Changeset 483925
- Timestamp:
- 01/03/2012 03:34:54 PM (14 years ago)
- Location:
- gab-captcha-2
- Files:
-
- 2 added
- 2 deleted
- 7 edited
- 9 copied
-
tags/1.0.19 (copied) (copied from gab-captcha-2/trunk)
-
tags/1.0.19/gabcaptcha2.php (copied) (copied from gab-captcha-2/trunk/gabcaptcha2.php) (4 diffs)
-
tags/1.0.19/gabcaptcha2_admin.php (copied) (copied from gab-captcha-2/trunk/gabcaptcha2_admin.php) (2 diffs)
-
tags/1.0.19/lang/default.po (deleted)
-
tags/1.0.19/lang/default.pot (added)
-
tags/1.0.19/lang/gabcaptcha2-fr_FR.mo (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-fr_FR.mo)
-
tags/1.0.19/lang/gabcaptcha2-fr_FR.po (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-fr_FR.po) (3 diffs)
-
tags/1.0.19/lang/gabcaptcha2-ru_RU.mo (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-ru_RU.mo)
-
tags/1.0.19/lang/gabcaptcha2-ru_RU.po (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-ru_RU.po) (3 diffs)
-
tags/1.0.19/readme.txt (copied) (copied from gab-captcha-2/trunk/readme.txt) (2 diffs)
-
tags/1.0.19/style.css (copied) (copied from gab-captcha-2/trunk/style.css)
-
trunk/gabcaptcha2.php (modified) (4 diffs)
-
trunk/gabcaptcha2_admin.php (modified) (2 diffs)
-
trunk/lang/default.po (deleted)
-
trunk/lang/default.pot (added)
-
trunk/lang/gabcaptcha2-fr_FR.mo (modified) (previous)
-
trunk/lang/gabcaptcha2-fr_FR.po (modified) (3 diffs)
-
trunk/lang/gabcaptcha2-ru_RU.mo (modified) (previous)
-
trunk/lang/gabcaptcha2-ru_RU.po (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gab-captcha-2/tags/1.0.19/gabcaptcha2.php
r480841 r483925 5 5 Description: Simple captcha plugin for Wordpress comments. 6 6 Author: Gabriel Hautclocq 7 Version: 1.0.1 87 Version: 1.0.19 8 8 Author URI: http://www.gabsoftware.com 9 9 Tags: comments, spam, bot, captcha, turing, test, challenge, protection, antispam … … 321 321 $this->gabcaptcha2_set_option( 'use_js', 'on' ); 322 322 } 323 if( $revver < 19 ) 324 { 325 $this->gabcaptcha2_set_option( 'legacy_theme', 'off' ); 326 } 323 327 } 324 328 } … … 857 861 $gc_captcha_length = $this->gabcaptcha2_get_option( 'captcha_length' ); 858 862 $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 863 878 //adds the captcha using Javascript 864 879 ?> … … 1004 1019 captchatarget.appendChild( node ); 1005 1020 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 1006 1055 <?php endif;?> 1007 1056 1008 1057 <?php if( $failedprevious && $failedcommentdata != '' ): ?> 1009 1010 var commentArea = gabcaptcha2_getElementByIdUniversal( 'comment' );1011 if( commentArea == null )1012 {1013 commentArea = document.getElementsByTagName( 'comment' )[0];1014 }1015 1058 1016 1059 window.location.hash = "#<?php echo $_SESSION['gabcaptcha2_id']; ?>"; -
gab-captcha-2/tags/1.0.19/gabcaptcha2_admin.php
r480841 r483925 195 195 ) ); 196 196 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 197 206 198 207 /* Security options … … 324 333 } 325 334 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 326 344 if( isset( $input['output_method'] ) ) 327 345 { -
gab-captcha-2/tags/1.0.19/lang/gabcaptcha2-fr_FR.po
r480841 r483925 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: gabcaptcha2 1.0.1 8\n"3 "Project-Id-Version: gabcaptcha2 1.0.19\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 201 1-12-27 02:58+0800\n"5 "POT-Creation-Date: 2012-01-03 23:27+0800\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n" … … 31 31 32 32 #: gabcaptcha2_admin.php:37 33 #: gabcaptcha2.php: 79834 #: gabcaptcha2.php:80 235 #: gabcaptcha2.php:9 8436 #: gabcaptcha2.php: 99633 #: gabcaptcha2.php:802 34 #: gabcaptcha2.php:806 35 #: gabcaptcha2.php:999 36 #: gabcaptcha2.php:1011 37 37 msgid "Gab Captcha 2" 38 38 msgstr "Gab Captcha 2" … … 130 130 msgstr "Si coché, le captcha sera ajouté dynamiquement à l'aide de Javascript (recommandé)" 131 131 132 #: gabcaptcha2_admin.php:203 132 #: gabcaptcha2_admin.php:199 133 msgid "Legacy themes compatibility" 134 msgstr "Compatibilité avec les anciens thèmes" 135 136 #: gabcaptcha2_admin.php:200 137 msgid "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." 138 msgstr "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 133 141 msgid "Method to output the Captcha:" 134 142 msgstr "Choisissez la méthode de génération du Captcha :" 135 143 136 #: gabcaptcha2_admin.php:2 04144 #: gabcaptcha2_admin.php:213 137 145 msgid "This is a compromise between better compatibility and better security." 138 146 msgstr "C'est un compromis entre une meilleure compatibilité et une meilleure sécurité." 139 147 140 #: gabcaptcha2_admin.php:2 09148 #: gabcaptcha2_admin.php:218 141 149 msgid "Standard: medium security, high compatibility" 142 150 msgstr "Standard : sécurité moyenne, compatibilité élevée" 143 151 144 #: gabcaptcha2_admin.php:21 0152 #: gabcaptcha2_admin.php:219 145 153 msgid "CSS: improved security, compatible with CSS-capable browsers" 146 154 msgstr "CSS : sécurité accrue, compatibilité avec navigateurs gérant le CSS" 147 155 148 #: gabcaptcha2_admin.php:2 11156 #: gabcaptcha2_admin.php:220 149 157 msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers" 150 158 msgstr "CSS 3 : Meilleure sécurité mais restreint la compatibilité aux navigateurs supportant le CSS 3 uniquement" 151 159 152 #: gabcaptcha2_admin.php:2 26160 #: gabcaptcha2_admin.php:235 153 161 msgid "This section concerns the general options of Gab Captcha 2." 154 162 msgstr "Cette section concerne les options générales de Gab Captcha 2." 155 163 156 #: gabcaptcha2_admin.php:2 32164 #: gabcaptcha2_admin.php:241 157 165 msgid "This section proposes settings related to the captcha." 158 166 msgstr "Cette section propose des options relatives au captcha." 159 167 160 #: gabcaptcha2_admin.php:2 38168 #: gabcaptcha2_admin.php:247 161 169 msgid "This section contains security settings." 162 170 msgstr "Cette section contient des paramètres relatifs à la sécurité." 163 171 164 #: gabcaptcha2.php:50 1165 #: gabcaptcha2.php:5 16166 #: gabcaptcha2.php:53 0172 #: gabcaptcha2.php:505 173 #: gabcaptcha2.php:520 174 #: gabcaptcha2.php:534 167 175 #, php-format 168 176 msgid "%s does not exist" 169 177 msgstr "%s n'existe pas" 170 178 171 #: gabcaptcha2.php:6 69179 #: gabcaptcha2.php:673 172 180 msgid "Wrong code typed!" 173 181 msgstr "Code entré invalide !" 174 182 175 #: gabcaptcha2.php:67 0183 #: gabcaptcha2.php:674 176 184 #, php-format 177 185 msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)." 178 186 msgstr "Vous serez redirigé dans 10 secondes vers <a href=\"%1$s\">%1$s</a> (là où vous étiez)." 179 187 180 #: gabcaptcha2.php:67 1188 #: gabcaptcha2.php:675 181 189 msgid "If the redirection does not work, click on the link above." 182 190 msgstr "Si la redirection ne fonctionne pas, cliquez sur le lien ci-dessus." 183 191 184 #: gabcaptcha2.php:67 2192 #: gabcaptcha2.php:676 185 193 msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page." 186 194 msgstr "Si vous êtes humain, ne vous inquiétez pas, votre commantaire n'est pas perdu. Il sera affiché à nouveau sur la page suivante." 187 195 188 #: gabcaptcha2.php:67 3196 #: gabcaptcha2.php:677 189 197 msgid "But double-check your code next time!" 190 198 msgstr "Mais vérifiez bien votre code la prochaine fois !" 191 199 192 #: gabcaptcha2.php:67 4200 #: gabcaptcha2.php:678 193 201 msgid "If you are a spam-bot, too bad for you." 194 202 msgstr "Si vous êtes un robot-spammeur, tant pis pour vous !" 195 203 196 #: gabcaptcha2.php:7 78197 #: gabcaptcha2.php:9 06204 #: gabcaptcha2.php:782 205 #: gabcaptcha2.php:921 198 206 msgid "Anti-spam protection" 199 207 msgstr "Protection anti-spam" 200 208 201 #: gabcaptcha2.php:7 79209 #: gabcaptcha2.php:783 202 210 #, php-format 203 211 msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)" 204 212 msgstr "Test de Turing avec Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)" 205 213 206 #: gabcaptcha2.php:7 88207 #: gabcaptcha2.php:9 62214 #: gabcaptcha2.php:792 215 #: gabcaptcha2.php:977 208 216 msgid "You failed the test. Try again!" 209 217 msgstr "Vous n'avez pas passé le test. Recommencez !" 210 218 211 #: gabcaptcha2.php: 798212 #: gabcaptcha2.php:9 78219 #: gabcaptcha2.php:802 220 #: gabcaptcha2.php:993 213 221 msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 214 222 msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 215 223 216 #: gabcaptcha2.php: 798217 #: gabcaptcha2.php:9 79224 #: gabcaptcha2.php:802 225 #: gabcaptcha2.php:994 218 226 #, php-format 219 227 msgid "Click here for more information about Gab Captcha 2 v%s" 220 228 msgstr "Cliquez ici pour plus d'informations à propos de Gab Captcha 2 v%s" 221 229 222 #: gabcaptcha2.php: 798223 #: gabcaptcha2.php:80 2224 #: gabcaptcha2.php:9 81225 #: gabcaptcha2.php: 993230 #: gabcaptcha2.php:802 231 #: gabcaptcha2.php:806 232 #: gabcaptcha2.php:996 233 #: gabcaptcha2.php:1008 226 234 msgid "Protected by " 227 235 msgstr "Protégé par " 228 236 229 #: gabcaptcha2.php:80 2230 #: gabcaptcha2.php: 992237 #: gabcaptcha2.php:806 238 #: gabcaptcha2.php:1007 231 239 #, php-format 232 240 msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/" 233 241 msgstr "Plus d'informations à propos de Gab Captcha 2 v%s sur http://www.gabsoftware.com/" 234 242 235 #: gabcaptcha2.php:8 66243 #: gabcaptcha2.php:881 236 244 msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!" 237 245 msgstr "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 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: gabcaptcha2 1.0.1 8\n"3 "Project-Id-Version: gabcaptcha2 1.0.19\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 201 1-12-27 03:00+0800\n"5 "POT-Creation-Date: 2012-01-03 23:30+0800\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n" … … 31 31 32 32 #: gabcaptcha2_admin.php:37 33 #: gabcaptcha2.php: 79834 #: gabcaptcha2.php:80 235 #: gabcaptcha2.php:9 8436 #: gabcaptcha2.php: 99633 #: gabcaptcha2.php:802 34 #: gabcaptcha2.php:806 35 #: gabcaptcha2.php:999 36 #: gabcaptcha2.php:1011 37 37 msgid "Gab Captcha 2" 38 38 msgstr "Gab Captcha 2" … … 130 130 msgstr "" 131 131 132 #: gabcaptcha2_admin.php:203 132 #: gabcaptcha2_admin.php:199 133 msgid "Legacy themes compatibility" 134 msgstr "" 135 136 #: gabcaptcha2_admin.php:200 137 msgid "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." 138 msgstr "" 139 140 #: gabcaptcha2_admin.php:212 133 141 msgid "Method to output the Captcha:" 134 142 msgstr "" 135 143 136 #: gabcaptcha2_admin.php:2 04144 #: gabcaptcha2_admin.php:213 137 145 msgid "This is a compromise between better compatibility and better security." 138 146 msgstr "" 139 147 140 #: gabcaptcha2_admin.php:2 09148 #: gabcaptcha2_admin.php:218 141 149 msgid "Standard: medium security, high compatibility" 142 150 msgstr "Стандартный: Средняя защита, но работает везде" 143 151 144 #: gabcaptcha2_admin.php:21 0152 #: gabcaptcha2_admin.php:219 145 153 msgid "CSS: improved security, compatible with CSS-capable browsers" 146 154 msgstr "CSS: улучшеная защита, работает в 99% браузеров" 147 155 148 #: gabcaptcha2_admin.php:2 11156 #: gabcaptcha2_admin.php:220 149 157 msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers" 150 158 msgstr "CSS 3: мощнейшая защита, работает только в современных бораузерах" 151 159 152 #: gabcaptcha2_admin.php:2 26160 #: gabcaptcha2_admin.php:235 153 161 msgid "This section concerns the general options of Gab Captcha 2." 154 162 msgstr "" 155 163 156 #: gabcaptcha2_admin.php:2 32164 #: gabcaptcha2_admin.php:241 157 165 msgid "This section proposes settings related to the captcha." 158 166 msgstr "" 159 167 160 #: gabcaptcha2_admin.php:2 38168 #: gabcaptcha2_admin.php:247 161 169 msgid "This section contains security settings." 162 170 msgstr "" 163 171 164 #: gabcaptcha2.php:50 1165 #: gabcaptcha2.php:5 16166 #: gabcaptcha2.php:53 0172 #: gabcaptcha2.php:505 173 #: gabcaptcha2.php:520 174 #: gabcaptcha2.php:534 167 175 #, php-format 168 176 msgid "%s does not exist" 169 177 msgstr "%s не существует" 170 178 171 #: gabcaptcha2.php:6 69179 #: gabcaptcha2.php:673 172 180 msgid "Wrong code typed!" 173 181 msgstr "" 174 182 175 #: gabcaptcha2.php:67 0183 #: gabcaptcha2.php:674 176 184 #, php-format 177 185 msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)." 178 186 msgstr "" 179 187 180 #: gabcaptcha2.php:67 1188 #: gabcaptcha2.php:675 181 189 msgid "If the redirection does not work, click on the link above." 182 190 msgstr "" 183 191 184 #: gabcaptcha2.php:67 2192 #: gabcaptcha2.php:676 185 193 msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page." 186 194 msgstr "" 187 195 188 #: gabcaptcha2.php:67 3196 #: gabcaptcha2.php:677 189 197 msgid "But double-check your code next time!" 190 198 msgstr "" 191 199 192 #: gabcaptcha2.php:67 4200 #: gabcaptcha2.php:678 193 201 msgid "If you are a spam-bot, too bad for you." 194 202 msgstr "" 195 203 196 #: gabcaptcha2.php:7 78197 #: gabcaptcha2.php:9 06204 #: gabcaptcha2.php:782 205 #: gabcaptcha2.php:921 198 206 msgid "Anti-spam protection" 199 207 msgstr "Анти-спам" 200 208 201 #: gabcaptcha2.php:7 79209 #: gabcaptcha2.php:783 202 210 #, php-format 203 211 msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)" 204 212 msgstr "" 205 213 206 #: gabcaptcha2.php:7 88207 #: gabcaptcha2.php:9 62214 #: gabcaptcha2.php:792 215 #: gabcaptcha2.php:977 208 216 msgid "You failed the test. Try again!" 209 217 msgstr "Вы неправильно ввели красные буквы. Попробуйте снова!" 210 218 211 #: gabcaptcha2.php: 798212 #: gabcaptcha2.php:9 78219 #: gabcaptcha2.php:802 220 #: gabcaptcha2.php:993 213 221 msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 214 222 msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 215 223 216 #: gabcaptcha2.php: 798217 #: gabcaptcha2.php:9 79224 #: gabcaptcha2.php:802 225 #: gabcaptcha2.php:994 218 226 #, php-format 219 227 msgid "Click here for more information about Gab Captcha 2 v%s" 220 228 msgstr "" 221 229 222 #: gabcaptcha2.php: 798223 #: gabcaptcha2.php:80 2224 #: gabcaptcha2.php:9 81225 #: gabcaptcha2.php: 993230 #: gabcaptcha2.php:802 231 #: gabcaptcha2.php:806 232 #: gabcaptcha2.php:996 233 #: gabcaptcha2.php:1008 226 234 msgid "Protected by " 227 235 msgstr "" 228 236 229 #: gabcaptcha2.php:80 2230 #: gabcaptcha2.php: 992237 #: gabcaptcha2.php:806 238 #: gabcaptcha2.php:1007 231 239 #, php-format 232 240 msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/" 233 241 msgstr "" 234 242 235 #: gabcaptcha2.php:8 66243 #: gabcaptcha2.php:881 236 244 msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!" 237 245 msgstr "Наша защита против спама требует для работы включенный JavaScript в вашем браузере!" -
gab-captcha-2/tags/1.0.19/readme.txt
r480841 r483925 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.3.0 7 Stable tag: 1.0.1 87 Stable tag: 1.0.19 8 8 9 9 Gab Captcha 2 is a simple captcha plugin for fighting spam in WordPress comments. … … 118 118 == Changelog == 119 119 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 120 123 = 1.0.18 = 121 124 * Better handling of captcha insertion, should be compatible with more themes -
gab-captcha-2/trunk/gabcaptcha2.php
r480841 r483925 5 5 Description: Simple captcha plugin for Wordpress comments. 6 6 Author: Gabriel Hautclocq 7 Version: 1.0.1 87 Version: 1.0.19 8 8 Author URI: http://www.gabsoftware.com 9 9 Tags: comments, spam, bot, captcha, turing, test, challenge, protection, antispam … … 321 321 $this->gabcaptcha2_set_option( 'use_js', 'on' ); 322 322 } 323 if( $revver < 19 ) 324 { 325 $this->gabcaptcha2_set_option( 'legacy_theme', 'off' ); 326 } 323 327 } 324 328 } … … 857 861 $gc_captcha_length = $this->gabcaptcha2_get_option( 'captcha_length' ); 858 862 $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 863 878 //adds the captcha using Javascript 864 879 ?> … … 1004 1019 captchatarget.appendChild( node ); 1005 1020 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 1006 1055 <?php endif;?> 1007 1056 1008 1057 <?php if( $failedprevious && $failedcommentdata != '' ): ?> 1009 1010 var commentArea = gabcaptcha2_getElementByIdUniversal( 'comment' );1011 if( commentArea == null )1012 {1013 commentArea = document.getElementsByTagName( 'comment' )[0];1014 }1015 1058 1016 1059 window.location.hash = "#<?php echo $_SESSION['gabcaptcha2_id']; ?>"; -
gab-captcha-2/trunk/gabcaptcha2_admin.php
r480841 r483925 195 195 ) ); 196 196 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 197 206 198 207 /* Security options … … 324 333 } 325 334 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 326 344 if( isset( $input['output_method'] ) ) 327 345 { -
gab-captcha-2/trunk/lang/gabcaptcha2-fr_FR.po
r480841 r483925 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: gabcaptcha2 1.0.1 8\n"3 "Project-Id-Version: gabcaptcha2 1.0.19\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 201 1-12-27 02:58+0800\n"5 "POT-Creation-Date: 2012-01-03 23:27+0800\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n" … … 31 31 32 32 #: gabcaptcha2_admin.php:37 33 #: gabcaptcha2.php: 79834 #: gabcaptcha2.php:80 235 #: gabcaptcha2.php:9 8436 #: gabcaptcha2.php: 99633 #: gabcaptcha2.php:802 34 #: gabcaptcha2.php:806 35 #: gabcaptcha2.php:999 36 #: gabcaptcha2.php:1011 37 37 msgid "Gab Captcha 2" 38 38 msgstr "Gab Captcha 2" … … 130 130 msgstr "Si coché, le captcha sera ajouté dynamiquement à l'aide de Javascript (recommandé)" 131 131 132 #: gabcaptcha2_admin.php:203 132 #: gabcaptcha2_admin.php:199 133 msgid "Legacy themes compatibility" 134 msgstr "Compatibilité avec les anciens thèmes" 135 136 #: gabcaptcha2_admin.php:200 137 msgid "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." 138 msgstr "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 133 141 msgid "Method to output the Captcha:" 134 142 msgstr "Choisissez la méthode de génération du Captcha :" 135 143 136 #: gabcaptcha2_admin.php:2 04144 #: gabcaptcha2_admin.php:213 137 145 msgid "This is a compromise between better compatibility and better security." 138 146 msgstr "C'est un compromis entre une meilleure compatibilité et une meilleure sécurité." 139 147 140 #: gabcaptcha2_admin.php:2 09148 #: gabcaptcha2_admin.php:218 141 149 msgid "Standard: medium security, high compatibility" 142 150 msgstr "Standard : sécurité moyenne, compatibilité élevée" 143 151 144 #: gabcaptcha2_admin.php:21 0152 #: gabcaptcha2_admin.php:219 145 153 msgid "CSS: improved security, compatible with CSS-capable browsers" 146 154 msgstr "CSS : sécurité accrue, compatibilité avec navigateurs gérant le CSS" 147 155 148 #: gabcaptcha2_admin.php:2 11156 #: gabcaptcha2_admin.php:220 149 157 msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers" 150 158 msgstr "CSS 3 : Meilleure sécurité mais restreint la compatibilité aux navigateurs supportant le CSS 3 uniquement" 151 159 152 #: gabcaptcha2_admin.php:2 26160 #: gabcaptcha2_admin.php:235 153 161 msgid "This section concerns the general options of Gab Captcha 2." 154 162 msgstr "Cette section concerne les options générales de Gab Captcha 2." 155 163 156 #: gabcaptcha2_admin.php:2 32164 #: gabcaptcha2_admin.php:241 157 165 msgid "This section proposes settings related to the captcha." 158 166 msgstr "Cette section propose des options relatives au captcha." 159 167 160 #: gabcaptcha2_admin.php:2 38168 #: gabcaptcha2_admin.php:247 161 169 msgid "This section contains security settings." 162 170 msgstr "Cette section contient des paramètres relatifs à la sécurité." 163 171 164 #: gabcaptcha2.php:50 1165 #: gabcaptcha2.php:5 16166 #: gabcaptcha2.php:53 0172 #: gabcaptcha2.php:505 173 #: gabcaptcha2.php:520 174 #: gabcaptcha2.php:534 167 175 #, php-format 168 176 msgid "%s does not exist" 169 177 msgstr "%s n'existe pas" 170 178 171 #: gabcaptcha2.php:6 69179 #: gabcaptcha2.php:673 172 180 msgid "Wrong code typed!" 173 181 msgstr "Code entré invalide !" 174 182 175 #: gabcaptcha2.php:67 0183 #: gabcaptcha2.php:674 176 184 #, php-format 177 185 msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)." 178 186 msgstr "Vous serez redirigé dans 10 secondes vers <a href=\"%1$s\">%1$s</a> (là où vous étiez)." 179 187 180 #: gabcaptcha2.php:67 1188 #: gabcaptcha2.php:675 181 189 msgid "If the redirection does not work, click on the link above." 182 190 msgstr "Si la redirection ne fonctionne pas, cliquez sur le lien ci-dessus." 183 191 184 #: gabcaptcha2.php:67 2192 #: gabcaptcha2.php:676 185 193 msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page." 186 194 msgstr "Si vous êtes humain, ne vous inquiétez pas, votre commantaire n'est pas perdu. Il sera affiché à nouveau sur la page suivante." 187 195 188 #: gabcaptcha2.php:67 3196 #: gabcaptcha2.php:677 189 197 msgid "But double-check your code next time!" 190 198 msgstr "Mais vérifiez bien votre code la prochaine fois !" 191 199 192 #: gabcaptcha2.php:67 4200 #: gabcaptcha2.php:678 193 201 msgid "If you are a spam-bot, too bad for you." 194 202 msgstr "Si vous êtes un robot-spammeur, tant pis pour vous !" 195 203 196 #: gabcaptcha2.php:7 78197 #: gabcaptcha2.php:9 06204 #: gabcaptcha2.php:782 205 #: gabcaptcha2.php:921 198 206 msgid "Anti-spam protection" 199 207 msgstr "Protection anti-spam" 200 208 201 #: gabcaptcha2.php:7 79209 #: gabcaptcha2.php:783 202 210 #, php-format 203 211 msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)" 204 212 msgstr "Test de Turing avec Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)" 205 213 206 #: gabcaptcha2.php:7 88207 #: gabcaptcha2.php:9 62214 #: gabcaptcha2.php:792 215 #: gabcaptcha2.php:977 208 216 msgid "You failed the test. Try again!" 209 217 msgstr "Vous n'avez pas passé le test. Recommencez !" 210 218 211 #: gabcaptcha2.php: 798212 #: gabcaptcha2.php:9 78219 #: gabcaptcha2.php:802 220 #: gabcaptcha2.php:993 213 221 msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 214 222 msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 215 223 216 #: gabcaptcha2.php: 798217 #: gabcaptcha2.php:9 79224 #: gabcaptcha2.php:802 225 #: gabcaptcha2.php:994 218 226 #, php-format 219 227 msgid "Click here for more information about Gab Captcha 2 v%s" 220 228 msgstr "Cliquez ici pour plus d'informations à propos de Gab Captcha 2 v%s" 221 229 222 #: gabcaptcha2.php: 798223 #: gabcaptcha2.php:80 2224 #: gabcaptcha2.php:9 81225 #: gabcaptcha2.php: 993230 #: gabcaptcha2.php:802 231 #: gabcaptcha2.php:806 232 #: gabcaptcha2.php:996 233 #: gabcaptcha2.php:1008 226 234 msgid "Protected by " 227 235 msgstr "Protégé par " 228 236 229 #: gabcaptcha2.php:80 2230 #: gabcaptcha2.php: 992237 #: gabcaptcha2.php:806 238 #: gabcaptcha2.php:1007 231 239 #, php-format 232 240 msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/" 233 241 msgstr "Plus d'informations à propos de Gab Captcha 2 v%s sur http://www.gabsoftware.com/" 234 242 235 #: gabcaptcha2.php:8 66243 #: gabcaptcha2.php:881 236 244 msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!" 237 245 msgstr "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 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: gabcaptcha2 1.0.1 8\n"3 "Project-Id-Version: gabcaptcha2 1.0.19\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 201 1-12-27 03:00+0800\n"5 "POT-Creation-Date: 2012-01-03 23:30+0800\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: Gabriel Hautclocq <gabriel@gabsoftware.com>\n" … … 31 31 32 32 #: gabcaptcha2_admin.php:37 33 #: gabcaptcha2.php: 79834 #: gabcaptcha2.php:80 235 #: gabcaptcha2.php:9 8436 #: gabcaptcha2.php: 99633 #: gabcaptcha2.php:802 34 #: gabcaptcha2.php:806 35 #: gabcaptcha2.php:999 36 #: gabcaptcha2.php:1011 37 37 msgid "Gab Captcha 2" 38 38 msgstr "Gab Captcha 2" … … 130 130 msgstr "" 131 131 132 #: gabcaptcha2_admin.php:203 132 #: gabcaptcha2_admin.php:199 133 msgid "Legacy themes compatibility" 134 msgstr "" 135 136 #: gabcaptcha2_admin.php:200 137 msgid "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." 138 msgstr "" 139 140 #: gabcaptcha2_admin.php:212 133 141 msgid "Method to output the Captcha:" 134 142 msgstr "" 135 143 136 #: gabcaptcha2_admin.php:2 04144 #: gabcaptcha2_admin.php:213 137 145 msgid "This is a compromise between better compatibility and better security." 138 146 msgstr "" 139 147 140 #: gabcaptcha2_admin.php:2 09148 #: gabcaptcha2_admin.php:218 141 149 msgid "Standard: medium security, high compatibility" 142 150 msgstr "Стандартный: Средняя защита, но работает везде" 143 151 144 #: gabcaptcha2_admin.php:21 0152 #: gabcaptcha2_admin.php:219 145 153 msgid "CSS: improved security, compatible with CSS-capable browsers" 146 154 msgstr "CSS: улучшеная защита, работает в 99% браузеров" 147 155 148 #: gabcaptcha2_admin.php:2 11156 #: gabcaptcha2_admin.php:220 149 157 msgid "CSS 3: better security, but reduces compatibility to CSS3-compliant browsers" 150 158 msgstr "CSS 3: мощнейшая защита, работает только в современных бораузерах" 151 159 152 #: gabcaptcha2_admin.php:2 26160 #: gabcaptcha2_admin.php:235 153 161 msgid "This section concerns the general options of Gab Captcha 2." 154 162 msgstr "" 155 163 156 #: gabcaptcha2_admin.php:2 32164 #: gabcaptcha2_admin.php:241 157 165 msgid "This section proposes settings related to the captcha." 158 166 msgstr "" 159 167 160 #: gabcaptcha2_admin.php:2 38168 #: gabcaptcha2_admin.php:247 161 169 msgid "This section contains security settings." 162 170 msgstr "" 163 171 164 #: gabcaptcha2.php:50 1165 #: gabcaptcha2.php:5 16166 #: gabcaptcha2.php:53 0172 #: gabcaptcha2.php:505 173 #: gabcaptcha2.php:520 174 #: gabcaptcha2.php:534 167 175 #, php-format 168 176 msgid "%s does not exist" 169 177 msgstr "%s не существует" 170 178 171 #: gabcaptcha2.php:6 69179 #: gabcaptcha2.php:673 172 180 msgid "Wrong code typed!" 173 181 msgstr "" 174 182 175 #: gabcaptcha2.php:67 0183 #: gabcaptcha2.php:674 176 184 #, php-format 177 185 msgid "You will be re-directed in 10 seconds to <a href=\"%1$s\">%1$s</a> (the URL you come from)." 178 186 msgstr "" 179 187 180 #: gabcaptcha2.php:67 1188 #: gabcaptcha2.php:675 181 189 msgid "If the redirection does not work, click on the link above." 182 190 msgstr "" 183 191 184 #: gabcaptcha2.php:67 2192 #: gabcaptcha2.php:676 185 193 msgid "If you are Human, don't worry, your comment is not lost. It will be displayed again on the next page." 186 194 msgstr "" 187 195 188 #: gabcaptcha2.php:67 3196 #: gabcaptcha2.php:677 189 197 msgid "But double-check your code next time!" 190 198 msgstr "" 191 199 192 #: gabcaptcha2.php:67 4200 #: gabcaptcha2.php:678 193 201 msgid "If you are a spam-bot, too bad for you." 194 202 msgstr "" 195 203 196 #: gabcaptcha2.php:7 78197 #: gabcaptcha2.php:9 06204 #: gabcaptcha2.php:782 205 #: gabcaptcha2.php:921 198 206 msgid "Anti-spam protection" 199 207 msgstr "Анти-спам" 200 208 201 #: gabcaptcha2.php:7 79209 #: gabcaptcha2.php:783 202 210 #, php-format 203 211 msgid "Turing test using Gab Captcha 2 v%s (http://www.gabsoftware.com/products/scripts/gabcaptcha2/)" 204 212 msgstr "" 205 213 206 #: gabcaptcha2.php:7 88207 #: gabcaptcha2.php:9 62214 #: gabcaptcha2.php:792 215 #: gabcaptcha2.php:977 208 216 msgid "You failed the test. Try again!" 209 217 msgstr "Вы неправильно ввели красные буквы. Попробуйте снова!" 210 218 211 #: gabcaptcha2.php: 798212 #: gabcaptcha2.php:9 78219 #: gabcaptcha2.php:802 220 #: gabcaptcha2.php:993 213 221 msgid "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 214 222 msgstr "http://www.gabsoftware.com/products/scripts/gabcaptcha2/" 215 223 216 #: gabcaptcha2.php: 798217 #: gabcaptcha2.php:9 79224 #: gabcaptcha2.php:802 225 #: gabcaptcha2.php:994 218 226 #, php-format 219 227 msgid "Click here for more information about Gab Captcha 2 v%s" 220 228 msgstr "" 221 229 222 #: gabcaptcha2.php: 798223 #: gabcaptcha2.php:80 2224 #: gabcaptcha2.php:9 81225 #: gabcaptcha2.php: 993230 #: gabcaptcha2.php:802 231 #: gabcaptcha2.php:806 232 #: gabcaptcha2.php:996 233 #: gabcaptcha2.php:1008 226 234 msgid "Protected by " 227 235 msgstr "" 228 236 229 #: gabcaptcha2.php:80 2230 #: gabcaptcha2.php: 992237 #: gabcaptcha2.php:806 238 #: gabcaptcha2.php:1007 231 239 #, php-format 232 240 msgid "More information about Gab Captcha 2 v%s on http://www.gabsoftware.com/" 233 241 msgstr "" 234 242 235 #: gabcaptcha2.php:8 66243 #: gabcaptcha2.php:881 236 244 msgid "Our anti-spam protection requires that you enable JavaScript in your browser to be able to comment!" 237 245 msgstr "Наша защита против спама требует для работы включенный JavaScript в вашем браузере!" -
gab-captcha-2/trunk/readme.txt
r480841 r483925 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.3.0 7 Stable tag: 1.0.1 87 Stable tag: 1.0.19 8 8 9 9 Gab Captcha 2 is a simple captcha plugin for fighting spam in WordPress comments. … … 118 118 == Changelog == 119 119 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 120 123 = 1.0.18 = 121 124 * Better handling of captcha insertion, should be compatible with more themes
Note: See TracChangeset
for help on using the changeset viewer.