This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » General plug-ins » New Plugin sfCaptchaGD
Re: New Plugin sfCaptchaGD [message #88659 is a reply to message #54790 ] Wed, 18 November 2009 18:42 Go to previous messageGo to next message
robyn  is currently offline robyn
Messages: 1
Registered: November 2009
Junior Member
Hi,

I've made some minor modifications to your code, so the implementation is a bit easier, I think. (It's attached.) After installing and enabling the plugin for sf1.2, all you have to do is to set the widget and validator on the form.

So you don't have to alter the original bind function in your actions.class.php:

$form->bind($request->getParameter($form->getName())); 


to:

// $form->bind(array_merge($request->getParameter($form->getName()), array('captcha' =>
// $request->getParameter('captcha')))); 



You just put the following in your form class:

$this->widgetSchema['captcha'] = new sfWidgetCaptchaGD();
$this->validatorSchema['captcha'] = new sfCaptchaGDValidator();


Hope you enjoy this Smile

Robert Lanyi

Re: New Plugin sfCaptchaGD [message #88664 is a reply to message #88636 ] Wed, 18 November 2009 20:45 Go to previous messageGo to next message
SmallBen  is currently offline SmallBen
Messages: 21
Registered: September 2009
Junior Member
litelus wrote on Wed, 18 November 2009 11:40

try

$this->form->bind(array(
        'name'      => $request->getParameter('name'), 
        'email'     => $request->getParameter('email'),
        'message'   => $request->getParameter('message'),
        'captcha'   => $request->getParameter('captcha'),
        '_csrf_token'   => $request->getParameter('_csrf_token'),
      ));




OK it works when i set it like this

Quote:


you could also try
var_dump($request->getParameter($this->form->getName())); 
die();

and see what the form framework gives you




it gives me null and some kind of warning ??

OK litelus thanks

robyn your solution works great Thanks a lot thats all my problems for now Smile One more time thanks!

[Updated on: Wed, 18 November 2009 21:06]

Re: New Plugin sfCaptchaGD [message #89317 is a reply to message #88659 ] Sat, 05 December 2009 00:49 Go to previous messageGo to next message
rernst  is currently offline rernst
Messages: 82
Registered: October 2009
Member
Cool stuff, works great for me!
Re: New Plugin sfCaptchaGD [message #89956 is a reply to message #54790 ] Mon, 14 December 2009 09:50 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
Hey,

in the new 1.4.0 Version you forgot to include the Widget and Routing Class... could you please fix this.
I also tried to include these classes from the 1.2.0 Version but didn't work out as well.

Ben

[Updated on: Mon, 14 December 2009 14:19]

Re: New Plugin sfCaptchaGD [message #89958 is a reply to message #89956 ] Mon, 14 December 2009 10:49 Go to previous messageGo to next message
macgyver  is currently offline macgyver
Messages: 13
Registered: July 2009
Junior Member
Andromeda wrote on Mon, 14 December 2009 09:50

Hey,

in the new 1.4.0 Version you forgot to include the Widget and Routing Class... could you please fix this.

Ben


Warning: call_user_func(sfCaptchaGDRouting::listenToRoutingLoadConfig urationEvent) [function.call-user-func]: First argument is expected to be a valid callback in D:\Projects\Symfony\buffa\lib\vendor\symfony\lib\event_dispa tcher\sfEventDispatcher.php on line 79

Fatal error: Class 'sfWidgetCaptchaGD' not found in D:\Projects\Symfony\buffa\lib\form\ContactForm.class.php on line 20

Hi,
I also tried to use this plugin with symfony 1.4.0...
I hope this problem will be fixed soon.
Thanks.
Re: New Plugin sfCaptchaGD [message #90413 is a reply to message #54790 ] Wed, 23 December 2009 17:46 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
Thanks for the changes but I still have a question, why do I get always the same image even after sending the form or reloading the page. Is there somewhere a setting for this?

Thanks!
Re: New Plugin sfCaptchaGD [message #90426 is a reply to message #90413 ] Thu, 24 December 2009 09:07 Go to previous messageGo to next message
GliNT  is currently offline GliNT
Messages: 30
Registered: June 2008
Member
This is a plugin feature. Do you really need to see another image?
Re: New Plugin sfCaptchaGD [message #90430 is a reply to message #90426 ] Thu, 24 December 2009 11:09 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
Yeah, I thought about it again. Every Captcha does it this way, but is it necessary?

I think its because when a bot has randomly found out a solution to one captcha he can do a lot of damage to your site. So better change it every time and he can only post one SPAM.

Happy Christmas!
Re: New Plugin sfCaptchaGD [message #90431 is a reply to message #90430 ] Thu, 24 December 2009 11:30 Go to previous messageGo to next message
GliNT  is currently offline GliNT
Messages: 30
Registered: June 2008
Member
There are minimum 9999 combinations in 4 char Captcha. I think you need to limit specific request counts and to ban bot, if number is bigger, i.e. 100.

P.S. Captcha is not a panace.
P.P.S. We can add a parameter to enable a random captcha on EVERY request.
Re: New Plugin sfCaptchaGD [message #90432 is a reply to message #90431 ] Thu, 24 December 2009 11:48 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
I have a captcha with length 5 and 50chars. Should be strong for the beginning. But A parameter would be great, cause my client wants it so...

Thanks a lot and a Happy Holiday.
Re: New Plugin sfCaptchaGD [message #91939 is a reply to message #54790 ] Thu, 21 January 2010 09:49 Go to previous messageGo to next message
nowaycharlie  is currently offline nowaycharlie
Messages: 1
Registered: January 2010
Location: Australia
Junior Member
I had some problems with this plugin v1.4.1 using symfony 1.4.2-DEV.

I use a format for form field names like "myform[captcha]"
ie.
<input type="text" name="myform[captcha]" />
this hard-coded name was not working:
<input type="text" name="captcha" />

This is the file:
sfCaptchaGDPlugin\lib\widget\sfWidgetCaptchaGD.class.php

This diff fixes it using renderTag() and sf link_to/image_tag functions:

12c12
<     return "<input type='text' name='captcha' value='".$context->getRequest()->getPostParameter('captcha')."' class='captcha' /> <a href='' onClick='return false' title='Reload image'><img src='$url?".time()."' onClick='this.src=\"$url?r=\" + Math.random() + \"&reload=1\"' border='0' class='captcha' /></a>";
---
>     return $this->renderTag('input', array_merge(array('type' => $this->getOption('type'), 'name' => $name, 'value' => $value), $attributes)) . link_to( image_tag("$url?".time(), array('raw_name' => true, 'border' => 0, 'onClick' => "this.src=\"$url?r=\" + Math.random() + \"&reload=1\"", 'class' => 'captcha')) ,'/',"class=captcha onClick='return false' title='Reload image'");

Re: New Plugin sfCaptchaGD [message #95142 is a reply to message #54790 ] Wed, 10 March 2010 00:28 Go to previous messageGo to next message
dancablam  is currently offline dancablam
Messages: 16
Registered: November 2007
Location: Dallas, TX
Junior Member
Thanks for the great plugin. There really does need to be at least an option to force the CAPTCHA to generate a new image each time - even if the last entered value was correct. I realize this is for convince, but it's insecure as it currently stands. If I'm a spammer, all I have to do is insert one code correctly, and then I have complete freedom to post a million spam messages throughout a site - which virtually defeats the point of having a CAPTCHA in the first place. For a CAPTCHA to be secure it must force a new number with every single request - regardless of whether or not the last value submitted was valid. Ideally this should be default behavior - but for backwards-compatibility would you please at least add a yml option to always force a new image?

Thanks,
Dan
Re: New Plugin sfCaptchaGD [message #95156 is a reply to message #54790 ] Wed, 10 March 2010 09:59 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
I don't think that this feature will come, cause I asked already 2-3 month ago for this.
Just open the sfCaptchaGD.class.php and delete lines 68, 70, 71, 72 then it will work just fine.
Re: New Plugin sfCaptchaGD [message #95240 is a reply to message #95142 ] Thu, 11 March 2010 09:10 Go to previous messageGo to next message
GliNT  is currently offline GliNT
Messages: 30
Registered: June 2008
Member
In new release (1.4.4) new parameter in app.yml been added:
force_new_captcha: false # if true - captcha regenerated EVERY request, even if user input true value before.
Re: New Plugin sfCaptchaGD [message #95302 is a reply to message #95240 ] Thu, 11 March 2010 19:04 Go to previous messageGo to next message
dancablam  is currently offline dancablam
Messages: 16
Registered: November 2007
Location: Dallas, TX
Junior Member
Great, thanks!
Re: New Plugin sfCaptchaGD [message #95451 is a reply to message #54790 ] Sun, 14 March 2010 17:58 Go to previous messageGo to next message
Shinkan  is currently offline Shinkan
Messages: 14
Registered: April 2008
Location: France
Junior Member
In documentation page : http://www.symfony-project.org/plugins/sfCaptchaGDPlugin, it is said that config goes in settings.yml, whereas 2 posts before mine, it is about app.yml.

It is not clear where and under which section we can configure sfCaptchaGDPlugin.

Thanks.
Re: New Plugin sfCaptchaGD [message #95480 is a reply to message #95451 ] Mon, 15 March 2010 12:06 Go to previous messageGo to next message
GliNT  is currently offline GliNT
Messages: 30
Registered: June 2008
Member
If you about this, it need to be in app.yml.
all:
sf_captchagd:
image_width: 100 # image width in pixels
image_height: 30 # image height in pixels
chars: "123456789" # possible chars in captcha
length: 4 # length of captcha
font_size: 18 # font size

In README was some mistake, sorry.
Re: New Plugin sfCaptchaGD [message #99857 is a reply to message #54790 ] Wed, 26 May 2010 15:48 Go to previous messageGo to next message
meta_tommy  is currently offline meta_tommy
Messages: 13
Registered: February 2010
Location: Bulgaria
Junior Member
Greetings everyone. I noticed something strange when using
  force_new_captcha:          true       

The first time a user enters the code even if it's true ,he gets 'invalid' message.

The second scenario is when the user clicks on the image and gets new image and value.Then if he enters the new captcha right everything is OK.

I'm asking if someone have encountered the same or have any idea how to fix it ? I'm a starter in symfony and so far cannot make solution for this problem.
Re: New Plugin sfCaptchaGD [message #99864 is a reply to message #54790 ] Wed, 26 May 2010 17:52 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
no, here everthing works fine.
Look at the web_debug_toolbar: config > Globals > session, there must be standing the code somewhere, so you could look if its saved correctly or not...
Re: New Plugin sfCaptchaGD [message #99948 is a reply to message #54790 ] Thu, 27 May 2010 16:49 Go to previous messageGo to next message
meta_tommy  is currently offline meta_tommy
Messages: 13
Registered: February 2010
Location: Bulgaria
Junior Member
Thanks Andromeda , that was helpful !
Strangely the value in :
symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes: { captcha: '2813' } }

...is different from the one user has entered . Thats what i get in Mozilla , but in Chrome it works fine. I guess there is something i don't understand in binding. Here's what i have :
$this->form->bind($request->getParameter($this->form->getName())); 

If i use this :
//$this->form->bind( array_merge( $request->getParameter($this->form->getName()) , array('captcha' => $request->getParameter('captcha') ))) ;

...i don't get any value and validator insists on entering smthing.
Do i miss something ???
I don't understand how if i click on the captcha and get new one it's working , but with the first after loading page...don't.
Hope someone can clear the myst !
Re: New Plugin sfCaptchaGD [message #99949 is a reply to message #99948 ] Thu, 27 May 2010 17:02 Go to previous messageGo to next message
meta_tommy  is currently offline meta_tommy
Messages: 13
Registered: February 2010
Location: Bulgaria
Junior Member
I didn't make myself clear Embarassed
There is a difference between the
 symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes: { captcha: '8577' } }

...and the value from the Captcha . Is there any known reason why is that.
And the difference between the two browsers ?
Re: New Plugin sfCaptchaGD [message #99972 is a reply to message #54790 ] Fri, 28 May 2010 01:25 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
i don't know any differences in browsers, but with of these binding is working??
Re: New Plugin sfCaptchaGD [message #99974 is a reply to message #99972 ] Fri, 28 May 2010 01:59 Go to previous messageGo to next message
macgyver  is currently offline macgyver
Messages: 13
Registered: July 2009
Junior Member
Hi,

I'm using the latest version of sfCaptchaGD and symfony 1.4.4.
I have no problem with captcha with my local server, but with the remote server the captcha image is not displayed.

With http://www.mysite.com/myproject/web/frontend_dev.php/captcha I get this error:

Quote:

Call to undefined function imagettftext() in /home/mysite.com/public_html/myproject/plugins/sfCaptchaGDPl ugin/lib/sfCaptchaGD.class.php on line 119


Anyone could give me an idea where the problem come from?
Re: New Plugin sfCaptchaGD [message #99975 is a reply to message #54790 ] Fri, 28 May 2010 02:04 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
gd-library included on remote?
Re: New Plugin sfCaptchaGD [message #99977 is a reply to message #99975 ] Fri, 28 May 2010 03:07 Go to previous messageGo to next message
macgyver  is currently offline macgyver
Messages: 13
Registered: July 2009
Junior Member
Hi,
I found this problem in settings with dev mode and I think this causes the issue.
These are my parameters in config > Globals

Quote:

env:
DOCUMENT_ROOT: /home/mysite.com/home/mysite.com/public_html
...
ORIG_PATH_TRANSLATED: /home/mysite.com/home/mysite.com/public_html/myproject/web/f rontend_dev.php/en/slug/page.html
...
PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bi n'
PATH_INFO: /en/slug/page.html
PATH_TRANSLATED: /home/mysite.com/home/mysite.com/public_html/en/slug/page.ht ml
...
SCRIPT_FILENAME: /home/mysite.com/home/mysite.com/public_html/myproject/web/f rontend_dev.php
server:
the same thing...


Also:
Quote:

session:
symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes: { first_request: false, captcha: '6674' } }
symfony/user/sfUser/authenticated: false
symfony/user/sfUser/credentials: { }
symfony/user/sfUser/culture: en
symfony/user/sfUser/lastRequest: 1275029813



Any idea?


[Updated on: Fri, 28 May 2010 09:30]

Re: New Plugin sfCaptchaGD [message #99989 is a reply to message #54790 ] Fri, 28 May 2010 09:55 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
you have to output phpinfo() and there is a topic GD and there must be standing support: enabled. If not you have to activate it in the php.ini...
Re: New Plugin sfCaptchaGD [message #99991 is a reply to message #99989 ] Fri, 28 May 2010 10:10 Go to previous messageGo to next message
macgyver  is currently offline macgyver
Messages: 13
Registered: July 2009
Junior Member
I did, the GD support is enabled. I'm frustrated...
Re: New Plugin sfCaptchaGD [message #100013 is a reply to message #54790 ] Fri, 28 May 2010 15:47 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
then try to call the function imagettftext() somewhere else, but when gd is enabled, then why is the function unknown?
Re: New Plugin sfCaptchaGD [message #100039 is a reply to message #99972 ] Sat, 29 May 2010 17:19 Go to previous messageGo to next message
meta_tommy  is currently offline meta_tommy
Messages: 13
Registered: February 2010
Location: Bulgaria
Junior Member
Andromeda wrote on Fri, 28 May 2010 01:25

i don't know any differences in browsers, but with of these binding is working??

Andromeda can you post some example of binding . I'm not sure i use the captcha widget right.If you have something that works it would be very helpful !
I still cannot find why in Mozilla there is difference between the shown captcha numbers and that stored in attributes , and in IE or Chrome there isn't such problem. Thought there is initial double call for generating the random number and storing only the first. But i don't see such possibility in the code , so far .

Re: New Plugin sfCaptchaGD [message #100040 is a reply to message #54790 ] Sat, 29 May 2010 18:58 Go to previous messageGo to next message
tomekmal  is currently offline tomekmal
Messages: 2
Registered: May 2010
Junior Member
Hello,
plugin works fine, but i had a problem to render widget. when i use layout of project with content-type set to application/xhtml+xml, i get an error about xml parsing.
problem is in widget's render function
<img src='$url?".time()."' onClick='this.src=\"$url?r=\" + Math.random() + \"&reload=1\"' border='0' class='captcha' /></a>


"&amp;reload=1" should be used instead "&reload=1"

after that fix problem dissapears.

Also i suggest one change of redner function,
text "Reload image" could be written as i18n function
__("Reload image")

to give avability for translation.

Thanks,
Tomasz M.
Re: New Plugin sfCaptchaGD [message #100045 is a reply to message #100039 ] Sun, 30 May 2010 08:57 Go to previous messageGo to next message
GliNT  is currently offline GliNT
Messages: 30
Registered: June 2008
Member
Andromeda:
Quote:

then try to call the function imagettftext() somewhere else, but when gd is enabled, then why is the function unknown?

You need to add Freetype GD support for functions like imagettftext.

tomekmal:
Quote:

Hello,
plugin works fine, but i had a problem to render widget. when i use layout of project with content-type set to application/xhtml+xml, i get an error about xml parsing.


Yes, for well-formed XML output img content must be as you wrote.
I'll add to the next release or you can supply a patch with differences.
Re: New Plugin sfCaptchaGD [message #100049 is a reply to message #100045 ] Sun, 30 May 2010 11:54 Go to previous messageGo to next message
tomekmal  is currently offline tomekmal
Messages: 2
Registered: May 2010
Junior Member
Quote:

Yes, for well-formed XML output img content must be as you wrote.
I'll add to the next release or you can supply a patch with differences.


Hello, thanks for reply, i uploaded in attachment a patch for sfWidgetCaptchaGD.class.php,
of course please test it, i used
__(...) 
i18n function in widget, and it works.
but i'm not sure if it will work on every version of SF. maybe it should be
sfContext::getInstance()->getI18N()->__(...)

Greets,
Tomasz M.

Re: New Plugin sfCaptchaGD [message #100067 is a reply to message #54790 ] Sun, 30 May 2010 22:45 Go to previous messageGo to next message
meta_tommy  is currently offline meta_tommy
Messages: 13
Registered: February 2010
Location: Bulgaria
Junior Member
Hey guys ! I need some enlightment on double getting image from gdcaptcha . I checked the logs and found that there are 2 executions on getImage() and only one gif response.
So i have the image of the first gif and captcha stored in attributes from the second !! Here is the log :
May 30 20:37:10 symfony [info] {sfPatternRouting} Match route "sf_captchagd" (/captcha) for /captcha with parameters array (  'module' => 'sfCaptchaGD',  'action' => 'GetImage',)
May 30 20:37:10 symfony [info] {sfFilterChain} Executing filter "sfRenderingFilter"
May 30 20:37:10 symfony [info] {sfFilterChain} Executing filter "sfExecutionFilter"
May 30 20:37:10 symfony [info] {sfCaptchaGDActions} Call "sfCaptchaGDActions->executeGetImage()"
May 30 20:37:10 symfony [info] 7723
May 30 20:37:10 symfony [info] {sfWebResponse} Send status "HTTP/1.1 200 OK"
May 30 20:37:10 symfony [info] {sfWebResponse} Send header "Content-Type: image/gif"
May 30 20:37:10 symfony [info] {sfWebDebugLogger} Configuration 16.68 ms (8)
May 30 20:37:10 symfony [info] {sfWebDebugLogger} Factories 78.38 ms (1)
May 30 20:37:10 symfony [info] {sfWebDebugLogger} Action "sfCaptchaGD/GetImage" 9.22 ms (1)
May 30 20:37:10 symfony [info] {sfWebResponse} Send content (0 o)
May 30 20:37:10 symfony [info] lalalal1
May 30 20:37:10 symfony [info] {sfWebDebugLogger} Configuration 16.68 ms (8)
May 30 20:37:10 symfony [info] {sfWebDebugLogger} Factories 78.38 ms (1)
May 30 20:37:10 symfony [info] {sfWebDebugLogger} Action "sfCaptchaGD/GetImage" 19.17 ms (2)
May 30 20:37:10 symfony [info] {sfWebDebugLogger} View "None" for "sfCaptchaGD/GetImage" 0.01 ms (1)
May 30 20:37:10 symfony [info] {sfWebResponse} Send content (0 o)

##other stuff

May 30 20:37:11 symfony [info] {sfWebResponse} Send header "Content-Type: text/html; charset=utf-8"
May 30 20:37:11 symfony [info] {sfWebDebugLogger} Configuration 9.36 ms (5)
May 30 20:37:11 symfony [info] {sfWebDebugLogger} Factories 76.36 ms (1)

#for some reason again finding the sf_captchagd route ...

May 30 20:37:12 symfony [info] {sfPatternRouting} Connect sfRoute "sf_guard_signin" (/login)
May 30 20:37:12 symfony [info] {sfPatternRouting} Connect sfRoute "sf_guard_signout" (/logout)
May 30 20:37:12 symfony [info] {sfPatternRouting} Connect sfRoute "sf_guard_password" (/request_password)
May 30 20:37:12 symfony [info] {sfPatternRouting} Connect sfRequestRoute "sf_captchagd" (/captcha)
May 30 20:37:12 symfony [info] {sfPatternRouting} Match route "sf_captchagd" (/captcha) for /captcha with parameters array (  'module' => 'sfCaptchaGD',  'action' => 'GetImage',)


I haven't any idea why that is happening. Hope someone of you guys can tell me is this supposed to work like this and what i'm missing !

Greetings !
Re: New Plugin sfCaptchaGD [message #100069 is a reply to message #54790 ] Sun, 30 May 2010 23:49 Go to previous messageGo to next message
meta_tommy  is currently offline meta_tommy
Messages: 13
Registered: February 2010
Location: Bulgaria
Junior Member
Pff sorry for bothering you ! There is a bug in Firefox Mozilla 3.6 that makes some fansy double reloading of any site developed in sf1.4 (that's not a fact but a notice) and that caused the difference between showed gif with captcha and the value stored in sfUser's attributes Rolling Eyes
Re: New Plugin sfCaptchaGD [message #100082 is a reply to message #54790 ] Mon, 31 May 2010 08:53 Go to previous messageGo to next message
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
oh man, stupid. but good that you found it.
Re: New Plugin sfCaptchaGD [message #101800 is a reply to message #54790 ] Wed, 30 June 2010 03:46 Go to previous message
raphox  is currently offline raphox
Messages: 8
Registered: October 2007
Location: Brazil, Campo Grande - M...
Junior Member
Im missing my html attribute 'class'.
I found a better solution to widget. See:

<?php
class sfWidgetCaptchaGD extends sfWidgetForm
{
  protected function configure($options = array(), $attributes = array())
  {
  }

  public function render($name, $value = null, $attributes = array(), $errors = array())
  {
    $context = sfContext::getInstance();
    $url = $context->getRouting()->generate("sf_captchagd");
    $value = $context->getRequest()->getPostParameter('captcha');

    // if there exists a value for 'class'
    if (isset($attributes['class'])) {
      if (!strstr($attributes['class'], 'captcha')) {
        $attributes['class'] = empty($attributes['class']) ? 'captcha' : trim($attributes['class']) . ' captcha';
      }
    } else {
      $attributes['class'] = 'captcha';
    }

    $attributes = $attributes;
    return $this->renderTag('input', array_merge(array('type' => 'text', 'name' => $name, 'value' => $value), $attributes)) . "<a href='' onClick='return false' title='Reload image'><img src='$url?".time()."' onClick='this.src=\"$url?r=\" + Math.random() + \"&reload=1\"' border='0' class='captcha' /></a>";
  }
}
Previous Topic:sfWidgetFormJqueryDate problems
Next Topic:SfEasyGmapPlugin
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software