1 (edited by druvans 2005-05-31 17:26)

Topic: Censor words -

I found a different use for censoring words. (May not be a recommended use)

You can use this functionality to dynamically create links in your posts.

Say in my forum, whenever I see a "Java", I added a replacement like this [ url=http://java.sun.com]Java[/url ]. I worked properly except one issue, that it messed up all the topic titles with "Java" on it.

So I opened functions.php and changed function like this

function censor_words($text,$title=true)
{
    global $db;
    static $search_for, $replace_with;
if(!$title){
    .............................
}
    return $text;
}

then opened the parser.php, changed the parse_message function to pass a 'fasle'.

if ($pun_config['o_censoring'] == '1')
        $text = censor_words($text,false);

now I have my dynamic links for all "Java".

if I cld add a title="Java programming language" into links, that wld be cool.

With minor modifications, it can be used as an advertsing tool