MyBB Community Forums

Full Version: 'Global' Templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2009-03-10, 11:05 AM)Tomm M Wrote: [ -> ]
(2009-03-09, 04:21 PM)Bey Brad Wrote: [ -> ]Universal Template?

(2009-03-09, 04:24 PM)Ryan Gordon Wrote: [ -> ]Custom Universal Templates?

Doesn't "universal" practically mean the same thing as global? Kind of defeats the object of renaming it... Shy

Well, yes and no. Global would be board-wide. Universal would be site-wide regardless of theme. I think Universal makes a lot of sense in this context.
Even if they do mean exactly the same thing, that isn't necessarily the problem, it's just the double name. I don't think having another name that means the same is a problem as long as it is just different.
What I found out by messing around a bit with MyBB while custom-coding a website that integrated tightly with MyBB, this Global Template Set, which usually has plugin templates in it, is a "failsafe" in case the theme doesn't have a template inside it's template set.

For example:

Let's say we have 3 template sets:
  • Global
  • MyBB Default
  • Some other name

And then we have 3 different themes:
  • MyBB Default
  • MyBB Optimized
  • MyBB Other

So let's say the MyBB Default theme as well as the MyBB Optimized themes use the MyBB Default template set, whereas the MyBB Other theme uses the Some other name template set.

Now what I found out is if a plugin calls for a template, say "plugin_index", and "plugin_index" is defined in both the Global template set and the Some other name template set. When the plugin calls for this template, it looks first in the theme's template set, if it finds the template, it uses it from there, otherwise it looks under the Global Template set to see if it's defined there.

I have been abusing this somewhat when redesigning my site with a new highly-customized design, while still using only one MyBB installation, so I can test it with any plugins or additional sections I have too. It's actually rather convenient. Smile </codejunkie>
Why not just Board-Wide templates? I like Universal Templates too.

Hmm..maybe another suggestion: When you hover over a template name, it will give you a tool tip with a brief description of what the template does.
what's wrong with tikitikitemplates
(2009-03-11, 08:30 PM)Bey Brad Wrote: [ -> ]what's wrong with tikitikitemplates
Not everyone has been here as long as us, Brad - they most-likely know Ryan as Ryan Gordon, not tikitikiToungue
but it sounds so cute Sad
Pages: 1 2