MyBB Community Forums

Full Version: Theme Variables (MyBB)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB Theme Variables;

POST , for Postbit
Template: postbit

{$post['pid']} //Comment ID
{$post['tid']} //Thread ID (Comment)
{$post['replyto']} //Quoted Comment ID
{$post['fid']} //Forum ID (Comment)
{$post['subject']} //Comment Subject
{$post['icon']} //Comment Icon ID
{$post['uid']} //User ID (Comment)
{$post['username']} //Posted by Username (Comment)
{$post['message']} //Comment Content
{$post['edituid']} //Editor ID
{$post['editreason']} //Edit Reason

THREAD , for Thread
Template: showthread

{$thread['tid']} //Thread ID
{$thread['fid']} //Forum ID (Thread)
{$thread['subject']} //Thread Subject
{$thread['prefix']} //Prefix ID
{$thread['icon']} //Thread Icon ID
{$thread['uid']} //User ID (Thread)
{$thread['username']} // Username (Thread)
{$thread['firstpost']} //First Comment ID
{$thread['lastposter']} //Lastposter Username
{$thread['lastposteruid']} //Lastposter ID
{$thread['views']} //Total Views
{$thread['replies']} //Total Comments
{$thread['numratings']} //Rate Points
{$thread['totalratings']} //Total Rates
{$thread['attachmentcount']} //Total Attachments

FORUM , for Forums
Template: forumbit_depth1_cat

{$forum['fid']} //Forum ID
{$forum['name']} //Forum Name
{$forum['description']} //Forum Description
{$forum['linkto']} //Redirect Address
{$forum['threads']} //Total Threads
{$forum['posts']} //Total Comments
{$forum['lastposter']} //Lastposter Username
{$forum['lastposteruid']} //Lastposter ID
{$forum['lastposttid']} //Thread ID of Lastpost

Template: All Templates

{$mybb->settings['boardclosed_reason']} //Maintenance Reason
{$mybb->settings['bbname']} //Website Name
{$mybb->settings['bburl']} //Website Link
{$mybb->settings['homename']} //Homepage Name
{$mybb->settings['homeurl']} //Homepage Link
{$mybb->settings['adminemail']} //Admin E-Mail
{$mybb->settings['returnemail']} //Return E-Mail
{$mybb->settings['contactemail']} //Contact E-Mail
{$mybb->settings['contactlink']} //Contact Link
{$mybb->settings['faxno']} //Fax No
{$mybb->settings['bblanguage']} //Forum Language
{$mybb->settings['useravatar']} //Default User Avatar
{$mybb->settings['avatarsize']} //Avatar Size

Good work mate, it is going to be helpful for a lot of people Smile
Not the hero we need, the hero we deserve. Well done, good sir.
This deserves a nice lil sticky.

Also, one that I needed recently:

{$theme['logo']} //logo image url for active theme
Bless this post. I don't understand why this isn't included in the standard documentation.