×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] Reload Captcha Image

[SOLVED] Reload Captcha Image 10 years 11 months ago #20916

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Hi Daniel,

it would be great if there was the posibility to reload the built in captcha image for people that have a hard time reading it.

Would it work if I call the function "ccommentHelperCaptcha::insertCaptcha" again through a link or button?

Thank you
gerhard

Reload Captcha Image 10 years 10 months ago #20922

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
:blush: Well, I thought about the same when I was working on it, but due to time constraints I decided to omit the reload button. It should be reintroduced once we get 5.0 stable.

Also I would actually disable the captcha till I get the first spam comment.
Today hosting providers will fight spam before it even gets to your server. Also in ccomment5 the form is generated with javascript, which makes it "invisible" for most of the current spambots. Someone would need to write a spam bot that specifically targets ccomment in order to abuse the form & I don't think that this will happen very fast.

Reload Captcha Image 10 years 10 months ago #20927

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Thank you for the explanation.

This absolutely makes sense.

Unfortunately my customer wants to have captcha in the form and wants reload capability.

So I'll try to convince him again that captcha is not needed. If he doesn't agree, I will have to wait for 5.0 stable.

I only need the free version of ccomment for the project I'm working on presently. But I will buy a subscription because of the great job you're doing, both in programming and in support.

Cheers
gerhard

Reload Captcha Image 10 years 10 months ago #20928

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What about using recaptcha? It has a reload button.

Reload Captcha Image 10 years 10 months ago #20929

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
I have to follow a fixed design where recaptcha doesn't fit in :-(

Reload Captcha Image 10 years 10 months ago #20930

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Off topic:
I have just made a subscription but cannot post in the closed support forum.

I have already logged out and back in again.

It is working now.

I was in the wrong topic (Hotspot) and have subscription only for ccomment :sick:

Reload Captcha Image 10 years 10 months ago #20935

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What about this:
developers.google.com/recaptcha/docs/customization

Custom theming.
In default_form.php on line 183 you can change the code to:
					<div class="ccomment-recaptcha-placeholder">
						<div id="recaptcha_widget">
 
							<div id="recaptcha_image"></div>
							<div class="recaptcha_only_if_incorrect_sol" style="color:red">Incorrect please try again</div>
 
							<span class="recaptcha_only_if_image">Enter the words above:</span>
							<span class="recaptcha_only_if_audio">Enter the numbers you hear:</span>
 
							<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
 
							<div><a href="javascript:Recaptcha.reload()">Get another CAPTCHA</a></div>
							<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')">Get an audio CAPTCHA</a></div>
							<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')">Get an image CAPTCHA</a></div>
 
							<div><a href="javascript:Recaptcha.showhelp()">Help</a></div>
 
						</div>
					</div>

Then in media/com_commentjs/views/comment-outer.js you'll have to change line 244 from
code : "white"
to
							theme: "custom",
							custom_theme_widget: 'recaptcha_widget'

And voila! now you should be able to style recaptcha as you want with css.

Reload Captcha Image 10 years 10 months ago #20943

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
That's great Daniel, thanks a lot.

I have just spoken with the customer and he agreed on not using captcha until he receives spam.

But your solution might be useful for further projects.

Reload Captcha Image 10 years 10 months ago #20949

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I actually didn't also know that it is possible to have a custom theme :) Now I'm playing with the idea of completely dropping the default captcha and providing only recaptcha...

Regards,
Daniel

Reload Captcha Image 10 years 10 months ago #20951

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
I think this is a good idea.

You could then make the recaptche themable in the template folder.

That way developers would have great flexibility.
  • Page:
  • 1
Time to create page: 0.138 seconds