PDA

View Full Version : How do I change censor "words" ?


sulasno
03-15-2010, 04:25 AM
is it possible to change words in a thread?

anyone typing "should" will result in "shall" ?

tia

andreamarucci
09-20-2010, 10:59 AM
I'm also interested in a function like this one. Using only the asterisk is not so good...

Lynne
09-20-2010, 01:43 PM
There are mods on how to replace words in posts. Or, here is my blurb on how to do it:

hook location - postbit_display_complete

$word = array(
'word 1',
'word 2',
);
$link = array(
'<a href="link1.php">Link 1</a>',
'<a href="link2.php">Link 2</a>',
);
$this->post['message'] = str_replace($word, $link, $this->post['message']);
You can just put words in where it says "$link" instead of links

sulasno
09-20-2010, 03:28 PM
can you provide an example using Replacement Variables ?

Lynne
09-20-2010, 11:03 PM
Replacement variables replace the words everywhere on the site, not just in posts. Replacement Variable Manager (http://www.vbulletin.com/docs/html/style_replacement)