Theme Variables (MyBB)
#1
Hi,
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

SETTINGS , Global
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

Goodbye.
Reply
#2
Good work mate, it is going to be helpful for a lot of people Smile
Reply
#3
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
Reply
#4
Bless this post. I don't understand why this isn't included in the standard documentation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)