MyBB Community Forums

Full Version: Can someone better explain the $theme variable?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the Authoring Templates and Themes wiki page, it says the following about the $theme variable:

Quote:(This variable is used inside HTML (such as table, tr, and td tags) to define theme specific attributes related to the current users theme of choice)

Can someone please put this into similar terms? Sorry to not understand. Sad
Variables are "anchors" that call something else and itserts that information into the forum.

Some call specific templates to add, some call information from the database.

In other words, instead of writing this post 10 times, the text here would be anchored with a variable such as "$post2", and everywhere I place $post2 in the template; it will call this text and insert it.

All variables must be qualified within the core files or database for them to work. For example you can't just place $post2 anywhere and expect it to work without first adding a qualifying string to the core file.

Hope this helps to explain it a little further. Wink
Lopalong Wrote:Variables are "anchors" that call something else and itserts that information into the forum.

Some call specific templates to add, some call information from the database.

In other words, instead of writing this post 10 times, the text here would be anchored with a variable such as "$post2", and everywhere I place $post2 in the template; it will call this text and insert it.

All variables must be qualified within the core files or database for them to work. For example you can't just place $post2 anywhere and expect it to work without first adding a qualifying string to the core file.

Hope this helps to explain it a little further. Wink

Thanks, that helps. Smile