MyBB Community Forums

Full Version: Share all the MYBB Codes you know
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
These are some codes provided by Envira on Myskins.org


{$welcomeblock} - Include welcomeblock (user/guest view of the member bit)
 {$mybbversion} - Displays softwares version
 {$modcplink} - Displays link to Mod CP
 {$admincplink} - Displays link to Admin CP (exclude for clients safety - reinstate it if requested)
 
 {$mybb->settings['bbname']} - Displays boards name
 {$mybb->settings['bburl']} - Displays URL to the board (use always when you have to link to something)
 {$mybb->settings['homename']} - Displays homepage name (the one in the footer's menu)
 {$mybb->settings['homeurl']} - Displays URL to the homepage site (the one in the footer's menu)
 
 {$mybb->user['username']} - Displays users username

now i need some more
 just post all the mybb codes you can think of

it doesnt have to have the mybb prefix

Please dont assume i already know so just post any code you can think of

Let me start the thread with some of mine

{$thread['subject']} for the thread subject (good for social share)

this i the ones i need for now


forums description
and thread starter

found some more by envira

{$theme['imgdir']} - Displays themes image dirrectory
{$theme['imglangdir']} - Displays language specific theme image dirrectory
{$theme['tid']} - Displays the themes ID number
{$theme['logo']} - Displays themes logo
{$theme['borderwidth']} - Displays themes borderwidth number
{$theme['tablespace']} - Displays themes tablespace number

{$forum['name']} - Displays forums title
{$forum['description']} - Displays forums description
{$forum['url']} - Displays forums URL
{$forum['fid']} - Displays forums ID number

still need thread starter post
you can get the variables by running a simple script found here: http://community.mybb.com/thread-109408.html
^ Like mmad said above, run this

<?php 
define("IN_MYBB", 1);
include "global.php";
echo '<pre>';
print_r($mybb);
echo '</pre>';

?>
(09-04-2015, 11:23 AM)Sazze Wrote: [ -> ]^ Like mmad said above, run this

<?php 
define("IN_MYBB", 1);
include "global.php";
echo '<pre>';
print_r($mybb);
echo '</pre>';

?>

Ah, so that's how you format it: <pre>. Thanks for that. Smile