MyBB Community Forums

Full Version: Don't use plugins for PHP!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I discovered a way to do it without plugins and I have 64ms page load times.  Which is a lot faster than MyBB itself.

Just use this kind of as a template...

define('IN_MYBB', 1);
require_once ("global.php");
include 'cache/themes/themeX/global.php';

echo $header;
echo $headerinclude;
// Add your lulz here
echo $footer;


It took me a while to figure out where my theme was being cached.  Mine doesn't update automatically so any code I add to global.css on the MyBB editor I also paste into my cache.

Don't use dangerous plugins.  Just do things the way you are used to doing them.
'include 'cache/themes/themeX/global.php';'?

I don't recommend doing it like this.
(2016-09-14, 09:40 AM)alfred702 Wrote: [ -> ]Don't use dangerous plugins.  Just do things the way you are used to doing them.

Don't go see a doctor even though you might have appendicitis, which may cause your appendix to rupture and you to turn septic and die.

Seriously, that's what you sound like. Just because you *can* do something doesn't mean you should.
Also assumes that all plugins are "dangerous", and that code you write yourself is any better, neither of which are either true or guaranteed.

This method of creating pages, or something similar, has been used for years though.
Okay? I have 15ms with my own Alerts plugin.

Get a better host man lol.
Because you can do something doesn't necessarily mean you should do it...
only time i see using this is if your plugin is for your own forum and do not care about safety.
I feel all the plugins and design of mybb along with my great host has my site blazing fast and steady and the thing I appreciate the most are the safety factores.
Security aside, That include would be pointless, global.php isn't cached or there, global.css is.
(2016-09-15, 03:26 PM)Paradigm Wrote: [ -> ]Because you can do something doesn't necessarily mean you should do it...

Anyone can say that,

why shouldn't I?
Pages: 1 2