captcha.css 0000644 0000121 0000121 00000001765 12515422574 012415 0 ustar apache apache /*
Place for user defined CSS rules of the Captcha plugin
Note: These rules are for using an image as captcha!
Author: Kai Peter (kp@dyndn.es), ©2014
License: GPLv3
*/
/* General rules to make a nicer look
++ Important:
++ 1. The width of the wrapper have to be greater than the
++ defined width of the image in the admin interface!
++ 2. The definitions do center the wrapper - this looks
++ better if the captcha is used at register page too. */
.dokuwiki #plugin__captcha_wrapper {
display: block;
// float: both;
width: 205px; // Wichtig für Form Registrierung
margin: 4px auto;
text-align: center;
}
/* the input fields to enter the code (and honeypot) */
.dokuwiki #plugin__captcha_wrapper input[type="text"] {
width: 120px;
margin: 2px auto 10px;
text-align: center;
}
/* the image itself */
.dokuwiki #plugin__captcha_wrapper img {
// margin-left: 50px;
}
/* the label for text "enter the code" */
.dokuwiki #plugin__captcha_wrapper label {
color: lightgreen;
}
captcha-patch-20170206 0000644 0001750 0000144 00000022306 13046061517 012737 0 ustar kp users diff -Naur '--exclude=.git' a/conf/default.php b/conf/default.php
--- a/conf/default.php 2017-02-06 09:11:36.894173195 +0100
+++ b/conf/default.php 2017-02-02 08:27:18.236035751 +0100
@@ -13,3 +13,5 @@
$conf['height'] = 22;
$conf['question'] = 'What\'s the answer to life, the universe and everything?';
$conf['answer'] = '42';
+$conf['inputlabel'] = 1;
+$conf['honeypot'] = 0;
diff -Naur '--exclude=.git' a/conf/metadata.php b/conf/metadata.php
--- a/conf/metadata.php 2017-02-06 09:11:36.894173195 +0100
+++ b/conf/metadata.php 2017-02-02 08:27:18.246035664 +0100
@@ -13,3 +13,5 @@
$meta['height'] = array('numeric', '_pattern' => '/[0-9]+/');
$meta['question'] = array('string');
$meta['answer'] = array('string');
+$meta['inputlabel'] = array('onoff');
+$meta['honeypot'] = array('onoff');
diff -Naur '--exclude=.git' a/helper.php b/helper.php
--- a/helper.php 2017-02-06 09:11:36.924172936 +0100
+++ b/helper.php 2017-02-02 08:31:59.823553830 +0100
@@ -58,8 +58,12 @@
$out = '';
$out .= '
';
$out .= '';
- $out .= ' ';
-
+ // show label of input field __before__ the "image" (added config option), by @Kai
+ if(!$this->getConf('inputlabel')) {
+ // this line is duplicated afterwards
+ $out .= ' ';
+ }
+
switch($this->getConf('mode')) {
case 'math':
case 'text':
@@ -92,10 +96,20 @@
}
break;
}
- $out .= ' ';
- // add honeypot field
- $out .= '';
+ // show label of input field __after__ the "image" (config option), by @Kai
+ if($this->getConf('inputlabel')) {
+ $out .= ' ';
+ }
+ // edit: added maxlength value, by @Kai
+ // $out .= ' ';
+ $out .= ' ';
+ // added config option to show 'honeypot' or not, by @Kai
+ if($this->getConf('honeypot')) {
+ $out .= '';
+ }
$out .= '
';
return $out;
}
diff -Naur '--exclude=.git' a/lang/de/lang.php b/lang/de/lang.php
--- a/lang/de/lang.php 2017-02-06 09:11:36.994172332 +0100
+++ b/lang/de/lang.php 2017-02-02 08:27:18.266035487 +0100
@@ -7,6 +7,7 @@
*/
$lang['testfailed'] = 'Das CAPTCHA wurde nicht korrekt beantwortet.';
$lang['fillcaptcha'] = 'Bitte übertragen Sie die Buchstaben in das Eingabefeld.';
+$lang['fillcaptcha'] = 'Bitte Captcha Code eingeben:';
$lang['fillmath'] = 'Bitte lösen Sie folgende Gleichung:';
$lang['soundlink'] = 'Wenn Sie die Buchstaben auf dem Bild nicht lesen können, laden Sie diese .wav Datei herunter, um sie vorgelesen zu bekommen.';
$lang['honeypot'] = 'Dieses Feld bitte leer lassen';
diff -Naur '--exclude=.git' a/lang/de/settings.php b/lang/de/settings.php
--- a/lang/de/settings.php 2017-02-06 09:11:37.004172246 +0100
+++ b/lang/de/settings.php 2017-02-02 08:27:18.286035312 +0100
@@ -22,3 +22,5 @@
$lang['height'] = 'Höhe des CAPTCHA Bildes (pixel)';
$lang['question'] = 'Frage für den "Feste Frage" Modus.';
$lang['answer'] = 'Antwort für den "Feste Frage" Modus.';
+$lang['inputlabel'] = 'Beschriftung für Eingabefeld nach dem Image anzeigen';
+$lang['honeypot'] = 'Honeypot einblenden';
diff -Naur '--exclude=.git' a/lang/de/settings.php.orig b/lang/de/settings.php.orig
--- a/lang/de/settings.php.orig 1970-01-01 01:00:00.000000000 +0100
+++ b/lang/de/settings.php.orig 2017-02-02 08:20:28.149646600 +0100
@@ -0,0 +1,24 @@
+
+ * @author Thomas Templin
+ * @author Leo Rudin
+ */
+$lang['mode'] = 'Welcher CAPTCHA-Typ soll benutzt werden?';
+$lang['mode_o_js'] = 'Text (automatisch ausgefüllt via JavaScript)';
+$lang['mode_o_text'] = 'Text (manuell auszufüllen)';
+$lang['mode_o_math'] = 'Mathe-Aufgabe';
+$lang['mode_o_question'] = 'Feste Frage';
+$lang['mode_o_image'] = 'Bild (nicht barrierefrei)';
+$lang['mode_o_audio'] = 'Bild+Audio (barrierefrei)';
+$lang['mode_o_figlet'] = 'Figlet ASCII-Kunst (nicht barrierefrei)';
+$lang['forusers'] = 'Soll das CAPTCHA auch für eingeloggte Benutzer gebraucht werden?';
+$lang['loginprotect'] = 'Benötigt es ein CAPTCHA um sich einzuloggen?';
+$lang['lettercount'] = 'Anzahl der zu verwendenen Buchstaben (3-16). Wenn Sie die Anzahl erhöhen, denken Sie daran auch die Breite des Bildes im nächsten Feld zu erhöhen.';
+$lang['width'] = 'Weite des CAPTCHA Bildes (pixel)';
+$lang['height'] = 'Höhe des CAPTCHA Bildes (pixel)';
+$lang['question'] = 'Frage für den "Feste Frage" Modus.';
+$lang['answer'] = 'Antwort für den "Feste Frage" Modus.';
diff -Naur '--exclude=.git' a/lang/de-informal/settings.php b/lang/de-informal/settings.php
--- a/lang/de-informal/settings.php 2017-02-06 09:11:36.984172418 +0100
+++ b/lang/de-informal/settings.php 2017-02-02 08:27:18.306035134 +0100
@@ -21,3 +21,5 @@
$lang['height'] = 'Höhe des CAPTCHA Bildes (in Pixel)';
$lang['question'] = 'Frage für den "Feste Frage" Modus.';
$lang['answer'] = 'Antwort für den "Feste Frage" Modus.';
+$lang['inputlabel'] = 'Beschriftung für Eingabefeld nach dem Image anzeigen';
+$lang['honeypot'] = 'Honeypot einblenden';
diff -Naur '--exclude=.git' a/lang/de-informal/settings.php.orig b/lang/de-informal/settings.php.orig
--- a/lang/de-informal/settings.php.orig 1970-01-01 01:00:00.000000000 +0100
+++ b/lang/de-informal/settings.php.orig 2017-02-02 08:20:28.139646687 +0100
@@ -0,0 +1,23 @@
+
+ * @author Dana
+ */
+$lang['mode'] = 'Welcher CAPTCHA-Typ soll benutzt werden?';
+$lang['mode_o_js'] = 'Text (automatisch ausgefüllt via JavaScript)';
+$lang['mode_o_text'] = 'Text (manuell auszufüllen)';
+$lang['mode_o_math'] = 'Mathe-Aufgabe';
+$lang['mode_o_question'] = 'Feste Frage';
+$lang['mode_o_image'] = 'Bild (nicht barrierefrei)';
+$lang['mode_o_audio'] = 'Bild+Audio (barrierefrei)';
+$lang['mode_o_figlet'] = 'Figlet ASCII-Kunst (nicht barrierefrei)';
+$lang['forusers'] = 'CAPTCHA auch für angemeldete Benutzer verwenden?';
+$lang['loginprotect'] = 'Vorraussetzen eines CAPTCHA zum Einloggen?';
+$lang['lettercount'] = 'Anzahl der zu verwendenen Buchstaben (3-16). Wenn Du die Anzahl erhöhst, denke daran auch die Breite des Bildes im nächsten Feld zu erhöhen.';
+$lang['width'] = 'Breite des CAPTCHA Bildes (in Pixel)';
+$lang['height'] = 'Höhe des CAPTCHA Bildes (in Pixel)';
+$lang['question'] = 'Frage für den "Feste Frage" Modus.';
+$lang['answer'] = 'Antwort für den "Feste Frage" Modus.';
diff -Naur '--exclude=.git' a/lang/en/settings.php b/lang/en/settings.php
--- a/lang/en/settings.php 2017-02-06 09:11:37.174170779 +0100
+++ b/lang/en/settings.php 2017-02-02 08:27:18.316035046 +0100
@@ -14,10 +14,12 @@
$lang['mode_o_audio'] = "Image+Audio (better accessibility)";
$lang['mode_o_figlet'] = "Figlet ASCII Art (bad accessibility)";
-$lang['forusers'] = "Use CAPTCHA for logged in users, too?";
+$lang['forusers'] = "Use CAPTCHA for logged in users, too?";
$lang['loginprotect'] = "Require a CAPTCHA to login?";
-$lang['lettercount']= "Number of letters to use (3-16). If you increase the amount, be sure to increase the width of the image below as well.";
-$lang['width'] = "Width of the CAPTCHA image (pixel)";
-$lang['height'] = "Height of the CAPTCHA image (pixel)";
-$lang['question'] = "Question for fixed question mode";
-$lang['answer'] = "Answer for fixed question mode";
+$lang['lettercount'] = "Number of letters to use (3-16). If you increase the amount, be sure to increase the width of the image below as well.";
+$lang['width'] = "Width of the CAPTCHA image (pixel)";
+$lang['height'] = "Height of the CAPTCHA image (pixel)";
+$lang['question'] = "Question for fixed question mode";
+$lang['answer'] = "Answer for fixed question mode";
+$lang['inputlabel'] = 'Show input label after captcha image';
+$lang['honeypot'] = 'Show honeypot';
README 0000644 0000000 0000000 00000003102 12515432254 010433 0 ustar root root Patch for captcha Plugin (dokuwiki)
Version: 2015-04-17 (version of captcha)
Author: Kai Peter (kp@dyndn.es), ©2014
Licence: GPL3
This patch comes WITHOUT ANY WARRANTY! Use it at your own risk!
Changes:
- added config option 'inputlabel' to show the label of the input field after
the captcha itself, changed code in helper.php
- added config option to show the 'honeypot' or not, changed code in helper.php
- added maxlength to input field
- values of width and height changed
- added lang variables of the new options to de, de-informal, en
- included some ccs code to center the captcha and optical improvement
Install (Unix)
====================
Download and extract the patch in your home. Change directory into the folder
'plugins' of your dokuwiki installation. Apply the patch like
$> patch -p0 < ~/captcha.patch
Reload your browser to purge the cache afterwards.
User defined CSS styles
=======================
The file captcha.css includes some css definitions to improve (IMHO) the look.
It was only tested with dokuwiki's default template since "Adora Belle". See
https://www.dokuwiki.org/template:dokuwiki for deatailed instruction of usage.
Usually copy it into your "conf/tpl/" folder and add an entry in the
file style.ini (section [stylesheets]) like:
captcha.css = screen
Limitations: This package was done through my needs. I use an image as captcha
only. I don't use a captcha for users which are logged in already.
---------------------------------------------------------------------------------
Looking for a DynDNS Service? Go to www.dyndn.es.