GenSec
11-11-2004, 10:00 PM
To whom it may concerns...
This hack was written for internal needs and made my admin's life much more comfortable ;)
---------------------------------------------------
This hack helps to maintane your vBulletin database in condition.
It concerns first of all those cases when there is inconsistency between your current users list
and dead users information in any of the database tables ( used by addons and hacks for example).
What does it do? It helps to clean db tables from records which contain old entries with userid's deleted
from the main vBulletin user table.
You can make this script to do this boring task in secs from your ACP.
Of course you should be familiar with your db structure. Otherwise don't waste your time for this hack.
You can add/delete/change your settings, turn on and off. I used it on my live board and it's safe BUT:
\*================================================ ======================*/
Backup your board database and accept responsibility if your board stops working.
This done you can rest assured that if you follow the instructions to the letter the board will be
in the same condition it was before, only with this added functionality.
\*================================================ ======================*/
File to edit: 1
File to add: 1
Add newSQL table: 1
Very easy to install... Just 2"
---------------------------------------------------
1. Run sql to create new work db table and populate it with some examples
( I just include tables to clean from some popular hacks )
CREATE TABLE `user_cleaner` (
`cl_id` int(10) unsigned NOT NULL auto_increment,
`cl_userid` varchar(20) NOT NULL default '',
`cl_table` varchar(200) NOT NULL default '',
`cl_valid` tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (`cl_id`)
) TYPE=MyISAM AUTO_INCREMENT=28 ;
#
#
INSERT INTO `user_cleaner` VALUES (1, 'userid', 'attachment', 0),
(2, 'userid', 'gamesessions', 0),
(3, 'XOWNER', 'petz_adopt', 0),
(4, 'UID', 'petz_bank', 0),
(5, 'OWNER', 'petz_petz', 0),
(6, 'userid', 'reputation', 0),
(7, 'whoadded', 'reputation', 0),
(8, 'userid', 'rpg_battle_stats', 0),
(9, 'userid', 'rpg_items_user', 0),
(10, 'userid', 'subscribethread', 0),
(11, 'userid', 'userfield', 0);
2. Upload cleanuser.php file to admincp folder
3. ...And optionally add link in you ACP
Find in admincp/index.php
construct_nav_option($vbphrase['repair_optimize_tables'], 'repair.php?do=list', '<br />');
Add below
construct_nav_option('User Cleaner', 'cleanuser.php', '<br />');
------------------
Thats all!
Run 'User Cleaner' from your ACP when you feel it is necessary ;)
This hack was written for internal needs and made my admin's life much more comfortable ;)
---------------------------------------------------
This hack helps to maintane your vBulletin database in condition.
It concerns first of all those cases when there is inconsistency between your current users list
and dead users information in any of the database tables ( used by addons and hacks for example).
What does it do? It helps to clean db tables from records which contain old entries with userid's deleted
from the main vBulletin user table.
You can make this script to do this boring task in secs from your ACP.
Of course you should be familiar with your db structure. Otherwise don't waste your time for this hack.
You can add/delete/change your settings, turn on and off. I used it on my live board and it's safe BUT:
\*================================================ ======================*/
Backup your board database and accept responsibility if your board stops working.
This done you can rest assured that if you follow the instructions to the letter the board will be
in the same condition it was before, only with this added functionality.
\*================================================ ======================*/
File to edit: 1
File to add: 1
Add newSQL table: 1
Very easy to install... Just 2"
---------------------------------------------------
1. Run sql to create new work db table and populate it with some examples
( I just include tables to clean from some popular hacks )
CREATE TABLE `user_cleaner` (
`cl_id` int(10) unsigned NOT NULL auto_increment,
`cl_userid` varchar(20) NOT NULL default '',
`cl_table` varchar(200) NOT NULL default '',
`cl_valid` tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (`cl_id`)
) TYPE=MyISAM AUTO_INCREMENT=28 ;
#
#
INSERT INTO `user_cleaner` VALUES (1, 'userid', 'attachment', 0),
(2, 'userid', 'gamesessions', 0),
(3, 'XOWNER', 'petz_adopt', 0),
(4, 'UID', 'petz_bank', 0),
(5, 'OWNER', 'petz_petz', 0),
(6, 'userid', 'reputation', 0),
(7, 'whoadded', 'reputation', 0),
(8, 'userid', 'rpg_battle_stats', 0),
(9, 'userid', 'rpg_items_user', 0),
(10, 'userid', 'subscribethread', 0),
(11, 'userid', 'userfield', 0);
2. Upload cleanuser.php file to admincp folder
3. ...And optionally add link in you ACP
Find in admincp/index.php
construct_nav_option($vbphrase['repair_optimize_tables'], 'repair.php?do=list', '<br />');
Add below
construct_nav_option('User Cleaner', 'cleanuser.php', '<br />');
------------------
Thats all!
Run 'User Cleaner' from your ACP when you feel it is necessary ;)