Plugin Directory

Changeset 483925


Ignore:
Timestamp:
01/03/2012 03:34:54 PM (14 years ago)
Author:
GabSoftware
Message:

added legacy themes compatibility option

Location:
gab-captcha-2
Files:
2 added
2 deleted
7 edited
9 copied

Legend:

Unmodified
Added
Removed
  • gab-captcha-2/tags/1.0.19/gabcaptcha2.php

    r480841 r483925  
    55Description: Simple captcha plugin for Wordpress comments.
    66Author: Gabriel Hautclocq
    7 Version: 1.0.18
     7Version: 1.0.19
    88Author URI: http://www.gabsoftware.com
    99Tags: comments, spam, bot, captcha, turing, test, challenge, protection, antispam
     
    321321                    $this->gabcaptcha2_set_option( 'use_js', 'on' );
    322322                }
     323                if( $revver < 19 )
     324                {
     325                    $this->gabcaptcha2_set_option( 'legacy_theme', 'off' );
     326                }
    323327            }
    324328        }
     
    857861        $gc_captcha_length = $this->gabcaptcha2_get_option( 'captcha_length' );
    858862        $use_js = ($this->gabcaptcha2_get_option( 'use_js' ) === 'on' );
    859 
    860 
    861         if( $use_js )
    862         {
     863        $legacy_theme = ($this->gabcaptcha2_get_option( 'legacy_theme' ) === 'on' );
     864
     865
     866        if( $use_js || $legacy_theme )
     867        {
     868            //if legacy theme, we have to output the fieldset after the comment form, then use JavaScript to replace it before the comment textarea.
     869            if( $legacy_theme )
     870            {
     871                ?>
     872
     873                    <fieldset id="<?php echo $_SESSION['gabcaptcha2_id']; ?>" class="gabcaptchafs"></fieldset>
     874
     875                <?php
     876            }
     877
    863878            //adds the captcha using Javascript
    864879            ?>
     
    10041019                captchatarget.appendChild( node );
    10051020
     1021                <?php if( $legacy_theme ): ?>
     1022
     1023                    //This is a legacy theme. We try to find the comment textarea and insert the captcha just before.
     1024                    var commentField = gabcaptcha2_getElementByIdUniversal( 'comment' );
     1025                    if( commentField == null )
     1026                    {
     1027                        //Try with the name attribute
     1028                        var fields = document.getElementsByTagName( 'comment' );
     1029                        if( fields.length > 0 )
     1030                        {
     1031                            commentField = fields[0];
     1032                        }
     1033                    }
     1034                    if( commentField != null )
     1035                    {
     1036                        //we found the comment text area, so we insert the captcha right before it
     1037                        var parentNode = commentField.parentNode;
     1038                        parentNode.insertBefore( captchatarget, commentField );
     1039
     1040                        <?php if( $failedprevious && $failedcommentdata != '' ): ?>
     1041
     1042                            //we fill the comment text area with the comment data
     1043                            commentField.innerHTML = '<?php echo esc_js( $failedcommentdata ); ?>';
     1044
     1045                        <?php endif; ?>
     1046                    }
     1047                    else
     1048                    {
     1049                        //The comment text area wasn't found... The captcha should appear under the comment area.
     1050                        //Not very pretty, but eh, shouldn't your theme be more up-to-date?
     1051                    }
     1052
     1053                <?php endif; ?>
     1054
    10061055            <?php endif;?>
    10071056
    10081057            <?php if( $failedprevious && $failedcommentdata != '' ): ?>
    1009 
    1010                 var commentArea = gabcaptcha2_getElementByIdUniversal( 'comment' );
    1011                 if( commentArea == null )
    1012                 {
    1013                     commentArea = document.getElementsByTagName( 'comment' )[0];
    1014                 }
    10151058
    10161059                window.location.hash = "#<?php echo $_SESSION['gabcaptcha2_id']; ?>";
  • gab-captcha-2/tags/1.0.19/gabcaptcha2_admin.php

    r480841 r483925  
    195195        ) );
    196196
     197        $this->create_setting( array(
     198            'id'      => 'legacy_theme',
     199            'title'   => __( 'Legacy themes compatibility', 'gabcaptcha2' ),
     200            'desc'    => __( 'If checked, the captcha will enforce the use of JavaScript and will only use the comment_form action hook. Try to check this if the captcha does not appear.', 'gabcaptcha2' ),
     201            'std'     => 'off',
     202            'type'    => 'checkbox',
     203            'section' => 'captcha'
     204        ) );
     205
    197206
    198207        /* Security options
     
    324333        }
    325334
     335        if( isset( $input['legacy_theme'] ) )
     336        {
     337            $newinput['legacy_theme'] = $input['legacy_theme'];
     338            if( ! preg_match( '/^(on|off)$/i', $newinput['legacy_theme'] ) )
     339            {
     340                $newinput['legacy_theme'] = 'off';
     341            }
     342        }
     343
    326344        if( isset( $input['output_method'] ) )
    327345        {
  • gab-captcha-2/tags/1.0.19/lang/gabcaptcha2-fr_FR.po

    r480841 r483925  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: gabcaptcha2 1.0.18\n"
     3"Project-Id-Version: gabcaptcha2 1.0.19\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2011-12-27 02:58+0800\n"
     5"POT-Creation-Date: 2012-01-03 23:27+0800\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n"
     
    3131
    3232#: gabcaptcha2_admin.php:37
    33 #: gabcaptcha2.php:798
    34 #: gabcaptcha2.php:802
    35 #: gabcaptcha2.php:984
    36 #: gabcaptcha2.php:996
     33#: gabcaptcha2.php:802
     34#: gabcaptcha2.php:806
     35#: gabcaptcha2.php:999
     36#: gabcaptcha2.php:1011
    3737msgid "Gab Captcha 2"
    3838msgstr "Gab Captcha 2"
     
    130130msgstr "Si coché, le captcha sera ajouté dynamiquement à l'aide de Javascript (recommandé)"
    131131
    132 #: gabcaptcha2_admin.php:203
     132#: gabcaptcha2_admin.php:199
     133msgid "Legacy themes compatibility"
     134msgstr "Compatibilité avec les anciens thèmes"
     135
     136#: gabcaptcha2_admin.php:200
     137msgid "If checked, the captcha will enforce the use of JavaScript and will only use the comment_form action hook. Try to check this if the captcha does not appear."
     138msgstr "Si coché, le captcha forcera l'usage du JavaScript et n'utilisera que l'action \"comment_form\". Essayez de cocher cette option si le captcha n'apparaît pas."
     139
     140#: gabcaptcha2_admin.php:212
    133141msgid "Method to output the Captcha:"
    134142msgstr "Choisissez la méthode de génération du Captcha&nbsp;:"
    135143
    136 #: gabcaptcha2_admin.php:204
     144#: gabcaptcha2_admin.php:213
    137145msgid "This is a compromise between better compatibility and better security."
    138146msgstr "C'est un compromis entre une meilleure compatibilité et une meilleure sécurité."
    139147
    140 #: gabcaptcha2_admin.php:209
     148#: gabcaptcha2_admin.php:218
    141149msgid "Standard: medium security, high compatibility"
    142150msgstr "Standard&nbsp;: sécurité moyenne, compatibilité élevée"
    143151
    144 #: gabcaptcha2_admin.php:210
     152#: gabcaptcha2_admin.php:219
    145153msgid "CSS: improved security, compatible with CSS-capable browsers"
    146154msgstr "CSS&nbsp;: sécurité accrue, compatibilité avec navigateurs gérant le CSS"
    147155
    148 #: gabcaptcha2_admin.php:211
     156#: gabcaptcha2_admin.php:220
    149157msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers"
    150158msgstr "CSS 3&nbsp;: Meilleure sécurité mais restreint la compatibilité aux navigateurs supportant le CSS 3 uniquement"
    151159
    152 #: gabcaptcha2_admin.php:226
     160#: gabcaptcha2_admin.php:235
    153161msgid "This section concerns the general options of Gab Captcha 2."
    154162msgstr "Cette section concerne les options générales de Gab Captcha 2."
    155163
    156 #: gabcaptcha2_admin.php:232
     164#: gabcaptcha2_admin.php:241
    157165msgid "This section proposes settings related to the captcha."
    158166msgstr "Cette section propose des options relatives au captcha."
    159167
    160 #: gabcaptcha2_admin.php:238
     168#: gabcaptcha2_admin.php:247
    161169msgid "This section contains security settings."
    162170msgstr "Cette section contient des paramètres relatifs à la sécurité."
    163171
    164 #: gabcaptcha2.php:501
    165 #: gabcaptcha2.php:516
    166 #: gabcaptcha2.php:530
     172#: gabcaptcha2.php:505
     173#: gabcaptcha2.php:520
     174#: gabcaptcha2.php:534
    167175#, php-format
    168176msgid "%s does not exist"
    169177msgstr "%s n'existe pas"
    170178
    171 #: gabcaptcha2.php:669
     179#: gabcaptcha2.php:673
    172180msgid "Wrong code typed!"
    173181msgstr "Code entré invalide&nbsp;!"
    174182
    175 #: gabcaptcha2.php:670
     183#: gabcaptcha2.php:674
    176184#, php-format
    177185msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)."
    178186msgstr "Vous serez redirigé dans 10 secondes vers <a href=\"%1$s\">%1$s</a> (là où vous étiez)."
    179187
    180 #: gabcaptcha2.php:671
     188#: gabcaptcha2.php:675
    181189msgid "If the redirection does not work, click on the link above."
    182190msgstr "Si la redirection ne fonctionne pas, cliquez sur le lien ci-dessus."
    183191
    184 #: gabcaptcha2.php:672
     192#: gabcaptcha2.php:676
    185193msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page."
    186194msgstr "Si vous êtes humain, ne vous inquiétez pas, votre commantaire n'est pas perdu. Il sera affiché à nouveau sur la page suivante."
    187195
    188 #: gabcaptcha2.php:673
     196#: gabcaptcha2.php:677
    189197msgid "But double-check your code next time!"
    190198msgstr "Mais vérifiez bien votre code la prochaine fois&nbsp;!"
    191199
    192 #: gabcaptcha2.php:674
     200#: gabcaptcha2.php:678
    193201msgid "If you are a spam-bot, too bad for you."
    194202msgstr "Si vous êtes un robot-spammeur, tant pis pour vous&nbsp;!"
    195203
    196 #: gabcaptcha2.php:778
    197 #: gabcaptcha2.php:906
     204#: gabcaptcha2.php:782
     205#: gabcaptcha2.php:921
    198206msgid "Anti-spam protection"
    199207msgstr "Protection anti-spam"
    200208
    201 #: gabcaptcha2.php:779
     209#: gabcaptcha2.php:783
    202210#, php-format
    203211msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)"
    204212msgstr "Test de Turing avec Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)"
    205213
    206 #: gabcaptcha2.php:788
    207 #: gabcaptcha2.php:962
     214#: gabcaptcha2.php:792
     215#: gabcaptcha2.php:977
    208216msgid "You failed the test. Try again!"
    209217msgstr "Vous n'avez pas passé le test. Recommencez&nbsp;!"
    210218
    211 #: gabcaptcha2.php:798
    212 #: gabcaptcha2.php:978
     219#: gabcaptcha2.php:802
     220#: gabcaptcha2.php:993
    213221msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    214222msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    215223
    216 #: gabcaptcha2.php:798
    217 #: gabcaptcha2.php:979
     224#: gabcaptcha2.php:802
     225#: gabcaptcha2.php:994
    218226#, php-format
    219227msgid "Click here for more information about Gab Captcha 2 v%s"
    220228msgstr "Cliquez ici pour plus d'informations à propos de Gab Captcha 2 v%s"
    221229
    222 #: gabcaptcha2.php:798
    223 #: gabcaptcha2.php:802
    224 #: gabcaptcha2.php:981
    225 #: gabcaptcha2.php:993
     230#: gabcaptcha2.php:802
     231#: gabcaptcha2.php:806
     232#: gabcaptcha2.php:996
     233#: gabcaptcha2.php:1008
    226234msgid "Protected by "
    227235msgstr "Protégé par "
    228236
    229 #: gabcaptcha2.php:802
    230 #: gabcaptcha2.php:992
     237#: gabcaptcha2.php:806
     238#: gabcaptcha2.php:1007
    231239#, php-format
    232240msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/"
    233241msgstr "Plus d'informations à propos de Gab Captcha 2 v%s sur http://www.gabsoftware.com/"
    234242
    235 #: gabcaptcha2.php:866
     243#: gabcaptcha2.php:881
    236244msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!"
    237245msgstr "JavaScript doit être activé pour que notre protection anti-spam vous laisse poster un commentaire."
  • gab-captcha-2/tags/1.0.19/lang/gabcaptcha2-ru_RU.po

    r480841 r483925  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: gabcaptcha2 1.0.18\n"
     3"Project-Id-Version: gabcaptcha2 1.0.19\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2011-12-27 03:00+0800\n"
     5"POT-Creation-Date: 2012-01-03 23:30+0800\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n"
     
    3131
    3232#: gabcaptcha2_admin.php:37
    33 #: gabcaptcha2.php:798
    34 #: gabcaptcha2.php:802
    35 #: gabcaptcha2.php:984
    36 #: gabcaptcha2.php:996
     33#: gabcaptcha2.php:802
     34#: gabcaptcha2.php:806
     35#: gabcaptcha2.php:999
     36#: gabcaptcha2.php:1011
    3737msgid "Gab Captcha 2"
    3838msgstr "Gab Captcha 2"
     
    130130msgstr ""
    131131
    132 #: gabcaptcha2_admin.php:203
     132#: gabcaptcha2_admin.php:199
     133msgid "Legacy themes compatibility"
     134msgstr ""
     135
     136#: gabcaptcha2_admin.php:200
     137msgid "If checked, the captcha will enforce the use of JavaScript and will only use the comment_form action hook. Try to check this if the captcha does not appear."
     138msgstr ""
     139
     140#: gabcaptcha2_admin.php:212
    133141msgid "Method to output the Captcha:"
    134142msgstr ""
    135143
    136 #: gabcaptcha2_admin.php:204
     144#: gabcaptcha2_admin.php:213
    137145msgid "This is a compromise between better compatibility and better security."
    138146msgstr ""
    139147
    140 #: gabcaptcha2_admin.php:209
     148#: gabcaptcha2_admin.php:218
    141149msgid "Standard: medium security, high compatibility"
    142150msgstr "Стандартный: Средняя защита, но работает везде"
    143151
    144 #: gabcaptcha2_admin.php:210
     152#: gabcaptcha2_admin.php:219
    145153msgid "CSS: improved security, compatible with CSS-capable browsers"
    146154msgstr "CSS: улучшеная защита, работает в 99% браузеров"
    147155
    148 #: gabcaptcha2_admin.php:211
     156#: gabcaptcha2_admin.php:220
    149157msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers"
    150158msgstr "CSS 3: мощнейшая защита, работает только в современных бораузерах"
    151159
    152 #: gabcaptcha2_admin.php:226
     160#: gabcaptcha2_admin.php:235
    153161msgid "This section concerns the general options of Gab Captcha 2."
    154162msgstr ""
    155163
    156 #: gabcaptcha2_admin.php:232
     164#: gabcaptcha2_admin.php:241
    157165msgid "This section proposes settings related to the captcha."
    158166msgstr ""
    159167
    160 #: gabcaptcha2_admin.php:238
     168#: gabcaptcha2_admin.php:247
    161169msgid "This section contains security settings."
    162170msgstr ""
    163171
    164 #: gabcaptcha2.php:501
    165 #: gabcaptcha2.php:516
    166 #: gabcaptcha2.php:530
     172#: gabcaptcha2.php:505
     173#: gabcaptcha2.php:520
     174#: gabcaptcha2.php:534
    167175#, php-format
    168176msgid "%s does not exist"
    169177msgstr "%s не существует"
    170178
    171 #: gabcaptcha2.php:669
     179#: gabcaptcha2.php:673
    172180msgid "Wrong code typed!"
    173181msgstr ""
    174182
    175 #: gabcaptcha2.php:670
     183#: gabcaptcha2.php:674
    176184#, php-format
    177185msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)."
    178186msgstr ""
    179187
    180 #: gabcaptcha2.php:671
     188#: gabcaptcha2.php:675
    181189msgid "If the redirection does not work, click on the link above."
    182190msgstr ""
    183191
    184 #: gabcaptcha2.php:672
     192#: gabcaptcha2.php:676
    185193msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page."
    186194msgstr ""
    187195
    188 #: gabcaptcha2.php:673
     196#: gabcaptcha2.php:677
    189197msgid "But double-check your code next time!"
    190198msgstr ""
    191199
    192 #: gabcaptcha2.php:674
     200#: gabcaptcha2.php:678
    193201msgid "If you are a spam-bot, too bad for you."
    194202msgstr ""
    195203
    196 #: gabcaptcha2.php:778
    197 #: gabcaptcha2.php:906
     204#: gabcaptcha2.php:782
     205#: gabcaptcha2.php:921
    198206msgid "Anti-spam protection"
    199207msgstr "Анти-спам"
    200208
    201 #: gabcaptcha2.php:779
     209#: gabcaptcha2.php:783
    202210#, php-format
    203211msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)"
    204212msgstr ""
    205213
    206 #: gabcaptcha2.php:788
    207 #: gabcaptcha2.php:962
     214#: gabcaptcha2.php:792
     215#: gabcaptcha2.php:977
    208216msgid "You failed the test. Try again!"
    209217msgstr "Вы неправильно ввели красные буквы. Попробуйте снова!"
    210218
    211 #: gabcaptcha2.php:798
    212 #: gabcaptcha2.php:978
     219#: gabcaptcha2.php:802
     220#: gabcaptcha2.php:993
    213221msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    214222msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    215223
    216 #: gabcaptcha2.php:798
    217 #: gabcaptcha2.php:979
     224#: gabcaptcha2.php:802
     225#: gabcaptcha2.php:994
    218226#, php-format
    219227msgid "Click here for more information about Gab Captcha 2 v%s"
    220228msgstr ""
    221229
    222 #: gabcaptcha2.php:798
    223 #: gabcaptcha2.php:802
    224 #: gabcaptcha2.php:981
    225 #: gabcaptcha2.php:993
     230#: gabcaptcha2.php:802
     231#: gabcaptcha2.php:806
     232#: gabcaptcha2.php:996
     233#: gabcaptcha2.php:1008
    226234msgid "Protected by "
    227235msgstr ""
    228236
    229 #: gabcaptcha2.php:802
    230 #: gabcaptcha2.php:992
     237#: gabcaptcha2.php:806
     238#: gabcaptcha2.php:1007
    231239#, php-format
    232240msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/"
    233241msgstr ""
    234242
    235 #: gabcaptcha2.php:866
     243#: gabcaptcha2.php:881
    236244msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!"
    237245msgstr "Наша защита против спама требует для работы включенный  JavaScript в вашем браузере!"
  • gab-captcha-2/tags/1.0.19/readme.txt

    r480841 r483925  
    55Requires at least: 3.0.0
    66Tested up to: 3.3.0
    7 Stable tag: 1.0.18
     7Stable tag: 1.0.19
    88
    99Gab Captcha 2 is a simple captcha plugin for fighting spam in WordPress comments.
     
    118118== Changelog ==
    119119
     120= 1.0.19 =
     121* Added an option for legacy themes compatibility. Legacy themes often do not use the comment_form() function that brings several actions and filters. Check this option if the captcha doesn't appear since update 1.0.15. The only action used will be "comment_form" and JavaScript will be used compulsory.
     122
    120123= 1.0.18 =
    121124* Better handling of captcha insertion, should be compatible with more themes
  • gab-captcha-2/trunk/gabcaptcha2.php

    r480841 r483925  
    55Description: Simple captcha plugin for Wordpress comments.
    66Author: Gabriel Hautclocq
    7 Version: 1.0.18
     7Version: 1.0.19
    88Author URI: http://www.gabsoftware.com
    99Tags: comments, spam, bot, captcha, turing, test, challenge, protection, antispam
     
    321321                    $this->gabcaptcha2_set_option( 'use_js', 'on' );
    322322                }
     323                if( $revver < 19 )
     324                {
     325                    $this->gabcaptcha2_set_option( 'legacy_theme', 'off' );
     326                }
    323327            }
    324328        }
     
    857861        $gc_captcha_length = $this->gabcaptcha2_get_option( 'captcha_length' );
    858862        $use_js = ($this->gabcaptcha2_get_option( 'use_js' ) === 'on' );
    859 
    860 
    861         if( $use_js )
    862         {
     863        $legacy_theme = ($this->gabcaptcha2_get_option( 'legacy_theme' ) === 'on' );
     864
     865
     866        if( $use_js || $legacy_theme )
     867        {
     868            //if legacy theme, we have to output the fieldset after the comment form, then use JavaScript to replace it before the comment textarea.
     869            if( $legacy_theme )
     870            {
     871                ?>
     872
     873                    <fieldset id="<?php echo $_SESSION['gabcaptcha2_id']; ?>" class="gabcaptchafs"></fieldset>
     874
     875                <?php
     876            }
     877
    863878            //adds the captcha using Javascript
    864879            ?>
     
    10041019                captchatarget.appendChild( node );
    10051020
     1021                <?php if( $legacy_theme ): ?>
     1022
     1023                    //This is a legacy theme. We try to find the comment textarea and insert the captcha just before.
     1024                    var commentField = gabcaptcha2_getElementByIdUniversal( 'comment' );
     1025                    if( commentField == null )
     1026                    {
     1027                        //Try with the name attribute
     1028                        var fields = document.getElementsByTagName( 'comment' );
     1029                        if( fields.length > 0 )
     1030                        {
     1031                            commentField = fields[0];
     1032                        }
     1033                    }
     1034                    if( commentField != null )
     1035                    {
     1036                        //we found the comment text area, so we insert the captcha right before it
     1037                        var parentNode = commentField.parentNode;
     1038                        parentNode.insertBefore( captchatarget, commentField );
     1039
     1040                        <?php if( $failedprevious && $failedcommentdata != '' ): ?>
     1041
     1042                            //we fill the comment text area with the comment data
     1043                            commentField.innerHTML = '<?php echo esc_js( $failedcommentdata ); ?>';
     1044
     1045                        <?php endif; ?>
     1046                    }
     1047                    else
     1048                    {
     1049                        //The comment text area wasn't found... The captcha should appear under the comment area.
     1050                        //Not very pretty, but eh, shouldn't your theme be more up-to-date?
     1051                    }
     1052
     1053                <?php endif; ?>
     1054
    10061055            <?php endif;?>
    10071056
    10081057            <?php if( $failedprevious && $failedcommentdata != '' ): ?>
    1009 
    1010                 var commentArea = gabcaptcha2_getElementByIdUniversal( 'comment' );
    1011                 if( commentArea == null )
    1012                 {
    1013                     commentArea = document.getElementsByTagName( 'comment' )[0];
    1014                 }
    10151058
    10161059                window.location.hash = "#<?php echo $_SESSION['gabcaptcha2_id']; ?>";
  • gab-captcha-2/trunk/gabcaptcha2_admin.php

    r480841 r483925  
    195195        ) );
    196196
     197        $this->create_setting( array(
     198            'id'      => 'legacy_theme',
     199            'title'   => __( 'Legacy themes compatibility', 'gabcaptcha2' ),
     200            'desc'    => __( 'If checked, the captcha will enforce the use of JavaScript and will only use the comment_form action hook. Try to check this if the captcha does not appear.', 'gabcaptcha2' ),
     201            'std'     => 'off',
     202            'type'    => 'checkbox',
     203            'section' => 'captcha'
     204        ) );
     205
    197206
    198207        /* Security options
     
    324333        }
    325334
     335        if( isset( $input['legacy_theme'] ) )
     336        {
     337            $newinput['legacy_theme'] = $input['legacy_theme'];
     338            if( ! preg_match( '/^(on|off)$/i', $newinput['legacy_theme'] ) )
     339            {
     340                $newinput['legacy_theme'] = 'off';
     341            }
     342        }
     343
    326344        if( isset( $input['output_method'] ) )
    327345        {
  • gab-captcha-2/trunk/lang/gabcaptcha2-fr_FR.po

    r480841 r483925  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: gabcaptcha2 1.0.18\n"
     3"Project-Id-Version: gabcaptcha2 1.0.19\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2011-12-27 02:58+0800\n"
     5"POT-Creation-Date: 2012-01-03 23:27+0800\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n"
     
    3131
    3232#: gabcaptcha2_admin.php:37
    33 #: gabcaptcha2.php:798
    34 #: gabcaptcha2.php:802
    35 #: gabcaptcha2.php:984
    36 #: gabcaptcha2.php:996
     33#: gabcaptcha2.php:802
     34#: gabcaptcha2.php:806
     35#: gabcaptcha2.php:999
     36#: gabcaptcha2.php:1011
    3737msgid "Gab Captcha 2"
    3838msgstr "Gab Captcha 2"
     
    130130msgstr "Si coché, le captcha sera ajouté dynamiquement à l'aide de Javascript (recommandé)"
    131131
    132 #: gabcaptcha2_admin.php:203
     132#: gabcaptcha2_admin.php:199
     133msgid "Legacy themes compatibility"
     134msgstr "Compatibilité avec les anciens thèmes"
     135
     136#: gabcaptcha2_admin.php:200
     137msgid "If checked, the captcha will enforce the use of JavaScript and will only use the comment_form action hook. Try to check this if the captcha does not appear."
     138msgstr "Si coché, le captcha forcera l'usage du JavaScript et n'utilisera que l'action \"comment_form\". Essayez de cocher cette option si le captcha n'apparaît pas."
     139
     140#: gabcaptcha2_admin.php:212
    133141msgid "Method to output the Captcha:"
    134142msgstr "Choisissez la méthode de génération du Captcha&nbsp;:"
    135143
    136 #: gabcaptcha2_admin.php:204
     144#: gabcaptcha2_admin.php:213
    137145msgid "This is a compromise between better compatibility and better security."
    138146msgstr "C'est un compromis entre une meilleure compatibilité et une meilleure sécurité."
    139147
    140 #: gabcaptcha2_admin.php:209
     148#: gabcaptcha2_admin.php:218
    141149msgid "Standard: medium security, high compatibility"
    142150msgstr "Standard&nbsp;: sécurité moyenne, compatibilité élevée"
    143151
    144 #: gabcaptcha2_admin.php:210
     152#: gabcaptcha2_admin.php:219
    145153msgid "CSS: improved security, compatible with CSS-capable browsers"
    146154msgstr "CSS&nbsp;: sécurité accrue, compatibilité avec navigateurs gérant le CSS"
    147155
    148 #: gabcaptcha2_admin.php:211
     156#: gabcaptcha2_admin.php:220
    149157msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers"
    150158msgstr "CSS 3&nbsp;: Meilleure sécurité mais restreint la compatibilité aux navigateurs supportant le CSS 3 uniquement"
    151159
    152 #: gabcaptcha2_admin.php:226
     160#: gabcaptcha2_admin.php:235
    153161msgid "This section concerns the general options of Gab Captcha 2."
    154162msgstr "Cette section concerne les options générales de Gab Captcha 2."
    155163
    156 #: gabcaptcha2_admin.php:232
     164#: gabcaptcha2_admin.php:241
    157165msgid "This section proposes settings related to the captcha."
    158166msgstr "Cette section propose des options relatives au captcha."
    159167
    160 #: gabcaptcha2_admin.php:238
     168#: gabcaptcha2_admin.php:247
    161169msgid "This section contains security settings."
    162170msgstr "Cette section contient des paramètres relatifs à la sécurité."
    163171
    164 #: gabcaptcha2.php:501
    165 #: gabcaptcha2.php:516
    166 #: gabcaptcha2.php:530
     172#: gabcaptcha2.php:505
     173#: gabcaptcha2.php:520
     174#: gabcaptcha2.php:534
    167175#, php-format
    168176msgid "%s does not exist"
    169177msgstr "%s n'existe pas"
    170178
    171 #: gabcaptcha2.php:669
     179#: gabcaptcha2.php:673
    172180msgid "Wrong code typed!"
    173181msgstr "Code entré invalide&nbsp;!"
    174182
    175 #: gabcaptcha2.php:670
     183#: gabcaptcha2.php:674
    176184#, php-format
    177185msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)."
    178186msgstr "Vous serez redirigé dans 10 secondes vers <a href=\"%1$s\">%1$s</a> (là où vous étiez)."
    179187
    180 #: gabcaptcha2.php:671
     188#: gabcaptcha2.php:675
    181189msgid "If the redirection does not work, click on the link above."
    182190msgstr "Si la redirection ne fonctionne pas, cliquez sur le lien ci-dessus."
    183191
    184 #: gabcaptcha2.php:672
     192#: gabcaptcha2.php:676
    185193msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page."
    186194msgstr "Si vous êtes humain, ne vous inquiétez pas, votre commantaire n'est pas perdu. Il sera affiché à nouveau sur la page suivante."
    187195
    188 #: gabcaptcha2.php:673
     196#: gabcaptcha2.php:677
    189197msgid "But double-check your code next time!"
    190198msgstr "Mais vérifiez bien votre code la prochaine fois&nbsp;!"
    191199
    192 #: gabcaptcha2.php:674
     200#: gabcaptcha2.php:678
    193201msgid "If you are a spam-bot, too bad for you."
    194202msgstr "Si vous êtes un robot-spammeur, tant pis pour vous&nbsp;!"
    195203
    196 #: gabcaptcha2.php:778
    197 #: gabcaptcha2.php:906
     204#: gabcaptcha2.php:782
     205#: gabcaptcha2.php:921
    198206msgid "Anti-spam protection"
    199207msgstr "Protection anti-spam"
    200208
    201 #: gabcaptcha2.php:779
     209#: gabcaptcha2.php:783
    202210#, php-format
    203211msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)"
    204212msgstr "Test de Turing avec Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)"
    205213
    206 #: gabcaptcha2.php:788
    207 #: gabcaptcha2.php:962
     214#: gabcaptcha2.php:792
     215#: gabcaptcha2.php:977
    208216msgid "You failed the test. Try again!"
    209217msgstr "Vous n'avez pas passé le test. Recommencez&nbsp;!"
    210218
    211 #: gabcaptcha2.php:798
    212 #: gabcaptcha2.php:978
     219#: gabcaptcha2.php:802
     220#: gabcaptcha2.php:993
    213221msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    214222msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    215223
    216 #: gabcaptcha2.php:798
    217 #: gabcaptcha2.php:979
     224#: gabcaptcha2.php:802
     225#: gabcaptcha2.php:994
    218226#, php-format
    219227msgid "Click here for more information about Gab Captcha 2 v%s"
    220228msgstr "Cliquez ici pour plus d'informations à propos de Gab Captcha 2 v%s"
    221229
    222 #: gabcaptcha2.php:798
    223 #: gabcaptcha2.php:802
    224 #: gabcaptcha2.php:981
    225 #: gabcaptcha2.php:993
     230#: gabcaptcha2.php:802
     231#: gabcaptcha2.php:806
     232#: gabcaptcha2.php:996
     233#: gabcaptcha2.php:1008
    226234msgid "Protected by "
    227235msgstr "Protégé par "
    228236
    229 #: gabcaptcha2.php:802
    230 #: gabcaptcha2.php:992
     237#: gabcaptcha2.php:806
     238#: gabcaptcha2.php:1007
    231239#, php-format
    232240msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/"
    233241msgstr "Plus d'informations à propos de Gab Captcha 2 v%s sur http://www.gabsoftware.com/"
    234242
    235 #: gabcaptcha2.php:866
     243#: gabcaptcha2.php:881
    236244msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!"
    237245msgstr "JavaScript doit être activé pour que notre protection anti-spam vous laisse poster un commentaire."
  • gab-captcha-2/trunk/lang/gabcaptcha2-ru_RU.po

    r480841 r483925  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: gabcaptcha2 1.0.18\n"
     3"Project-Id-Version: gabcaptcha2 1.0.19\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2011-12-27 03:00+0800\n"
     5"POT-Creation-Date: 2012-01-03 23:30+0800\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n"
     
    3131
    3232#: gabcaptcha2_admin.php:37
    33 #: gabcaptcha2.php:798
    34 #: gabcaptcha2.php:802
    35 #: gabcaptcha2.php:984
    36 #: gabcaptcha2.php:996
     33#: gabcaptcha2.php:802
     34#: gabcaptcha2.php:806
     35#: gabcaptcha2.php:999
     36#: gabcaptcha2.php:1011
    3737msgid "Gab Captcha 2"
    3838msgstr "Gab Captcha 2"
     
    130130msgstr ""
    131131
    132 #: gabcaptcha2_admin.php:203
     132#: gabcaptcha2_admin.php:199
     133msgid "Legacy themes compatibility"
     134msgstr ""
     135
     136#: gabcaptcha2_admin.php:200
     137msgid "If checked, the captcha will enforce the use of JavaScript and will only use the comment_form action hook. Try to check this if the captcha does not appear."
     138msgstr ""
     139
     140#: gabcaptcha2_admin.php:212
    133141msgid "Method to output the Captcha:"
    134142msgstr ""
    135143
    136 #: gabcaptcha2_admin.php:204
     144#: gabcaptcha2_admin.php:213
    137145msgid "This is a compromise between better compatibility and better security."
    138146msgstr ""
    139147
    140 #: gabcaptcha2_admin.php:209
     148#: gabcaptcha2_admin.php:218
    141149msgid "Standard: medium security, high compatibility"
    142150msgstr "Стандартный: Средняя защита, но работает везде"
    143151
    144 #: gabcaptcha2_admin.php:210
     152#: gabcaptcha2_admin.php:219
    145153msgid "CSS: improved security, compatible with CSS-capable browsers"
    146154msgstr "CSS: улучшеная защита, работает в 99% браузеров"
    147155
    148 #: gabcaptcha2_admin.php:211
     156#: gabcaptcha2_admin.php:220
    149157msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers"
    150158msgstr "CSS 3: мощнейшая защита, работает только в современных бораузерах"
    151159
    152 #: gabcaptcha2_admin.php:226
     160#: gabcaptcha2_admin.php:235
    153161msgid "This section concerns the general options of Gab Captcha 2."
    154162msgstr ""
    155163
    156 #: gabcaptcha2_admin.php:232
     164#: gabcaptcha2_admin.php:241
    157165msgid "This section proposes settings related to the captcha."
    158166msgstr ""
    159167
    160 #: gabcaptcha2_admin.php:238
     168#: gabcaptcha2_admin.php:247
    161169msgid "This section contains security settings."
    162170msgstr ""
    163171
    164 #: gabcaptcha2.php:501
    165 #: gabcaptcha2.php:516
    166 #: gabcaptcha2.php:530
     172#: gabcaptcha2.php:505
     173#: gabcaptcha2.php:520
     174#: gabcaptcha2.php:534
    167175#, php-format
    168176msgid "%s does not exist"
    169177msgstr "%s не существует"
    170178
    171 #: gabcaptcha2.php:669
     179#: gabcaptcha2.php:673
    172180msgid "Wrong code typed!"
    173181msgstr ""
    174182
    175 #: gabcaptcha2.php:670
     183#: gabcaptcha2.php:674
    176184#, php-format
    177185msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)."
    178186msgstr ""
    179187
    180 #: gabcaptcha2.php:671
     188#: gabcaptcha2.php:675
    181189msgid "If the redirection does not work, click on the link above."
    182190msgstr ""
    183191
    184 #: gabcaptcha2.php:672
     192#: gabcaptcha2.php:676
    185193msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page."
    186194msgstr ""
    187195
    188 #: gabcaptcha2.php:673
     196#: gabcaptcha2.php:677
    189197msgid "But double-check your code next time!"
    190198msgstr ""
    191199
    192 #: gabcaptcha2.php:674
     200#: gabcaptcha2.php:678
    193201msgid "If you are a spam-bot, too bad for you."
    194202msgstr ""
    195203
    196 #: gabcaptcha2.php:778
    197 #: gabcaptcha2.php:906
     204#: gabcaptcha2.php:782
     205#: gabcaptcha2.php:921
    198206msgid "Anti-spam protection"
    199207msgstr "Анти-спам"
    200208
    201 #: gabcaptcha2.php:779
     209#: gabcaptcha2.php:783
    202210#, php-format
    203211msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)"
    204212msgstr ""
    205213
    206 #: gabcaptcha2.php:788
    207 #: gabcaptcha2.php:962
     214#: gabcaptcha2.php:792
     215#: gabcaptcha2.php:977
    208216msgid "You failed the test. Try again!"
    209217msgstr "Вы неправильно ввели красные буквы. Попробуйте снова!"
    210218
    211 #: gabcaptcha2.php:798
    212 #: gabcaptcha2.php:978
     219#: gabcaptcha2.php:802
     220#: gabcaptcha2.php:993
    213221msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    214222msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/"
    215223
    216 #: gabcaptcha2.php:798
    217 #: gabcaptcha2.php:979
     224#: gabcaptcha2.php:802
     225#: gabcaptcha2.php:994
    218226#, php-format
    219227msgid "Click here for more information about Gab Captcha 2 v%s"
    220228msgstr ""
    221229
    222 #: gabcaptcha2.php:798
    223 #: gabcaptcha2.php:802
    224 #: gabcaptcha2.php:981
    225 #: gabcaptcha2.php:993
     230#: gabcaptcha2.php:802
     231#: gabcaptcha2.php:806
     232#: gabcaptcha2.php:996
     233#: gabcaptcha2.php:1008
    226234msgid "Protected by "
    227235msgstr ""
    228236
    229 #: gabcaptcha2.php:802
    230 #: gabcaptcha2.php:992
     237#: gabcaptcha2.php:806
     238#: gabcaptcha2.php:1007
    231239#, php-format
    232240msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/"
    233241msgstr ""
    234242
    235 #: gabcaptcha2.php:866
     243#: gabcaptcha2.php:881
    236244msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!"
    237245msgstr "Наша защита против спама требует для работы включенный  JavaScript в вашем браузере!"
  • gab-captcha-2/trunk/readme.txt

    r480841 r483925  
    55Requires at least: 3.0.0
    66Tested up to: 3.3.0
    7 Stable tag: 1.0.18
     7Stable tag: 1.0.19
    88
    99Gab Captcha 2 is a simple captcha plugin for fighting spam in WordPress comments.
     
    118118== Changelog ==
    119119
     120= 1.0.19 =
     121* Added an option for legacy themes compatibility. Legacy themes often do not use the comment_form() function that brings several actions and filters. Check this option if the captcha doesn't appear since update 1.0.15. The only action used will be "comment_form" and JavaScript will be used compulsory.
     122
    120123= 1.0.18 =
    121124* Better handling of captcha insertion, should be compatible with more themes
Note: See TracChangeset for help on using the changeset viewer.