BanHelper
From e107 Wiki
Contents |
BanHelper plugin
a plugin by nlstart.
BanHelper v1.4 (stable) is released August 3, 2010.
BanHelper is an easy to use e107 plugin to keep out spammers and to ban and delete comments/forum posts in one swoop.
This plugin is a collection of anti spam tools, partly based on the Comment Stop Beta 0.6 plugin of Jezza.
This plugin is aimed at stopping the type of spam that most sites will suffer from, but it may not suit everyone's needs.
This plugin is capable of deleting database content (forum threads, comments) when you ask for it. Please make regular backups, and create a backup before use. Use at own risk! Test offline first. As a consequence of the direct deletion, it may mess up your forum counts! You are advised if you use Ban Helper regularly, to run a manual recount regularly as well.
Preferences
Tab 'General'
- User group that will see 'ban helper' icon on forum/comments.
Show 'Ban Helper' icon at forum and comment posts to allow admin to quickly remove/approve posts and comments or ban a user! Select the class that can access this feature. Success of this setting depends on your theme - test carefully!
- Moderate comments setting
Three different settings are possible: 1. Moderate users 1st comment. Once approved the user can post again without moderation. 2. Moderate all comments. All comments must be moderated manually by an admin. 3. No comment moderation.
- Send an email alert to admin when a comment is blocked
When a comment is blocked an e-mail will be send out to the e-mail address specified in Admin Area > Preferences > Main site admin email
- Minimum anonymous user name length: can be used to ensure that anonymous comment posters must enter a name
- Show user permissions on banhelper.php page. This is the page users are redirected to whenever posting is blocked.
- Message to display when content is blocked: additional message to display on the banhelper.php page. Anything here will always be displayed and can be used to replace the auto generated permission text or create extra additional information to it. You can use BB-code in this field.
Tab 'Permissions'
The Permission tab page is intended to set the global post/comment blocking
- User class permitted to post links on forum. Select the user class that can access this feature.
- Detect links using the following strings: specify the banned phrases via a comma separated list to block spam, by default: "http://,[link=,www.,[url"
- User class permitted to post links in comments: allow link posting in forum. Select the user class that can access this feature.
- Detect links using the following strings: specify the banned phrases via a comma separated list to block spam, by default: "http://,[link=,www.,[url"
- User class permitted to post blocked items: specify a user class that will be subject to a global block list
- Keywords not be allowed in comments or posts: add comma separated phrases that will always be blocked. This can be used to block e.g. an affiliate code of a spammer.
Tab 'User Control'
This admin page controls the ability to restict the actions of new sign ups or a specified class. This can then be used to prevent spammers signing up and posting spam immediately.
- Turn on restricted user control. Turn this section on and off. If this is not ticked none of the other functions will work. Leave off if not in use to reduce unnecessary processing.
- Apply restricted users status to new users: apply restricted status by ticking the box. This means the checks will apply to users who registered x number of days ago and have only made y posts.
- New user status expires after: set the number of days and posts for the restricted users here.
- Apply restricted user status to user class: alternatively you can apply the restrictions to everyone in a specified class. Create a new class and add users you want to restrict.
Then specify the restrictions that will apply: * Decide if they are not allowed to post links * Decide if they are not allowed to post images * Limit the number of forum posts they are allowed to make in a 24hr period * Decide if they are allowed to start new threads or not
Tab 'Ban Intensity'
You can decide to perform for the following actions if they need to be done:
- Delete comments of banned user (activated by default)
- Delete forum threads of banned user (not activated by default)
This is a radio button choice where there can be selected: nothing, delete the forum threads or replace the forum threads
- Forum replacement text (default blank); the text that will be used when the selection 'Replace forum threads of banned user' has been chosen the current forum threads of the banned user will be overwritten with this text.
- Delete chatbox entries of banned user (not activated by default)
- Delete private messages of banned user (not activated by default)
- Delete extended user fields of banned user (activated by default)
- Add IP address of banned user to ban list (activated by default)
- Change password (not activated by default): will apply a random password for the banned user so it will be impossible to use their previous password.
- Unhide e-mail address (not activated by default): it will change the e-mail address setting to be public; that will expose the e-mail address of the spammer! Hopefully that will teach them!
This setting does not make sense if the 'change e-mail address' option has been activated.
- Change e-mail address (not activated by default): it will garble the e-mail address like e.g. ban1141@spam.com where 1141 is the user id.
Some checks are off by default because the installation process does not check if a certain plugin is installed or not.
- Silent signature (not activated by default): when it is on; a Banhelper message will be set in the signature of the banned user to inform which admin banned him/her. When it is off; the signature will be wiped clean.
NOTE: the ban of the user cannot be influenced and this will always be performed. It is the nature of this plugin. :-)
Tab 'Approve'
Only visible if you have selected in tab General "Moderate users first comment only". This option allows you to batch approve all of your current users. Please Ensure that there are no spammers still in the database before running this else the plugin will grant them access rights to post comments etc. It is urgently adviced to put your website in Maintenance mode first, next delete and check on spam users first and than run this function.
Ban User
- Ban user allows you to search for a user and remove them and all their posts and comments! Please make backups before using this!
Although the plugin has been tested this procedure is definitive and there is no way back if you ban a non-spammer by mistake. What exactly is the function capable of (actual action is dependent on settings in tab 'Ban Intensity'): 1. delete all comments of the banned user 2. delete all forum posts of the banned user 3. delete all chatbox menu entries of the banned user 4. delete all private messages of the banned user 5. Reset all counters in the user table of the banned user 6. Set the status of the user to 'banned' 7. Set signature text to 'Ban Helper; performed by XXX' (where XXX is the username who executed the Ban Helper procedure) 8. Adds the IP-address to the ban-list (if same IP address is not used by other users) 9. Removes all extended user fields data of the banned user
Find Spam
- Spam finder reports back any users who exceed a specified number of links in their comments/forum posts.
This is setup to find the type of spam that mosts sites will get. May not suit everybody's need and might need to be expanded to catch other spammers! For comments admin users are excluded. For forum posts admin users and forum moderators are excluded. NOTE: the results might still indicate false positives. Be careful with banning users based on this function and always investigate if you have to actually ban the users found.
Approve User
- Comment moderation will set all comments from a user to be blocked until an Admin approves that user.
This option alters the blocked flag so ensure you dont make use of this functionality elsewhere.
Suggest that language file is updated to 'Awaiting Moderation' or similar.
Do this by updating: e107_languages\English\lan_comment.php eg. define("COMLAN_0", "[Awaiting Moderation]");
Change log
Changelog 1.4 (nlstart)
- admin_findspam.php: Sort reversed on user array (high to low)
- admin_findspam.php: new check: Search for users with 2 times or more link/url BBcode in their signature in the last month
- admin_findspam.php: new check: Search for users with homepage link also in their signature as link in the last month
- admin_banuser.php: added link to user.php for to be banned user info
- admin_banuser.php: added display of user signature in to be banned user info
- e_meta.php: improved handling of templates in theme folder (thanks steved)
- languages/English.php: added BH_BAN_47
Changelog 1.3 (nlstart)
- e_meta.php: replaced hardcoded text for forum.php
- e_meta.php: fixed template replacement for comments
- e_meta.php: adds banhelper icon to shortcode username instead of shortcode comments
- e_meta.php: banhelper icon was not always presented properly with custom theme templates
- added blank index.html file for security reasons to all BanHelper plugin folders
- banhelper.sc: replaced language term LAN_CS11 with BH_11
- languages/English.php: added BH_META_04, BH_META_05
Changelog 1.2 (nlstart)
- e_meta.php: optimized coding
- banhelper.sc: correct use of banhelper class retrieval from prefs; thanks steved
- banhelper.sc: removed hardcoded alt/title texts from forum links
- languages/English.php: added BH_28
Changelog 1.1 (nlstart)
- admin_config.php: created new preference 'Silent signature' in tab 'Ban Intensity'
when it is on; a Banhelper message will be set in the signature of the banned user to inform which admin banned him. When it is off; the signature will be whiped clean.
- admin_banuser.php: implemented the new 'Silent signature' setting
Changelog 1.0 (nlstart)
- fixed lots of XHTML and php issues
- changed icons
- customized and improved the shortcode
- made all plugin parts language independent
- had a major overhaul on all the plugin parts (not to say the whole plugin got rewritten from scratch)
Changelog 0.6 (Jezza)
- Fixed Config Settings
- Added custom message to banhelper.php page
- Added a global block list
- New User Restrictions added

