From Vichan Wiki
Jump to navigationJump to search

Word Filters[edit | edit source]

A wordfilter (sometimes referred to as just a “filter” or “censor”) automatically scans users’ posts as they are submitted and changes or censors particular words or phrases.

Standard Replacement[edit | edit source]

$config['wordfilters'][] = array('cat', 'dog');

Regular Expressions[edit | edit source]

Using Perl Compatible Regular Expressions, you can match more words or phrases, even if they aren’t exact. To use regular expression wordfilters, you must include ‘true’ as the third element in the array. The following example changes both “cat” and “car” to “dog”.

$config['wordfilters'][] = array('/ca[rt]/', 'dog', true);