Hi,
I have a question about the function "Censored Words", is it possible to only censor words in the posts? I dont want to have this function in the topic subject. ::)
Hope someone can help me with this, thanks.
Forum version: SMF 1.1.7
Welcome to SMF
I am not aware of any options other than allow users to turn off word censoring. If the word is in the censor list, it is censored throughout the forum.
Ah ok, because i want to use it as a url link function, example when u write "google" it automatic "censores" to google link (http://www.google.com).
But when someone writes "google" in a topic subject the bbcode shows up instead of the link. Does anybody know any other functions that can help me with this problem then, if its not possible to do with censored words function?
Please! ;)
Nobody knows how to do this? I have seen some other forums that got this function, but they aint using SMF. Please help :(
is the word censoring some kind of additional mod or included in smf? sorry to be off topic but I can't help you :(
Quote from: evolution88 on January 25, 2009, 10:19:26 PM
is the word censoring some kind of additional mod or included in smf? sorry to be off topic but I can't help you :(
it is included.
Admin panel -> Posts and Topics -> Censored Words
Quote from: DNAPANDA on January 25, 2009, 10:22:14 PM
Quote from: evolution88 on January 25, 2009, 10:19:26 PM
is the word censoring some kind of additional mod or included in smf? sorry to be off topic but I can't help you :(
it is included.
Admin panel -> Posts and Topics -> Censored Words
ooh, thanks a bunch ! i'm so blind -.-
If you want, we can move this topic over to the Mod Request board for you. There is currently no mod that I'm aware of that will do this. It's for the entire forum as mentioned earlier...
Can't you just substitute the word "Google" with the words "http://google.com", out of curiosity?
Quote from: greyknight17 on February 01, 2009, 03:31:35 PM
If you want, we can move this topic over to the Mod Request board for you. There is currently no mod that I'm aware of that will do this. It's for the entire forum as mentioned earlier...
That would be good, hopefully someone could make a mod that fixes this.
Quote from: Kat on February 01, 2009, 03:44:52 PM
Can't you just substitute the word "Google" with the words "http://google.com", out of curiosity?
Thats right, but the problem is that I dont want the word (ex. google) to show "http://google.com" in the topic subject, only in replys.
If a topic subject says "Google buys Youtube" it will show up "http://google.com buys Youtube".
Understand? :P
Ah, yeah!
I'm with ya!
Is it somebody who can help with this? :o
I'm looking for a similar but different mod, one that would allow censored words to be removed from the title / subject only.
I'm using ssi to include latest posts in my main site and i'd like to have swearing filtered from those titles. I don't however mind swearing in the main message body.
Both these requests could be included in the same mod. Something to decide what section of posts are censored.
IE. Apply filter to:
1. All content (smf default)
2. Message body only
3. Topic / message subjects only.
Thanks guys.
Having had a quick look at what this would entail it would seem changes to a lot of files would be required for this mod.
See the attached image of files that reference censorText and number of occurences within each of those files.
Is that generally a bad thing for a mod?
Quote from: DNAPANDA on January 20, 2009, 06:34:06 AM
Hi,
I have a question about the function "Censored Words", is it possible to only censor words in the posts? I dont want to have this function in the topic subject. ::)
Hope someone can help me with this, thanks.
Forum version: SMF 1.1.7
just had a look and this is surprisingly easy to do.
in Sources/Display.php
comment out the lines
censorText($topicinfo['subject']);
and
censorText($message['subject']);
making them
//censorText($topicinfo['subject']);
and
//censorText($message['subject']);
Alan G: I suspect your request would be similar but that you would need to go through each instance of CensorText you found and comment out all the ones you didnt want to be censored.
Yeah that's what i figured, just seems like a lot of changes to make, and would effect updates a fair bit.
Quote from: fwitt on February 17, 2009, 11:06:38 AM
Quote from: DNAPANDA on January 20, 2009, 06:34:06 AM
Hi,
I have a question about the function "Censored Words", is it possible to only censor words in the posts? I dont want to have this function in the topic subject. ::)
Hope someone can help me with this, thanks.
Forum version: SMF 1.1.7
just had a look and this is surprisingly easy to do.
in Sources/Display.php
comment out the lines
censorText($topicinfo['subject']);
and
censorText($message['subject']);
making them
//censorText($topicinfo['subject']);
and
//censorText($message['subject']);
Great, its getting close now! :D
It shows the right subject text when you are inside the current subject, but when you are looking at the topic inside the boards and on the forumindex it still shows links in the subject. Where can I change these codes?
I'd take a look at the list of files i attached previously, it will be one or multiple of those. Gping purely on name you might want to try messageindex.php
Subs-BoardIndex.php I think will be the main one to look in but there may be other occurances. They should all be very similar to the two posted earlier.
I have searched, but cant find it in messageindex.php or subs-boardindex.php :-\
BoardIndex.php
censorText($row_board['subject']);
Works like a dream, thanks a bunch guys!! :D
Quote from: DNAPANDA on February 17, 2009, 02:19:58 PM
Quote from: fwitt on February 17, 2009, 11:06:38 AM
Quote from: DNAPANDA on January 20, 2009, 06:34:06 AM
Hi,
I have a question about the function "Censored Words", is it possible to only censor words in the posts? I dont want to have this function in the topic subject. ::)
Hope someone can help me with this, thanks.
Forum version: SMF 1.1.7
just had a look and this is surprisingly easy to do.
in Sources/Display.php
comment out the lines
censorText($topicinfo['subject']);
and
censorText($message['subject']);
making them
//censorText($topicinfo['subject']);
and
//censorText($message['subject']);
Great, its getting close now! :D
It shows the right subject text when you are inside the current subject, but when you are looking at the topic inside the boards and on the forumindex it still shows links in the subject. Where can I change these codes?
Hello,
I don´t have Sources/Display.php in my theme, and I can´t find censorText code in Display.template.php...Where I can find this code?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi50.tinypic.com%2F2z9b5na.jpg&hash=a6817970a85b5becafa609db858dc5ec9d94b6b3)
Thank´s
That's because it's not in the template files at all, but the core source files. You're looking at /Themes/yourtheme/Display.template.php, but you have to go up out of the Themes area entirely and into the Sources files, which you cannot directly edit from the web (unless you use the File Management Mod)
Yeh,
That´s worked...
Thank´s ;D
If anyone can help I'd appreciate it. I'm using version 1.1.11 and I'm running into this problem. Ive made the changes suggested on this post and I'm 90% there...but.... the topic name on the board still shows the URL...when inside the topic it's clean (not censored) but the topic name on the board is still being censored and the URL is present.
I've made these changes, but I'm obviously missing something....any advice??
Code: [Select]
//censorText($topicinfo['subject']);
Code: [Select]
//censorText($message['subject']);
//censorText($row_board['subject']);
Having thought about this, I'd still use the censored words, as-is.
If you censor "Google" and substitute it with
[url=http://www.google.com]Google[/url]
it should do the job.
Google (http://www.google.com)
It Does Kay....works great in the body of the post BUT if you include the word google in the new topic name without making code changes this is what will show up on the board and the topic title
Google (http://www.google.com)
So lets say you post a new topic and call it search with google today what will show on the topic title and board will be
search with Google (http://www.google.com) today
The changes I've already made in the PHP files have solved the subject censoring however the title of the subject on the board is still effected. I need to know what code to change to stop the title name on the board from being censored. I only want to censor the words within the posts.
Any ideas??
NOTE- The red [non-active] would be google in this example, not sure why the red came up :-\
It's a "Here" thing. ;)
No idea, mate.
That'd need some coding, somewhere. Way out of my league, I'm afraid.
I believe that it'd be quite a difficult thing to achieve, too. Though, I could be wrong.
It seems from the above posts another member resolved the issue. I'm almost there just need to know which Censor code I'm missing.
'course!
Doh!
One thing I noticed, if it helps.
//censorText($topicinfo['subject']);
//censorText($message['subject']);
They didn't comment-out this one: //censorText($row_board['subject']);
No they didn't but I did :)
these are the three I commented out... must be another one somewhere??
//censorText($topicinfo['subject']);
//censorText($message['subject']);
//censorText($row_board['subject']);
Hi!
I'm trying to do the same thing (on SMF 2.0.2) but I'm stuck...
I 've commented out the three lines as above, but still the thread subject gets "censored".
Any help would be appreciated.
Thanks!
I think I "almost" managed to make this work!
I need to change some words into links automatically but to do this, I need the CensoredWords "plugin" to only censor the body texts and not the topics's subjects otherwise some subjects would look like:
[url=http://www.google.com]Google[/url] is great!
In addition to the things listed in the above posts, I also modified MessageIndex.php as follows.
I edited this section:
// Censor the subject and message preview.
censorText($row['first_subject']);
censorText($row['first_body']);
// Don't censor them twice!
if ($row['id_first_msg'] == $row['id_last_msg'])
{
$row['last_subject'] = $row['first_subject'];
$row['last_body'] = $row['first_body'];
}
else
{
censorText($row['last_subject']);
censorText($row['last_body']);
}
}
else
{
$row['first_body'] = '';
$row['last_body'] = '';
censorText($row['first_subject']);
if ($row['id_first_msg'] == $row['id_last_msg'])
$row['last_subject'] = $row['first_subject'];
else
censorText($row['last_subject']);
}
as follows:
// Censor the subject and message preview.
//censorText($row['first_subject']);
//censorText($row['first_body']);
// Don't censor them twice!
if ($row['id_first_msg'] == $row['id_last_msg'])
{
//$row['last_subject'] = $row['first_subject'];
$row['last_body'] = $row['first_body'];
}
else
{
//censorText($row['last_subject']);
censorText($row['last_body']);
}
}
else
{
$row['first_body'] = '';
$row['last_body'] = '';
//censorText($row['first_subject']);
if ($row['id_first_msg'] == $row['id_last_msg'])
$row['last_subject'] = $row['first_subject'];
//else
// censorText($row['last_subject']);
}
This kind of works (only the body of the message gets censored, therefore the topics subjects stay uncensored), but problems arise when one edits a censored message (the body gets censored twice, making the automatically created links like this:
[url=http://www.[url=http://www.google.com]Google[/url].com][url=http://www.google.com]Google[/url][/url]
I temporarily fixed this by adding these "Censored Words":
Censor this:
[url=http://www.[url=http://www.google.com]Google[/url].com][url=http://www.google.com]Google[/url][/url]
Into this:
[url=http://www.google.com]Google[/url]
Which actually works because bodies can't be edited more than once at a time, basically.... but this solution does not look very kosher IMHO :)
Any suggestions?
Thanks
Quote from: Sciamano on January 03, 2013, 08:10:16 AM
(...)
This kind of works (only the body of the message gets censored, therefore the topics subjects stay uncensored), but problems arise when one edits a censored message (the body gets censored twice, making the automatically created links like this:
[url=http://www.[url=http://www.google.com]Google[/url].com][url=http://www.google.com]Google[/url][/url]
I temporarily fixed this by adding these "Censored Words":
Censor this:
[url=http://www.[url=http://www.google.com]Google[/url].com][url=http://www.google.com]Google[/url][/url]
Into this:
[url=http://www.google.com]Google[/url]
Which actually works because bodies can't be edited more than once at a time, basically.... but this solution does not look very kosher IMHO :)
Any suggestions?
Thanks
It's going to be a 5 years bump, but the problem is still there. I've lurked the whole forum and search engines and came to the same conclusion as quoted member.
Is there anyone willing to share a way to stop censoring words covered by BBCode tags?
While mentioned method is working it certainly has a great impact on performance..
QuoteIs there anyone willing to share a way to stop censoring words covered by BBCode tags?
There basically isn't one.
Quote from: Arantor on January 13, 2018, 05:14:48 PM
QuoteIs there anyone willing to share a way to stop censoring words covered by BBCode tags?
There basically isn't one.
Darn. Sad but true ;)
as a last resort, the solution suggested by Sciamano will be the one that will be used.