最近遭受垃圾留言攻擊,所以替留言版加入驗證碼。
- 在/plugins/guestbook/templates/updateguestbook.template 模版加入
{if !empty($authimage)}
{if $authimage->isEnabled()}
<TR>
<TD valign="top" align="right" nowrap><LABEL for=url>驗證碼:</LABEL></TD>
<TD><input id=url name="authImage" id="authImage" value="" size="4"> {$authimage->show()}</TD>
</TR>
{/if}
{/if}
- 修改/plugins/authimage/class/security/authimagefilter.class.php
行42
if( $request->getValue( "op" ) != "AddComment" ) {
改成
$_check_op=array("AddComment","AddGuestbookPost","ReplyGuestbookPost");
if( !in_array($request->getValue( "op" ),$_check_op) ) {