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 |
#52
|
||||
|
||||
Quote:
I didn't know you had this hack >_>... |
#53
|
||||
|
||||
I'd like to see this taken just one step further.
Instead of applying a global forum-wide censor list, let users manage their own individual swear-replace list. |
#54
|
||||
|
||||
Works fine on 3.06 for me
|
#55
|
|||
|
|||
This would be more useful if it didn't stop you from using replacement variables for anything else. I like the idea though.
|
#56
|
||||
|
||||
I've noticed a problem with this since we upgraded to 3.0.6.
We don't seem to be able to add a space after a word anymore. For example, replacing 'ass' with '***' would result in '***' when the word ass was found, and '***ert' for the word 'assert'. However telling it to censor ' ass ' would fix that by only affecting 'ass' alone, not when used as part of another word. Since the upgrade, the database won't accept words with a space after them. |
#57
|
||||
|
||||
I would like to install this hack. Currently I am using vb 3.06 and will upgrade to vb3.07 this weekend. Does this hack work in vb3.07?
|
#58
|
|||
|
|||
has this been updated to not touch anything besides text in forums and pm messages?
I dont want this messing up anything else. will wait for an answer. |
#59
|
||||
|
||||
Code:
RUN SQL (use mySQL or phpMyAdmin etc.): --------------------------------------------------------------------------------------------------------- ALTER TABLE user ADD usereplacementscensor TINYINT(1) NOT NULL DEFAULT '1' AFTER pmunread; --------------------------------------------------------------------------------------------------------- The default value of 1 means that users WILL use the censorship by default unless they turn it off. If you would prefer it to be OFF by default, then use this INSTEAD: ALTER TABLE user ADD usereplacementscensor TINYINT(1) NOT NULL DEFAULT '0' AFTER pmunread; If you change your mind you can change the default using: ALTER TABLE user ALTER COLUMN usereplacementscensor SET DEFAULT '1'; (or SET DEFAULT '0' as appropriate). |
#60
|
||||
|
||||
Quote:
Hello... I'm having the same issue but with a different line refrenced. I really want to do this thing here... I have been reading the thread the whole night and looking into it... I am really Bawls to the wall right now too so my anticipation is through the roof to make this thing happen. My biggest issue is that I really have no background with Php, and am pretty lost... PLEASE HELP! Code:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /forum/includes/functions.php on line 2018 |
#61
|
||||
|
||||
Anyway we can get a port to 3.5?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|