View Single Post
  #11 (permalink)  
Old 03-19-2008, 08:43 AM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
If you want to delete also the votes of the spammer, use this code (inspired by rossooline, http://forums.pligg.com/general-help...ml#post52705):

Step 1: admin_users.php
Find the function called "yeskillspam" (around line 313) and follow it down to where it ends (around line 343) and insert the following code:
PHP Code:
//////////////////////////////////// NEW KILL SPAM //////////////////////////////////////////
        
if ($_GET["mode"] == "yeskillspam2"){ // killspam step 2
            
$user$db->get_row('SELECT * FROM ' table_users .' where user_login="'.$_GET["user"].'"');
            
            
canIChangeUser($user->user_level);
            
            if (
$user) {
                
                
$db->query('DELETE FROM `' table_users '` WHERE `user_id` = "'.$_GET["id"].'"');
                
$db->query('DELETE FROM `' table_links '` WHERE `link_author` = "'.$_GET["id"].'"');
                
$db->query('DELETE FROM `' table_comments '` WHERE `comment_user_id` = "'.$_GET["id"].'"');

//Delete the votes
$db->query('DELETE FROM `' table_votes '` WHERE `vote_user_id` = "'.$_GET["id"].'"');

                
                
// breadcrumbs and page title
                
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
                
$navwhere['link1'] = getmyurl('admin''');
                
$navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel_1');
                
$navwhere['link2'] = my_pligg_base "/admin_users.php";
                
$navwhere['text3'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_User_Disable_2');
                
$main_smarty->assign('navbar_where'$navwhere);
                
$main_smarty->assign('posttitle'" / " $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
                
                
// pagename
                
define('pagename''admin_users'); 
                
$main_smarty->assign('pagename'pagename);

                
header("Location: ".my_pligg_base."/admin_users.php");
                
                
            }
            else{
showmyerror('userdoesntexist');}
            
        }
/////////////////////////////////// END New KILL SPAM //////////////////////////////////// 
Reply With Quote