View Full Version : Disable swear censor per forum (configurable)
boozehound
02-21-2005, 10:00 PM
https://vborg.vbsupport.ru/showthread.php?t=45238 is great but for vb 2 and https://vborg.vbsupport.ru/showthread.php?t=65343 doesn't give you the option of configuring the per forum settings through admincp, so here is a hack similar to the vb2 version but for vb3. Tested on 3.0.3 through 3.0.7.
Update 2nd March 2005: See this post (https://vborg.vbsupport.ru/showpost.php?p=619564&postcount=9) to stop sigs bypassing the filter globally.
dndog
02-22-2005, 09:26 PM
Screenshots?
Thanks.
boozehound
02-22-2005, 09:31 PM
Screenshots?
Thanks.
There isn't much to see, just a new option in the forum manager. For the forums you don't want to be censored, set this option to 'no'. It is 'yes' by default.
Boofo
02-23-2005, 03:50 AM
Is there a way to allow Admins to not be censored no matter what it is set at in a certain forum? ;)
T3MEDIA
02-23-2005, 06:13 PM
Ok this is creepy I was thinking about something like this. BUT I was looking for soemthing that lets Private messages not be screened. ever by usergroup.
but public stuff stays the same...
i mean it would be nice if there was a switch in the control pannel that had allow swearing... block swearing.
that way if people are offended it is blocked. almost how google has safe filter.
can this mod be... um... modded to do such a thing?
boozehound
02-23-2005, 06:44 PM
Is there a way to allow Admins to not be censored no matter what it is set at in a certain forum? ;)
Not with this hack as it is but it's certainly possible; I'm working on a 'img tags per usergroup per forum' hack at the moment which involves a new table mapping forum ids to usergroup ids with a permissions column, this could be extended for censoring too. In fact with censoring this is quite easy as you just have to find calls to fetch_censored_text in posting-based scripts (i.e. newreply, newthread, editpost) and put a conditional around the call based on the settings.
boozehound
02-23-2005, 06:46 PM
Ok this is creepy I was thinking about something like this. BUT I was looking for soemthing that lets Private messages not be screened. ever by usergroup.
but public stuff stays the same...
i mean it would be nice if there was a switch in the control pannel that had allow swearing... block swearing.
that way if people are offended it is blocked. almost how google has safe filter.
can this mod be... um... modded to do such a thing?
For PMs you'd just need to put conditionals around the calls to fetch_censored_text in the PM scripts (just private.php off the top of my head). For it to be a user selectable option just add a new user option mapping to a field in the user table (or use a custom profile field if you're lazy) and base the conditional on that.
jlaine
03-01-2005, 11:19 PM
Seems to allow signatures to bypass the censor globally - whether or not the forum is set to yes doesn't effect it.
boozehound
03-01-2005, 11:54 PM
Seems to allow signatures to bypass the censor globally - whether or not the forum is set to yes doesn't effect it.
In includes/functions_bbcodeparse find:
if ($forum['censor'])
replace with:
if ($forum['censor'] || $forum == null)
This will censor sigs globally.
jlaine
03-02-2005, 01:41 AM
In includes/functions_bbcodeparse find:
if ($forum['censor'])
replace with:
if ($forum['censor'] || $forum == null)
This will censor sigs globally.
Gotcha, will apply sir. :)
Is there a reason it is not applying the censor to non-checked forums?
I'd be fine with it if it was staying active in forums that had mandatory censoring, but once I installed this, globally all signatures were bypassing the censor rules.
Thanks for the help,
Josh
boozehound
03-02-2005, 01:48 AM
Gotcha, will apply sir. :)
Is there a reason it is not applying the censor to non-checked forums?
I'd be fine with it if it was staying active in forums that had mandatory censoring, but once I installed this, globally all signatures were bypassing the censor rules.
Thanks for the help,
Josh
It was an oversight on my part; I was just checking for a flag mapped to a forum id when deciding whether or not to apply the filter, but not checking for the case where there was no forum id which is the case when sigs are parsed.
The way this hack works it would be a bit more work to allow sigs to bypass the filter per forum. But at some point I hope to release a new version of this hack that allows the filter to apply per usergroup per forum, and I'll include the sig stuff in that.
jlaine
03-02-2005, 10:50 AM
It was an oversight on my part; I was just checking for a flag mapped to a forum id when deciding whether or not to apply the filter, but not checking for the case where there was no forum id which is the case when sigs are parsed.
The way this hack works it would be a bit more work to allow sigs to bypass the filter per forum. But at some point I hope to release a new version of this hack that allows the filter to apply per usergroup per forum, and I'll include the sig stuff in that.
I applied that change - but it appears that disables checking of any forum on regular posts - as the censor is working on the forum I chose to disable it in - users posts are coming back censored now.
I don't mind the exclusion of the signature, so long as it's always globally censored - kinda freaked me out when something ended up visible in the general areas. ;)
boozehound
03-02-2005, 09:57 PM
I applied that change - but it appears that disables checking of any forum on regular posts - as the censor is working on the forum I chose to disable it in - users posts are coming back censored now.
I don't mind the exclusion of the signature, so long as it's always globally censored - kinda freaked me out when something ended up visible in the general areas. ;)
Hmm I see what you mean. Well, he's a kind of fix, it'll censor sigs when they are edited (by a user, not through modcp or admincp but the code for that is the same just in a difference place), so it'll be impossible for users to put censored words in their sigs.
profile.php
find:
else
{
$signature = trim($message);
}
add after that:
require_once('./includes/functions_bbcodeparse.php');
$signature = fetch_censored_text($signature);
jlaine
03-02-2005, 11:13 PM
Hmm I see what you mean. Well, he's a kind of fix, it'll censor sigs when they are edited (by a user, not through modcp or admincp but the code for that is the same just in a difference place), so it'll be impossible for users to put censored words in their sigs.
profile.php
find:
else
{
$signature = trim($message);
}
add after that:
require_once('./includes/functions_bbcodeparse.php');
$signature = fetch_censored_text($signature);
Gotcha - along with that I'll revert the other changes and see what takes place. ;)
Thanks again for the assistance, I'll let you know if anything arises from this. :)
Josh
rinkrat
06-22-2005, 03:01 AM
My shoutbox is now uncensored. How can I change it back to being censored? Is there a way to disable it globally till I get it right?
boozehound
06-22-2005, 04:01 AM
My shoutbox is now uncensored. How can I change it back to being censored? Is there a way to disable it globally till I get it right?
Change, in includes/functions_bbcodeparse.php (assuming this hack is applied):
if ($forum['censor'])
{
$bbcode = fetch_censored_text($bbcode);
}
to:
if ($forum['censor'] || empty($forum))
{
$bbcode = fetch_censored_text($bbcode);
}
which will then censor things that are parsed but where $forum is undefined, like in a shoutbox.
rinkrat
06-22-2005, 04:15 AM
OK the titles of the threads are uncensored but the contents of the posts are still ****'ed over.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.