vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - spam from new users (https://vborg.vbsupport.ru/showthread.php?t=194745)

kermit2 10-27-2008 10:00 PM

spam from new users
 
Not so much a plugin, more a little code modification. It moderates any first posts which contains 'www' or 'http' and posts the post to a thread of your choice (presumably in a private forum) - the idea being that you can re-approve any false positives. Simple I know, but it has cut out the majority of my spam.

The change goes in includes/functions_newpost.php , around line 353 (depending on your VB version)


Code:

if ($vbulletin->userinfo['posts'] == 0) {

        if ((strpos($post['message'], "http") > 0) || (strpos($post['message'], "www.") > 0) || (strpos($post['message'], "www ") > 0) ) {

                $dataman->set('visible', 0);
                $post['visible'] = 0;

                $pete_post = "The following post by . "\"]" .
                        $vbulletin->userinfo['username'] . "
has been auto-unapproved:
                       

       
Quote:

       
       
               
       
       

                       

                       
                                " . $post['message'] . "
                       
                       

               

\n";

                $vbulletin->db->query_write("INSERT INTO post (threadid, parentid, username,userid, pagetext, dateline, visible) VALUES
                        (162262, 0, 'bot', 183720, \"" . mysql_escape_string($pete_post) . "\", " . time() . ", 1)");

                $vbulletin->db->query_write("UPDATE thread SET replycount=replycount + 1 WHERE threadid='162262'");

        }
}

just after:

Code:

        else
        {
                $dataman->set('visible', 1);
                $post['visible'] = 1;
        }

and just before:

Code:

        if ($type != 'thread')
        {
                if ($postinfo['postid'] == 0)
                {

More info at http://linuxbox.co.uk/vbulletin_spam_hack.php

FReeSTER 10-27-2008 10:39 PM

I will look into this, seen to be a nice add.

kermit2 10-27-2008 10:50 PM

Of course I should also have said that you need to change the MySQL query to reflect the threadid and username/userID of the user/thread in which you'd like the notification post to appear.

nfn 10-28-2008 04:06 PM

There's already some mods that do this:
https://vborg.vbsupport.ru/showthread.php?t=173490

Q-v-n-s-Q 11-22-2008 04:27 AM

check it out latter


All times are GMT. The time now is 02:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00985 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete