Results 1 to 7 of 7

Thread: Spam Trigger - like plugin used by Pligg

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Lightbulb Spam Trigger - like plugin used by Pligg

    Is it possible that someone creates Spam Trigger plugin for hotaru like plugin used by Pligg:

    Spam Trigger - Anti-Spam and Profanity Filter
    http://forums.pligg.com/free-modules...ty-filter.html

    - which works in way that you have text file in which you enter list of spammy words, and when someone submits bookmark that contain any of words meantioned in that text file - that bookmarks either gets deleted or get some status and goes first to reviewing - so it doesn't show on home page instantly...

  2. #2
    Senior Member
    Join Date
    Jun 2011
    Location
    Thailand
    Posts
    294
    Thanks
    0
    Thanked 69 Times in 63 Posts

    Default

    Not a plugin, but this hack will do the job. Find the following lines around 659 in SubmitFunctions.php

    PHP Code:
            if (isset($submitted_data['submit_status'])) {
                
    $h->post->status $submitted_data['submit_status'];
            } else {
                
    $h->post->status 'processing';
            } 

    Add The following snippet just after those codes:
    PHP Code:
    $banned_status 'processing'// Define what to do with banned posts
    if ( $h->post->status !=  $banned_status ) { // No need to check if post is already in the banned status
        
    $banned_words = array( "sex","porn" ); // Add as many as banned words here. Lowercase only!
        
    $words explode" "strip_tagsstrtolower$submitted_data['submit_title'] . " " $submitted_data['submit_content'] ) ) );
        if ( 
    is_array$words ) ) {
            
    $words array_uniquearray_filter$words ) );
            foreach ( 
    $words as $word ) {
                if ( 
    in_array$word$banned_words ) ) {
                    
    $h->post->status $banned_status// Set post status to e.g "processing".
                    
    break; // Already found a banned word, no need to continue
                
    }
            }
        }

    Last edited by PuckRobin; 02-26-2012 at 08:32 AM.

  3. Thanked by:


  4. #3
    Junior Member
    Join Date
    Feb 2012
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I decided to try this out - came across a "banned word" list in text, XML, and CSV formats at http://www.bannedwordlist.com/ - thought I'd pass it on.

  5. #4
    Junior Member
    Join Date
    Feb 2012
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Just tried this and it went ahead and let me submit a post full of expletives. Could there be some plugin interfering?

    Also, would it make sense to explicitly strip tags out of the text before doing the search? To prevent, e.g., <b>b</b>ad<i>w</i>ord from getting through.

  6. #5
    Senior Member
    Join Date
    Jun 2011
    Location
    Thailand
    Posts
    294
    Thanks
    0
    Thanked 69 Times in 63 Posts

    Default

    Submit Lite may affect it. I didn't look in detail.

    Stripping tags is a good idea. I updated the codes.

  7. #6
    Junior Member
    Join Date
    Oct 2011
    Location
    Mumbai, Maharashtra, India
    Posts
    18
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    I tried this but its not working. Would you plz tell the exact location of the SubmitFunctions.php file in the web folder?
    Visit to SEO Forums

  8. #7
    Senior Member
    Join Date
    Jun 2011
    Location
    Thailand
    Posts
    294
    Thanks
    0
    Thanked 69 Times in 63 Posts

    Default

    content/plugins/submit/libs/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What's with that spam?
    By anthonyr in forum Other
    Replies: 1
    Last Post: 09-23-2011, 06:51 PM
  2. Tos Anti spam & 404
    By scrt in forum How-To and Troubleshooting
    Replies: 1
    Last Post: 03-07-2011, 04:50 PM
  3. Replies: 0
    Last Post: 03-06-2011, 03:50 PM
  4. Following Plugin like Pligg and Twitter
    By bookwormxp in forum Plugin Suggestion Box
    Replies: 12
    Last Post: 03-20-2010, 01:23 AM
  5. Started on a Pligg Importer plugin
    By Nick in forum How-To and Troubleshooting
    Replies: 6
    Last Post: 09-15-2009, 08:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •