![]() |
|
|
Mod Options |
User Optional Word Censorship Details »»
|
|||||||||||||||||||||||||||||||||||||||
|
User Optional Word Censorship
Developer Last Online: Feb 2010
User Optional Word Censorship
What this hack does The default censorship options in VB are all or nothing, in other words it is either enabled or disabled for all users regardless of their personal preference. Without any additional SQL calls and an extremely low runtime impact (on top of the resource usage required when using the censor in the first place), this hack gives the user the option to view your forum with the AdminCP configured censor switched on if you have it enabled. How to install In summary the install requires:
So this is what you need to do: First create a custom user profile field:
* These options set the text that is displayed to the user, feel free to customise/change these to whatever you want. All the AdminCP work is done now, so if you want logout. The next step is to make a small file edit, to check this field value when VB calls the censor code.
The last, and most critically important step is:
Footnotes By default the censor will be off for all users, so they will have to change their profile in order to enabled this. I could not find a way to create a profile checkbox field that is checked by default, and describing how to run SQL scripts to set the field value is more complicated than I wanted to go with this simple hack. So if anybody knows how to do this post the details and I will update the article. In the meantime a simpler option (rather than playing with the DB) is to use "Yes" / "No" radio buttons and set the default value to Yes (or no if you prefer). If you do this you will also have to subtly change the code above from:
to:
Download Now Only licensed members can download files, Click Here for more information. Show Your Support
|
|||||||||||||||||||||||||||||||||||||||
Similar Mod
|
||||
| Mod | Developer | Type | Replies | Last Post |
| User-optional Replacements-based Censorship | tjdrico | vBulletin 3.0 Full Releases | 70 | 04 Nov 2007 14:10 |
| Comments |
|
#2
|
|||
|
|||
|
Because you just never know
![]() |
|
#3
|
|||
|
|||
|
I've been wanting this! Thanks!
__________________
- |
|
#4
|
||||
|
||||
|
Nominated!
although I'm in favor of free speech ![]() |
|
#5
|
||||
|
||||
|
Even without queries, parsing the post every display can really rack up resource usage. Formatting and displaying the post is more intensive than pulling it from the database. How do you work around this?
|
|
#6
|
|||
|
|||
|
Yes, running with the vBulletin word censor enabled will of course increase usage. However this isn't an issue for me as this modification doesn't alter the default vBulletin parsing system.
|
|
#7
|
||||
|
||||
|
Yeah, but it prevents you from using the postcache which is created on edit of the post and stores the post in its parsed state to be shown on the screen without running BBCode and censor parsing at runtime.
|
|
#8
|
|||
|
|||
|
In which case take the issue up your VB development team as the issue you have is with default VB code/architecture and is most certainly beyond the scope of this 2 minute hack.
Last edited by MrEyes : 19 Apr 2008 at 19:24. |
|
#9
|
||||
|
||||
|
Dosn't work, just makes the screen go white and nothing else.
This is my code, i might of missed something obvious..
__________________
My Forums - A Forum dedicated to the horror films comprising the George A. Romero "Dead" series of films, Night of the Living Dead, Dawn of the Dead, Day of the Dead, Land of the Dead, Diary of the Dead and Survival of the Dead. |
||||
|
#10
|
||||
|
||||
|
Anyone?
|
|
#11
|
||||||||
|
||||||||
|
Originally Posted by ZombieAndy
Remove the second
|
||||||||
|
#12
|
||||
|
||||
|
D'uh! I knew it would be something simple!
Thanks man! |
|
#13
|
|||
|
|||
|
Does this code mess up with editing posts and whatnot and does it take a while to load?
|
|
#14
|
|||
|
|||
|
Theres one problem, when the post is submitted, it censors the words and puts them in the database censored. So if this is turned off, they will display uncensored for all users.
|
|
#15
|
||||
|
||||
|
OK I installed this exactly how you said and when I go to disable the censor
it says "A required field called Enable word censor is missing or has an invalid value." What am I doing wrong? eta: My code
Last edited by Brittany : 03 Dec 2008 at 19:58. |
||||
![]() |
«
Previous Mod
|
Next Mod
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Mod Options | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 16:29.








