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)
-   -   Moderators Functions - Spam Decimator (https://vborg.vbsupport.ru/showthread.php?t=183244)

RaidenDAWG2 06-21-2008 10:00 PM

Spam Decimator
 
This is an updated version of my previous extension, Spam Decimator 1.0.x. This is for vB versions 3.7.0 and up. It may work with 3.6.8PL2 and up, but I cannot confirm this.

Features Include:

-Ban a spammer with two clicks.

-Delete all threads by a user (soft or permanent, ACP configurable)

-Delete all posts by a user (again, soft or permanent, choice is yours)

-NEW! Delete any spam comments and log them as well.

-Permit or deny mod/super mod access through ACP

-Email the spammer saying pretty much haha, caught you sucker (default email can be configured using ACP)

-Email the webmaster informing him/her of the attack

-Option to move all soft deleted threads to a specified forum (for safe keeping in case IP addresses or whatnot are later needed for legal proceedings or whatever)

Most everything here works with vB native functions (i.e. delete_thread, etc.), so forum, thread, and post counters are automatically updated.

Install

Installing is quite simple. Simply upload the included files (three of them, decimator.php, includes/functions_decimator.php, and images/misc/spambutton.gif) preserving hierarchy and import the product file, and voila! you're done and ready to take on any spammer who comes your way.

***NOTE: if template hooks do not work for you, see the install file included in the package for instructions.

Other Stuff

**UPDATED!!!

Tested and functioning with vBulletin 3.7.1. I make no guarantees about compatibility with other versions.

Spam Decimator 2.0.0 is slated for a late June 2008 release, with a features list to follow.

That's basically it. Enjoy, and as always, click install ;)

Changes:
1.0.1 - Fixed problems with xml product file, validated for use with vB 3.5 Gold release.

1.0.2 - Fixed mod/super mod access bug as well as fixed templates for non-vB default styles.

1.0.3 - Fixed all known remaining bugs, rewrote email system to properly parse emails using native vB functions.

1.0.4 - Attempted to fix bug I can't find...updated main template.

1.0.5 - Fixed no mod access bug.

1.5.0 - Added post count limit to be decimatable, added plugin to control display of Decimator button. Fixed minor issues, rewrote several functions for improved performance.

1.5.1 - Fixed bugs, added vBulletin blog comment compatibility.

-RD

goranbaxy 06-22-2008 06:24 PM

Great!

cafenetland 06-22-2008 06:34 PM

screens please

RaidenDAWG2 06-22-2008 06:38 PM

Quote:

Originally Posted by cafenetland (Post 1556236)
screens please

Uploaded...albeit, the screens are from an earlier version that hasn't changed all that much since.

KURTZ 06-22-2008 06:40 PM

<font color="DarkOrange">*tagged</font>

cafenetland 06-22-2008 06:49 PM

Quote:

Originally Posted by RaidenDAWG2 (Post 1556240)
Uploaded...albeit, the screens are from an earlier version that hasn't changed all that much since.


thx..

i already installed before u added screens

very usefull hack

clicked instaled.

Il Pompa 06-22-2008 06:52 PM

great:up:

macc 06-22-2008 07:00 PM

Thanks!

regards

macc

MPDev 06-22-2008 09:24 PM

I noticed this didn't work using additional usergroups; only primary. So I made a couple minor changes to cache the $decimators and the users memgroupids.

Code:

global $candecimate;
global $vbulletin;
global $decimators, $allowedids;

if($vbulletin->options['sd_enabled'])
{
    $candecimate = false;
   
    if ( !$decimators )
    {
        $modgroups = explode(",", $vbulletin->options['modgroupid']);
        $supergroups = explode(",", $vbulletin->options['supermodid']);
        $admingroups = explode(",", $vbulletin->options['adminid']);
        $decimators = array_merge($admingroups,$modgroups,$supergroups);

        $ids = $vbulletin->userinfo['usergroupid'];
        if ( $vbulletin->userinfo['membergroupids'] != "" ) $ids .= ",". $vbulletin->userinfo['membergroupids'];
       
        $allowedids = explode( ",", $ids );
    }
       
    if(!in_array($post['usergroupid'], $decimators))
    {
          foreach( $allowedids AS $allowedid )
          {
              if(in_array($allowedid, $decimators))
              {
                    if($vbulletin->options['sd_postmax'] > 0)
                    {
                        if($post['posts'] < $vbulletin->options['sd_postmax'])
                        {
                            $candecimate = true;
                        }
                    }
                    else
                    {
                        $candecimate = true;
                    }
              }
          }
    }
}
else
{
    $candecimate = false;
}

if($candecimate)
{
    $template_hook['postbit_controls'] .= "<a href=\"#\" onclick=\"window.open('decimator.php?userid=$post[userid]&amp;threadid=$post[threadid]&amp;postid=$post[postid]','spam_decimator','statusbar=yes,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes,width=800,height=600'); return false;\"><img src=\"images/misc/spambutton.gif\" alt=\"Spam Decimator\" border=\"0\"></a>";
}


macc 06-22-2008 10:12 PM

hello!

where to put this code in above post?

regards

macc

MPDev 06-22-2008 11:46 PM

In the plug-in code.

macc 06-23-2008 11:37 AM

Hello!

can you explain little more please?

regards

macc

Playa82 06-23-2008 11:49 AM

vBulletin 3.7.1 already have a option like this i think...

(Delet Posts as Spam) in your Post Drop-Down menu

RaidenDAWG2 06-23-2008 11:51 AM

Quote:

Originally Posted by Playa82 (Post 1556746)
vBulletin 3.7.1 already have a option like this i think...

(Delet Posts as Spam) in your forum Drop-Down menu

Yes, but it doesn't have the other options, namely, deleting blog comment spam, banning the user automatically, deleting ALL posts and threads started by a user, etc.

TheInsaneManiac 06-23-2008 12:20 PM

If you implement a way to delete the users PMs I will also have this mod installed :D

maidos 06-23-2008 02:02 PM

can u have a spam button available for for members to report spam. just make it easy when ppl click the spam button the report will be available to an own dedicated spam section where mods and admin can check for reported spams...

TheInsaneManiac 06-23-2008 02:28 PM

Quote:

Originally Posted by maidos (Post 1556839)
can u have a spam button available for for members to report spam. just make it easy when ppl click the spam button the report will be available to an own dedicated spam section where mods and admin can check for reported spams...

Thats what the original report button is for -_-

mayanks 06-23-2008 05:01 PM

thanks...mark installed

Crono_86 06-23-2008 05:12 PM

Hey man, great mod.

I was just wondering if you were going to add the ban IP option into the 2.0.0 release? You mentioned in the old thread that it would be fairly easy to do.

RaidenDAWG2 06-23-2008 07:05 PM

Quote:

Originally Posted by TheInsaneManiac (Post 1556776)
If you implement a way to delete the users PMs I will also have this mod installed :D

Next release (barring any bug fixes).

Quote:

Originally Posted by Crono_86 (Post 1556993)
Hey man, great mod.

I was just wondering if you were going to add the ban IP option into the 2.0.0 release? You mentioned in the old thread that it would be fairly easy to do.

Same as above, next release.

I'm thinking end of June, buuuuuut that's now a week away, so more likely early July after my first round of midterms is over.

Spinball 06-25-2008 05:48 AM

Thanks for this - nice to see this mod being developed further.

vBVision 06-25-2008 07:15 AM

Will test it, thanks:)

Spinball 06-26-2008 12:02 PM

I've had one report that using the tool did not ban the spammer. I will report back if this happens again.

RaidenDAWG2 06-27-2008 03:56 PM

Quote:

Originally Posted by Spinball (Post 1559497)
I've had one report that using the tool did not ban the spammer. I will report back if this happens again.

Interesting...I'll take a look at the code at some point early next week, see if there's something I missed.

MindStar 07-05-2008 03:53 PM

Excellent, I see that you've used the postbit_hook to install the button without requiring any pesky template edits :)

Keep up the good work!

robgeo973 07-05-2008 09:53 PM

I may use this in the future!

mA|tRiX 07-08-2008 06:14 AM

Great Add-On. :) THX :)

Spinball 07-27-2008 04:05 PM

The user group does not appear to be being changed to Banned when a member is banned. I have the correct user group set up in the settings.

cindy helmond 07-27-2008 04:21 PM

great hack but 1 question : can register users use this tool ? or only admin and moderators?
thx

Raffaele 07-27-2008 06:15 PM

will this work in vb 3.7.2? and btw... great add-on

RaidenDAWG2 07-29-2008 06:48 PM

Quote:

Originally Posted by Spinball (Post 1585322)
The user group does not appear to be being changed to Banned when a member is banned. I have the correct user group set up in the settings.

I've not been able to recreate that one. Is it another user who's telling you that, or is it happening when you're running it?

Quote:

Originally Posted by cindy helmond (Post 1585332)
great hack but 1 question : can register users use this tool ? or only admin and moderators?
thx

It's based on usergroups you define, so if you really want to give them that power...I highly recommend you don't, but it's your choice.

Quote:

Originally Posted by Raffaele (Post 1585404)
will this work in vb 3.7.2? and btw... great add-on

Yes.

RaidenDAWG2 08-23-2008 03:18 PM

Quote:

Originally Posted by Spinball (Post 1585322)
The user group does not appear to be being changed to Banned when a member is banned. I have the correct user group set up in the settings.

Alright, I found the bug in my own copy as well. It has nothing to do with usergroups so much as it does the usertitle isn't changed. The banned group is still set properly though. I'll have a fix sometime this week.

Alfa1 08-28-2008 07:34 PM

Does this hack also ad the spammer ip to the banned ip's if the spammer is on a proxy like AOL? That would IP ban a large number of proxy users and innocent members would be affected.

Dingo14 08-29-2008 06:35 AM

nice one thanks

RaidenDAWG2 09-01-2008 04:34 AM

Quote:

Originally Posted by Alfa1 (Post 1609307)
Does this hack also ad the spammer ip to the banned ip's if the spammer is on a proxy like AOL? That would IP ban a large number of proxy users and innocent members would be affected.

At the moment, no.

-RD

irishblacknight 09-04-2008 12:01 AM

Great addon, but is there any way to change the default actions? ie. not email the user and not email the admin?

Emailing the banned user can result in stupid emails from them complaining and I'd rather just nuke them once and for all :)

fukdawrld 09-04-2008 12:55 AM

:D thanx for this

RaidenDAWG2 09-04-2008 03:09 AM

Quote:

Originally Posted by irishblacknight (Post 1614018)
Great addon, but is there any way to change the default actions? ie. not email the user and not email the admin?

Emailing the banned user can result in stupid emails from them complaining and I'd rather just nuke them once and for all :)

Easiest way is to edit the decimator_main template...ok, here's the changes...

Find:
PHP Code:

<input type="checkbox" value="1" name="DOESPAMMER" checked>Email Spammer<br>
<
textarea cols="30" rows="8" name="emailtext">
$vboptions[settingdefaultemail]
</
textarea><br>
<
input type="checkbox" value="1" name="DOWEMAS" checked>Email Webmaster<br

Replace With:
PHP Code:

<input type="checkbox" value="0" name="DOESPAMMER" disabled="disabled">Email Spammer<br>
<
textarea cols="30" rows="8" name="emailtext"  disabled="disabled">
$vboptions[settingdefaultemail]
</
textarea><br>
<
input type="checkbox" value="0" name="DOWEMAS" disabled="disabled">Email Webmaster<br


momo2 09-04-2008 12:04 PM

very nice hack, any idea why my button ( spam ) comes 2 twice ? in each posts

RaidenDAWG2 09-04-2008 02:32 PM

Were you previously using the 1.0.x series hack from vB 3.5? If so, remove the template edit that that version needed, you should be good to go :)

If not...back to the drawing board, no idea.


All times are GMT. The time now is 06:11 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.01372 seconds
  • Memory Usage 1,837KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete