[FEATURE] Set tabindex of honeypot to negative value 41/31741/2
authortritum_rz <ralf.zimmermann@tritum.de>
Wed, 23 Jul 2014 16:22:36 +0000 (18:22 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Wed, 23 Jul 2014 16:30:11 +0000 (18:30 +0200)
Resolves: #59832
Releases: 6.1, 4.7, 4.5
Change-Id: Id2fc96ee296c43a17db6322ee6607f71e3c8f2ac
Reviewed-on: https://review.typo3.org/31741
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
ChangeLog
Classes/Methodes/class.tx_wtspamshield_method_honeypot.php
Configuration/TypoScript/constants.txt
Configuration/TypoScript/setup.txt

index 54fb0c1..a6b2eca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * FIX #32079: message definition on wrong template position
        * FIX #7005: superfluous tt_news piVars appended when redirected to "spam recognized page"
 
-For older releases / changes see doc/manual.sxw
\ No newline at end of file
+For older releases / changes see doc/manual.sxw
index 5920d1b..d2ca916 100644 (file)
@@ -59,12 +59,25 @@ class tx_wtspamshield_method_honeypot extends tx_wtspamshield_method_abstract {
                $cObjvalues['value'] = $this->getL10n($lll);
                $code = $this->cObj->cObjGetSingle($cObjType, $cObjvalues);
 
-               $code .= '<input type="text" autocomplete="off" name="';
+               $doctypePart = substr($GLOBALS['TSFE']->config['config']['doctype'], 0, 5);
+
+               $code .= '<input type="text" name="';
                $code .= $this->additionalValues['prefixInputName'] . '[' . $this->additionalValues['honeypotInputName'] . ']"';
                $code .= ' ' . $tsConf['honeypot.']['css.']['inputStyle'];
-               $code .= ' value=""';
                $code .= ' ' . $tsConf['honeypot.']['css.']['inputClass'];
-               $code .= ' />';
+               $code .= ' ' . $tsConf['honeypot.']['additionalParams.']['standard'];
+
+               if ($doctypePart == 'html5') {
+                       $code .= ' ' . $tsConf['honeypot.']['additionalParams.']['html5'];
+               }
+
+               $code .= ' value=""';
+
+               if ($doctypePart == 'xhtml') {
+                       $code .= ' />';
+               } else {
+                       $code .= ' >';
+               }
 
                return $code;
        }
index 60fc6a4..d2857c4 100644 (file)
@@ -123,24 +123,30 @@ plugin.wt_spamshield {
   # cat=wt_spamshield main//0400; type=text; label= CSS class honeypot: CSS class for honeypot input field
   honeypot.css.inputClass = class="wt_spamshield_field wt_spamshield_honey"
 
-  # cat=wt_spamshield main//0410; type=text; label= Honeyput input name for comments
+  # cat=wt_spamshield main//0410; type=text; label= additional tags params for honeypot: additional tag params for honeypot
+  honeypot.additionalParams.standard = autocomplete="off"
+
+  # cat=wt_spamshield main//0420; type=text; label= additional html5 tags params for honeypot: additional html5 tags params for honeypot
+  honeypot.additionalParams.html5 = tabindex="-1"
+
+  # cat=wt_spamshield main//0430; type=text; label= Honeyput input name for comments
   honeypot.inputname.comments = uid987651
 
-  # cat=wt_spamshield main//0420; type=text; label= Honeyput input name for direct_mail_subscription
+  # cat=wt_spamshield main//0440; type=text; label= Honeyput input name for direct_mail_subscription
   honeypot.inputname.direct_mail_subscription = uid987651
 
-  # cat=wt_spamshield main//0430; type=text; label= Honeyput input name for standardMailform
+  # cat=wt_spamshield main//0450; type=text; label= Honeyput input name for standardMailform
   honeypot.inputname.standardMailform = uid987651
 
-  # cat=wt_spamshield main//0440; type=text; label= Honeyput input name for powermail
+  # cat=wt_spamshield main//0460; type=text; label= Honeyput input name for powermail
   honeypot.inputname.powermail = uid987651
 
-  # cat=wt_spamshield main//0450; type=text; label= Honeyput input name for ve_guestbook
+  # cat=wt_spamshield main//0470; type=text; label= Honeyput input name for ve_guestbook
   honeypot.inputname.ve_guestbook = uid987651
 
-  # cat=wt_spamshield main//0460; type=text; label= Honeyput input name for ke_userregister
+  # cat=wt_spamshield main//0480; type=text; label= Honeyput input name for ke_userregister
   honeypot.inputname.ke_userregister = uid987651
 
-  # cat=wt_spamshield main//0470; type=text; label= Honeyput input name for pbsurvey
+  # cat=wt_spamshield main//0490; type=text; label= Honeyput input name for pbsurvey
   honeypot.inputname.pbsurvey = uid987651
 }
index d500958..bbf4071 100644 (file)
@@ -87,6 +87,11 @@ plugin.wt_spamshield {
       inputStyle = {$plugin.wt_spamshield.honeypot.css.inputStyle}
       inputClass = {$plugin.wt_spamshield.honeypot.css.inputClass}
     }
+    
+    additionalParams {
+      standard = {$plugin.wt_spamshield.honeypot.additionalParams.standard}
+      html5 = {$plugin.wt_spamshield.honeypot.additionalParams.html5}
+    }
 
     explanation = TEXT
     explanation {