Forums

How can I make a "custom" recaptcha css?

samoht 06 Jul, 2009
Hello guys,

I notices that custom is an option in the recaptcha plugin for themes - but How to set this up??
GreyHead 06 Jul, 2009
Hi samoht,

I think there are instructions in the Wiki at the ReCaptcha site.

Bob
samoht 06 Jul, 2009
Hi Bob,

Yeah, I saw that - but they are saying that in order for the recaptcha to appear you have to put in your own HTML like:

<script>
var RecaptchaOptions = {
   theme: 'custom',
   lang: 'en',
   custom_theme_widget: 'recaptcha_widget'
};
</script>

<div id="recaptcha_widget" style="display:none">

<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>


if I use the recaptcha plugin - I don't know where I would put the HTML div's required for the recaptcha to show??

Thanks
Max_admin 06 Jul, 2009
Hi samoht,

I'm not sure I get the question but doesn't the reCaptcha plugin manage reshowing it again ?

Cheers,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
samoht 06 Jul, 2009
Hi Max,

The plugin works for all the other themes - but "Custom" requires different HTML output and therefore does not show.
I could hack the plugin to input the html necessary for the "Custom" theme - but I didn't know if there was something already there?

To be clear: the HTML output for the other schemes looks like:
<script type="text/javascript"
   src="http://api.recaptcha.net/challenge?k=<your_public_key>">
</script>

<noscript>
   <iframe src="http://api.recaptcha.net/noscript?k=<your_public_key>"
       height="300" width="500" frameborder="0"></iframe><br>
   <textarea name="recaptcha_challenge_field" rows="3" cols="40">
   </textarea>
   <input type="hidden" name="recaptcha_response_field" 
       value="manual_challenge">
</noscript>


for the custom theme to work you need some empty div's and html code like the previous post.

At least that is what the documentation seems to be telling me?
GreyHead 07 Jul, 2009
Hi samoht,

The Plugin just includes the standard ReCaptcha code at the moment. By all means try hacking the onload() function in the plugin to add the extra functionality. You'll need to check if the theme param is 'custom' and, if it is, then add the extra widget param to the javscript and the html to $recaptcha_load.

Bob
This topic is locked and no more replies can be posted.