Please make sure IN_MYBB is defined."); } $plugin->add_hook("core_init_start", "die_bitch"); //run test_function at the hook called "index_page_main_start" function plugin_2_information() { return array( "name" =>"blockME", "about" =>"Blocks access to all non-admin pages for all users.", "created_by" =>"StormyRain", "uid" =>"11111", "version" =>"1.0", "fieme_rev" =>"0.8.*" ); } function plugin_2_activate() { echo "ACTIVATED, BOOYAH"; } function plugin_2_deactivate() { echo "DEACTIVATED, BOOYAH"; } function die_bitch() { if (!preg_match('/\/admin/i', $_SERVER['REQUEST_URI'])) //if 'admin' is not part of the URL... { die("BAA BAAA BA ROMAAANCE. Yeah, I'm a naughty plugin, 'cause you can't do shit now, huh? So, now, go beg the admin to open up ;D! :(."); } }