2014-02-04, 12:38 AM
2014-02-04, 02:38 AM
Something like this?
http://community.mybb.com/thread-109408-...#pid796432
http://community.mybb.com/thread-109408-...#pid796432
2014-02-04, 11:54 PM
Close, but i think my question is...
where is $mybb, $db, $user found - i.e if i am new, how do i know they exist?
Where does usercp_do_changename_end come from? - another example of my questions
Is $templatelist a mybb defined variable or one that is user created?
(All taken form plugins i have seen)
where is $mybb, $db, $user found - i.e if i am new, how do i know they exist?
Where does usercp_do_changename_end come from? - another example of my questions
Is $templatelist a mybb defined variable or one that is user created?
(All taken form plugins i have seen)
2014-02-05, 12:40 AM
Variables and plugin hook placement can be found in PHP files, of course. A list of hooks can also be seen here: http://docs.mybb.com/MyBB_Plugin_Hooks.html List of functions: http://sourcedocs.mybboard.nl/nav.html?_...index.html There is no list of variables because there are thousands of them and they may repeat (for example $user is used in many different while loops).
$templatelist is defined in global.php.
$mybb - inc/init.php
$db - also inc/init.php
$templatelist is defined in global.php.
$mybb - inc/init.php
$db - also inc/init.php
2014-02-05, 01:03 AM
Appreciate the response.
Just trying to get my head round what is available to me (to use in a plugin), what needs to be created, and what needs to be included. Either im being daft, or it feels like you guys are born understanding
Maybe this will help, looking at this for example: usercp_do_changename_end
Where is that from, and what difference does it make if it is start or end suffixed?
Just trying to get my head round what is available to me (to use in a plugin), what needs to be created, and what needs to be included. Either im being daft, or it feels like you guys are born understanding

Maybe this will help, looking at this for example: usercp_do_changename_end
Where is that from, and what difference does it make if it is start or end suffixed?
2014-02-05, 04:57 AM
OP: I had the same questions when I first came around here. Check out the answers that got me on track: http://community.mybb.com/thread-109408.html
2014-02-05, 08:33 AM
(2014-02-05, 01:03 AM)Andre R. Wrote: [ -> ]Maybe this will help, looking at this for example: usercp_do_changename_end
Where is that from, and what difference does it make if it is start or end suffixed?
The best idea is to search through the source code.
[nmalcolm@freedom ~]$ cd /var/www/mybb
[nmalcolm@freedom mybb]$ grep -r -n 'usercp_do_changename_end' .
./usercp.php:1154: $plugins->run_hooks("usercp_do_changename_end");
File usercp.php
Line 1154
Alternatively you can use Github to search:
https://github.com/mybb/mybb/search?q=us...gename_end
2014-02-09, 10:12 PM
Thanks for the assistance - starting to make a little more sense which is great on my part.
Out of interest, the function pluginName_info() function - which table in the db does that get stored in?
Out of interest, the function pluginName_info() function - which table in the db does that get stored in?
2014-02-09, 10:14 PM
why would it be stored in any table? it calls pluginname_info() any time the info is needed.
use debug messages. If you have a hook and want to know what's available in globals, just print $GLOBALS
note this will contain sensitive information, so you should do this on a dev board, or make sure it's only displayed to you and not others.
use debug messages. If you have a hook and want to know what's available in globals, just print $GLOBALS
note this will contain sensitive information, so you should do this on a dev board, or make sure it's only displayed to you and not others.