View Full Version : Enable/Disable Censor in individual forums
SWFans.net
10-30-2002, 10:00 PM
This is a fairly straightforward and semi easy hack to add. What it does is gives the administrator the option in the admin control panel for their vB board to enable or disable the swear filter (censored words list) on a forum-by-forum basis. Just in case you would like to have swearing allowed in an individual or private forum, but not allowed in other forums.
I would like to give credit to Logician (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=2355) for helping me figure out how to do this correctly in the request forum. Thanks much!
It has been tested on a version 2.2.7 board, but should work as is on a 2.2.8 board I do believe. :)
Smoothie
10-31-2002, 07:22 AM
Nice! Been looking for this. Does this add any extra queries?
SWFans.net
10-31-2002, 07:33 AM
None.
bblack
10-31-2002, 01:12 PM
Yes it'S look nice thnaks for the works !
:D
Very cool idea indeed. I'll be installing this, thanks :D
Smoothie
11-01-2002, 04:06 AM
anyone have this installed and running ok on your forums?
Chris M
11-01-2002, 07:45 AM
Looks quite nice:)
Shame I dont censor what users say;)
Satan
DiscussAnything
11-05-2002, 05:34 PM
are you sure this query is correct?
ALTER TABLE forum ADD forceusepostprefix SMALLINT(6) DEFAULT '1' NOT NULL;
'censor' isnt stated anywhere, and my forum gives me an error when i try to tell it to censor words in a certain forum. it tells me
Database error in vBulletin Control Panel 2.2.6:
Invalid SQL: UPDATE forum
SET
styleid='1', title='General Discussion', description='',
active='1', displayorder='99', parentid='-1', parentlist='45,-1',
allowposting='0', cancontainthreads='0', daysprune='30',
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='0', allowbbcode='0',
allowimages='0', allowsmilies='0', allowicons='0',
styleoverride='0', allowratings='0', countposts='1',
moderateattach='0',censor='1'
WHERE forumid='45'
mysql error: Unknown column 'censor' in 'field list'
mysql error number: 1054
I did note that the changes between 2.2.6 and 2.2.8+ are that instead of 'subject' they use 'title'. For the rest its all applicable
SWFans.net
11-05-2002, 08:31 PM
Sorry about that. The query should have been:ALTER TABLE forum ADD censor SMALLINT(6) DEFAULT '1' NOT NULL;I have updated the attachment.
DiscussAnything
11-06-2002, 06:38 AM
thanks, i was wondering what the forceusepostprefix had to do with anything ;)
Should I remove that column from the table or doesnt it take any space. And how would i safely remove it? (i'm not too experienced with sql :()
SWFans.net
11-06-2002, 07:10 AM
Yeah you should delete it. Use this command.
ALTER TABLE forum DROP forceusepostprefix;
Tungsten
11-12-2002, 05:39 PM
In order to make this work with VBulletin 2.2.8 you must change any instances of the following in the hack:
$subject=censortext($subject);
To read as follows instead:
$title=censortext($title);
Just do a mass search and replace on the hack code and you'll be set. :)
BigCheeze
12-01-2002, 01:00 AM
Does anyone know if this will work on 2.2.5?
SemperFidelis
01-08-2003, 04:54 AM
In vb 2.2.9, this doesnt exist :
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$visible')");
Any suggestions on what it was replaced with ?
SWFans.net
01-08-2003, 11:30 PM
It exists.
ImportPassion
02-05-2003, 03:05 PM
Originally posted by Tungsten
In order to make this work with VBulletin 2.2.8 you must change any instances of the following in the hack:
To read as follows instead:
Just do a mass search and replace on the hack code and you'll be set. :)
well, 2.2.9 newthread.php, this is not the case, it's still using $subject=censortext($subject);
One more thing, if you have Lesane's store hack, be careful you don't overwrite your queries.
Link14716
02-05-2003, 09:31 PM
Cool hack, but I don't use censors. If someone wants to cuss every 3rd word they say, then, whatever, they'll just be making themselves look immature, and if it annoys me and my mods enough, we'll bake some ban cakes. :)
Cyricx
06-03-2003, 07:07 PM
Great hack!!
Had to do the changes in post 12 and remove one of the } from the second edit for the editpost.php but other then that..
Works like a charm. :)
Boofo
06-03-2003, 08:37 PM
SWFans.net, if you replace all instances of this:
if ($foruminfo[censor]) {
with this:
if ($foruminfo[censor] AND !in_array($bbuserinfo[usergroupid], array(5, 6, 7))) {
will this hack still work as it is supposed to for other than staff?
MissN
07-19-2003, 02:56 AM
Like another person here said, you need to remove a { to get it to work when you edit a post, otherwise you'll get a parse error.
This
// censor hack
if ($foruminfo[censor]) {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars(censortext($title)))."', iconid=".intval($iconid)." WHERE threadid=$threadinfo[threadid]");
} else {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."', iconid=".intval($iconid)." WHERE threadid=$threadinfo[threadid]");
}
//$title="";
}
// end hack
Should be this:
// censor hack
if ($foruminfo[censor]) {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars(censortext($title)))."', iconid=".intval($iconid)." WHERE threadid=$threadinfo[threadid]");
} else {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."', iconid=".intval($iconid)." WHERE threadid=$threadinfo[threadid]");
//$title="";
}
// end hack
Cyricx
09-15-2003, 06:36 PM
Hmm using 2.3.2 and unable to disable the censor in PMs
Anyone else having this problem with this hack?
TheComputerGuy
09-16-2003, 03:28 PM
Do we have to replace all $subject=censortext($subject);
Cause I want to use vB 2.3.2
vbtester33
01-14-2005, 07:13 PM
i need this for vb 3.03
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.