![]() |
User-Selectable Optional Language Replacement Censor
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. :pirate: 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. |
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 |
Cool. Let me know how it goes for you.
:) |
Very cool;) I'll install this on locally later
|
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:
PHP Code:
|
this is excellent :) thanks 006 -- I'll check it out when I get home
|
Nice idea:)
Satan |
Thanks. Let me know how it goes everyone. :)
|
Ok a quick question:
admin/functions.php, we are told to add: Code:
// User-Selectable Optional Language Replacement Censor by 006 Also : registeradult template: Code:
<tr> Satan |
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. |
Well surely you would just have:
Code:
// User-Selectable Optional Language Replacement Censor by 006
:) Satan |
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!) :) |
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 |
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* |
Quote:
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. :) |
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 |
Quote:
Satan |
Fixed the typo.. lol
You're killing me man.. j/k lol :) Thanks! :p |
It works very well:)
Maybe thread titles could do with it as well;) And i'm working on the list thing;):) Satan |
Quote:
I will look into that. Good idea. |
I think they are censored in forumdisplay.php and showthread.php:)
Satan |
I looked in both of those earlier today with no luck.
|
i believe
$subject=censortext($subject); in editpost, newthread, newreply ;) then again I may be wrong |
Mine didn't have that... I'll look again tomorrow. It's late. :)
|
Aha -
In newreply.php: Code:
$title=censortext($title); Code:
$subject=censortext($subject); Code:
$title=censortext($title); Satan |
Convienient mod, thanks for this. May just use. :)
|
question does the word filter in the admin cp have to be enabled or disabled for this to work correctly?
|
Well I just updated the install file now.
Changed step 6. With the update, you DO (yes) need to have censoring enabled in admincp. Thread titles will now be censored as well, but will be censored regardless of the users preferences. If anyone knows how to use the replacement system for the thread titles based on if the user has selected to use censoring or not please let me know. Thanks. If you don't see a different step 6 then clear your cache and then try downloading again. :) |
Quick Q:
Which step 6? The first one, second one or third one?;):p Satan |
Everything in step 6 is new. :)
The old step 6 was just disabling the censor option from admincp... but now you need it enabled, at least if you use the new step 6. ~006 :) |
I will wait and see if a way is found to do it via your method for titles - If one is not found, I will see if I can find some way to make it do it:)
Satan |
Cool. And I just found out that the censoring option needs to be turned OFF in your admin CP for this hack to work.
I am still trying to get this to work with titles... I found some censoring code in the functions.php a few scrolls under the edit this hack makes that I am looking into.. |
Okies cool;)
Satan |
Umm.... everytime I try to click "Yes" to use language filter in my user cp and click edit options, it's set to No again?
Some help! |
Anybody?
|
??????????????
|
Huh?
|
Okay, I do everything I'm told to do. I have the filter in the admin cp set to off. I go to user CP and turn my filter on. I then re-enter my user cp options, and it's set to "no" again. I.E.: The filter doesn't stay on. My other users have noticed this too.
Any ideas? |
Jeez, within 11 hours a thread is bumpped back to halfway down on the second page...
|
Sounds like you may have missed a step in member.php
There are defining variables that determine whether or not the Yes or No radio buttons will be checked or not. Try going back and making sure you did everything. It should definately work if you followed all of the directions. You did run the query right? Can you edit a users options in the admin cp? Does your selection stay there? If so then go back and redo the edits in member.php. |
All times are GMT. The time now is 04:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|