Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Enable/Disable Censor in individual forums Details »»
Enable/Disable Censor in individual forums
Version: 1.00, by SWFans.net SWFans.net is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 10-30-2002 Last Update: Never Installs: 8
 
No support by the author.

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 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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 11-06-2002, 07:10 AM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah you should delete it. Use this command.

PHP Code:
ALTER TABLE forum DROP forceusepostprefix
Reply With Quote
  #13  
Old 11-12-2002, 05:39 PM
Tungsten's Avatar
Tungsten Tungsten is offline
 
Join Date: Jan 2002
Location: Nashville, TN
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In order to make this work with VBulletin 2.2.8 you must change any instances of the following in the hack:

Quote:
$subject=censortext($subject);
To read as follows instead:

Quote:
$title=censortext($title);

Just do a mass search and replace on the hack code and you'll be set.
Reply With Quote
  #14  
Old 12-01-2002, 01:00 AM
BigCheeze BigCheeze is offline
 
Join Date: Oct 2002
Location: Lost in Colorado
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know if this will work on 2.2.5?
Reply With Quote
  #15  
Old 01-08-2003, 04:54 AM
SemperFidelis SemperFidelis is offline
 
Join Date: May 2002
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In vb 2.2.9, this doesnt exist :
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')"); 
Any suggestions on what it was replaced with ?
Reply With Quote
  #16  
Old 01-08-2003, 11:30 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It exists.
Reply With Quote
  #17  
Old 02-05-2003, 03:05 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #18  
Old 02-05-2003, 09:31 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 06-03-2003, 07:07 PM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 06-03-2003, 08:37 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SWFans.net, if you replace all instances of this:

PHP Code:
if ($foruminfo[censor]) { 
with this:

PHP Code:
 if ($foruminfo[censor] AND !in_array($bbuserinfo[usergroupid], array(567))) { 
will this hack still work as it is supposed to for other than staff?
Reply With Quote
  #21  
Old 07-19-2003, 02:56 AM
MissN MissN is offline
 
Join Date: Jul 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Code:
 // 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:

Code:
 // 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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:15 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04549 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete