Sep 01, 2007

captchaによるwritebackの画像認証

コメントに画像認証を導入を参考にして、captchaによる画像認証をこのblosxom blogに導入した。

1 3つのpluginをblosxomのpluginディレクトリに入れる。

新しく入れるpluginは、captchaとinterpolate_fancy、error(名前を00errorにしておく)の3つ。
このうち、captchaとerrorはBill Wardさんのサイトから入手できる。
interpolate_fancyは、blosxom :: the zen of blogging :: pluginsから入手できる。このサイトに行った際、字が小さいのでブラウザの「編集」から「このサイトを検索」で、interpolateを検索するとすぐ見つけられると思う。

2 captcha画像を一時的に保存するディレクトリを作る(captcha pluginにある説明参照)。

3 captchaとwritebackを書き換える。

captchaは、画像を保存するディレクトリ(permissionは707か777で、captchaというディレクトリを作成する)とアクセスできるURLを指定して書き換える必要がある。通常変更箇所は2カ所
次にblosxom starter kitの場合には、writback pluginに1行を挿入する。挿入するコードはcaptchaに書いてあるが、場所はJcodeで文字コードをコンバートするブロックのすぐ下(カーリーパーレンの下、print行のすぐ前)。

4 error.htmlというflavourを作る。内容は最低「$error::msg」を書く。

5 blosxom starter kitでは「foot.htm」に「captcha」に出ているformを参考にコピーアンドペーストする。

WriteBacks
TrackBack ping me at
http://haizara.net/~shimirin/blosxom/blosxom.cgi/computer/linux/20070901082527.trackback
Post a comment

writeback message: Ready to post a comment.













Captcha:
To prevent comment spam, please retype the characters in this image:

Enter the text here: