ez comments - configuration (recapthca)

Author Message

roberto perata

Friday 08 July 2011 3:02:02 am

Hi,
I'm editing che configuration settings in ezcomments.ini.append.php  but I don't see any change even after clearing the cache.

Did I miss something?

Thanks

Roberto

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 17 2025 23:35:53
Script start
Timing: Jan 17 2025 23:35:53
Module start 'layout'
Timing: Jan 17 2025 23:35:53
Module start 'content'
Timing: Jan 17 2025 23:35:53
Module end 'content'
Timing: Jan 17 2025 23:35:53
Script end

Main resources:

Total runtime0.5318 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9375152.6250
Module start 'layout' 0.00540.0029 740.562539.4531
Module start 'content' 0.00830.5220 780.0156586.2344
Module end 'content' 0.53030.0015 1,366.250020.1563
Script end 0.5317  1,386.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.5833160.0002
Check MTime0.00130.2532160.0001
Mysql Total
Database connection0.00080.149910.0008
Mysqli_queries0.469188.2107630.0074
Looping result0.00050.1024610.0000
Template Total0.499894.020.2499
Template load0.00190.351520.0009
Template processing0.497993.627920.2489
Template load and register function0.00010.023710.0001
states
state_id_array0.00160.294510.0016
state_identifier_array0.00180.333620.0009
Override
Cache load0.00170.3144740.0000
Sytem overhead
Fetch class attribute can translate value0.00060.118120.0003
Fetch class attribute name0.00140.257660.0002
XML
Image XML parsing0.00060.107020.0003
class_abstraction
Instantiating content class attribute0.00000.002660.0000
General
dbfile0.00210.3881160.0001
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs