MyBB Community Forums

Full Version: Global Template Elements
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is for functionality akin to the Global Templates plugin by Firestryke31.

I had to modify it to store the global templates in memcached, as the current (hacky) implementation through $global was destroying the database with an expensive template query for EVERY SINGLE GLOBAL TEMPLATE no matter what page is requested.

The basic idea is this:

You have a bunch of skins. They all or many of them share common elements such as a universal navigation. But this means if you want to change one of these common elements, you must change every single template one at a time. Granted my site is an outlier in terms of number of forums and themes ... but after you get more than a dozen themes that gets old *really* fast. The solution is to have variables which may be called anywhere in a template which simply dump the contents of their variable into the template. You literally just fill the variables with your desired HTML/CSS code. You can sandwich MyBB calls (as I do) between variables to actually push MyBB content into your global navigation in a way that is easy to manage.


If the devs would like to see in AdminCP for how I do this on CSNbbs ... or get a copy of the modifications I have made to that plugin to dump stuff to memcache so you don't pwn the database ... PM me. I'd be happy to create a credentialed account and email code.



This is probably **THE** most important thing I'd like to see in 1.8.