Location: PHPKode > projects > Instant PHP/MySQL Guestbook > ipmgb/template/default/admin/_msgfilter.tpl
<!-- $Include /admin/header.inc.tpl -->
<form name="mainForm" method="POST"><!-- 
$BeginBlock update_success_b -->
<i>Changes have been saved successfully.  Number of changes: ${num_of_changes}.</i><!-- 
$EndBlock update_success_b --><!--
$BeginBlock update_failure_b -->
<img class="admgb-icon" src="${gb_root_dir}/assets/attn16.png">
    <i>Update failed.  Please see error messages inline.</i><!--
$EndBlock update_failure_b -->
<table border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td width="140" class="admgb-heading" align="right">Message Filter</td>
    <td align="left"><hr /></td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" nowrap><input type="checkbox" name="word_filter_enabled" value="Y" <!-- $BeginBlock word_filter_b -->checked<!-- $EndBlock word_filter_b -->>Enable Message Filter
    </td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" class="admgb-help">
<img class="admgb-icon" src="${gb_root_dir}/assets/info.gif">
When a word in a new message matches any of the word patterns, the new message is either rejected or submitted as pending for review.
    </td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" nowrap><hr/></td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" nowrap>
    Word Patterns (separated by space): <br/>
    <textarea wrap="virtual" rows="8" cols="45" name="word_patterns">${word_patterns}</textarea><br/><!--
$BeginBlock word_error_b -->
<img class="admgb-icon" src="${gb_root_dir}/assets/attn16.png">
<span class="admgb-error"><!--
$BeginBlock word_pattern_error_b -->
A pattern must contain at least 3 word characters.<br/><!--
$EndBlock word_pattern_error_b --><!--
$BeginBlock word_list_error_b -->
The list is too long.  The whole list must not be longer than 255 characters.<br/><!--
$EndBlock word_list_error_b -->
</span><!--
$EndBlock word_error_b -->
    Test the patterns with this string: <input type="text" size="15" maxlength="46" name="test_word" value="${test_word}">
    <input type="submit" name="word_test" value="Test">
    <b><!--
$BeginBlock test_word_match_b -->Found a match.<!--
$EndBlock test_word_match_b --><!--
$BeginBlock test_word_no_match_b -->No match.<!--
$EndBlock test_word_no_match_b --></b>
    </td>
  </tr> 
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" nowrap>&nbsp;</td>
  </tr> 
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" class="admgb-help">
    1. A pattern without wildcard characters calls for an exact match.  
For example, pattern <b>man</b> will match word <i>man</i> only, but not <i>human</i> or <i>mania</i>.
    </td>
  </tr> 
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" class="admgb-help">
    2. Wildcard <b>*</b> matches zero or more word characters.  
For example, pattern <b>*man</b> will match word <i>man</i> or <i>human</i>.
Wildcard <b>+</b> matches one or more word characters.  
For example, pattern <b>+man</b> will match word <i>human</i>, but not <i>man</i>.
    </td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" class="admgb-help">
    3. Filtering character '<i>*</i>' or '<i>+</i>' is not possible.
In addition, a pattern must contain at least 3 word characters.  
For example, <b>*ch</b>, <b>*</b> and <b>f+</b> are all invalid.
    </td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" class="admgb-help">
    4. The whole list of patterns, including the spaces, cannot be longer than 255 characters.
If you find yourself entering a lot of word patterns, consider moderating the whole guestbook by
<a class="admgb" href="composition.${php_extension}">holding messages for review</a>.
    </td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" nowrap><hr/></td>
  </tr> 
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left">
    When a match is found,<br/><br/>
    &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="word_filter_action" value="moderate" <!-- $BeginBlock word_moderated_b -->checked<!-- $EndBlock word_moderated_b -->>Allow submission but place the message in the pending list.<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="word_filter_action" value="reject" <!-- $BeginBlock word_rejected_b -->checked<!-- $EndBlock word_rejected_b -->>Do not allow submission.<br/>
    </td>
  </tr>
  <tr>
    <td width="140" align="right">&nbsp;</td>
    <td align="left" nowrap><hr/></td>
  </tr>
  <tr>
    <td width="140" class="admgb-heading" align="right">&nbsp;</td>
    <td align="left">
    <input type="submit" name="update" value="Update">
    </td>
  </tr>         
  <tr>
    <td width="140" align="right">
    <img src="${gb_root_dir}/assets/t.gif" width="140" height="1" border="0" alt="" title=""/>
    </td>
    <td align="left">&nbsp;</td>
  </tr>       
</table>
</form><!-- 
$Include /admin/footer.inc.tpl -->
Return current item: Instant PHP/MySQL Guestbook