Version: 4.1.4.0, by mawby
Developer Last Online: Jul 2020
Category: End-User Options -
Version: 4.1.4
Rating:
Released: 11-01-2010
Last Update: 07-04-2011
Installs: 44
Uses Plugins
Re-useable Code Translations
No support by the author.
This product will mask out rude words on your forum, but with an option that allows the filter to be turned off by the user.
The filter works on all forum posts, threads, titles, search results and emails. There is also a BLOGs version of this product which I've extended to also filter the built-in blogs, comments, latest bits and titles. Blog support is not 100% complete yet. There are some places where no suitable hooks exist for the filter to work; blog search results being an example. Hopefully these will be fixed as and when more hooks become available. (I'd rather wait for the hooks then start giving instructions on hacking the files)
As of version 4.0.8.2 it is now possible to set a minimum age required before a user is allowed to turn off the profanity filter.
Installation
Download the required .xml file product-LAM_product-LAM_ProfanityFilter.xml or product-LAM_ProfanityFilterBLOG.xml
Create the required User Profile Field A picture speak a thousand words....
...but here are the words as well!
Code:
In your Admin Control Panel (ACP), please do the following:
ACP -> User Profile Fields -> Add New User Profile Field
Change the "Profile Field Type" to "Single-Selection Radio Buttons" and press "Continue"
Now enter the following values into the following fields...
User Profile Field
------------------
Title = Profanity Filter
Description = The profanity filter will mask out mature language from forum posts
Profile Field Category = (Uncategorized)
Options = {Copy and paste in the two lines below}
Turn On
Turn Off
Set Default = Yes
Display Order = You Select this (dependant on how many you already have)
Field Required = No
Field Editable by User = Yes
Private Field = Yes
Field Searchable on Members List = No
Show on Members List = No
Optional Input
--------------
Allow user to input their own value for this option = No
Max length of allowed user input = 100
Field Length = 25
Regular Expression = {Leave this Blank}
Display Page
------------
Which page displays this option? = Edit Profile
Make a note of the FieldID at the top of the page because you will need to use it to configure this product.
Press Save
Configure the product
Configuration
You need to configure the product to specify the Profile Field ID to use (the one created during installation). If you want to change the "Turn On" "Turn Off" labels in the profile field (e.g. for translations) then you need to change the default "Turned Off" Selection option. This product works on the basis that the filter is always on unless the user chooses to turn it off. Therefore it needs to know what to look for to determine the user has turned it off. Next is the filter mask. This is the replacement for any words which have been filtered. And finally is the list of words to filter. I've masked them out in the picture below just in case vB.org get upset.
Each user can then turn the filter off in their user cp...
Example
A user who has the profanity filter turned off can create and view posts without any alterations being made to them. For users with the profanity filter turned on this product should mask out the configured words where ever they may appear on your forum.
Here are some examples of the filter at work...
Known Issues
Blog search results are not filtered
Latest blog/comments AJAX results are not filtered
Version History
4.1.4.0 - Fixed bug which could display a no permission error when trying to create a new blog post (2011/07/05)
4.1.1.0 - Fixed HTML clobbering when filtering the word "ass" again (2011/01/17)
4.1.0.2 - Fixed vB4.0.1 not filtering search results post titles (2010/12/11)
4.1.0.1 - Fixed vB4.0.1 not filtering posts at all (2010/12/11)
4.0.8.3 - Fixed HTML clobbering when filtering the word "ass", plus optimised Blog filtering (2010/11/09)
4.0.8.2 - Added minimum age required to turn off the profanity filter
4.0.8.1 - Fix to prevent over filtering if a trailing comma is put in the filtered words list (2010/11/03)
4.0.8.0 - Initial release (2010/11/02)
I've tested this and having a filtered words list like "word1,word2,word3," or "word1,word2,,word3" would cause the problem you've described. I've updated to product to stop this from happening. Can you try the update and let me know if it fixes your problem please?
You will, however, still get a problem if your filtered words list contains a space like "word1,word2, ,word3" but in this situation I think it quite reasonable for the filter to start replacing all spaces as that's what its been configured to do - so I'm not going to fix that one.
No more jibberish like before, but now it does this to all of the posts on the home screen under Last Post:
I read the rules...
by
XXXUSERXXX
View Profile
View Forum Posts
Private Message
Add as Contact
October 29th, 2010, 21:48
No more jibberish like before, but now it does this to all of the posts on the home screen under Last Post:
Can you PM me the list of words in your filter and the mask you are using please. Either I'm missing something obvious or there is another add-on causing a problem, but I will try to get it sorted for you.
Can you PM me the list of words in your filter and the mask you are using please. Either I'm missing something obvious or there is another add-on causing a problem, but I will try to get it sorted for you.
PM inbound, and boy is it awful - the mask is the default $#@!