PDA

View Full Version : End-User Options - User Based Word Censorship


crs6785
02-23-2010, 10:00 PM
Info:

This mod allows a user to toggle word censorship from an option in their profile.

The following areas are covered by this mod:

Forum lists
Viewing threads/posts
Viewing user profiles
Groups
Albums
Who's Online list
Tags
Searches
Most private message stuff
Usertitles

It works by disabling censorship globally (so text gets into the database uncensored) and then selectively re-enabling it if the user has censorship enabled in their profile.

Installation:

Enable word censorship in the AdminCP area under vBulletin options and configure the words to block.

Import the XML file as a product under the 'Plugin System --> Manage Products' area of the AdminCP.

By default the censorship option in their profile will be checked, which disables word censorship.

You can change some product options for this mod by selecting the 'User Censorship Options' setting group from the vBulletin Options area in the AdminCP.

Uninstalling:

If you remove this product and want to stick with the normal vBulletin censoring system, then update the post cache and clear the parsed signatures under the 'Maintenance --> Update Counters' area of the AdminCP.

Changelog:

v0.1 (2/23/10)

Initial release

v0.2 (2/24/10)

Fix the plugin that censors group discussions.
Add a plugin to censor the pagetitle as set by navbits.

v0.3 (2/27/10)

Added an option to control if words are censored for visitors/unregistered users.
Added an option to control the default censorship value for newly registered users.

v0.4 (8/10/10)

Improved support for vBulletin 4.x.x (Thanks to CClements for the bug report and testing).

Jarocks
02-24-2010, 02:01 AM
Definately installing this, Will edit this post after it's been tested at my site. :)

This will help me let parents keep users from seeing censored words!!!

(Marked As Installed)

crs6785
02-25-2010, 01:53 AM
Fixed an issue in the group discussion plugin. Also added another plugin to cover censoring some pages that use the $pagetitle global variable.

I'm curious as to how this plugin performs on a moderate/large sized forum. Since it has to censor words in cached text, I'm guessing it might slow down loading cached posts. I'm curious if the delay/resources used is noticeable on a busy forum.

SEW810
03-01-2010, 03:09 AM
any screen please?.
Thanx dude :)

CClements
07-06-2010, 10:35 PM
Any chance for a vb4 release? I tried installing this with vb 4.0.4 and it didn't work so well. Whenever I enabled censored words through my user profile, I got a screen full of code. I really like the idea, though, so I hope you can release a vb4 version if you have the time.

crs6785
07-21-2010, 01:58 AM
Any chance for a vb4 release? I tried installing this with vb 4.0.4 and it didn't work so well. Whenever I enabled censored words through my user profile, I got a screen full of code. I really like the idea, though, so I hope you can release a vb4 version if you have the time.

Interesting...what do you mean by screen full of code? You can PM the message/screenshot to me if you like.

I just tested the plugin with VB 4.0.5 and didn't see an issue like that when toggling the option in my profile. However, it could be that there is an issue with the logic that creates the custom user field, as it is created manually when the product is installed. That's just a guess though.

While I was testing VB 4 I also fixed the censoring in the forum bits plugin since it was changed a bit in VB 4. I'll still check if I can reproduce the issue with the option in the profile. If not I'll just upload the new version soon.

CClements
08-03-2010, 01:12 AM
I sent a screen shot to you via PM. Thanks for taking a look at it for me.

TheKdd
08-03-2010, 08:46 PM
Couple of questions....

So with this mod I could censor, say, all profanity (that I can come up with lol), then the user themselves would be able to decide whether they want it on or off? That's exactly what I'm looking for if that's the case. I just want to make sure I understand this correctly :)

Second question... is censorship globally enabled automatically, and then the user can then decide they want it off or is it auto off, and the user can go turn it on? Also, for guests viewing, would the censorship be auto-on for them as well until they join and then they can turn it off? If not, is it possible to do this?

Thanks so much, sorry for all the questions!

crs6785
08-07-2010, 07:05 PM
Couple of questions....

So with this mod I could censor, say, all profanity (that I can come up with lol), then the user themselves would be able to decide whether they want it on or off? That's exactly what I'm looking for if that's the case. I just want to make sure I understand this correctly :)


Yup, that's correct.


Second question... is censorship globally enabled automatically, and then the user can then decide they want it off or is it auto off, and the user can go turn it on? Also, for guests viewing, would the censorship be auto-on for them as well until they join and then they can turn it off? If not, is it possible to do this?


Currently I have it set so censorship is disabled by default for users when you install the product. You can change it if you want, but you'll need to edit the product manually before installing it. You would need to edit the following line of the install code...


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field{$profilefield_id} INT NOT NULL DEFAULT '1';");


And change the 1 near the end to a 0. So it would look like this ...


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field{$profilefield_id} INT NOT NULL DEFAULT '0';");

They can go into their profile at anytime then to change the censorship status. You can also set an option in the AdminCP to decide whether you want censorship enabled or disabled for new users (this will not change the option for current users).

You can also toggle censorship on or off for visitors from an option in the AdminCP. By default it is set to not censor text for visitors (easily changed though, like I mentioned).

I will be releasing a new version soon with some fixes for vbulletin4. I'm pretty sure I fixed the bug CClements pointed out. If I don't hear back in a week I'll post the new version since I'm pretty confident it's fixed.

steeler7
08-09-2010, 01:43 AM
Yup, that's correct.



Currently I have it set so censorship is disabled by default for users when you install the product. You can change it if you want, but you'll need to edit the product manually before installing it. You would need to edit the following line of the install code...


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field{$profilefield_id} INT NOT NULL DEFAULT '1';");


And change the 1 near the end to a 0. So it would look like this ...


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field{$profilefield_id} INT NOT NULL DEFAULT '0';");

They can go into their profile at anytime then to change the censorship status. You can also set an option in the AdminCP to decide whether you want censorship enabled or disabled for new users (this will not change the option for current users).

You can also toggle censorship on or off for visitors from an option in the AdminCP. By default it is set to not censor text for visitors (easily changed though, like I mentioned).

I will be releasing a new version soon with some fixes for vbulletin4. I'm pretty sure I fixed the bug CClements pointed out. If I don't hear back in a week I'll post the new version since I'm pretty confident it's fixed.

Awesome! I've been looking for this when I had 3.8.4 and didn't see it and now that I upgraded to 4 I thought there was a slim chance to find this.

Thanks. I'm looking forward to the vB 4 release of this

crs6785
08-10-2010, 04:17 PM
The bug with vBulletin 4.x.x has been fixed, so I've uploaded the new version. If anyone encounters any other issues with this product feel free to let me know and I'll do my best to fix it.

BirdOPrey5
08-10-2010, 07:48 PM
I really like the idea of this mod but I have a couple of questions:

1) How does it affect performance- how are the posts cached? Are only the uncensored versions cached? Are both cached? Does the last one called replace the other- etc... I could see this effectively doubling the load if it isn't implemented right...

2) Is this system able to more or less guarantee the uncensored words would never shop up for someone with censorship enabled- including in 3rd party mods like vbAdvanced CMS and the Arcade high scores?

crs6785
08-10-2010, 09:23 PM
1) How does it affect performance- how are the posts cached? Are only the uncensored versions cached? Are both cached? Does the last one called replace the other- etc... I could see this effectively doubling the load if it isn't implemented right...


Only uncensored versions are cached. There are not enough hooks in place (based on my understanding of how the caching is achieved...perhaps I'm wrong though :/ ) to create a cached censored and uncensored version. That would obviously be the ideal solution. Then it could retrieve the cached censored or uncensored version depending on user specific settings. The only solutions to that problem, that I can see, involve modifying the source itself.

Regarding performance, I was wondering about that myself. I'm not sure because I haven't had any feedback from a heavily used forum that tried it and I don't have access to one to try it.

However, a while back I did a simple benchmark of the page load times for a long thread with lots of censored words. The result was ...

0.09227 seconds - With Censor
0.08614 seconds - Without Censor

Which is a 0.00613 second difference. For a short thread with not as much text/stuff to censor the difference was 0.00181 seconds. For things like profile pages, albums, and groups there wasn't a difference in load time.


2) Is this system able to more or less guarantee the uncensored words would never shop up for someone with censorship enabled- including in 3rd party mods like vbAdvanced CMS and the Arcade high scores?

There was only one spot in the private message system where there wasn't enough hooks to censor something (PM page titles or something like that...), other than that I think I pretty much covered it all.

Things in 3rd party mods would probably just come across uncensored. A global, fool proof solution, to having censorship controlled as a user based option is going to require rewriting a lot of stuff in vbulletin. It simply wasn't designed with that in mind.

CClements
08-10-2010, 11:18 PM
BirdOPrey5,

This mod is definitely worth a shot if user-based censorship is what you are going for. :up:

I don't run a heavily trafficked site, but the mod works great on mine. Plus the "more experienced" generation of members on my board really appreciate not having to read all the foul language on the board.

Download it and give it a shot. See what happens. :D

BirdOPrey5
08-11-2010, 12:12 AM
The problem is I don't (can't) have obscene language showing up in my vbadvanced homepage or my arcade high scores or some other place I'm not thinking of- besides the bad light it would shed on the board and offended members I think it would red-flag the site in some web filtering programs as an 'adult' or worse, 'racist/hate' site and knock out visibility to many of my members who browse from work.

I'm all for the idea of user-based censorship but I can't take the chance of having uncensored parts of my page- my uses will find them. As is I have a mod that disables the word censor per forum id so we have a private 'anything goes' forum but no one can accidentally access it nor is it crawled by search or indexing spiders.

CClements
08-11-2010, 02:16 AM
I don't know how it will handle vbadvanced because I don't have it installed, but I do have ibproarcade installed. I'll check and see if it censors anything in the arcade high scores...

CClements
08-11-2010, 02:20 AM
It censors the words in the ibproarcade high scores. :up:

BirdOPrey5
08-11-2010, 02:59 AM
Thanks.

KW802
08-11-2010, 09:11 PM
It censors the words in the ibproarcade high scores. :up:

Thanks.
... but you're using v3 Arcade. ;)

EDIT: I'll install a test copy somewhere to test it. If it isn't currently working as expected, then I'll put a change in so it does. :)

BirdOPrey5
08-11-2010, 09:46 PM
... but you're using v3 Arcade. ;)

EDIT: I'll install a test copy somewhere to test it. If it isn't currently working as expected, then I'll put a change in so it does. :)

I know but it was the thought that counted. :)

I don't have the arcade on my test install... if I decide to go this way I'll try it.

You have any guess on if it would work on VBadvanced?

steeler7
08-14-2010, 03:50 AM
BirdOPrey,

I'm just like you with this Mod. I needed something that users could disable the word censor at their discretion because I had to have a censor on to get past work filters and other things...

After fixing my own screw up initially (enabling and disabling mix up), it works really well for me. Words are censored when I'm not logged in. when I'm logged in as myself and the censored list is disabled it works.

I'm running vBadvanced 4 on my vBulletin 4.0.3 board and I was sort of confused about you wondering if it would work with vBadvanced. Unless you are inputting the text into a Page or a custom Module, I would think that everything else is pretty much pulling from the forum into vBadvanced .. so it should follow the censorship setup you put on for your forum.... In any case, I have my site set up where vBadvanced pulls specific Threads I have prefixed from my forum so that my Vbadvanced looks more like a Blog on the outside b and all of the profanity is censored on vBadvanced .

BirdOPrey5
08-14-2010, 01:07 PM
Thanks for the info, it gives me more hope I may try this.

BirdOPrey5
08-14-2010, 01:51 PM
OK one more question... lets say I decide to remove this mod one day- now all the posts are in the database uncensored... will old posts show uncensored to everyone or will the default built in vb censor still censor words when displaying them even though they made it into the database uncensored?

crs6785
08-18-2010, 09:33 PM
OK one more question... lets say I decide to remove this mod one day- now all the posts are in the database uncensored... will old posts show uncensored to everyone or will the default built in vb censor still censor words when displaying them even though they made it into the database uncensored?

If you remove the product then you need to rebuild the post cache and signatures cache (per the uninstall info for the mod) so that words that made it in uncensored will once again be censored. As long you rebuild the cache it will work as expected.

BirdOPrey5
08-19-2010, 01:34 AM
Thanks for the info.

PSC001
09-24-2010, 05:45 PM
Install instructions say "Enable word censorship in the AdminCP area under vBulletin options and configure the words to block", but can additional words to be censored still be added after this is installed?

PSC001
09-24-2010, 06:25 PM
Never mind, I installed it anyway and was able to successfully add words after the fact. Thanks, and marked as Installed.

onealien
09-27-2010, 09:46 PM
works great...and love the principle of 'freedom of choice'....lol

thanks....*marks installed*...

tyteen4a03
11-03-2010, 03:01 PM
Can we actually have this as a Yes/No radio box? The current design is very confusing.

Kat-2
03-03-2011, 02:41 AM
Please, please update this for 4.1 !!

wtwest
03-25-2011, 02:37 PM
I installed this a few days ago, and decided to uninstall it. Then, I finally decided that I want to install and use the mod. I have two checkboxes for censorship options. How do I remove the one from before?

crs6785
05-13-2011, 02:09 AM
I installed this a few days ago, and decided to uninstall it. Then, I finally decided that I want to install and use the mod. I have two checkboxes for censorship options. How do I remove the one from before?

Sorry for such a delayed response here. You mean two checkboxes to tick in their profile? If that's the case, then it would be: Admin CP --> User Profile Fields --> User Profile Field Manager. Delete the one with the lower order number.

crs6785
05-13-2011, 02:10 AM
Please, please update this for 4.1 !!

Is there something that doesn't work with 4.1 but did work with previous releases? I just did a quick test of the new version and didn't see anything obvious, though I haven't really done too much testing yet.

Grimes
09-21-2012, 01:15 PM
Hi, I realize this hasn't been updated in a while, but I was wondering if anyone has any experience running this on 4.2 PL2? I would love to use this, but I'd like to make sure it works on 4.2 first. Thanks.