MyBB Community Forums

Full Version: Where do you know the special functions and words of Mybb??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi ,

I tried to learn PHP and I think I am doing good . Now I want to try to make like plugins or themes for Mybb . But I found there is some special functions in MyBB which make it easier to make a plugin DodgyDodgy. So I wanted to know how to know these functions . Also where do you know the stuff like :
{$mybb->settings['bburl']} means the URL of the board
and If you want to put the name of the forum you put instead {$mybb->settings['bbname']}
so , where do you know these things , do I have to read the files of the Mybb forums or only one file will show all ??

Thanks
For the settings, it uses the name of the setting which you can find in the settings table in the database.

Also see this for database stuff: [Wiki: Database_Methods] (Broken link, head over to docs.mybb.com instead)
Thanks . I'll try that .
What About the hooks stuff ???
OK . Thanks for the info .
Don't be afraid to ask again Smile
lol , you read my mind !!!
now I know the settings like {$mybb->settings['bbname']} , but there are some other variables like , {$user['uid']} , {$user['username']} . Is there a place that you can know all these things , or you just get them by practice . I learnt some of them but it would be easier to have a guide for them .
Thanks so much for your efforts .
{$mybb->user['X']} - replace the X with the name of the field from the users table and it will show the information for the currently logged in user. For example, for you on this forum, {$mybb->user['uid'] would be 5616, {$mybb->user['username']} would be alwahsh, {$mybb->user['postnum']} would be 24... etc etc.

{$mybb->usergroup['X']} - exactly the same, replace the X, but it uses the usergroup table to get information on the usergroup a user is in.
yeah , got it now . user for users , posts for posts and usergroups for usergroups . Easy . Thank you .
Hey, This is good for me Smile

I want to make my own plugins and learn more about MyBB (I love it).

First, I have to continue learning PHP wich is a good language (and easy too).

Thanks!!!!!
Pages: 1 2