MyBB Community Forums
Theme Variables (MyBB) - Printable Version

+- MyBB Community Forums (
+-- Forum: Resources (
+--- Forum: Tutorials (
+--- Thread: Theme Variables (MyBB) (/thread-214420.html)

Theme Variables (MyBB) - Moody's - 2017-11-28

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


RE: Theme Variables (MyBB) - WallBB - 2017-11-29

Good work mate, it is going to be helpful for a lot of people Smile

RE: Theme Variables (MyBB) - bls1999 - 2017-11-29

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

RE: Theme Variables (MyBB) - kirikiri - 2020-08-01

Bless this post. I don't understand why this isn't included in the standard documentation.