Added configuration screen for bad words list.
This commit is contained in:
@@ -8,10 +8,5 @@ This is a very simple Text Filter that searches text
|
||||
being output to the screen, replacing "bad" words
|
||||
with other words.
|
||||
|
||||
To activate this filter, add a line like this to your
|
||||
config.php:
|
||||
|
||||
$CFG->textfilter1 = 'filter/censor/censor.php';
|
||||
|
||||
|
||||
To customise the word list, edit cursor.php.
|
||||
To customise the word list, use the censor settings page
|
||||
in the filters administration page.
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// check the default settings
|
||||
if (!isset($CFG->filter_censor_badwords)) {
|
||||
set_config( 'filter_censor_badwords','' );
|
||||
}
|
||||
|
||||
// get strings to use
|
||||
$txt = new Object;
|
||||
$txt->badwordslist = get_string( 'badwordslist','admin' );
|
||||
$txt->badwordsconfig = get_string( 'badwordsconfig','admin' );
|
||||
?>
|
||||
|
||||
<table cellpadding="9" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td align="right"><?php echo $txt->badwordslist; ?></td>
|
||||
<td><textarea type="text" name="filter_censor_badwords" cols="60" rows="10"><?php echo "$CFG->filter_censor_badwords"; ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><?php echo $txt->badwordsconfig; ?></td>
|
||||
</tr>
|
||||
<table>
|
||||
Reference in New Issue
Block a user