MyBB Community Forums

Full Version: myBB "variables"?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
on some other forum softwares you can use something like {userid}, and add it to your template to show your user id. Is that possible on myBB too?
yes, {$mybb->user['uid']} shows user ID on almost all templates of MyBB
I'm using the page manager, and at the top of the page it says: 'Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/u43**59200/public_html/forum/inc/plugins/pagemanager.php(794) : eval()'d code on line 9' I've no clue what that means, except that i know it's a variable error.
^ you have to include global.php file for using MyBB variables on other pages ...
I tried to use <?php include("global.php"); ?> but that solved nothing, am i doing it wrong?
<?php include("pathtomybb/global.php"); ?>
I'm still getting the same error...
Wait, global isn't in the inc folder. Oops.

Did you try to require it instead?

<?php require("global.php"); ?>
No diffrence... Really strange.
$GLOBALS['mybb']->user['uid'] should work .. no need of including global.php
Pages: 1 2