vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Moderators Functions - One-touch Spam Ban and Cleanup (https://vborg.vbsupport.ru/showthread.php?t=156444)

mfyvie 08-27-2007 09:00 PM

One-touch Spam Ban and Cleanup
 
1 Attachment(s)
*** Staff note: The author of this modification has passed away in a diving accident. We wish his family all strength in dealing with this tragic issue. ***

One-touch Spam Ban and Cleanup




The main purpose of this mod is to clean up after a spammer. With a minimum of fuss it will:
  • Delete all threads started by the spammer
  • Delete all posts made by the spammer
  • Delete all PMs sent to other members by the spammer
  • Delete all calendar events made by the spammer
  • Ban or delete the spammer as you like
  • Ignore permissions - posts can be deleted in areas that a moderator may not have access to.
The option to activate this tool appears in the drop-down menu in the postbit, as well as on the profile page. From here it is a "one-touch" operation, with the small exception that you must press a confirmation button before the cleanup is made.




See the screenshot for the various options, but some of the more interesting ones are:
  • You can specify individual users (in addition to groups) who can use this tool. This means certain trusted, non-moderator users could have the ability to clean up spam and ban spammers.
  • You can specify users or groups who are protected - they cannot be deleted by this tool.
  • By default, users who have registered more than 30 days ago are also protected from this tool (spammers tend to be caught and removed fairly soon after registration)
  • You can turn the various deletion targets (threads, posts, events, PMs) on or off
  • Select between hard delete or soft delete
This mod is similar to some older mods, but improved in a number of ways:
  • You also have the choice to alter the standard ban and delete reasons before you press confirm.
  • Deletes more types of spam (PMs, events)
  • Simple, quick, effective
  • Single file import (.xml) no file edits, no template edits, no .php files to upload
  • Should work on all versions of 3.6.x and future versions
Installation

Download and import the .xml file via AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product. Remember to click overwrite if upgrading

Configuration

Once installed, check in your AdminCP under "VBulletin settings" and look for the configuration group called "One-touch Spam Ban & Cleanup Options". The default options should be fine for most people.

How to use

If you have rights to use this tool (i.e. are an admin or moderator, or have configured it for the relevant user or group ID) you should see the option appear on the member profile page, or in a drop-down on the postbit (see attached screenshots for an example). The idea is that as soon as you see a spammer select the "One-touch Ban & Clean" option to remove all trace of the spammer.

Support




Support will be given to those who have:
  • Read these instructions (and followed them) and
  • Clicked install
Version history

1.0 - initial version (28.08.2007)
1.1 - security fix (21.09.2007)
1.2b - Beta Fix to work with vb3.7.0 (20.05.2008)

mfyvie 08-28-2007 01:27 PM

Reserved

Symmetrical? 08-28-2007 01:33 PM

second installed :)

Symmetrical? 08-28-2007 01:43 PM

Error !
edit :)

mfyvie 08-28-2007 01:48 PM

Very strange. What version of php are you running? I'll try to duplicate the problem...

Symmetrical? 08-28-2007 01:50 PM

ok i will wating for fix. :) because very nice hack

mfyvie 08-28-2007 01:55 PM

Duplicated and fixed. .xml file updated, just re-download and reinstall. Can you please remove that screenshot from your post - it's massive and no longer applies since the issue was fixed.

Symmetrical? 08-28-2007 01:58 PM

Quote:

Originally Posted by mfyvie (Post 1327400)
Duplicated and fixed. .xml file updated, just re-download and reinstall. Can you please remove that screenshot from your post - it's massive and no longer applies since the issue was fixed.

ok removed caps . thanks ..

Symmetrical? 08-28-2007 02:06 PM

very very nice because very easy ban :D thnx mfyvie.

edit: you should add + ip ban ;)

johnrizz 08-28-2007 07:54 PM

Sweet mfyvie! I like it... installed

you should add + Email ban..

Brandon Sheley 08-28-2007 08:10 PM

Just wondering how this is different from the Spam Deciminator ?

beduino 08-28-2007 09:52 PM

Oh my God!
this is really a fantastic feature!
tks a lot - one click to ban, delete threads, posts.... oh GOD it is a miracle! :D
joao barroca
aka beduino

RMS-Chef 08-28-2007 10:43 PM

I have the option in the user's profile but not in the postbit drop menu. Could this be because I am using postbit_legacy?
Could you just post the posbit template addition so I can manually add it?

Quote:

Originally Posted by Symmetrical? (Post 1327406)
very very nice because very easy ban :D thnx mfyvie.

edit: you should add + ip ban ;)

Excellent modification. Thank you.
I agree, having an option to ban any/all registration and post IPs of the user would be nice as well.

Alibass 08-29-2007 01:33 AM

*INSTALLED* very nice hack mfyvie as always. :)

The drop postbit menu works fine with default vB skin but not with my custom skins. Can you post code for that?

I will half to agree also banning of IP and email address that a user registered with would really make this mod sweeeeeeeet.

Fearlessninja 08-29-2007 02:15 AM

Awesome! Been waiting for this for quite awhile. Thanks!

epoc fitness 08-29-2007 03:14 AM

Will this allow moderators and supermod to only perform soft deleted or perm deletes. I would hate for a moderator to get pissed off one day and just delete people and all their posts.

mfyvie 08-29-2007 05:28 AM

Hi everyone. I'm pleasantly surprised by high number of installs (40 so far) in just a few hours. I'll answer some of your questions below.

Quote:

Originally Posted by stone0075 (Post 1327652)
Sweet mfyvie! I like it... installed

you should add + Email ban..

Well I could do that, but if you configure your vbulletin to not allow duplicate email addresses, then when the spammer is banned, the email address can't be reused anyway....

Quote:

Originally Posted by Loco.M (Post 1327662)
Just wondering how this is different from the Spam Deciminator ?

Well I don't really want to criticise other mods, but I took a look at spam decimator just before I decided to write this mod (I didn't know about it, but had come up with the concept for a mod I wanted). I felt there were some unnecessary features, and that it was also missing features I really needed like deleting PMs, etc. I saw that many people had asked for these features, but that the mod wasn't being upgraded or worked on. Therefore I decided to write this mod instead. Another difference is that my mod is a single .xml install which fully uses the plugin system (something I aim for in all my mods).

Quote:

Originally Posted by RMS-Chef (Post 1327733)
I have the option in the user's profile but not in the postbit drop menu. Could this be because I am using postbit_legacy?
Could you just post the posbit template addition so I can manually add it?

Well, I don't really have to post it because it is in a separate template. Simply look for the template called postbit_onetouchban and copy and paste the contents.

That said however, it might be better to find out WHY this didn't work. Most likely you are missing the correct template hook (either because you deleted it or have failed to revert templates when upgrading VB).

Check through your template (postbit) look for $template_hook[postbit_user_popup] - it should be right at the end, just before the final </table> tag. If it's not there, add it - but better would be ask yourself WHY it isn't there. These hooks should be in the templates of all recent versions of vbulletin. Other hacks may use them as well.

Quote:

Originally Posted by RMS-Chef (Post 1327733)
Excellent modification. Thank you.
I agree, having an option to ban any/all registration and post IPs of the user would be nice as well.

I've put in an option for the forthcoming 1.1 release which automatically bans the IP used in registration. But some people are telling me they want to see lists of other users using that IP. I'm not sure I want to go into all the post IPs as well - I'm trying to keep this mod simple, without bogging it down with silly options.

Quote:

Originally Posted by Alibass (Post 1327817)
*INSTALLED* very nice hack mfyvie as always. :)

The drop postbit menu works fine with default vB skin but not with my custom skins. Can you post code for that?

See my answer above, you probably don't have the correct hooks in your custom skins, add them and the problem will be resolved.

Quote:

Originally Posted by epoc fitness (Post 1327854)
Will this allow moderators and supermod to only perform soft deleted or perm deletes. I would hate for a moderator to get pissed off one day and just delete people and all their posts.

Please read the description of this mod (at the top of this page, with bullet points listed) which specifically answers the questions you've just asked. You've clicked install, so just look at the settings for the mod in your admincp and your questions will also be answered.

projectego 08-29-2007 06:38 AM

Fantastic! :)

[high]* projectego clicks install[/high]

Hornstar 08-29-2007 07:12 AM

This is a really great mod if you do not have a lot of staff, and you get lots of spammers. nice work!

bazzup 08-29-2007 09:17 AM

excellent mate installed

regards

Symmetrical? 08-29-2007 10:37 AM

installed 44 well done :)

hobbystoresearc 08-29-2007 11:59 AM

this is a database error I get when clicking on the link to remove spam

Code:

Database error in vBulletin 3.6.8:

Invalid SQL:

                SELECT COUNT(0) FROM thread
                WHERE postuserid = 3
                AND threadid NOT IN
                        (SELECT primaryid FROM deletionlog
                        WHERE type = 'thread');

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT primaryid FROM deletionlog
                        WHERE type = 'thread')'
Error Number : 1064
Date        : Wednesday, August 29th 2007 @ 09:56:39 AM
Script      : http://www.*****/forums/misc.php?do=spamcleanconfirm&u=3
Referrer    : http://www.*****.com/forums/member.php?u=3
IP Address  : *****
Username    : munsonfan15
Classname    : vB_Database


mfyvie 08-29-2007 03:10 PM

That database syntax should be correct. What version of mysql are you running?

Alibass 08-29-2007 05:50 PM

Quote:

Originally Posted by mfyvie (Post 1327892)
See my answer above, you probably don't have the correct hooks in your custom skins, add them and the problem will be resolved.

In my other custom skins I see your postbit_onetouchban template installed. I did not have $template_hook[postbit_user_popup] in my custom skins postbit templates so I added it in the location you suggested and reinstalled your mod, but I still cannot get the One-touch Ban & Clean option in the postbit drop down menu of my custom skins to work.

Alibass 08-29-2007 05:57 PM

Never mind I found where to add postbit_onetouchban code in postbit to make it work.

Thanks again, great mod. :)

FreshFroot 08-29-2007 06:06 PM

Wow.. this should be a MOTM, great stuff mate :D

hobbystoresearc 08-29-2007 06:47 PM

Quote:

Originally Posted by mfyvie (Post 1328191)
That database syntax should be correct. What version of mysql are you running?

mysql 4.0.27

Apophis 08-29-2007 07:17 PM

The product installed okay, but I do have a rather strange result:

In the postbit pull-down (I use the legacy postbit) I see the "One Touch Ban & Clean" option for the FIRST post in the thread. On the SECOND post in the thread I see that option twice in the pull-down, for the THIRD post I see it three times. etc. etc. etc.

Any ideas?

Apophis 08-29-2007 07:20 PM

Upon further inspection I also see that even though it displays multiple times, each iteration retains the userid of the respective poster based on the post order.

IE: On a situation where it is displayed 5 times (on the 5th post). The first occurance lists the first posters ID, the second occurance lists the second posters ID, etc. etc.

mfyvie 08-30-2007 06:00 AM

Quote:

Originally Posted by Alibass (Post 1328265)
In my other custom skins I see your postbit_onetouchban template installed. I did not have $template_hook[postbit_user_popup] in my custom skins postbit templates so I added it in the location you suggested and reinstalled your mod, but I still cannot get the One-touch Ban & Clean option in the postbit drop down menu of my custom skins to work.

Hmm, strange. I don't know enough about the template hook system to comment, but I would have thought that just adding the hook would be enough, but maybe there's more to it than that. Well at least you've resolved the problem manually in any case.

Quote:

Originally Posted by hobbystoresearc (Post 1328298)
mysql 4.0.27

Ok, that is a problem. I just checked and 4.0 doesn't support sub queries. I strongly suggest you upgrade to mysql 4.1 or later (or encourage your host to do so). I may change the product pre-requisites so that it won't install if you have mysql 4.0.

Quote:

Originally Posted by Apophis (Post 1328318)
The product installed okay, but I do have a rather strange result:

In the postbit pull-down (I use the legacy postbit) I see the "One Touch Ban & Clean" option for the FIRST post in the thread. On the SECOND post in the thread I see that option twice in the pull-down, for the THIRD post I see it three times. etc. etc. etc.

Any ideas?

This is most strange. The relevant code can be found in the plugin called "Insert into templates" at postbit_display_start:

Code:

eval('$template_hook[postbit_user_popup] .= " ' . fetch_template('postbit_onetouchban') . '";');
The php concatenation operator ".=" is used there. This means, append the contents, rather than replace them. This seems to work correctly on other systems, but I've no idea why it isn't working on yours. Basically what is happening is that something else should resetting that hook on each iteration, but that isn't happening, so this hook keeps growing and growing as you proceed down the page. Are you running an older version of vbulletin (bug maybe?) or perhaps another hack is causing this behaviour?

You can work around it by changing the ".=" to just "=" but this will kill any other mods that might be using this template hook (though you probably don't have any).

Alibass 08-30-2007 07:48 AM

Quote:

Originally Posted by mfyvie (Post 1328654)
Hmm, strange. I don't know enough about the template hook system to comment, but I would have thought that just adding the hook would be enough, but maybe there's more to it than that. Well at least you've resolved the problem manually in any case.

So sorry mfyvie, yes adding the hook worked as you said and I wrote the wrong thing in previous post as I was modifying postbit to show One-touch Ban & Clean at the bottom of each post and PM. Thats the way I wanted it on my site.

j_86 08-30-2007 08:55 AM

Any chance of having a move threads feature rather than deleting them? We have a 'Litter Tray' forum to move threads to instead of deleting.

mfyvie 08-30-2007 10:35 AM

Quote:

Originally Posted by JimpsEd (Post 1328730)
Any chance of having a move threads feature rather than deleting them? We have a 'Litter Tray' forum to move threads to instead of deleting.

My feeling on this is that it makes little sense to move spam to such an area. I have a trash / dupes forum as well, but that's where I put stupid questions from my users. The aim of a spammer is to get his message through, and since this is a spam tool the best thing to do is delete it, rather than move it somewhere else. I'm happy to be convinced otherwise, but I still can't see the logic in this...

Apophis 08-30-2007 11:34 AM

Quote:

Originally Posted by mfyvie (Post 1328654)
This is most strange. The relevant code can be found in the plugin called "Insert into templates" at postbit_display_start:

Code:

eval('$template_hook[postbit_user_popup] .= " ' . fetch_template('postbit_onetouchban') . '";');
The php concatenation operator ".=" is used there. This means, append the contents, rather than replace them. This seems to work correctly on other systems, but I've no idea why it isn't working on yours. Basically what is happening is that something else should resetting that hook on each iteration, but that isn't happening, so this hook keeps growing and growing as you proceed down the page. Are you running an older version of vbulletin (bug maybe?) or perhaps another hack is causing this behaviour?

You can work around it by changing the ".=" to just "=" but this will kill any other mods that might be using this template hook (though you probably don't have any).

I'm running 3.6.7 PL1 right now. I just haven't gotten around to upgrading to 3.6.8. Maybe I'll do that today and see if the problem still exists.

The only other plugins I have that are using postbit_display_start are v3 Arcade and Yet Another Award System 3.6.

I'll do that upgrade and then report back if the problem still exists.

mfyvie 08-30-2007 11:38 AM

Apophis - I also run 3.6.7 PL1, so unlikely an issue there. Try disabling those products just for a few minutes (and any others that use other hooks in postbit, not just display_start) and see if that resolves it. From there it should be easy to pinpoint.

Apophis 08-30-2007 11:58 AM

Quote:

Originally Posted by mfyvie (Post 1328839)
Apophis - I also run 3.6.7 PL1, so unlikely an issue there. Try disabling those products just for a few minutes (and any others that use other hooks in postbit, not just display_start) and see if that resolves it. From there it should be easy to pinpoint.


Disabling YAAS didn't help nor did disabling v3 Arcade.

Moving on to products that hook into other areas of postbit:

AnyMedia BBCode 3.0.3: No Change
vBSEO: No Change
nCode Image Resizer: No Change
vBGoogleMap Member Edition: No Change

That's all I could find for products/plugins that tie into any postbit_ hook.

mfyvie 08-30-2007 12:06 PM

Ok, in that case I'm out of ideas :-) When I get a chance I'll have to take a look at alternative ways of implementing that, in the meantime you could try my suggestion of changing ".=" to "=" to fix it. Let's see if anyone else reports the same issue.

Apophis 08-30-2007 12:09 PM

Quote:

Originally Posted by mfyvie (Post 1328861)
Ok, in that case I'm out of ideas :-) When I get a chance I'll have to take a look at alternative ways of implementing that, in the meantime you could try my suggestion of changing ".=" to "=" to fix it. Let's see if anyone else reports the same issue.

As having the functionality in the postbit isn't of great importance to me, I simply disabled that plugin and can do it from the users profile instead. I'll give the ".=" to "=" fix a whirl a little later today and see if that does the trick for me.

Small issues such as the postbit one aside, this is a great product and will save me, and my moderators, a lot of time when it comes to dealing with spammers! Thanks for the contribution!

hypertextfever 08-30-2007 03:36 PM

What a wonderful mod. Thanks so much!!!

ishare 08-30-2007 05:02 PM

INSTALLED!
Very usefull mod. Thanks a lot for this share...


All times are GMT. The time now is 09:29 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.02609 seconds
  • Memory Usage 1,851KB
  • 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
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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