MyBB Community Forums

Full Version: Global Methods
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone know all the available methods to use in mybb (ie predefined) or that are stored in the common global variable (besides $db considering we have a doc for it)?
You look up for them during your development planning. There are so many that listing them all would be insane.
Well i think is unnecesary, why, because you can use var_dump to see all globalized vars, and you can see doc for the database as you know, but set an entire ammount of data can be insane, maybe the most common used or the global data can be usefull for modders may be usefull, but i dunno, i everytime see some things after use it Big Grin
I didn't mean propertes, I meant functions and methods. Right now, we have the $db object methods, rebuild_settings, and $lang->load and thats about it (plus the die() and error() functions). I am quite certain we have more……… like how do you rebuild threputation cache etc.

(2015-02-15, 03:53 AM)Dark Neo Wrote: [ -> ]Well i think is unnecesary, why, because you can use var_dump to see all globalized vars, and you can see doc for the database as you know, but set an entire ammount of data can be insane, maybe the most common used or the global data can be usefull for modders may be usefull, but i dunno, i everytime see some things after use it Big Grin

And there you go, var_dump only gives properties not methods, so yourpoint is?
Just go look through inc/functions.php. That's most of them right there.
$mybb->get_input($name, type); Type is one of the following:
MyBB::INPUT_INT, MyBB::INPUT_ARRAY,MyBB::INPUT_STING (default) MyBB:INPUT_BOOL, MyBB::INPUT_FLOAT

$mybb->get_asset_url($path, $use_cdn=true);
$mybb->trigger_generic_error($code);

Common globals: $db, $mybb, $theme, $config, $settings, $session, $lang, $plugins
Try: http://crossreference.mybboard.de/nav.html?index.html

For example, to find methods of the MyBB class (inc/class_core.php, $mybb), look here: http://crossreference.mybboard.de/nav.html?index.html
Useful link, but how do I rebuild the reputation cache? I couldn't find it.
(2015-02-16, 01:27 AM)Ircher Wrote: [ -> ]Useful link, but how do I rebuild the reputation cache? I couldn't find it.

There is no reputation cache.
(2015-02-16, 01:47 AM)Destroy666 Wrote: [ -> ]
(2015-02-16, 01:27 AM)Ircher Wrote: [ -> ]Useful link, but how do I rebuild the reputation cache? I couldn't find it.

There is no reputation cache.

Sorry, I meant recount reputation.