| OSTWigits - Captcha |
Description:Captcha is a system plugin to produce and verify captcha images. We use freecap lib from: http://www.puremango.co.uk/cm_php_captcha_script_113.php Download:Available from Joomlacode here: http://joomlacode.org/gf/project/ostwigits/frs/?action=FrsReleaseBrowse&frs_package_id=2652 Functions:null display() -- Produces the image, see examplebool confirm( $word ) -- Confirms if the passed word matches the captcha image produced in display. * See configuration items in plugin params Examples (Non-Trigger):Displaying an image:In order to show the image, your component is used to build the data and display to user. The recommended way is to implement the following code in your controler class: function displayimg() This will produce a raw output of the image. When displaying your form, you would then just call your own component with &task=displayimg appending the url: echo "<form method='post'>"; Confirming the word:A simple way to confirm the word would be the following code (Assuming the word is given via the post variable "word"): $word = JRequest::getVar('word', false, '', 'CMD');
Examples (Using Trigger):Displaying an image:In order to show the image, your component is used to build the data and display to user. The recommended way is to implement the following code in your controler class: function displayimg() This will produce a raw output of the image. When displaying your form, you would then just call your own component with &task=displayimg appending the url: echo "<form method='post'>"; Confirming the word:A simple way to confirm the word would be the following code (Assuming the word is given via the post variable "word"): global $mainframe; |
| Last Updated on Tuesday, 24 July 2007 20:25 |
