Products: 1
Plugins: 2
Queries: 1 (if the user is in banned group)
THIS IS A BETA... DON'T INSTALL IT...
Really, I mean it. Okay, so it worked on my test forum, but do you really want to be a guinea pig?
Actually, its using the "forumhome_complete" hook to initiate the banning process... I think there's probably a better hook, but I'm not sure where yet.
Sounds cool, does it destroy robots?
Um, no. If a user is banned, it will set a cookie and if they re-register or log onto an alias, they will be auto-banned.
IMPORTANT SIDE NOTE:
If you test this out on your forum, delete the cookie before you log back into your admin account or you will get banned!!
(Next version, I'll add a check so admins are exempt)
Installation:
Step 1: Import product-token_of_death.xml
Step 2: edit the 'Token Of Death: Bake a Cookie!' and change the 8 to your preferred banned usergroup ID. 8 I think is the default. admincp -> plugin manager -> Token Of Death: Bake a Cookie! (edit)
PHP Code:
if (is_member_of($vbulletin->userinfo, 8))
Step 2: edit the 'Token of Death: Stealth Ban!' plugin and change $TODgroup to the usergroup you want to add the user to. admincp -> plugin manager -> Token of Death: Stealth Ban! (edit)
PHP Code:
// This is the usergroup you want to change the user to (banned).
$TODgroup = 10;
Step 3: Take over World!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
well remove or disable the hack for now as per the instruction. You'll need to unban your users. I'll take a look for you when I get home if you send PM me an admin username and login that has access to plugins and products.
I havent tried this out but try saving this code as token-of-life.php and uploading it into your forums folder. This should delete the cookie and change the usergroup from 10 (banned?) to 2 (registered).
PHP Code:
<?php
/* ############### TOKEN OF LIFE ############### */
// SET SOME VARIABLES:
$newusergroup = 2; // this should be your registered usergroup, the unbanned group you want to move them to. $TODgroup = 10; // change to whatever your Token of Death usergroup is or was.
// ######################## SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS ####################### // change the line below to the actual filename without ".php" extention. // the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation.
define('THIS_SCRIPT', 'test');
// #################### PRE-CACHE TEMPLATES AND DATA ###################### // get special phrase groups $phrasegroups = array();
// get special data templates from the datastore $specialtemplates = array();
// pre-cache templates used by all actions $globaltemplates = array( // change the lines below to the list of actual templates used in the script 'test_mytesttemplate1', 'test_mytesttemplate22', );
// pre-cache templates used by specific actions $actiontemplates = array();
// ######################################################################## // ######################### START MAIN SCRIPT ################################# // ########################################################################
$navbits = array(); // change the line below to contain whatever you want to show in the navbar (title of your custom page) $navbits[$parent] = 'Token of Life';
// #################### LETS EAT THE COOKIE AND UNBAN PEOPLE ########################
// We'll change the cookie so it expires at the end of the browser session. if (is_member_of($vbulletin->userinfo, $TODgroup)) { vbsetcookie("TOD",0,0); }
// Lets change the users group
if (is_member_of($vbulletin->userinfo, $TODgroup)) { $db->query_write(" UPDATE user SET usergroupid = $newusergroup WHERE userid = " . $vbulletin->userinfo['userid'] . " "); }
// change the line below to contain the name of the actual main output template used in your script //eval('print_output("' . fetch_template('Token_of_Life') . '");');
// No Content Header for Now header("HTTP/1.0 204 No Content");