2015-03-03, 11:19 PM
(2015-03-03, 10:53 PM)Crazycat Wrote: Good thread idea, I suggest to add it in the official doc
Its not neccessary, I do have a plugin that displays some of this info for me on activation though:
<?php
if (!defined("IN_MYBB")) {
die( "Access inside MyBB" );
}
$plugins->add_hook( "admin_config_plugin_begin", "show_globals_header_info" );
function show_globals_info() {
return array(
'name' => 'Show Global Information',
'description' => 'Lists some global variable information.',
'version' => '1.0',
'compatibility' => '16*, 18*'
);
}
function show_globals_activate() {
}
function show_globals_deactivate() {
}
function show_globals_header_info() {
/* This info is shown at the top of the plugin
* page in the admincp.
* You can adjust this function for your needs,
* but try not displaying too much as it is
* a pain to scroll through.
*/
global $mybb;
echo '<span style="white-space: pre;">';
echo '$mybb->user: ';
print_r( $mybb->user );
echo '$mybb->usergroup: ';
print_r( $mybb->usergroup );
echo '$mybb->settings: ';
print_r( $mybb->settings );
echo '</span>';
}
?>
Do NOT pm me for support on ANY of my plugins
DO pm me if you got suggestions for existing ones (although posting in the proper thread is preferred), or suggestions/ideas for new plugins (keep in mind I'm an amateur but not necessarily a beginner.)
DO pm me if you got suggestions for existing ones (although posting in the proper thread is preferred), or suggestions/ideas for new plugins (keep in mind I'm an amateur but not necessarily a beginner.)