Back to vBulletin 3.0 Add-Ons

exclude usergroups from automatic user pruning
Mod Version: 1.00, by waza

This modification is in the archives.
vB Version: 3.0.7 Rating: (0 vote - 0 average) Installs: 2
Released: 27 Jun 2005 Last Update: 27 Jun 2005 Downloads: 4
Not Supported  

Hey,
this is my first (small) addon i made and probably it could be better, but it works...

What does this do?
This is actually an addon for the atomatic user pruning hack you can find here
with this hack you can exclude several usergroups from been pruned.

How to Install

Open your deleteinactive.php file

FIND
PHP Code:
// This only needs to be modified if you set above to false
$groupid=8
BELOW ADD
PHP Code:
//set this to false if you want to exclude some usergroups from pruning
$pruneall false;

// If you have set false above, you can set here the usergroups you do NOT wish to be modified, seperate each groupid with a space
$exclude "1 8 3"

FIND
PHP Code:
$prunedmembers $DB_site->query("
        SELECT * FROM `" 
TABLE_PREFIX "user`
        WHERE `posts` <= '
$maxposts'
        AND `lastactivity` <= '" 
. (TIMENOW - ($lastactivity 86400)) . "'
        AND `lastpost` <= '" 
. (TIMENOW - ($lastpost 86400)) . "' 
    "
); 
REPLACE WITH
PHP Code:
if($pruneall==true){
    
$prunedmembers $DB_site->query("
        SELECT * FROM `" 
TABLE_PREFIX "user`
        WHERE `posts` <= '
$maxposts'
        AND `lastactivity` <= '" 
. (TIMENOW - ($lastactivity 86400)) . "'
        AND `lastpost` <= '" 
. (TIMENOW - ($lastpost 86400)) . "' 
    "
);
}else{
$donotprune explode(" "$exclude);
    for(
$i=0$i<count($donotprune); $i++){
        
$endquery.="AND `usergroupid` != '".$donotprune[$i]."' ";
    }
    
$prunedmembers $DB_site->query("
        SELECT * FROM `" 
TABLE_PREFIX "user`
        WHERE `posts` <= '
$maxposts'
        AND `lastactivity` <= '" 
. (TIMENOW - ($lastactivity 86400)) . "'
        AND `lastpost` <= '" 
. (TIMENOW - ($lastpost 86400)) . "' $endquery 
    "
);


grz,
seba

Download

This modification is archived and cannot be downloaded.

Similar Mods

Add-On Releases Automatic Inactive Users Pruning - vB3.7 RC2 vBulletin 3.7 Add-ons
Automatic Inactive Users Pruning vBulletin 3.0 Full Releases
Automatic Zero-Reply Pruning vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024