Go Back   Pligg Forum > Pligg Help > General Help
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2007, 08:37 AM
The Humanaught The Humanaught is offline
Casual Pligger
 
Join Date: Jun 2006
Posts: 86
Downloads: 8
Uploads: 0
Thanks: 8
Thanked 12 Times in 6 Posts
Wink [solved] Killspam? More like Bruisespam

Hi... sorry, don't mean for that headline to sound critical at all of Pligg, as I love it more than a cold beer on a hot day.... ok, that's not entirely true.

Anyway, I'm really wondering why the Spamkill feature is so nice to the spammers? Why are we still just changing their password and not removing them and their offending posts right from the database?

There was some issues of how this might hurt comments made by the offender - but in practice, how many spammers are leaving comments?

Also, the whole "discard" thing leaves me with a bad taste in my mouth - it inflates the database and leaves the linkylove intact (for anyone with a reasonably good PR rating - which is why you're being spammed in the first place).

Am I the only person who wants a stronger solution? Does anyone have any idea how to implement this? I'm comfortable with PHP, but a little unclear on the MySQL commands needed to mod the function.

Any help would be much appreciated.

Ryan
__________________
The Hao Hao Report: The Best Stories About China

Last edited by The Humanaught : 05-27-2007 at 12:17 AM. Reason: found a solution
Reply With Quote
Sponsored Links
Check out the New Templates at the Pligg Pro Shop.
  #2 (permalink)  
Old 05-24-2007, 05:41 AM
The Humanaught The Humanaught is offline
Casual Pligger
 
Join Date: Jun 2006
Posts: 86
Downloads: 8
Uploads: 0
Thanks: 8
Thanked 12 Times in 6 Posts
Nadda, eh?
__________________
The Hao Hao Report: The Best Stories About China
Reply With Quote
  #3 (permalink)  
Old 05-27-2007, 12:15 AM
The Humanaught The Humanaught is offline
Casual Pligger
 
Join Date: Jun 2006
Posts: 86
Downloads: 8
Uploads: 0
Thanks: 8
Thanked 12 Times in 6 Posts
Cool [solved] Tougher Killspam Method

Hi folks, finally had a chance to take a look at this today, and think I've come up with a stronger solution than the default Killspam function.

Basically, I hate clogging up my database with discarded stories that are spam. So, here is how to modify your Killspam function to really KILL the spam, not just sweep it under the rug.

I've been testing it on my site and it seems to work, but let me know if I'm missing something and am freckin' up things.

This method simply adds a second option to the Killspam This User page (accessed via the User Management page). It does not remove/replace the original function, so if you just want to bruise the spam, and not kill it - you'll still have that option.

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"].'"');
                
                
// 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 //////////////////////////////////// 
Step 2: /templates/yget/admin_templates/user_killspam_step1_center.tpl
Replace this:
HTML Code:
<fieldset><legend><img src="{$my_pligg_base}/templates/{$the_template}/images/user_killspam.png" align="absmiddle" /> {#PLIGG_Visual_Breadcrumb_User_Killspam#}</legend> <table style="border:none"> <tr><td>{#PLIGG_Visual_View_Killspam_Step1#}</td></tr> <tr><td><a href = "{$my_pligg_base}/admin_users.php?mode=yeskillspam&user={$user}&id={$id}">{#PLIGG_Visual_Ban_Link_Yes#}</a>&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;<a href="javascript:history.back()">{#PLIGG_Visual_Ban_Link_No#}</a></tr></td> </table> </fieldset>
With this:
HTML Code:
<fieldset><legend><img src="{$my_pligg_base}/templates/{$the_template}/images/user_killspam.png" align="absmiddle" /> {#PLIGG_Visual_Breadcrumb_User_Killspam#}</legend> <table style="border:none"> <tr><td>{#PLIGG_Visual_View_Killspam_Step1#}</td></tr> <tr><td>Bruise The Spam: <a href = "{$my_pligg_base}/admin_users.php?mode=yeskillspam&user={$user}&id={$id}">{#PLIGG_Visual_Ban_Link_Yes#}</a>&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;<a href="javascript:history.back()">{#PLIGG_Visual_Ban_Link_No#}</a></tr></td> <tr><td>Slaughter The Spam: <a href = "{$my_pligg_base}/admin_users.php?mode=yeskillspam2&user={$user}&id={$id}">{#PLIGG_Visual_Ban_Link_Yes#}</a>&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;<a href="javascript:history.back()">{#PLIGG_Visual_Ban_Link_No#}</a></tr></td> </table> </fieldset>
Now when you visit the Kill Spam page, you'll be presented with two options instead of one. The first option, "Bruise The Spam", is the original Pligg default Kill Spam, the second option, "Slaughter The Spam", is the tougher - scrub it from the database - method.

This removes the offending user, all their posts and all their comments from the MySQL database.

*** PLEASE PLEASE PLEASE BACKUP YOUR DATABASE AND THE RELATED FILES BEFORE USING THIS - IT WORKS FOR ME BUT I MAKE NO GUARANTEES ***
__________________
The Hao Hao Report: The Best Stories About China
Reply With Quote
The Following 4 Users Say Thank You to The Humanaught For This Useful Post:
  #4 (permalink)  
Old 08-04-2007, 09:24 PM
ryanshyper ryanshyper is offline
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
Downloads: 6
Uploads: 0
Thanks: 4
Thanked 1 Time in 1 Post
KillSpam

Humanaught....NICE WORK. Works great - haven't seen any issues yet. Will let you know if I do. Thank you for the contribution. Also - This should be added to the core build.
Reply With Quote
  #5 (permalink)  
Old 08-04-2007, 09:30 PM
The Humanaught The Humanaught is offline
Casual Pligger
 
Join Date: Jun 2006
Posts: 86
Downloads: 8
Uploads: 0
Thanks: 8
Thanked 12 Times in 6 Posts
I've been using it for more than two months now and have had no problems at all. I am really unclear what the thinking was in having the "discard" function as the default in the first place. I assumed it was because it would leave holes in the database or whatnot, but if a spammer is a spammer... I don't want anything of theirs in my database.

I left the original one in there in case I want a less harmful way to control posts, but I rarely - if ever - use it.

What I'd like to incorporate into this once I have a bit more time is a way to auto-add the URL to the anti-spam text file. Currently it's an extra step in the spam removal process.
__________________
The Hao Hao Report: The Best Stories About China
Reply With Quote
  #6 (permalink)  
Old 08-08-2007, 03:45 AM
ryanshyper ryanshyper is offline
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
Downloads: 6
Uploads: 0
Thanks: 4
Thanked 1 Time in 1 Post
Humanaught - after using this I had some problems viewing user profiles. I went though the database and deleted all references to these patient IDs and it resolved the problem. There were 3 or 4 tables - including pligg_messages, pligg_comments, and the largest was pligg_pageviews. A description can be found here: god/admin profile problem
Reply With Quote
  #7 (permalink)  
Old 08-09-2007, 02:10 AM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,074
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
What does standard Killspam exactly do in v9.5+ ? The only difference I realized was to change the password to something unknown and the email address to blank@blank.com. The user is still visible in the system.

Humanaught´s solution sounds good. I will give it a try as soon as ryanshyper´s problerms are solved with a fix.
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 01:52 PM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,074
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Is such a solution available on a story basis, i.e. for a single story as admin link or like comment management for all discarded stories?
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 02:05 PM
graphicsguru's Avatar
graphicsguru graphicsguru is offline
Pligg Donor
Pligg Version: 9.9
 
Join Date: Aug 2006
Location: USA
Posts: 411
Downloads: 20
Uploads: 0
Thanks: 62
Thanked 45 Times in 34 Posts
this may help Method for deleting discarded stories

Fight Spam and Splog
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 03:07 PM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,074
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Thank you for the link :-)
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg 9.0 Unable to Disable or SpamKill User oddnews Bug Report 3 12-26-2006 12:02 PM


LinkBacks Enabled by vBSEO 3.0.0