Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
User-Selectable Optional Language Replacement Censor Details »»
User-Selectable Optional Language Replacement Censor
Version: 1.00, by 007 007 is offline
Developer Last Online: Apr 2020 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-30-2003 Last Update: Never Installs: 12
 
No support by the author.

User-Selectable Optional Language Replacement Censor by 006

What this hack does:

This will give your users the option whether or not they want to have certain words censored or not. Also instead of the standard *** for censored words, this lets you substitute different words that will be used to replace words.

For example, if the user has language filter turned on, and the word "dog" is censored, and you have chosen to have the word "cat" be used as a replacement, then this user will see the word "cat" in every post where the word "dog" is used. If the user does not choose to enable censoring, they will see the word "dog."

(No use censoring that word lol, it's just for the example)

Benefits of this hack:

People will no longer try to cheat to get their words in by typing "[b][/b]" in the middle of certain censored words to fool the word filter. If they want to see all words, they choose to not use the censor and are happy. If they are offended by certain words, they can use the censor and be happy. Everybody wins. irate:

User-Selectable Optional Language Replacement Censor

by 006

INSTALLATION TIME:

About 20 - 30 minutes. (6 steps, 4 file edits, 3 template edits, and 1 query)

It has been tested and works fine in 2.2.9

Any questions? Feel free to ask in this thread.

If you use this hack, please click "INSTALL." Thanks



Updated install file to .php so it doesn't parse replacements.

Show Your Support

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

Comments
  #2  
Old 05-31-2003, 05:12 PM
Dan's Avatar
Dan Dan is offline
 
Join Date: Dec 2002
Location: Titusville, Florida
Posts: 1,787
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh this is so useful... some of my members are offended by the words i censored and some don't care and want to see them so great hack and I'll install it in a few.

/me clicks install
Reply With Quote
  #3  
Old 05-31-2003, 05:13 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool. Let me know how it goes for you.

Reply With Quote
  #4  
Old 05-31-2003, 05:17 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very cool I'll install this on locally later
Reply With Quote
  #5  
Old 05-31-2003, 05:21 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool. I just updated the installation file so censoring is turned on by default for guests.

The only change is in functions.php

Change
PHP Code:
if ($bbuserinfo[usecensor]!=0
to
PHP Code:
if ($bbuserinfo[usecensor]!=or $bbuserinfo[userid]==0
Reply With Quote
  #6  
Old 05-31-2003, 05:35 PM
Koutaru's Avatar
Koutaru Koutaru is offline
 
Join Date: Feb 2003
Location: IL
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is excellent thanks 006 -- I'll check it out when I get home
Reply With Quote
  #7  
Old 05-31-2003, 06:05 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea

Satan
Reply With Quote
  #8  
Old 05-31-2003, 06:06 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Let me know how it goes everyone.
Reply With Quote
  #9  
Old 05-31-2003, 06:11 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok a quick question:

admin/functions.php, we are told to add:

Code:
// User-Selectable Optional Language Replacement Censor by 006
if ($bbuserinfo[usecensor]!=0 or $bbuserinfo[userid]==0) {
$bbcode=eregi_replace("wordtocensor","replacewith", $bbcode); 
$bbcode=eregi_replace("wordtocensor","replacewith", $bbcode);
} else {}
// User-Selectable Optional Language Replacement Censor by 006
But there is nothing in the "} else {" statement...

Also :

registeradult template:

Code:
<tr>
	<td bgcolor="{firstaltcolor}"><normalfont><b>Pop up a box when you receive a Private Message?</b></normalfont><br>
	<smallfont>This will pop up a small warning box when you receive a Private Message asking whether you want to view the message.</smallfont></td>
	<td bgcolor="{firstaltcolor}"><normalfont>
		<input type="radio" name="pmpopup" value="yes"> yes
		<input type="radio" name="pmpopup" value="no" checked> no
	</normalfont></td>
</tr>


-----------------------FIND-------------------------------------


and underneath it, add
---------------------------------ADD----------------------------


<tr>
	<td bgcolor="{secondaltcolor}"><normalfont><b>Pop up a box when you receive a Private Message?</b></normalfont><br>
	<smallfont>This will pop up a small warning box when you receive a Private Message asking whether you want to view the message.</smallfont></td>
	<td bgcolor="{secondaltcolor}"><normalfont>
		<input type="radio" name="usecensor" value="yes" checked> yes
		<input type="radio" name="usecensor" value="no"> no
	</normalfont></td>
</tr>
Forgot to change something?

Satan
Reply With Quote
  #10  
Old 05-31-2003, 06:13 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MY BAD! (Will change that now)


and..

There's not supposed to be. That just leaves censoring totally off for people who selected to turn it off.
Reply With Quote
Reply

Thread Tools

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 02:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05409 seconds
  • Memory Usage 2,300KB
  • 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
  • (2)bbcode_php
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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