Author Topic: New reCAPTCHA plugin  (Read 16963 times)

Offline dennylin93

  • Jr. Member
  • **
  • Posts: 17
New reCAPTCHA plugin
« Reply #15 on: July 06, 2010, 03:39:06 AM »
Hmm, looks like there's a problem with the method I'm using to insert the reCAPTCHA code.

Can you post the plugins you're using (in the order listed in the config) as well as a copy of the HTML code from your browser?
« Last Edit: July 06, 2010, 03:46:53 AM by dennylin93 »

Offline lumen

  • Newbie
  • *
  • Posts: 2
New reCAPTCHA plugin
« Reply #16 on: July 06, 2010, 05:49:33 AM »
« Last Edit: July 08, 2010, 06:58:25 AM by lumen »

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
New reCAPTCHA plugin
« Reply #17 on: July 22, 2010, 01:56:11 AM »
Quote from: lumen;28560
Do you have any ideas?


In this code:




     




You have these two HTML tags at one line:


In rcguard.php the code:
    $tmp str_ireplace('</tbody>',
      
'<tr><td class="title"><div id="rcguard"><div id="recaptcha">' $script '</div></div>
</td>
</tr>
</tbody>'
$tmp);


searches for single HTML tag:


You have two ways:

  • Edit plugin's files rcguard.php
  • Edit your index.php file
Why this happened?
I think because you had made incorrect changes in your file:
skins/default/templates/login.html
« Last Edit: January 12, 2012, 09:30:58 AM by Makc666 »
...... ...... "А стукачков мы не любим!"

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
New reCAPTCHA plugin
« Reply #18 on: July 23, 2010, 09:08:34 AM »
Quote from: lacri;25411
to change language in capchta
edit rcguard.js

and replace
var RecaptchaOptions = {
  
theme 'white'
};
with
var RecaptchaOptions = {
  
theme 'white',
  
lang 'de'
};
de for German

see here for more options
reCAPTCHA API Documentation


There is another magic method to do this one.
And it has to be included in the plugin by default.

  • Open file:
rcguard.php

  • Find line:
$this->include_script('rcguard.js');

  • Replace with:
    if($_SESSION['language']){
        if(
is_readable('localization/' $_SESSION['language'] . '.js')){
            
$this->include_script('localization/' $_SESSION['language'] . '.js');
        }else{
            
$this->include_script('rcguard.js');
        }
    }else{
        
$this->include_script('rcguard.js');
    }


  • Open plugins localization folder and add *.js files for your languages.

    For example:
    • ru_RU.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'ru'
      };

    • de_DE.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'de'
      };

« Last Edit: January 12, 2012, 09:31:01 AM by Makc666 »
...... ...... "А стукачков мы не любим!"

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
New reCAPTCHA plugin
« Reply #19 on: July 23, 2010, 09:36:46 AM »
Quote from: lacri;25411
to change language in capchta
edit rcguard.js

and replace
var RecaptchaOptions = {
  
theme 'white'
};
with
var RecaptchaOptions = {
  
theme 'white',
  
lang 'de'
};
de for German

see here for more options
reCAPTCHA API Documentation


There is another magic method to do this one.
And it has to be included in the plugin by default.

  • Open file:
rcguard.php

  • Find line:
$this->include_script('rcguard.js');

  • Replace with:
    if($_SESSION['language']){
        if(
is_readable('localization/' $_SESSION['language'] . '.js')){
            
$this->include_script('localization/' $_SESSION['language'] . '.js');
        }else{
            
$this->include_script('rcguard.js');
        }
    }else{
        
$this->include_script('rcguard.js');
    }


  • Open plugins localization folder and add *.js files for your languages.

    For example:
    • ru_RU.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'ru'
      };

    • de_DE.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'de'
      };

...... ...... "А стукачков мы не любим!"

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
New reCAPTCHA plugin
« Reply #20 on: July 23, 2010, 09:49:13 AM »
Quote from: lacri;25411
to change language in capchta
edit rcguard.js

and replace
var RecaptchaOptions = {
  
theme 'white'
};
with
var RecaptchaOptions = {
  
theme 'white',
  
lang 'de'
};
de for German

see here for more options
reCAPTCHA API Documentation


P.S. Delete my previous bad post(s) regarding this problem. Thanks.

There is another magic method to do this one.
And it has to be included in the plugin by default.

  • Open file:
rcguard.php

  • Find line:
$this->include_script('rcguard.js');

  • Replace with:
    if($_SESSION['language']){
        if(
is_readable(slashify(realpath(slashify($this->home))) . '/localization/' $_SESSION['language'] . '.js')){
            
$this->include_script('localization/' $_SESSION['language'] . '.js');
        }else{
            
$this->include_script('rcguard2.js');
        }
    }else{
        
$this->include_script('rcguard.js');
    }


  • Open plugins localization folder and add *.js files for your languages.

    For example:
    • ru_RU.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'ru'
      };

    • de_DE.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'de'
      };

...... ...... "А стукачков мы не любим!"

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
New reCAPTCHA plugin
« Reply #21 on: July 23, 2010, 09:51:52 AM »
Quote from: lacri;25411
to change language in capchta
edit rcguard.js

and replace
var RecaptchaOptions = {
  
theme 'white'
};
with
var RecaptchaOptions = {
  
theme 'white',
  
lang 'de'
};
de for German

see here for more options
reCAPTCHA API Documentation


P.S. Please, delete my others post above regadiing the patch described in this thread.

There is another magic method to do this one.
And it has to be included in the plugin by default.

  • Open file:
rcguard.php

  • Find line:
$this->include_script('rcguard.js');

  • Replace with:
    if($_SESSION['language']){
        if(
is_readable(slashify(realpath(slashify($this->home))) . '/localization/' $_SESSION['language'] . '.js')){
            
$this->include_script('localization/' $_SESSION['language'] . '.js');
        }else{
            
$this->include_script('rcguard.js');
        }
    }else{
        
$this->include_script('rcguard.js');
    }


  • Open plugins localization folder and add *.js files for your languages.

    For example:
    • ru_RU.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'ru'
      };

    • de_DE.js
      Code: [Select]
      var RecaptchaOptions = {
        theme : 'white',
        lang : 'de'
      };

...... ...... "А стукачков мы не любим!"

Offline mattfox27

  • Jr. Member
  • **
  • Posts: 53
New reCAPTCHA plugin
« Reply #22 on: September 26, 2010, 01:46:40 AM »
this plugin kills my ability to show inline html images and attachments?????

I think i got it to work i downloaded and reinstalled it from the above link and it worked the files from the repository didn't work right...weird
« Last Edit: September 26, 2010, 02:12:44 AM by mattfox27 »