Forums / Extensions / ez comments - configuration (recapthca)

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

eZ debug

Timing: Jan 17 2025 20:59:43
Script start
Timing: Jan 17 2025 20:59:43
Module start 'content'
Timing: Jan 17 2025 20:59:44
Module end 'content'
Timing: Jan 17 2025 20:59:44
Script end

Main resources:

Total runtime0.9170 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 596.0703180.8359
Module start 'content' 0.00630.8135 776.9063630.9609
Module end 'content' 0.81990.0971 1,407.8672345.6328
Script end 0.9169  1,753.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4116210.0002
Check MTime0.00140.1487210.0001
Mysql Total
Database connection0.00090.098410.0009
Mysqli_queries0.835991.14842000.0042
Looping result0.00140.15651980.0000
Template Total0.892197.320.4461
Template load0.00180.195120.0009
Template processing0.890397.085820.4452
Template load and register function0.00010.012110.0001
states
state_id_array0.00070.073510.0007
state_identifier_array0.00090.092920.0004
Override
Cache load0.00170.1875740.0000
Sytem overhead
Fetch class attribute can translate value0.00100.110330.0003
Fetch class attribute name0.00070.080960.0001
XML
Image XML parsing0.00090.098630.0003
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00240.2606270.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs