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
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
  #12  
Old 05-31-2003, 06:17 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

Well surely you would just have:

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);
}
// User-Selectable Optional Language Replacement Censor by 006
I have a few suggestions for the next version if I may?
  • List of censored words
  • User can add their own words
OR
  • List of censored words
  • User can suggest words to be censored



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

Fixed. I also noticed that vb.org was parsing the replacement values, so I changed the install file to .php.

To answer your question before. The else isn't really necessary... (edited. I took it out. My bad!)
Reply With Quote
  #14  
Old 05-31-2003, 06:21 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, but IMO having an }else{ statement for nothing seems wasted

Luckily, in the .txt file I downloaded, the replacements were OK, it was just because I copied them from the .txt file into my post

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

I took it out now. I originally had something in there but decided it wasn't needed. I see what you meant. lol

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

Quote:
Today at 02:17 PM hellsatan said this in Post #11
I have a few suggestions for the next version if I may?...

As much as I hate to hardcode variables it was my only choice because I don't know any other way to do it. If you want to do that feel free and PM me and I will update the install file.

You'd get credit of course.
Reply With Quote
  #17  
Old 05-31-2003, 06:29 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

Not to be a pest, but you made another typo

in registeradult:
Code:
<normalfont><b>se language filter?</b></normalfont>
=
Code:
<normalfont><b>Use language filter?</b></normalfont>


Satan
Reply With Quote
  #18  
Old 05-31-2003, 06:30 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

Quote:
Today at 08:28 PM 006 said this in Post #15
As much as I hate to hardcode variables it was my only choice because I don't know any other way to do it. If you want to do that feel free and PM me and I will update the install file.

You'd get credit of course.
Ok sure I'll have a tamper around and see what I can come up with

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

Fixed the typo.. lol

You're killing me man.. j/k lol

Thanks!
Reply With Quote
  #20  
Old 05-31-2003, 06:49 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

It works very well

Maybe thread titles could do with it as well

And i'm working on the list thing

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

Quote:
Today at 02:49 PM hellsatan said this in Post #19
Maybe thread titles could do with it as well
Satan
I see what you mean.. Which file are thread titles censored? I' sure there is a way to make this also work with the standard censoring feature to, but for now you just have to turn it off...

I will look into that. Good idea.
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:20 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.05025 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
  • (3)bbcode_code
  • (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
  • (3)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