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
  #42  
Old 06-07-2003, 09:32 PM
Andrew111888's Avatar
Andrew111888 Andrew111888 is offline
 
Join Date: Mar 2003
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just double checked; I did have something incorrect that I fixed, then double checked again and all seems to be in order.. but it still won't stay checked yes.
Reply With Quote
  #43  
Old 06-08-2003, 05:07 AM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would suggest reverting all the edits back to how they were before hacking and trying again. (Reversing the query won't do anything so you can leave that how it is with the new userfield and all).

If you run into any code that you aren't sure about post it and I will help you out.

Hope all goes well.
Reply With Quote
  #44  
Old 06-08-2003, 04:49 PM
Andrew111888's Avatar
Andrew111888 Andrew111888 is offline
 
Join Date: Mar 2003
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just took half an hour to re-install this and IT STILL DOESN'T KEEP "YES" SELECTED!!
Reply With Quote
  #45  
Old 06-08-2003, 05:37 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok check Step 3.

Also, check the modifyoptions template edit in Step 6.

Make sure you have the $usecensornotchecked and $usecensorchecked variables in there as well in the modifyoptions edit or the buttons will not be checked.

Also, if you tried to make the code in Step 6 in it's own seperate template it will not work. I tried this before too and everything else was the same and it didn't work. It displayed the option field but yes or no was not selected.

Did you do anything different at all with the hack?
Reply With Quote
  #46  
Old 06-08-2003, 06:24 PM
Andrew111888's Avatar
Andrew111888 Andrew111888 is offline
 
Join Date: Mar 2003
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have it all fine
Reply With Quote
  #47  
Old 06-08-2003, 07:44 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really don't know then. The only thing I can say is if you want I can go check out your code. I don't see any other way to do it.

I don't see why it's not working for you but I would have to see your code to find the problems. Maybe PM me about it or something.
Reply With Quote
  #48  
Old 07-13-2003, 04:43 AM
Pikok Pikok is offline
 
Join Date: Jul 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had the same problem with the filter getting turned off and not working. There's an error in the code in the installation file..


In "root/member.php" where it says to add:
PHP Code:
// User-Selectable Optional Language Censor by 006
  
$swearfilter=iif($swearfilter=="yes",1,0); 
Under:
PHP Code:
$options+=iif($showimages=="yes",4,0); 
Add This Instead:
PHP Code:
// User-Selectable Optional Language Censor by 006
  
$usecensor=iif($usecensor=="yes",1,0); 
Basically, if you've already installed this hack.. Just replace both instances of "swearfilter" with "usecensor" in that line and you should be all set.
Reply With Quote
  #49  
Old 07-13-2003, 04:59 AM
Andrew111888's Avatar
Andrew111888 Andrew111888 is offline
 
Join Date: Mar 2003
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Pikor, you are a LIFE saver!
Reply With Quote
  #50  
Old 07-13-2003, 05:15 AM
Pikok Pikok is offline
 
Join Date: Jul 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem.. Happy to help.
Reply With Quote
  #51  
Old 07-13-2003, 05:52 AM
Pikok Pikok is offline
 
Join Date: Jul 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, I have a question..

Anybody have a suggestion on how to filter for example "crap", but not "scrap" with this hack? I know I could check for " crap", "crap ", and " crap ".. But, then if "crap" was the only word on a line it wouldn't get filtered. I can only figure out how to get it to filter the word if there's other text on the line with it.

Another idea would be to be able to add a list of words that would be ignored as well as words to be filtered. If this could be done, it would be less work and probably give better performance as there would only be the 2 lines vs. the 4+ lines.

I'm not quite sure how to do it with this hack. Any ideas?!?
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 05:47 AM.


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.07033 seconds
  • Memory Usage 2,314KB
  • 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_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
  • (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