Advertisement:

Author Topic: [SOLVED] noCaptcha reCaptcha just shows at modal and not into the form on pages.  (Read 3886 times)

lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
Hi Folks and Shamim_biplob (Plugin dev - Thanks for the great plug-in).

I want to inform that I'm not getting to make it works at the log-in page oc-content/brasil/user-login.php and other pages such as contact, and so on. (Brazil theme)
Actually, it just shows at the pop-up login, and not at the page login. See the printscreen (Attachment). WEIRD.
Access the site and try at www.FotoMarket.com.br

When I have tested I wasn't logged into the backend (Admin area). The show Captcha is checked for Login Form, also I have placed the plugin line code <?php anr_captcha_form_field(); ?> correctly into the code before the submit button as requested into the plugin configuration as you can check below:

Code: [Select]
<form action="<?php echo osc_base_url(true); ?>" method="post" >
                    <input type="hidden" name="page" value="login" />
                    <input type="hidden" name="action" value="login_post" />
                   
                    <fieldset>
                        <label for="email"><?php _e('E-mail''brasil'); ?></label> <?php UserForm::email_login_text(); ?><br />
                        <label for="password"><?php _e('Password''brasil'); ?></label> <?php UserForm::password_login_text(); ?><br />
                        <p class="checkbox"><?php UserForm::rememberme_login_checkbox();?> <label for="remember"><?php _e('Remember me''brasil'); ?></label></p>
                        <?php anr_captcha_form_field(); ?>
                        <button type="submit"><?php _e("Log in"'brasil');?></button>
                        <div class="more-login">
                            <a href="<?php echo osc_register_account_url(); ?>"><?php _e("Register for a free account"'brasil'); ?></a> · <a href="<?php echo osc_recover_user_password_url(); ?>"><?php _e("Forgot password?"'brasil'); ?></a>
                        <>
                    </fieldset>
                </form>


Any idea of what can be wrong? Why it just shows at the "modal" login pop-up and not at the pages where the line code is implemented such as login, contact, new listing and so on?

Thanks
« Last Edit: August 02, 2015, 03:57:20 pm by lucato »

shamim_biplob

  • Full Member
  • ***
  • Posts: 169
i did not use Brazil theme before and also can not find this theme for investigate.

What i suspect you have added code in modal form not the page form. Both form use same code? I don't think so. I can not read Brazil language (Though sometimes visited your country  :) ) But find that After submit button page form have two link but modal form have one link.

Please find out and let me know.

Also there is a suspect that google no Captcha shown in one form in a page only, If you have more than one form in a page also.
« Last Edit: August 01, 2015, 07:13:53 pm by shamim_biplob »

lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
Hi Shamim, thanks for your reply.

Here is the link for Brazil theme in the Market if you want to investigate.

How do I know which one is a modal form and other is a page form? The code I posted above is all code from the file user-login.php at oc-content/themes/brasil/ is it a modal form?

Thanks for a while. I will try to discover what is the php file for modal and which one is for page form, I thought both where in the same code above, as I'm not a php programmer. :0)

That is weird that it isn't working also for the other .php that are located into the theme, files those that I've inserted the plugin line code into.
« Last Edit: August 02, 2015, 03:42:36 am by lucato »

shamim_biplob

  • Full Member
  • ***
  • Posts: 169
I am trying to investigate this theme.

There is a quick hack to know which form you are editing is that you change something which is in both form. eg. In your desire form have "password" field. Change "Password" to "password2" or wharever, but another string. Then see that is this string changed in both form or only one? and which one?

shamim_biplob

  • Full Member
  • ***
  • Posts: 169
uninstall previous nocaptcha plugin. Download attached nocaptcha plugin and install. (You can not use bolth). In your themes header.php arround line 59 (before "log in" button) add
Code: [Select]
<div id="nocaptcha_recaptcha_modal"></div>. and any other form ( login, register etc) add
Code: [Select]
<div id="nocaptcha_recaptcha"></div> before submit button.

Let me know.

lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
Hi Shamim, thanks for the file.
Unfortunately didn't work for Brasil theme as you can check here.
It doesn't even show a single captha in the modal as was doing before. So, none is showing.

I have placed the codes as you've requested. Actually I have replaced from code:

Code: [Select]
<?php anr_captcha_form_field(); ?>

TO code:

Code: [Select]
<div id="nocaptcha_recaptcha"></div>
If I keep the (from code) with the new line (TO code), it doesn't build the page.

I'll try now to deactive all plugins I'm using to see if it can be some conflict between plugins. Not sure if by blocking or uninstalling plugins can solve something.

Have a nice sunday and I appreciate your time and help.

lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
^ just adding...
1. By blocking all other plugins, didn't solve anything;
2. Tried to change theme, and used the Bender (changed user-login.php in bender), and didn't work too. No captcha shows up. See the attached printscreen or try it here.

« Last Edit: August 02, 2015, 01:44:55 pm by lucato »

Aficionado

  • Guest
^ just adding...
1. By blocking all other plugins, didn't solve anything;
2. Tried to change theme, and used the Bender (changed user-login.php in bender), and didn't work too. No captcha shows up. See the attached printscreen or try it here.

It shows very well for me visiting your site.



lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
Thanks Aficionado for your reply,
Now it is really showing here too. Maybe it was an update delay on the server.

I'll check the other pages and give a new feedback if all went ok.

Have a nice Sunday.

lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
Hey Shamim and Aficionado, Solved!

It is really working, thanks a lot.

Shamim, you need to update the online version to this one. ;0)

The only think i'd like to reduce the box size of it. It seems that is controlled from an external .css file (https://www.gstatic.com/recaptcha/api2/r20150728113637/styles__ltr.css)
I was wondering if it is possible to override the css:

Code: [Select]
.rc-anchor-normal {
    height: 74px;
    width: 300px;
}

And from where I would override it?

Thanks a lot.



lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
http://forums.osclass.org/plugins-20/(new-plugin)-nocaptcha-recaptcha-now-in-market/msg124443/#msg124443


Thanks. I've placed that code from the link you provided into my style.css into my theme folder, but nothing happens with the size of the captcha box. By insepecting the box size I get:
Code: [Select]
.rc-anchor-normal {    height: 74px;    width: 300px;}

Tryied also to put it into style.css as with: 200px !important and nothing happens.

Any idea what I could try different to make it works? Thanks.

shamim_biplob

  • Full Member
  • ***
  • Posts: 169
Google no captcha loads on iframe. So it is difficult to apply css on it. But above link code works in  my installation. it makes no captcha responsive, try to adjust your window screen to see.

Google also now have another size named "compact". You can apply this if you like. Plugin i have given to you in line 48 and 49
replace 
Code: [Select]
'theme' : '<?php echo osc_esc_js($theme); ?>'with
Code: [Select]
'theme' : '<?php echo osc_esc_js($theme); ?>', 'size' : 'compact'

lucato

  • Full Member
  • ***
  • Posts: 182
  • [<o>] Brasil
Thanks a lot buddy, that looks "better" as you can check here.

I liked also this other solution (size), but I didn't get to make it works.


Have a great day and thanks again.