2009年3月21日星期六

Re: [fw-core] My_Captcha_Image

Hi, I am having the same problem and I don't know how to use
My/Captcha/Image.php instead of Zend/Captcha/Image.php when I create form
element using new Zend_Form_Element_Captcha.

$captchaimage = new My_Captcha_Image();

$this->addElement('captcha', 'captcha', array(
'label' => 'Word Verification',
'description' => 'Please verify that you are human',
'helper' => null,
'order' => 4,
'captcha' => array(
'captcha' => 'Image',
'wordLen' => 6,
'timeout' => 300,
'font' => 'pics/captcha/DeJaVuSansMono.ttf',
'fontSize' => 30,
'imgDir' => 'pics/captcha/img',
'imgUrl' => 'http://foo/pics/captcha/img'
)
));


Raavi Raaj wrote:
>
> Hi,
>
> I would like to extend the Image adapter for the Captcha element.
> I have done so and placed it in My/Captcha/Image.php
>
> *My question...*
> I have no clue how to use my adapter for the captcha.
>
> *This is how I define and add the element*
> $captcha = new Zend_Form_Element_Captcha('captcha', array('captcha' =>
> array('captcha' => 'Image', 'wordLen' => 4)));
> $this->addElement($captcha);
>
> All help is appreciated.
>
> -R
>
> P.S.
> - I have a canventional setup
> - All my forms extend My_Form
>
>

--
View this message in context: http://www.nabble.com/My_Captcha_Image-tp21663845p22634465.html
Sent from the Zend Core mailing list archive at Nabble.com.

没有评论: