Menu:

Recent Entries

About

Sirius

板工秀勇與阿吉管理中

Categories

xoops [5]
XPress [1]
學用Blog [2]
有關模板 [5]
LightBox [2]
站務公告 [7]
校務系統 [3]
Lifetype系統更新 [10]
Plugins套用修改 [3]
系統修改 [4]
TinyMCE [3]
IMageMagick [1]
MySQL [4]
Windows相關 [5]
設備使用 [1]
Moodle [1]
硬體相關 [2]
FreeNX [1]
Ubuntu相關 [1]
CSS [1]
電腦教室管理 [0]

Links

LiftType教學
- LifeType 線上教學(官網)
- 部落格教室(怡杰老師)
- 阿欣部落
- 阿杰老師部落格教室

Syndicate

RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3

Version:

andreas01 v1.3

為xoops的wordpress安裝SecureImage

sirius | 23 四月, 2007 15:11

這只是安裝參考,目前尚未成功

尚待繼續測試 

 以下引用自:http://blog.tinyau.net/archives/2005/09/13/captcha-plugin-secureimage/

早前我提過以後留言時要輸入安全碼才成,而 Madthiu 問我為何會選擇 SecureImage 作為我的 Captcha plugin,雖然我在留言中回答了他,但我覺得有需要特地開一篇文章再作補充。

選擇 SecureImage 的原因

以我所知 Captcha plugin 起碼有以下 4 款:

我選擇 SecureImage 的原因是其他的 plugins 不是需要更改 WordPress core files,便是產生出來的 Captcha 比較容易被解碼,詳情可參考 PWNtcha, 而 SecureImage 除了不用更改 WordPress core files 外,在設定上很方便,在 Admin. Panel 就可以設定 Captcha 的長度、弧度、角度等,還有產生出來的 Captcha 以 PWNtcha 來說應該比較難以解碼,所以我便選擇了 SecureImage。

使用 SecureImage 的必需條件

大部份使用 UNIX 類 OS 的 web hosting 應該不用安裝便已經有 ImageMagick,而使用 Windows 平台的 web hosting 的話,就有需要下載了,整套 ImageMagick 軟件包括多套工具,但 SecureImage 只需要內裡的 convert(UNIX 版本)或 convert.exe(Windows 版本)工具而已。

使用 SecureImage 的注意事項

SecureImage 預設是會阻擋所有 pingback 及 trackback 的,大家可以使用這個 patch 去修改這個 plugin,或下載這個已修改的版本(下載後記著把 .txt 的 extension 轉成 .php)

SecureImage 產生出來的 Captcha 是包括大小寫英文字母及數字的,但因為弧度等問題,有時難以分辨,所以我便修改了只用小寫英文字母,方法如下:

首先在 secureimage.php 內搜尋 “// Generate the random string” 字串,在這句字串下面的數行正是 array 用來儲存 Captcha 使用的字符。

$chars = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G",
"h","H","i","j","J","k","K","L","m","M","n","N","o","O",
"p","P","q","Q","r","R","s","S","t","T","u","U","v","V",
"w","W","x","X","y","Y","z","Z","1","2","3","4","5","6",
"7","8","9");

大家可見有大小寫英文字母及數字,只需更改這裡,放入合你心意的字符便可,以我為例只用小寫英文字母的話,便會是:

$chars = array("a","b","c","d","e","f","g","h","i","j",
"k","l","m","n","o","p","q","r","s","t",
"u","v","w","x","y","z");

設定 SecureImage plugin

啟動 SecureImage 後,跟著便要做一些設定這個 plugin 才能正式生效,在文初提過使用 SecureImage 的必需條件是有 ImageMagick 及一個 TrueType font 的,在 SecureImage 的設定中要記下 convert / convert.exe 及 TrueType font 的路徑的,convert 的存放目錄路徑是以 UNIX 類 OS 預設的 /usr/bin/convert,如果使用 Windows 平台的話,記著路徑內的 要轉成 / 及整個路徑是不可含有空格的,例如 convert.exe 是存放在 c:imagemagick 內的話,路徑便是:

c:/imagemagick/convert.exe

在 SecureImage 設定中隨了 convert 工具及 TrueType font 的路徑設定外,還可以選擇字型的大小、Captcha 的長度、弧度、角度等等,大家可以嘗試改變這些設定看看效果如何的。

最後使用這個 plugin 是不需要更改任何 theme file 的,因為 SecureImage 已經自動 register 在 comment_form 及 comment_post 內,所以只需啟動後及設定正確,Captcha 會自動顯示在留言面版中,如果沒有顯示出來的話可以檢查一下在你使用的 theme 內的 comments.php 內究竟有沒有以下這句:,如果沒有的話,這個 plugin 就不能用在你的 theme 了。

<?php do_action('comment_form', $post->ID); ?>

如果沒有的話可以自行將這句加在 comments.php 內 </form> 前,好像以下的做法:

<form .....>
.
.
.
<?php do_action('comment_form', $post->ID); ?>
</form>

之後 SecureImage 應該可以成功運行的了。 wink

Update (2005-09-17): 更正如果 comments.php 內沒有 do_action 這句是不能使用 SecureImage 這個說法,實則只需加進這句後 SecureImage 是可以成功運作的。

 

Posted in xoops . 迴響: (96). 引用:(0). 靜態連結網址
«Next post | Previous post»

Comments

  1. 1. http://ronaldcosplay.us  |  05/03,2019 at 07:54

    Saved as a favorite, I love your web site!

  2. 2. http://pummillcosplay.us  |  04/28,2019 at 18:35

    Piece of writing writing is also a excitement, if you know after that you
    can write or else it is difficult to write.

  3. 3. cosplay costumes  |  09/23,2018 at 18:04

    I blog frequently and I seriously appreciate your content.
    This great article has truly peaked my interest. I will book
    mark your website and keep checking for new details about once per week.
    I opted in for your RSS feed too.

  4. 4. kittycosplay.us  |  09/22,2018 at 22:40

    This piece of writing is in fact a pleasant one it helps new internet people,
    who are wishing in favor of blogging.

  5. 5. http://naefcosplay.us  |  09/20,2018 at 00:39

    I really like what you guys are usually up too. This type
    of clever work and reporting! Keep up the amazing works guys I've included you guys to
    our blogroll.

  6. 6. cosplay costumes  |  09/14,2018 at 01:14

    What's up, after reading this remarkable piece of writing i am also cheerful
    to share my experience here with friends.

  7. 7. cosplay costumes  |  09/12,2018 at 22:02

    Pretty! This has been a really wonderful article. Thanks for supplying this information.

  8. 8. cosplay costumes  |  09/12,2018 at 06:14

    What's up, every time i used to check weblog posts here early in the
    dawn, as i enjoy to find out more and more.

  9. 9. cosplay costumes  |  09/11,2018 at 07:16

    Quality articles is the main to interest the viewers to go to see the web page, that's what this web page is providing.

  10. 10. cosplay costumes  |  09/10,2018 at 18:22

    I got this web page from my pal who informed me regarding this web page and at
    the moment this time I am browsing this web site and
    reading very informative articles here.

  11. 11. cosplay costumes  |  09/04,2018 at 23:21

    Spot on with this write-up, I honestly believe that this amazing
    site needs far more attention. I'll probably be back again to read through more, thanks for the
    advice!

  12. 12. QualityCosplay  |  09/02,2018 at 18:11

    I used to be suggested this blog by means
    of my cousin. I am not sure whether this put up is written via him as no
    one else know such precise approximately my problem. You are amazing!
    Thank you!

  13. 13. Qualitycosplay.com  |  09/02,2018 at 17:38

    This piece of writing is truly a nice one it assists new net visitors, who are wishing
    for blogging.

  14. 14. Qualitycosplay.com  |  09/02,2018 at 16:41

    bookmarked!!, I like your web site!

  15. 15. Qualitycosplay.com  |  09/02,2018 at 12:42

    I am not sure where you are getting your information, but great topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for magnificent info I was looking for this info for my mission.

  16. 16. brokinscosplay.us  |  09/01,2018 at 04:11

    Hi, just wanted to mention, I enjoyed this post. It
    was funny. Keep on posting!

  17. 17. cosplay costumes  |  09/01,2018 at 03:59

    Nice post. I was checking constantly this weblog and I am inspired!
    Extremely helpful information particularly the last part :) I handle such information much.
    I used to be looking for this particular info for
    a long time. Thanks and good luck.

  18. 18. thiết kế bàn thờ công giáo  |  07/31,2018 at 02:34

    I'm really impressed with your writing skills as well as with the layout on your weblog.
    Is this a paid theme or did you modify it yourself?
    Anyway keep up the excellent quality writing, it is rare to see a
    great blog like this one today.

  19. 19. https://thanhphong.art/category/moc-khoa-go-dep-doc  |  07/31,2018 at 01:03

    Thank you a bunch for sharing this with
    all folks you actually realize what you're talking about!
    Bookmarked. Kindly additionally seek advice from my site =).

    We could have a link exchange arrangement among us

  20. 20. https://thanhphong.art/category/thien-thu  |  07/30,2018 at 12:33

    Hi to every one, the contents present at this web site are truly remarkable
    for people experience, well, keep up the nice
    work fellows.

Leave a Reply

發表迴響
 authimage