The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
User-optional Replacements-based Censorship Details »» | |||||||||||||||||||||||||||
User-optional Replacements-based Censorship
Developer Last Online: Apr 2014
User-optional Replacements-based Censorship Hack
================================================ Rationale: ---------- Some of my forum members wanted a swear filter for use at work, but others didn't. I searched for a hack that could do that and I saw a similar hack ( https://vborg.vbsupport.ru/showthread.php?t=53640 ) by 006 but that's for vB 2.2.* and I have vB 3.0.0. I started to look at the hack to install it but it looked significantly different from the code I had for vB, so I thought it'd be simpler to write a new version for vB 3 from scratch. This is it. Description: ------------ The "bad words" censorship filter built in to vBulletin has at least three drawbacks: 1. It's all or nothing - all users are subject to the censorship whether they choose to be or not. 2. Censored words are replaced by asterisks and are not recoverable, even if the censorship is subsequently removed. 3. There is only a single list possible, where a forum administrator may wish different censorship lists within different styles (if they relate to different fora, for example). This hack is a solution. Based upon the built-in Replacement Variables system, this hack enables individual users to specify whether they want to view censored posts or not. Even if the Administrator chooses not to censor his forum, individual members sometimes prefer some words to be censored because they view in an office environment and Web proxies log certain words, or because minors may be present and read the screen. Using his own "Edit Options" page, a member of your forum can turn his censorhip on or off unilaterally, and because of the way the replacements system works this is an entirely reversible operation. He can view censored posts at work, then log in at home and turn the censorship off again to view the posts as intended. Also because of the way the replacements system works, censorship should take place in thread titles as well as posts. If there are words that simply must be censored for all users, the built-in global censorship system can deal with that. Caveats: -------- Using the Replacement Variables system in this manner may preclude its use from any other function. I have no useful information relating to how much additional load this will put in your server. I would imagine it would be minimal if the list of words is short or most users have censorship turned off. Hack Information: ----------------- Queries to run: 1 Files to modify: 2 Templates to modify: 1 Phrases to add: 4 Estimated time to install hack: 5 minutes As ever, please take sensible precautions before installing this hack; back up your database and files beforehand. I have tested this hack on my own forum and my test forum and found it to be fine, but I am not responsible for the application of any hack I don't do myself. For support, please use this thread or email me if you don't get a response. Thanks. Daren "Rico" Chandisingh rico[at]justice-department.org.uk http://www.respawned.co.uk/forums/ Show Your Support
|
Comments |
#12
|
||||
|
||||
Oh thank you so much! I have been wanting to do this but I had no idea how. Now everyone will be happy. THANK YOU!
|
#13
|
||||
|
||||
Quote:
|
#14
|
|||
|
|||
Very awesome! Thank you TONS
|
#15
|
||||
|
||||
this is interesting however, I want to make it so that it is censored from Guests. Is it possible?
|
#16
|
||||
|
||||
Quote:
Open ./includes/functions.php and replace this: PHP Code:
PHP Code:
|
#17
|
||||
|
||||
The zip file has disappeared..
I was just going to install this, and now I can't.! |
#18
|
||||
|
||||
Quote:
|
#19
|
||||
|
||||
It doesn't appear to be working for me..
I'm using 3.0.1.. The Microstats hack also touches the same area of code in includes/functions.php, but I don't think that's the cause of it. The censor is disabled in the Admin CP, and tested on my account to enable the censor option - and the words are still visible uncensored.. Any ideas? |
#20
|
||||
|
||||
Good work tjdrico. I don't have VB3 yet (plan to upgrade in the next week or so) so it will be nice not to have to rehack this one. Thanks for giving me credit for the idea. Looks like you have managed to take yours a step further and get it to work with titles as well. Looks good. I will install for sure when I upgrade.
|
#21
|
||||
|
||||
Thanks 006, but there was absolutely zero extra effort involved in getting it to work with titles as well as thread bodies. The way the replacements system works, the entire page seems to be fed through the filter before it's sent to the browser, so it's always likely to catch everything. I may be wrong there, but it seems that way.
It could present a problem if a forum used a, image URL or something that matches part of the replaced text - users with the censorship turned on would end up with missing images. =) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|