$Mybb Variable List
#11
(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.)
Reply


Messages In This Thread
$Mybb Variable List - by Miah - 2014-03-22, 02:06 AM
RE: $Mybb Variable List - by Cedric - 2014-03-23, 03:33 PM
RE: $Mybb Variable List - by Nathan Malcolm - 2014-03-23, 05:46 PM
RE: $Mybb Variable List - by cafeína - 2014-03-29, 05:35 PM
RE: $Mybb Variable List - by UnfedZombie - 2015-02-22, 09:09 AM
RE: $Mybb Variable List - by Destroy666 - 2015-02-22, 11:54 PM
RE: $Mybb Variable List - by niere8 - 2015-03-03, 10:18 PM
RE: $Mybb Variable List - by Leefish - 2015-03-03, 10:29 PM
RE: $Mybb Variable List - by niere8 - 2015-03-03, 10:50 PM
RE: $Mybb Variable List - by Crazycat - 2015-03-03, 10:53 PM
RE: $Mybb Variable List - by Ircher - 2015-03-03, 11:19 PM
RE: $Mybb Variable List - by Crazycat - 2015-03-04, 03:40 PM
RE: $Mybb Variable List - by Blackbeard - 2016-03-01, 08:06 PM
RE: $Mybb Variable List - by Destroy666 - 2016-03-02, 11:39 PM
RE: $Mybb Variable List - by Blackbeard - 2016-03-03, 01:43 AM
RE: $Mybb Variable List - by Stormyy - 2017-02-16, 12:44 PM
RE: $Mybb Variable List - by Matt - 2017-02-16, 01:07 PM
RE: $Mybb Variable List - by Stormyy - 2017-02-16, 07:50 PM
RE: $Mybb Variable List - by ketamine - 2017-07-12, 08:21 AM
RE: $Mybb Variable List - by fizz - 2017-07-12, 08:27 AM
RE: $Mybb Variable List - by Xaphryl - 2018-03-22, 08:12 AM
RE: $Mybb Variable List - by Matt - 2018-03-22, 01:29 PM
RE: $Mybb Variable List - by Xaphryl - 2018-03-22, 08:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)