Menu:

Recent Entries

About

Sirius

板工秀勇與阿吉管理中

Categories

Ubuntu相關 [1]
有關模板 [4]
FreeNX [1]
MySQL [4]
TinyMCE [3]
學用Blog [2]
系統修改 [4]
LightBox [1]
校務系統 [3]
xoops [5]
硬體相關 [2]
Lifetype系統更新 [10]
Windows相關 [5]
IMageMagick [1]
XPress [1]
CSS [1]
站務公告 [7]
Plugins套用修改 [3]
設備使用 [1]
Moodle [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 . 迴響: (1405). 引用:(2). 靜態連結網址
«Next post | Previous post»

Comments

  1. 1. easy to use animation software  |  09/22,2021 at 06:29

    Amazing issues here. I'm very glad to look your
    post. Thanks a lot and I am looking ahead to touch you.
    Will you kindly drop me a e-mail?

  2. 2. зона чернобыль сериал 1 сезон  |  09/22,2021 at 05:29

    зона чернобыль сериал 1 сезон

  3. 3. location bateau,rent,boat,rental boat,boat rental, location,bateau,nice, location bateau nice, boat rent nice, boat rental nice, location voiture, transfert voiture, private driver, chauffeur prive, uber, tour voiture, helicoptere transfert, vol charter,  |  09/22,2021 at 03:03

    Thanks to my father who told me regarding this webpage,
    ths website is actually remarkable.

  4. 4. sexy girls xxx porn  |  09/21,2021 at 22:15

    Why viewers still use to read news papers when in this technological globe everything is accessible on net?

  5. 5. https://Westgamestrategies.com/forums/users/marcosrountree/  |  09/21,2021 at 21:24

    It's an awesome piece of writing in favor of all the online viewers;
    they will get benefit from it I am sure.

  6. 6. bom.to  |  09/21,2021 at 21:22

    Some really interesting information, well written and broadly user friendly.

  7. 7. 2d animation programs  |  09/21,2021 at 19:27

    I do consider all the ideas you have introduced in your post.
    They're very convincing and will definitely work. Still, the posts are very short for starters.
    Could you please extend them a little from next time?
    Thank you for the post.

  8. 8. Latisha  |  09/21,2021 at 15:04

    Thanks for ones marvelous posting! I genuinely enjoyed reading it, you may be a
    great author.I will make sure to bookmark your blog and may come back very soon. I
    want to encourage yourself to continue your great writing, have a nice holiday weekend!

  9. 9. helpful site  |  09/21,2021 at 14:15

    I am not very great with English but I come up this real leisurely
    to understand.

  10. 10. cheap taxi airport nice  |  09/21,2021 at 13:45

    Paragraph writing is also a fun, if you know after that you can write otherwise
    it is difficult to write.

  11. 11. диплом института  |  09/21,2021 at 13:08

    I used to be recommended this website by way of my cousin.
    I'm now not positive whether this submit is written by
    way of him as nobody else recognise such unique approximately my trouble.
    You're amazing! Thanks!

  12. 12. hey  |  09/21,2021 at 10:19

    It's a pity you don't have a donate button! I'd
    without a doubt donate to this excellent blog!
    I guess for now i'll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to fresh updates and will talk about this website with my Facebook
    group. Talk soon!

  13. 13. купить диплом института  |  09/21,2021 at 10:06

    naturally like your web-site however you have to check the spelling on quite
    a few of your posts. Several of them are rife with spelling issues and I to find it very bothersome to tell the truth however
    I will certainly come again again.

  14. 14. text to speech voices  |  09/21,2021 at 09:47

    Oh my goodness! Impressive article dude! Many thanks, However I am having issues with your
    RSS. I don't understand why I am unable to subscribe to
    it. Is there anyone else having similar RSS problems?
    Anyone that knows the solution will you kindly respond?
    Thanks!!

  15. 15. 토토사이트  |  09/21,2021 at 09:12

    I used to be able to find good advice from your blog posts.

  16. 16. дипломы о высшем образовании  |  09/21,2021 at 06:34

    This design is incredible! You most certainly know how to keep a
    reader entertained. Between your wit and your videos, I
    was almost moved to start my own blog (well, almost...HaHa!)
    Wonderful job. I really loved what you had to say, and more than that,
    how you presented it. Too cool!

  17. 17. olly vitamins  |  09/21,2021 at 05:37

    Excellent post. I was checking constantly this blog and I'm impressed!
    Extremely helpful information specifically the last part :) I
    care for such information much. I was looking for this particular information for a long time.
    Thank you and good luck.

  18. 18. พนันออนไลน์  |  09/21,2021 at 04:22

    Howdy, i read your blog from time to time and i own a similar one and
    i was just wondering if you get a lot of spam comments?
    If so how do you protect against it, any plugin or anything you can suggest?
    I get so much lately it's driving me insane so any assistance is very much appreciated.

  19. 19. joker123 terpercaya  |  09/21,2021 at 04:17

    slot online

  20. 20. essays writing service  |  09/21,2021 at 03:17

    Since the admin of this site is working, no
    uncertainty very quickly it will be renowned, due to
    its quality contents.

Leave a Reply

發表迴響
 authimage