Author Topic: Joomla 1.5 contact forms and Recapcha  (Read 3636 times)

0 Members and 1 Guest are viewing this topic.

Offline libmansworld

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Joomla 1.5 contact forms and Recapcha
« on: February 22, 2010, 07:01:50 PM »
Hi folks,

I installed JEZ reCAPTCHA Integrator implementation Joomla! 1.5 plugin v1.0.0 without a hitch.

I entered in the public and private keys.

I did not choose inclusion syntax option and included the following

global $mainframe;
$mainframe->triggerEvent('onCaptchaDisplay');

in line 63 of the default_form.php  in com_contact of joomla.

No dice on recapcha. Didn't work.

I did this at http://seeds-of-leadership.com/index.php?option=com_contact&view=contact&id=1&Itemid=221

Any suggestions?

Thanks,
greg
« Last Edit: February 22, 2010, 07:04:00 PM by libmansworld »

Offline BDD

  • Global Moderator
  • Full Member
  • *****
  • Posts: 146
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #1 on: February 23, 2010, 12:13:00 PM »
Have you enabled the plugin? Also, did you put the triggerEvent code between a pair of PHP opening ( <?php ) and closing ( ?> ) tags?

Offline libmansworld

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #2 on: February 23, 2010, 05:23:09 PM »
Thanks for responding BDD.

I believe I did everything correctly. See my attachments. I assume I enabled the plugin.

I am wondering if I am not putting the ph code in the correct php file in Joomla. I'm using the default_form.php.

I checked the recaptcha.

I'm perplexedat this point.

Greg

Offline Fremen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Ok for me
« Reply #3 on: February 26, 2010, 04:35:56 AM »
Hello,

For me it's ok.

You can have a look to my contact form http://www.diagnobd.fr/contact
You can do a try, you can write test joomlaez as object in the form.



here the code I'm using on default_form.php

Code: [Select]
<?php if ($this->contact->params->get'show_email_copy' )) : ?>
<br />
<input type="checkbox" name="email_copy" id="contact_email_copy" value="1"  />
<label for="contact_email_copy">
<?php echo JText::_'EMAIL_A_COPY' ); ?>
</label>
<?php endif; ?>
<br />
<br />

<?php
global $mainframe;
$mainframe->triggerEvent('onCaptchaDisplay');

$document =& JFactory::getDocument();
$document->addScriptDeclaration("var RecaptchaOptions = {theme : 'blackglass', lang : 'fr'}");
?>


<button class="button validate" type="submit"><?php echo JText::_('Send'); ?></button>
</div>

Hope this is helping you

Offline libmansworld

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Ok for me
« Reply #4 on: February 26, 2010, 06:53:36 AM »
First thanks. But still not working.

I just don't get why I can't get this to work.

Anyone here a master at this stuff. It must be something simple. I have done everything that I can think off.

I installed the plugin and it is activated. Am I missing something? This is a hassle. I thought this would be a simple. ;(

Any help would be appreciated.

All the best,
Greg


Hello,

For me it's ok.

You can have a look to my contact form http://www.diagnobd.fr/contact
You can do a try, you can write test joomlaez as object in the form.



here the code I'm using on default_form.php

Code: [Select]
<?php if ($this->contact->params->get'show_email_copy' )) : ?>
<br />
<input type="checkbox" name="email_copy" id="contact_email_copy" value="1"  />
<label for="contact_email_copy">
<?php echo JText::_'EMAIL_A_COPY' ); ?>
</label>
<?php endif; ?>
<br />
<br />

<?php
global $mainframe;
$mainframe->triggerEvent('onCaptchaDisplay');

$document =& JFactory::getDocument();
$document->addScriptDeclaration("var RecaptchaOptions = {theme : 'blackglass', lang : 'fr'}");
?>


<button class="button validate" type="submit"><?php echo JText::_('Send'); ?></button>
</div>

Hope this is helping you

Offline Fremen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #5 on: February 26, 2010, 08:47:27 AM »
Can you try with another template (more basic), I know yootheme template is using mootools library and sometimes you get a conflict with jquery or other js script...


If you have a local machine with your own apach server (localhost) you can do a test, look here :

http://stackoverflow.com/questions/1794335/rails-recaptcha-on-localhost-windows-causing-issues


I don't have more idea...

Offline libmansworld

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #6 on: February 26, 2010, 09:10:42 AM »
I actually thought that the template might be interfering with recapcha. I attempted to address this possibility at the YooTheme forum but it appears no one wants to address this issue which is a bit disturbing. The person I'm helping with the website at seeds-of-leadership.com wants the VOX template so I have to work with that.

I think I'll take your advice and try a simple install and see if I can cut out some variables.

Your help has been highly appreciated. I'll let you know what happens over the next few days.

I thought I might experiment with Jollom but I suspect I might run into the same problem.

Greg

PS.  In the lines below should I be using 'en'. Where can I learn about setting the themes. Thanks again.

$document =& JFactory::getDocument();
            $document->addScriptDeclaration("var RecaptchaOptions = {theme : 'blackglass', lang : 'en'}");

 

Can you try with another template (more basic), I know yootheme template is using mootools library and sometimes you get a conflict with jquery or other js script...


If you have a local machine with your own apach server (localhost) you can do a test, look here :

http://stackoverflow.com/questions/1794335/rails-recaptcha-on-localhost-windows-causing-issues


I don't have more idea...
« Last Edit: February 26, 2010, 09:19:11 AM by libmansworld »

Offline Fremen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #7 on: February 26, 2010, 09:57:03 AM »
To be sure the reason is your template, try to swap to a very basic one like beez or download a free one somewhere (the one I'm using is aphelion from redevolution and is free, at least reCaptcha works on it)

It's not necssary to specifiy "en" for english in your case because it's the basic language (maybe tomorrow it'll be chinese but for the moment it's english  ;))

To customize the recaptcha have a look here

http://recaptcha.net/apidocs/captcha/client.html


Look & Feel Customization

Good luck

Offline libmansworld

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #8 on: February 26, 2010, 10:03:28 AM »
Tried your suggestion by choosing a basic template - still didn't work. I MUST be doing something wrong. Gads it is so frustrating.

Greg

Offline BDD

  • Global Moderator
  • Full Member
  • *****
  • Posts: 146
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #9 on: March 01, 2010, 03:24:43 AM »
Have you tried to put the plugin's integration code into the file:

your-joomla-location/templates/your-default-template/html/com_contact/contact/default_form.php

Offline libmansworld

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #10 on: March 01, 2010, 07:21:34 AM »
I had finally discovered that I was looking at the WRONG default_form.html. Being new to Joomla I was lloking at the default form in the components folder as opposed to the default_form in my template. Gads-that's what happens when one is a newbie! All works well at the contact form at seeds-of-leadership.com.

Thanks so much for your patience, your time, and your help,
Greg

Offline Fremen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Joomla 1.5 contact forms and Recapcha
« Reply #11 on: August 15, 2010, 04:31:09 AM »
I modified the default_form from the component because my template hasn't any contact default_form.html.
But after an update this php script was overwritten... so the captcha is again lost.

Changing directly the joomla file was not the correct solution for me.
I have to look to place the specific code to my template or finding another captcha module.

 

This is not an official Joomla! Site. The use of the words Joomla is intended to describe what the products are designed for and should not be considered an endorsement by the related Projects.