Share » Forums » Extensions » ez comments - configuration (recapthca)

ez comments - configuration (recapthca)

ez comments - configuration (recapthca)

Friday 08 July 2011 3:02:02 am - 4 replies

Modified on Monday 11 July 2011 12:19:18 am by roberto perata

Author Message

Gaetano Giunta

Friday 08 July 2011 9:30:42 am

Yes, you missed to explain in detail what are the symptoms you are getting, and in which files you have put your settings, and which settings you changed and to which value ;-)

Principal Consultant International Business
Member of the Community Project Board

roberto perata

Monday 11 July 2011 3:30:33 am

I'm trying to use recaptcha.
I registered the domain and set the keys.

the page with ezcomments suddently disappear when try to connect to google (I suppose to get the keys) and it remains blank.

I'm working in a local copy of the site, don't know if depends about this.

Roberto

 

roberto perata

Tuesday 12 July 2011 6:08:43 am

I'm not able to use recaptcha.
It seems that the result of  {fetch( 'comment', 'recaptcha_html' )} is a document.write script that give me a blank page...
As far this is the normal behavior I suppose I miss something.

Actually I edit the ezcommments.ini, and it's fine and I added the following line to my template (these are the lines from the original add_comments):

        {if $fields|contains( 'recaptcha' )}
            {*Fetch captcha limitation*}
             {def $bypass_captcha = fetch( 'comment', 'has_access_to_security', hash( 'limitation', 'AntiSpam',
                                                                                        'option_value', 'bypass_captcha' ) )}
             {if $bypass_captcha|not}
                <div class="ezcom-field">
                  <fieldset>
                  <legend>{'Security text:'|i18n( 'ezcomments/comment/add/form' )}{$fieldRequiredText}</legend>
                  {if ezini( 'RecaptchaSetting', 'PublicKey', 'ezcomments.ini' )|eq('')}
                        <div class="message-warning">
                            {'reCAPTCHA API key missing.'|i18n( 'ezcomments/comment/add' )}
                        </div>
                  {else}
                      <script type="text/javascript">
                                {def $theme = ezini( 'RecaptchaSetting', 'Theme', 'ezcomments.ini' )}
                                {def $language = ezini( 'RecaptchaSetting', 'Language', 'ezcomments.ini' )}
                                {def $tabIndex = ezini( 'RecaptchaSetting', 'TabIndex', 'ezcomments.ini' )}
                                var RecaptchaOptions = {literal}{{/literal} theme : '{$theme}',
                                                         lang : '{$language}',
                                                         tabindex : {$tabIndex} {literal}}{/literal};
                      </script>
                      {if $theme|eq('custom')}
                          {*Customized theme start*}
                          <p>
                               {'Enter both words below, with or without a space.'|i18n( 'ezcomments/comment/add/form' )}<br />
                               {'The letters are not case-sensitive.'|i18n( 'ezcomments/comment/add/form' )}<br />
                               {'Can\'t read this?'|i18n( 'ezcomments/comment/add/form' )}
                               <a href="javascript:;" onclick="Recaptcha.reload();">
                                {'Try another'|i18n( 'ezcomments/comment/add/form' )}
                               </a>
                          </p>
                          <div id="recaptcha_image"></div>
                          <p>
                               <input type="text" class="box" id="recaptcha_response_field" name="recaptcha_response_field" />
                          </p>
                          {*Customized theme end*}
                       {/if}
                       {fetch( 'comment', 'recaptcha_html' )}
                  {/if}
                 </fieldset>
                </div>
             {/if}
             {undef $bypass_captcha}
        {/if}

 

In order to avoid the 'blank page' I put an iframe that makes a call to a server function to get the recaptha. I have the recaptha but not able to submit the form because it's inside an iframe.

Any suggestion?

Roberto

roberto perata

Wednesday 13 July 2011 5:00:53 am

I soleved calling a server function from the iframe and passign the input field to the comment form.

Roberto

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu