diff --git a/sources/lib/plugins/captcha/README b/sources/lib/plugins/captcha/README new file mode 100644 index 0000000..237f135 --- /dev/null +++ b/sources/lib/plugins/captcha/README @@ -0,0 +1,25 @@ +captcha Plugin for DokuWiki + +All documentation for this plugin can be found at +http://www.dokuwiki.org/plugin:captcha + +If you install this plugin manually, make sure it is installed in +lib/plugins/captcha/ - if the folder is called different it +will not work! + +Please refer to http://www.dokuwiki.org/plugins for additional info +on how to install plugins in DokuWiki. + +---- +Copyright (C) Andreas Gohr + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +See the COPYING file in your DokuWiki folder for details diff --git a/sources/lib/plugins/captcha/action.php b/sources/lib/plugins/captcha/action.php new file mode 100644 index 0000000..92aab02 --- /dev/null +++ b/sources/lib/plugins/captcha/action.php @@ -0,0 +1,149 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'action.php'); + +class action_plugin_captcha extends DokuWiki_Action_Plugin { + + /** + * register the eventhandlers + */ + function register(&$controller) { + $controller->register_hook( + 'ACTION_ACT_PREPROCESS', + 'BEFORE', + $this, + 'handle_act_preprocess', + array() + ); + + // old hook + $controller->register_hook( + 'HTML_EDITFORM_INJECTION', + 'BEFORE', + $this, + 'handle_editform_output', + array('editform' => true, 'oldhook' => true) + ); + + // new hook + $controller->register_hook( + 'HTML_EDITFORM_OUTPUT', + 'BEFORE', + $this, + 'handle_editform_output', + array('editform' => true, 'oldhook' => false) + ); + + if($this->getConf('regprotect')) { + // old hook + $controller->register_hook( + 'HTML_REGISTERFORM_INJECTION', + 'BEFORE', + $this, + 'handle_editform_output', + array('editform' => false, 'oldhook' => true) + ); + + // new hook + $controller->register_hook( + 'HTML_REGISTERFORM_OUTPUT', + 'BEFORE', + $this, + 'handle_editform_output', + array('editform' => false, 'oldhook' => false) + ); + } + } + + /** + * Will intercept the 'save' action and check for CAPTCHA first. + */ + function handle_act_preprocess(&$event, $param) { + $act = $this->_act_clean($event->data); + if(!('save' == $act || ($this->getConf('regprotect') && + 'register' == $act && + $_POST['save'])) + ) { + return; // nothing to do for us + } + + // do nothing if logged in user and no CAPTCHA required + if(!$this->getConf('forusers') && $_SERVER['REMOTE_USER']) { + return; + } + + // check captcha + $helper = plugin_load('helper', 'captcha'); + if(!$helper->check()) { + if($act == 'save') { + // stay in preview mode + $event->data = 'preview'; + } else { + // stay in register mode, but disable the save parameter + $_POST['save'] = false; + } + } + } + + /** + * Create the additional fields for the edit form + */ + function handle_editform_output(&$event, $param) { + // check if source view -> no captcha needed + if(!$param['oldhook']) { + // get position of submit button + $pos = $event->data->findElementByAttribute('type', 'submit'); + if(!$pos) return; // no button -> source view mode + } elseif($param['editform'] && !$event->data['writable']) { + if($param['editform'] && !$event->data['writable']) return; + } + + // do nothing if logged in user and no CAPTCHA required + if(!$this->getConf('forusers') && $_SERVER['REMOTE_USER']) { + return; + } + + // get the CAPTCHA + $helper = plugin_load('helper', 'captcha'); + $out = $helper->getHTML(); + + if($param['oldhook']) { + // old wiki - just print + echo $out; + } else { + // new wiki - insert at correct position + $event->data->insertElement($pos++, $out); + } + } + + /** + * Pre-Sanitize the action command + * + * Similar to act_clean in action.php but simplified and without + * error messages + */ + function _act_clean($act) { + // check if the action was given as array key + if(is_array($act)) { + list($act) = array_keys($act); + } + + //remove all bad chars + $act = strtolower($act); + $act = preg_replace('/[^a-z_]+/', '', $act); + + return $act; + } + +} + diff --git a/sources/lib/plugins/captcha/conf/default.php b/sources/lib/plugins/captcha/conf/default.php new file mode 100644 index 0000000..7861b94 --- /dev/null +++ b/sources/lib/plugins/captcha/conf/default.php @@ -0,0 +1,15 @@ + + */ + +$conf['mode'] = 'js'; +$conf['forusers'] = 0; +$conf['regprotect'] = 1; +$conf['lettercount'] = 5; +$conf['width'] = 115; +$conf['height'] = 22; +$conf['question'] = 'What\'s the answer to life, the universe and everything?'; +$conf['answer'] = '42'; diff --git a/sources/lib/plugins/captcha/conf/metadata.php b/sources/lib/plugins/captcha/conf/metadata.php new file mode 100644 index 0000000..c0c66d4 --- /dev/null +++ b/sources/lib/plugins/captcha/conf/metadata.php @@ -0,0 +1,15 @@ + + */ + +$meta['mode'] = array('multichoice', '_choices' => array('js', 'text', 'math', 'question', 'image', 'audio', 'figlet')); +$meta['regprotect'] = array('onoff'); +$meta['forusers'] = array('onoff'); +$meta['lettercount'] = array('numeric', '_min' => 3, '_max' => 16); +$meta['width'] = array('numeric', '_pattern' => '/[0-9]+/'); +$meta['height'] = array('numeric', '_pattern' => '/[0-9]+/'); +$meta['question'] = array('string'); +$meta['answer'] = array('string'); diff --git a/sources/lib/plugins/captcha/figlet.flf b/sources/lib/plugins/captcha/figlet.flf new file mode 100644 index 0000000..24284b8 --- /dev/null +++ b/sources/lib/plugins/captcha/figlet.flf @@ -0,0 +1,1097 @@ +flf2a$ 5 4 14 15 10 0 22415 96 +SmSlant by Glenn Chappell 6/93 - based on Small & Slant +Includes ISO Latin-1 +figlet release 2.1 -- 12 Aug 1994 +Permission is hereby given to modify this font, as long as the +modifier's name is placed on a comment line. + +Modified by Paul Burton 12/96 to include new parameter +supported by FIGlet and FIGWin. May also be slightly modified for better use +of new full-width/kern/smush alternatives, but default output is NOT changed. + + $@ + $ @ + $ @ + $ @ +$ @@ + __@ + / /@ + /_/ @ +(_) @ + @@ + _ _ @ +( | )@ +|/|/ @ +$ @ + @@ + ____ @ + __/ / /_@ + /_ . __/@ +/_ __/ @ + /_/_/ @@ + @ + _//@ + (_-<@ +/ __/@ +// @@ + _ __@ +(_)_/_/@ + _/_/_ @ +/_/ (_)@ + @@ + ____ @ + / __/___@ + > _/_ _/@ +|_____/ @ + @@ + _ @ +( )@ +|/ @ +$ @ + @@ + __@ + _/_/@ + / / @ +/ / @ +|_| @@ + _ @ + | |@ + / /@ + _/_/ @ +/_/ @@ + @ + _/|@ +> _<@ +|/ @ + @@ + __ @ + __/ /_@ +/_ __/@ + /_/ @ + @@ + @ + @ + _ @ +( )@ +|/ @@ + @ + ____@ +/___/@ + $ @ + @@ + @ + @ + _ @ +(_)@ + @@ + __@ + _/_/@ + _/_/ @ +/_/ @ + @@ + ___ @ + / _ \@ +/ // /@ +\___/ @ + @@ + ___@ + < /@ + / / @ +/_/ @ + @@ + ___ @ + |_ |@ + / __/ @ +/____/ @ + @@ + ____@ + |_ /@ + _/_ < @ +/____/ @ + @@ + ____@ + / / /@ +/_ _/@ + /_/ @ + @@ + ____@ + / __/@ + /__ \ @ +/____/ @ + @@ + ____@ + / __/@ +/ _ \ @ +\___/ @ + @@ + ____@ +/_ /@ + / / @ +/_/ @ + @@ + ___ @ + ( _ )@ +/ _ |@ +\___/ @ + @@ + ___ @ + / _ \@ + \_, /@ +/___/ @ + @@ + _ @ + (_)@ + _ @ +(_) @ + @@ + _ @ + (_)@ + _ @ +( ) @ +|/ @@ + __@ + / /@ +< < @ + \_\@ + @@ + @ + ____@ + /___/@ +/___/ @ + @@ +__ @ +\ \ @ + > >@ +/_/ @ + @@ + ___ @ +/__ \@ + /__/@ +(_) @ + @@ + _____ @ + / ___ \@ +/ / _ `/@ +\ \_,_/ @ + \___/ @@ + ___ @ + / _ |@ + / __ |@ +/_/ |_|@ + @@ + ___ @ + / _ )@ + / _ |@ +/____/ @ + @@ + _____@ + / ___/@ +/ /__ @ +\___/ @ + @@ + ___ @ + / _ \@ + / // /@ +/____/ @ + @@ + ____@ + / __/@ + / _/ @ +/___/ @ + @@ + ____@ + / __/@ + / _/ @ +/_/ @ + @@ + _____@ + / ___/@ +/ (_ / @ +\___/ @ + @@ + __ __@ + / // /@ + / _ / @ +/_//_/ @ + @@ + ____@ + / _/@ + _/ / @ +/___/ @ + @@ + __@ + __ / /@ +/ // / @ +\___/ @ + @@ + __ __@ + / //_/@ + / ,< @ +/_/|_| @ + @@ + __ @ + / / @ + / /__@ +/____/@ + @@ + __ ___@ + / |/ /@ + / /|_/ / @ +/_/ /_/ @ + @@ + _ __@ + / |/ /@ + / / @ +/_/|_/ @ + @@ + ____ @ + / __ \@ +/ /_/ /@ +\____/ @ + @@ + ___ @ + / _ \@ + / ___/@ +/_/ @ + @@ + ____ @ + / __ \@ +/ /_/ /@ +\___\_\@ + @@ + ___ @ + / _ \@ + / , _/@ +/_/|_| @ + @@ + ____@ + / __/@ + _\ \ @ +/___/ @ + @@ + ______@ +/_ __/@ + / / @ +/_/ @ + @@ + __ __@ + / / / /@ +/ /_/ / @ +\____/ @ + @@ + _ __@ + | | / /@ + | |/ / @ + |___/ @ + @@ + _ __@ + | | /| / /@ + | |/ |/ / @ + |__/|__/ @ + @@ + _ __@ + | |/_/@ + _> < @ +/_/|_| @ + @@ + __ __@ + \ \/ /@ + \ / @ + /_/ @ + @@ + ____@ + /_ /@ + / /_@ + /___/@ + @@ + ___@ + / _/@ + / / @ + / / @ +/__/ @@ +__ @ +\ \ @ + \ \ @ + \_\@ + @@ + ___@ + / /@ + / / @ + _/ / @ +/__/ @@ + //|@ +|/||@ + $ @ +$ @ + @@ + @ + @ + @ + ____@ +/___/@@ + _ @ +( )@ + V @ +$ @ + @@ + @ + ___ _@ +/ _ `/@ +\_,_/ @ + @@ + __ @ + / / @ + / _ \@ +/_.__/@ + @@ + @ + ____@ +/ __/@ +\__/ @ + @@ + __@ + ___/ /@ +/ _ / @ +\_,_/ @ + @@ + @ + ___ @ +/ -_)@ +\__/ @ + @@ + ___@ + / _/@ + / _/ @ +/_/ @ + @@ + @ + ___ _@ + / _ `/@ + \_, / @ +/___/ @@ + __ @ + / / @ + / _ \@ +/_//_/@ + @@ + _ @ + (_)@ + / / @ +/_/ @ + @@ + _ @ + (_)@ + / / @ + __/ / @ +|___/ @@ + __ @ + / /__@ + / '_/@ +/_/\_\ @ + @@ + __@ + / /@ + / / @ +/_/ @ + @@ + @ + __ _ @ + / ' \@ +/_/_/_/@ + @@ + @ + ___ @ + / _ \@ +/_//_/@ + @@ + @ + ___ @ +/ _ \@ +\___/@ + @@ + @ + ___ @ + / _ \@ + / .__/@ +/_/ @@ + @ + ___ _@ +/ _ `/@ +\_, / @ + /_/ @@ + @ + ____@ + / __/@ +/_/ @ + @@ + @ + ___@ + (_-<@ +/___/@ + @@ + __ @ + / /_@ +/ __/@ +\__/ @ + @@ + @ + __ __@ +/ // /@ +\_,_/ @ + @@ + @ + _ __@ +| |/ /@ +|___/ @ + @@ + @ + _ __@ +| |/|/ /@ +|__,__/ @ + @@ + @ + __ __@ + \ \ /@ +/_\_\ @ + @@ + @ + __ __@ + / // /@ + \_, / @ +/___/ @@ + @ + ___@ +/_ /@ +/__/@ + @@ + __@ + _/_/@ +_/ / @ +/ / @ +\_\ @@ + __@ + / /@ + / / @ + / / @ +/_/ @@ + __ @ + \ \ @ + / /_@ + _/_/ @ +/_/ @@ + /\//@ +//\/ @ + $ @ +$ @ + @@ + _ _ @ + (_)(_)@ + / - | @ +/_/|_| @ + @@ + _ _ @ + (_)_(_)@ +/ __ \ @ +\____/ @ + @@ + _ _ @ + (_) (_)@ +/ /_/ / @ +\____/ @ + @@ + _ _ @ + (_)(_)@ +/ _ `/ @ +\_,_/ @ + @@ + _ _ @ + (_)(_)@ +/ _ \ @ +\___/ @ + @@ + _ _ @ + (_)(_)@ +/ // / @ +\_,_/ @ + @@ + ____ @ + / _ )@ + / /< < @ + / //__/ @ +/_/ @@ +160 NO-BREAK SPACE + $@ + $ @ + $ @ + $ @ +$ @@ +161 INVERTED EXCLAMATION MARK + _ @ + (_)@ + / / @ +/_/ @ + @@ +162 CENT SIGN + @ + __//@ +/ __/@ +\ _/ @ +// @@ +163 POUND SIGN + __ @ + __/__|@ + /_ _/_ @ +(_,___/ @ + @@ +164 CURRENCY SIGN + /|_/|@ + | . / @ + /_ | @ +|/ |/ @ + @@ +165 YEN SIGN + ____@ + _| / /@ + /_ __/@ +/_ __/ @ + /_/ @@ +166 BROKEN BAR + __@ + / /@ + /_/ @ + / / @ +/_/ @@ +167 SECTION SIGN + __ @ + _/ _)@ + / | | @ + | |_/ @ +(__/ @@ +168 DIAERESIS + _ _ @ +(_) (_)@ + $ $ @ +$ $ @ + @@ +169 COPYRIGHT SIGN + ____ @ + / ___\ @ + / / _/ |@ +| |__/ / @ + \____/ @@ +170 FEMININE ORDINAL INDICATOR + ___ _@ + / _ `/@ + _\_,_/ @ +/____/ @ + @@ +171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + ____@ + / / /@ +< < < @ + \_\_\@ + @@ +172 NOT SIGN + @ + ____@ +/_ /@ + /_/ @ + @@ +173 SOFT HYPHEN + @ + ___@ +/__/@ + $ @ + @@ +174 REGISTERED SIGN + ____ @ + / __ \ @ + / / -) |@ +| //\\ / @ + \____/ @@ +175 MACRON + ____@ +/___/@ + $ @ +$ @ + @@ +176 DEGREE SIGN + __ @ + /. |@ +|__/ @ + $ @ + @@ +177 PLUS-MINUS SIGN + __ @ + __/ /_@ + /_ __/@ + __/_/_ @ +/_____/ @@ +178 SUPERSCRIPT TWO + __ @ + |_ )@ +/__| @ + $ @ + @@ +179 SUPERSCRIPT THREE + ___@ + |_ /@ +/__) @ + $ @ + @@ +180 ACUTE ACCENT + __@ +/_/@ + $ @ +$ @ + @@ +181 MICRO SIGN + @ + __ __@ + / // /@ + / .,_/ @ +/_/ @@ +182 PILCROW SIGN + _____@ + / /@ +|_ / / @ +/_/_/ @ + @@ +183 MIDDLE DOT + @ + _ @ +(_)@ +$ @ + @@ +184 CEDILLA + @ + @ + @ + _ @ +/_)@@ +185 SUPERSCRIPT ONE + __@ + < /@ +/_/ @ +$ @ + @@ +186 MASCULINE ORDINAL INDICATOR + ___ @ + / _ \@ + _\___/@ +/____/ @ + @@ +187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +____ @ +\ \ \ @ + > > >@ +/_/_/ @ + @@ +188 VULGAR FRACTION ONE QUARTER + __ __ @ + < /_/_/___@ +/_//_//_' /@ + /_/ /_/ @ + @@ +189 VULGAR FRACTION ONE HALF + __ __ @ + < /_/_/_ @ +/_//_/|_ )@ + /_/ /__| @ + @@ +190 VULGAR FRACTION THREE QUARTERS + ___ __ @ + |_ /_/_/___@ +/__)/_//_' /@ + /_/ /_/ @ + @@ +191 INVERTED QUESTION MARK + _ @ + _(_)@ +/ _/_@ +\___/@ + @@ +192 LATIN CAPITAL LETTER A WITH GRAVE + __ @ + _\_\@ + / - |@ +/_/|_|@ + @@ +193 LATIN CAPITAL LETTER A WITH ACUTE + __@ + _/_/@ + / - |@ +/_/|_|@ + @@ +194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX + //|@ + _|/||@ + / - | @ +/_/|_| @ + @@ +195 LATIN CAPITAL LETTER A WITH TILDE + /\//@ + _//\/ @ + / - | @ +/_/|_| @ + @@ +196 LATIN CAPITAL LETTER A WITH DIAERESIS + _ _ @ + (_)(_)@ + / - | @ +/_/|_| @ + @@ +197 LATIN CAPITAL LETTER A WITH RING ABOVE + (())@ + / _ |@ + / __ |@ +/_/ |_|@ + @@ +198 LATIN CAPITAL LETTER AE + _______@ + / _ __/@ + / _ _/ @ +/_//___/ @ + @@ +199 LATIN CAPITAL LETTER C WITH CEDILLA + _____@ + / ___/@ +/ /__ @ +\___/ @ +/_) @@ +200 LATIN CAPITAL LETTER E WITH GRAVE + __ @ + \_\@ + / -<@ +/__< @ + @@ +201 LATIN CAPITAL LETTER E WITH ACUTE + __@ + _/_/@ + / -< @ +/__< @ + @@ +202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX + //|@ + |/||@ + / -< @ +/__< @ + @@ +203 LATIN CAPITAL LETTER E WITH DIAERESIS + _ _ @ + (_)(_)@ + / -< @ +/__< @ + @@ +204 LATIN CAPITAL LETTER I WITH GRAVE + __ @ + _\_\ @ + /_ __/@ +/____/ @ + @@ +205 LATIN CAPITAL LETTER I WITH ACUTE + __@ + __/_/@ + /_ __/@ +/____/ @ + @@ +206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX + //|@ + _|/||@ + /_ __/@ +/____/ @ + @@ +207 LATIN CAPITAL LETTER I WITH DIAERESIS + _ _ @ + (_)(_)@ + /_ __/ @ +/____/ @ + @@ +208 LATIN CAPITAL LETTER ETH + ____ @ + _/ __ \@ +/_ _// /@ +/_____/ @ + @@ +209 LATIN CAPITAL LETTER N WITH TILDE + /\//@ + __//\/ @ + / |/ / @ +/_/|__/ @ + @@ +210 LATIN CAPITAL LETTER O WITH GRAVE + __ @ + _\_\ @ +/ __ \@ +\____/@ + @@ +211 LATIN CAPITAL LETTER O WITH ACUTE + __@ + __/_/@ +/ __ \@ +\____/@ + @@ +212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX + //|@ + _|/||@ +/ __ \@ +\____/@ + @@ +213 LATIN CAPITAL LETTER O WITH TILDE + /\//@ + _//\/ @ +/ __ \ @ +\____/ @ + @@ +214 LATIN CAPITAL LETTER O WITH DIAERESIS + _ _ @ + (_)_(_)@ +/ __ \ @ +\____/ @ + @@ +215 MULTIPLICATION SIGN + @ + /|/|@ + > < @ +|/|/ @ + @@ +216 LATIN CAPITAL LETTER O WITH STROKE + _____ @ + / _// \@ +/ //// /@ +\_//__/ @ + @@ +217 LATIN CAPITAL LETTER U WITH GRAVE + __ @ + __\_\ @ +/ /_/ /@ +\____/ @ + @@ +218 LATIN CAPITAL LETTER U WITH ACUTE + __@ + __ /_/@ +/ /_/ /@ +\____/ @ + @@ +219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX + //|@ + __|/||@ +/ /_/ /@ +\____/ @ + @@ +220 LATIN CAPITAL LETTER U WITH DIAERESIS + _ _ @ + (_) (_)@ +/ /_/ / @ +\____/ @ + @@ +221 LATIN CAPITAL LETTER Y WITH ACUTE + __@ +__/_/@ +\ V /@ + /_/ @ + @@ +222 LATIN CAPITAL LETTER THORN + __ @ + / / @ + / -_)@ +/_/ @ + @@ +223 LATIN SMALL LETTER SHARP S + ____ @ + / _ )@ + / /< < @ + / //__/ @ +/_/ @@ +224 LATIN SMALL LETTER A WITH GRAVE + __ @ + _\_\_@ +/ _ `/@ +\_,_/ @ + @@ +225 LATIN SMALL LETTER A WITH ACUTE + __@ + __/_/@ +/ _ `/@ +\_,_/ @ + @@ +226 LATIN SMALL LETTER A WITH CIRCUMFLEX + //|@ + _|/||@ +/ _ `/@ +\_,_/ @ + @@ +227 LATIN SMALL LETTER A WITH TILDE + /\//@ + _//\/ @ +/ _ `/ @ +\_,_/ @ + @@ +228 LATIN SMALL LETTER A WITH DIAERESIS + _ _ @ + (_)(_)@ +/ _ `/ @ +\_,_/ @ + @@ +229 LATIN SMALL LETTER A WITH RING ABOVE + __ @ + _(())@ +/ _ `/@ +\_,_/ @ + @@ +230 LATIN SMALL LETTER AE + @ + ___ ___ @ +/ _ ` -_)@ +\_,____/ @ + @@ +231 LATIN SMALL LETTER C WITH CEDILLA + @ + ____@ +/ __/@ +\__/ @ +/_) @@ +232 LATIN SMALL LETTER E WITH GRAVE + __ @ + _\_\@ +/ -_)@ +\__/ @ + @@ +233 LATIN SMALL LETTER E WITH ACUTE + __@ + _/_/@ +/ -_)@ +\__/ @ + @@ +234 LATIN SMALL LETTER E WITH CIRCUMFLEX + //|@ + |/||@ +/ -_)@ +\__/ @ + @@ +235 LATIN SMALL LETTER E WITH DIAERESIS + _ _ @ +(_)(_)@ +/ -_) @ +\__/ @ + @@ +236 LATIN SMALL LETTER I WITH GRAVE + __ @ + \_\@ + / / @ +/_/ @ + @@ +237 LATIN SMALL LETTER I WITH ACUTE + __@ + /_/@ + / / @ +/_/ @ + @@ +238 LATIN SMALL LETTER I WITH CIRCUMFLEX + //|@ + |/||@ + / / @ +/_/ @ + @@ +239 LATIN SMALL LETTER I WITH DIAERESIS + _ _ @ +(_)_(_)@ + / / @ +/_/ @ + @@ +240 LATIN SMALL LETTER ETH + _||_@ + __ || @ +/ _` | @ +\___/ @ + @@ +241 LATIN SMALL LETTER N WITH TILDE + /\//@ + _//\/ @ + / _ \ @ +/_//_/ @ + @@ +242 LATIN SMALL LETTER O WITH GRAVE + __ @ + _\_\@ +/ _ \@ +\___/@ + @@ +243 LATIN SMALL LETTER O WITH ACUTE + __@ + _/_/@ +/ _ \@ +\___/@ + @@ +244 LATIN SMALL LETTER O WITH CIRCUMFLEX + //|@ + _|/||@ +/ _ \ @ +\___/ @ + @@ +245 LATIN SMALL LETTER O WITH TILDE + /\//@ + _//\/ @ +/ _ \ @ +\___/ @ + @@ +246 LATIN SMALL LETTER O WITH DIAERESIS + _ _ @ + (_)(_)@ +/ _ \ @ +\___/ @ + @@ +247 DIVISION SIGN + _ @ + _(_)@ +/___/@ +(_) @ + @@ +248 LATIN SMALL LETTER O WITH STROKE + @ + ___ @ +/ //\@ +\//_/@ + @@ +249 LATIN SMALL LETTER U WITH GRAVE + __ @ + __\_\@ +/ // /@ +\_,_/ @ + @@ +250 LATIN SMALL LETTER U WITH ACUTE + __@ + __/_/@ +/ // /@ +\_,_/ @ + @@ +251 LATIN SMALL LETTER U WITH CIRCUMFLEX + //|@ + _|/||@ +/ // /@ +\_,_/ @ + @@ +252 LATIN SMALL LETTER U WITH DIAERESIS + _ _ @ + (_)(_)@ +/ // / @ +\_,_/ @ + @@ +253 LATIN SMALL LETTER Y WITH ACUTE + __@ + __/_/@ + / // /@ + \_, / @ +/___/ @@ +254 LATIN SMALL LETTER THORN + __ @ + / / @ + / _ \@ + / .__/@ +/_/ @@ +255 LATIN SMALL LETTER Y WITH DIAERESIS + _ _ @ + (_)(_)@ + / // / @ + \_, / @ +/___/ @@ diff --git a/sources/lib/plugins/captcha/figlet.php b/sources/lib/plugins/captcha/figlet.php new file mode 100644 index 0000000..bd7692b --- /dev/null +++ b/sources/lib/plugins/captcha/figlet.php @@ -0,0 +1,169 @@ +loadFont("fonts/standard.flf")) { + * $phpFiglet->display("Hello World"); + * } else { + * trigger_error("Could not load font file"); + * } + * + */ + + +class phpFiglet +{ + + /* + * Internal variables + */ + + var $signature; + var $hardblank; + var $height; + var $baseline; + var $maxLenght; + var $oldLayout; + var $commentLines; + var $printDirection; + var $fullLayout; + var $codeTagCount; + var $fontFile; + + + /* + * Contructor + */ + + function phpFiglet() + { + + } + + + /* + * Load an flf font file. Return true on success, false on error. + */ + + function loadfont($fontfile) + { + $this->fontFile = @file($fontfile); + if (!$this->fontFile) return false; + + $hp = explode(" ", $this->fontFile[0]); // get header + + $this->signature = substr($hp[0], 0, strlen($hp[0]) -1); + $this->hardblank = substr($hp[0], strlen($hp[0]) -1, 1); + $this->height = $hp[1]; + $this->baseline = $hp[2]; + $this->maxLenght = $hp[3]; + $this->oldLayout = $hp[4]; + $this->commentLines = $hp[5] + 1; + $this->printDirection = $hp[6]; + $this->fullLayout = $hp[7]; + $this->codeTagCount = $hp[8]; + + unset($hp); + + if ($this->signature != "flf2a") { + return false; + } else { + return true; + } + } + + + /* + * Get a character as a string, or an array with one line + * for each font height. + */ + + function getCharacter($character, $asarray = false) + { + $asciValue = ord($character); + $start = $this->commentLines + ($asciValue - 32) * $this->height; + $data = ($asarray) ? array() : ""; + + for ($a = 0; $a < $this->height; $a++) + { + $tmp = $this->fontFile[$start + $a]; + $tmp = str_replace("@", "", $tmp); + //$tmp = trim($tmp); + $tmp = str_replace($this->hardblank, " ", $tmp); + + if ($asarray) { + $data[] = $tmp; + } else { + $data .= $tmp; + } + } + + return $data; + } + + + /* + * Returns a figletized line of characters. + */ + + function fetch($line) + { + $ret = ""; + + for ($i = 0; $i < (strlen($line)); $i++) + { + $data[] = $this->getCharacter($line[$i], true); + } + + @reset($data); + + for ($i = 0; $i < $this->height; $i++) + { + while (list($k, $v) = each($data)) + { + $ret .= str_replace("\n", "", $v[$i]); + } + reset($data); + $ret .= "\n"; + } + + return $ret; + } + + + /* + * Display (print) a figletized line of characters. + */ + + function display($line) + { + print $this->fetch($line); + } + +} +?> diff --git a/sources/lib/plugins/captcha/fonts/README b/sources/lib/plugins/captcha/fonts/README new file mode 100644 index 0000000..69edcbe --- /dev/null +++ b/sources/lib/plugins/captcha/fonts/README @@ -0,0 +1,8 @@ +All fonts placed in this directory will be used randomly for the image captcha. +The more and exotic fonts you use, the harder it will be to OCR. However you +should be aware that most fonts are very hard to read when used for small sizes. + +Provided fonts: + +VeraSe.ttf - Bitsream Vera, http://www-old.gnome.org/fonts/ +Rufscript010.ttf - Rufscript, http://openfontlibrary.org/en/font/rufscript diff --git a/sources/lib/plugins/captcha/fonts/Rufscript010.ttf b/sources/lib/plugins/captcha/fonts/Rufscript010.ttf new file mode 100644 index 0000000..887a449 Binary files /dev/null and b/sources/lib/plugins/captcha/fonts/Rufscript010.ttf differ diff --git a/sources/lib/plugins/captcha/fonts/VeraSe.ttf b/sources/lib/plugins/captcha/fonts/VeraSe.ttf new file mode 100644 index 0000000..4b4ecc6 Binary files /dev/null and b/sources/lib/plugins/captcha/fonts/VeraSe.ttf differ diff --git a/sources/lib/plugins/captcha/helper.php b/sources/lib/plugins/captcha/helper.php new file mode 100644 index 0000000..eb75366 --- /dev/null +++ b/sources/lib/plugins/captcha/helper.php @@ -0,0 +1,318 @@ + + */ +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/'); +require_once(DOKU_INC.'inc/blowfish.php'); + +class helper_plugin_captcha extends DokuWiki_Plugin { + + protected $field_in = 'plugin__captcha'; + protected $field_sec = 'plugin__captcha_secret'; + protected $field_hp = 'plugin__captcha_honeypot'; + + /** + * Constructor. Initializes field names + */ + public function __construct() { + $this->field_in = md5($this->_fixedIdent().$this->field_in); + $this->field_sec = md5($this->_fixedIdent().$this->field_sec); + $this->field_hp = md5($this->_fixedIdent().$this->field_hp); + } + + /** + * Check if the CAPTCHA should be used. Always check this before using the methods below. + * + * @return bool true when the CAPTCHA should be used + */ + public function isEnabled() { + if(!$this->getConf('forusers') && $_SERVER['REMOTE_USER']) return false; + return true; + } + + /** + * Returns the HTML to display the CAPTCHA with the chosen method + */ + public function getHTML() { + global $ID; + + $rand = (float) (rand(0, 10000)) / 10000; + if($this->getConf('mode') == 'math') { + $code = $this->_generateMATH($this->_fixedIdent(), $rand); + $code = $code[0]; + $text = $this->getLang('fillmath'); + } elseif($this->getConf('mode') == 'question') { + $text = $this->getConf('question'); + } else { + $code = $this->_generateCAPTCHA($this->_fixedIdent(), $rand); + $text = $this->getLang('fillcaptcha'); + } + $secret = $this->encrypt($rand); + + $txtlen = $this->getConf('lettercount'); + + $out = ''; + $out .= '
'; + $out .= ''; + $out .= ' '; + + switch($this->getConf('mode')) { + case 'math': + case 'text': + $out .= $this->_obfuscateText($code); + break; + case 'js': + $out .= ''.$this->_obfuscateText($code).''; + break; + case 'image': + $out .= ' '; + break; + case 'audio': + $out .= ' '; + $out .= ''; + $out .= ''.$this->getLang('soundlink').''; + break; + case 'figlet': + require_once(dirname(__FILE__).'/figlet.php'); + $figlet = new phpFiglet(); + if($figlet->loadfont(dirname(__FILE__).'/figlet.flf')) { + $out .= '
';
+                    $out .= rtrim($figlet->fetch($code));
+                    $out .= '
'; + } else { + msg('Failed to load figlet.flf font file. CAPTCHA broken', -1); + } + break; + } + $out .= ' '; + + // add honeypot field + $out .= ''; + $out .= '
'; + return $out; + } + + /** + * Checks if the the CAPTCHA was solved correctly + * + * @param bool $msg when true, an error will be signalled through the msg() method + * @return bool true when the answer was correct, otherwise false + */ + public function check($msg = true) { + // compare provided string with decrypted captcha + $rand = $this->decrypt($_REQUEST[$this->field_sec]); + + if($this->getConf('mode') == 'math') { + $code = $this->_generateMATH($this->_fixedIdent(), $rand); + $code = $code[1]; + } elseif($this->getConf('mode') == 'question') { + $code = $this->getConf('answer'); + } else { + $code = $this->_generateCAPTCHA($this->_fixedIdent(), $rand); + } + + if(!$_REQUEST[$this->field_sec] || + !$_REQUEST[$this->field_in] || + utf8_strtolower($_REQUEST[$this->field_in]) != utf8_strtolower($code) || + trim($_REQUEST[$this->field_hp]) !== '' + ) { + if($msg) msg($this->getLang('testfailed'), -1); + return false; + } + return true; + } + + /** + * Build a semi-secret fixed string identifying the current page and user + * + * This string is always the same for the current user when editing the same + * page revision, but only for one day. Editing a page before midnight and saving + * after midnight will result in a failed CAPTCHA once, but makes sure it can + * not be reused which is especially important for the registration form where the + * $ID usually won't change. + * + * @return string + */ + public function _fixedIdent() { + global $ID; + $lm = @filemtime(wikiFN($ID)); + $td = date('Y-m-d'); + return auth_browseruid(). + auth_cookiesalt(). + $ID.$lm.$td; + } + + /** + * Adds random space characters within the given text + * + * Keeps subsequent numbers without spaces (for math problem) + * + * @param $text + * @return string + */ + protected function _obfuscateText($text) { + $new = ''; + + $spaces = array( + "\r", + "\n", + "\r\n", + ' ', + "\xC2\xA0", // \u00A0 NO-BREAK SPACE + "\xE2\x80\x80", // \u2000 EN QUAD + "\xE2\x80\x81", // \u2001 EM QUAD + "\xE2\x80\x82", // \u2002 EN SPACE + // "\xE2\x80\x83", // \u2003 EM SPACE + "\xE2\x80\x84", // \u2004 THREE-PER-EM SPACE + "\xE2\x80\x85", // \u2005 FOUR-PER-EM SPACE + "\xE2\x80\x86", // \u2006 SIX-PER-EM SPACE + "\xE2\x80\x87", // \u2007 FIGURE SPACE + "\xE2\x80\x88", // \u2008 PUNCTUATION SPACE + "\xE2\x80\x89", // \u2009 THIN SPACE + "\xE2\x80\x8A", // \u200A HAIR SPACE + "\xE2\x80\xAF", // \u202F NARROW NO-BREAK SPACE + "\xE2\x81\x9F", // \u205F MEDIUM MATHEMATICAL SPACE + + "\xE1\xA0\x8E\r\n", // \u180E MONGOLIAN VOWEL SEPARATOR + "\xE2\x80\x8B\r\n", // \u200B ZERO WIDTH SPACE + "\xEF\xBB\xBF\r\n", // \uFEFF ZERO WIDTH NO-BREAK SPACE + ); + + $len = strlen($text); + for($i = 0; $i < $len - 1; $i++) { + $new .= $text{$i}; + + if(!is_numeric($text{$i + 1})) { + $new .= $spaces[array_rand($spaces)]; + } + } + $new .= $text{$len - 1}; + return $new; + } + + /** + * Generates a random char string + * + * @param $fixed string the fixed part, any string + * @param $rand float some random number between 0 and 1 + * @return string + */ + public function _generateCAPTCHA($fixed, $rand) { + $fixed = hexdec(substr(md5($fixed), 5, 5)); // use part of the md5 to generate an int + $numbers = md5($rand * $fixed); // combine both values + + // now create the letters + $code = ''; + for($i = 0; $i < ($this->getConf('lettercount') * 2); $i += 2) { + $code .= chr(floor(hexdec($numbers[$i].$numbers[$i + 1]) / 10) + 65); + } + + return $code; + } + + /** + * Create a mathematical task and its result + * + * @param $fixed string the fixed part, any string + * @param $rand float some random number between 0 and 1 + * @return array taks, result + */ + protected function _generateMATH($fixed, $rand) { + $fixed = hexdec(substr(md5($fixed), 5, 5)); // use part of the md5 to generate an int + $numbers = md5($rand * $fixed); // combine both values + + // first letter is the operator (+/-) + $op = (hexdec($numbers[0]) > 8) ? -1 : 1; + $num = array(hexdec($numbers[1].$numbers[2]), hexdec($numbers[3])); + + // we only want positive results + if(($op < 0) && ($num[0] < $num[1])) rsort($num); + + // prepare result and task text + $res = $num[0] + ($num[1] * $op); + $task = $num[0].(($op < 0) ? '-' : '+').$num[1].'=?'; + + return array($task, $res); + } + + /** + * Create a CAPTCHA image + * + * @param string $text the letters to display + */ + public function _imageCAPTCHA($text) { + $w = $this->getConf('width'); + $h = $this->getConf('height'); + + $fonts = glob(dirname(__FILE__).'/fonts/*.ttf'); + + // create a white image + $img = imagecreatetruecolor($w, $h); + $white = imagecolorallocate($img, 255, 255, 255); + imagefill($img, 0, 0, $white); + + // add some lines as background noise + for($i = 0; $i < 30; $i++) { + $color = imagecolorallocate($img, rand(100, 250), rand(100, 250), rand(100, 250)); + imageline($img, rand(0, $w), rand(0, $h), rand(0, $w), rand(0, $h), $color); + } + + // draw the letters + $txtlen = strlen($text); + for($i = 0; $i < $txtlen; $i++) { + $font = $fonts[array_rand($fonts)]; + $color = imagecolorallocate($img, rand(0, 100), rand(0, 100), rand(0, 100)); + $size = rand(floor($h / 1.8), floor($h * 0.7)); + $angle = rand(-35, 35); + + $x = ($w * 0.05) + $i * floor($w * 0.9 / $txtlen); + $cheight = $size + ($size * 0.5); + $y = floor($h / 2 + $cheight / 3.8); + + imagettftext($img, $size, $angle, $x, $y, $color, $font, $text[$i]); + } + + header("Content-type: image/png"); + imagepng($img); + imagedestroy($img); + } + + /** + * Encrypt the given string with the cookie salt + * + * @param string $data + * @return string + */ + public function encrypt($data) { + if(function_exists('auth_encrypt')) { + $data = auth_encrypt($data, auth_cookiesalt()); // since binky + } else { + $data = PMA_blowfish_encrypt($data, auth_cookiesalt()); // deprecated + } + + return base64_encode($data); + } + + /** + * Decrypt the given string with the cookie salt + * + * @param string $data + * @return string + */ + public function decrypt($data) { + $data = base64_decode($data); + + if(function_exists('auth_decrypt')) { + return auth_decrypt($data, auth_cookiesalt()); // since binky + } else { + return PMA_blowfish_decrypt($data, auth_cookiesalt()); // deprecated + } + } +} diff --git a/sources/lib/plugins/captcha/img.php b/sources/lib/plugins/captcha/img.php new file mode 100644 index 0000000..e0efcb7 --- /dev/null +++ b/sources/lib/plugins/captcha/img.php @@ -0,0 +1,22 @@ + + */ + +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/../../../'); +define('NOSESSION', true); +define('DOKU_DISABLE_GZIP_OUTPUT', 1); +require_once(DOKU_INC.'inc/init.php'); +require_once(DOKU_INC.'inc/auth.php'); + +$ID = $_REQUEST['id']; +/** @var helper_plugin_captcha $plugin */ +$plugin = plugin_load('helper', 'captcha'); +$rand = $plugin->decrypt($_REQUEST['secret']); +$code = $plugin->_generateCAPTCHA($plugin->_fixedIdent(), $rand); +$plugin->_imageCAPTCHA($code); + +//Setup VIM: ex: et ts=4 enc=utf-8 : diff --git a/sources/lib/plugins/captcha/lang/ar/lang.php b/sources/lib/plugins/captcha/lang/ar/lang.php new file mode 100644 index 0000000..54984c6 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/ar/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'عذراً، لكن لم يكن الرد على كلمة التحقق بشكل صحيح.'; +$lang['fillcaptcha'] = 'الرجاء تعبئة كافة الأحرف في المربع.'; +$lang['fillmath'] = 'الرجاء حل المعادلة التالية.'; +$lang['soundlink'] = 'إذا كنت لا تستطيع قراءة الحروف على الصورة، تحميل ملف الصوت يساعدك على قراءة الأحرف.'; +$lang['honeypot'] = 'الرجاء الحفاظ على هذا الحقل فارغاً:'; diff --git a/sources/lib/plugins/captcha/lang/ar/settings.php b/sources/lib/plugins/captcha/lang/ar/settings.php new file mode 100644 index 0000000..550e5da --- /dev/null +++ b/sources/lib/plugins/captcha/lang/ar/settings.php @@ -0,0 +1,21 @@ + + */ +$lang['mode'] = 'أي نوع من كلمة التحقق استخدامها؟'; +$lang['mode_o_js'] = 'نص (مملوءة مسبقا مع جافا سكريبت)'; +$lang['mode_o_text'] = 'النص (دليل فقط)'; +$lang['mode_o_math'] = 'مشكلة الرياضيات'; +$lang['mode_o_question'] = 'مسألة ثابتة'; +$lang['mode_o_image'] = 'الصورة (أسوأ إمكانية الوصول)'; +$lang['mode_o_audio'] = 'الصورة + الصوت (أفضل إمكانية الوصول)'; +$lang['regprotect'] = 'حماية نموذج التسجيل كذلك؟'; +$lang['forusers'] = 'استخدام كلمة التحقق في تسجيل المستخدمين، أيضا؟'; +$lang['lettercount'] = 'عدد من الرسائل لاستخدام (3-16). إذا قمت بزيادة كمية، ومن المؤكد أن زيادة العرض في الصورة أدناه كذلك.'; +$lang['width'] = 'عرض الصورة كلمة التحقق (بالبكسل)'; +$lang['height'] = 'ارتفاع الصورة كلمة التحقق (بالبكسل)'; +$lang['question'] = 'سؤال لوضع مسألة ثابتة'; +$lang['answer'] = 'جواب المسألة الثابتة'; diff --git a/sources/lib/plugins/captcha/lang/cs/lang.php b/sources/lib/plugins/captcha/lang/cs/lang.php new file mode 100644 index 0000000..aca652f --- /dev/null +++ b/sources/lib/plugins/captcha/lang/cs/lang.php @@ -0,0 +1,11 @@ + + */ + +$lang['testfailed'] = "Bohužel, ale na CAPTCHA nebylo odpovězeno správně. Jste vůbec člověk?"; +$lang['fillcaptcha'] = "Vyplňte, prosím, všechna písmena v poli, abyste dokázali, že nejste robot."; +$lang['soundlink'] = "Pokud nedokážete přečíst písmena na obrázku, stáhněte si tento .wav soubor, kde je text přečtený."; + diff --git a/sources/lib/plugins/captcha/lang/cs/settings.php b/sources/lib/plugins/captcha/lang/cs/settings.php new file mode 100644 index 0000000..732fecb --- /dev/null +++ b/sources/lib/plugins/captcha/lang/cs/settings.php @@ -0,0 +1,18 @@ + + */ + +$lang['mode'] = "Který typ CAPTCHA se má použít?"; +$lang['mode_o_js'] = "Text (předvyplněný JavaScriptem)"; +$lang['mode_o_text'] = "Text (pouze manuálně vložený)"; +$lang['mode_o_image'] = "Obrázek (špatná přístupnost)"; +$lang['mode_o_audio'] = "Obrázek (lepší přístupnost)"; + +$lang['regprotect'] = "Chránit také registrační formulář?"; +$lang['forusers'] = "Používat CAPTCHA i pro registrované uživatele?"; +$lang['width'] = "Šírka CAPTCHA obrázku (v bodech)"; +$lang['height'] = "Výška CAPTCHA obrázku (v bodech)"; + diff --git a/sources/lib/plugins/captcha/lang/da/lang.php b/sources/lib/plugins/captcha/lang/da/lang.php new file mode 100644 index 0000000..1820eb8 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/da/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Desværre, CAPTCHA blev ikke besvaret korrekt. Du er muligvis ikke et menneske?'; +$lang['fillcaptcha'] = 'Skriv venligst alle bogstaverne i boksen for at bevise at du er et menneske.'; +$lang['fillmath'] = 'Løs venligst følgende ligning for at bevise at du er et menneske.'; +$lang['soundlink'] = 'Hvis du ikke kan læse bogstaverne på skærmen, kan du downloade denne .wav-fil, for at få dem læst op.'; +$lang['honeypot'] = 'Hold venligst dette felt tomt:'; diff --git a/sources/lib/plugins/captcha/lang/da/settings.php b/sources/lib/plugins/captcha/lang/da/settings.php new file mode 100644 index 0000000..bc5357b --- /dev/null +++ b/sources/lib/plugins/captcha/lang/da/settings.php @@ -0,0 +1,22 @@ + + */ +$lang['mode'] = 'Hvilken type CAPTCHA skal benyttes?'; +$lang['mode_o_js'] = 'Tekst (præudfyldt af JavaScript)'; +$lang['mode_o_text'] = 'Tekst (kun manuelt)'; +$lang['mode_o_math'] = 'Matematikproblem'; +$lang['mode_o_question'] = 'Løsning'; +$lang['mode_o_image'] = 'Billede (dårlig tilgængelighed)'; +$lang['mode_o_audio'] = 'Billede+Audio (bedre tilgængelighed)'; +$lang['mode_o_figlet'] = 'Figlet ASCII Art (dårlig tilgængelighed)'; +$lang['regprotect'] = 'Beskyt også registreringsformularen?'; +$lang['forusers'] = 'Benyt også CAPTCHA til brugere der er logget ind?'; +$lang['lettercount'] = 'Antal af bogstaver der skal benyttes (3-16). Hvis du øger antallet, skal du også huske at øge bredden af billedet herunder.'; +$lang['width'] = 'Bredden af CAPTCHA-billedet (pixel)'; +$lang['height'] = 'Højden af CAPTCHA-billedet (pixel)'; +$lang['question'] = 'Spørgsmål til fast-spørgsmål-tilstand'; +$lang['answer'] = 'Svar til fast-spørgsmål-tilstand'; diff --git a/sources/lib/plugins/captcha/lang/de-informal/lang.php b/sources/lib/plugins/captcha/lang/de-informal/lang.php new file mode 100644 index 0000000..867031e --- /dev/null +++ b/sources/lib/plugins/captcha/lang/de-informal/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Das CAPTCHA wurde nicht korrekt beantwortet.'; +$lang['fillcaptcha'] = 'Bitte übertrage die Buchstaben in das Eingabefeld.'; +$lang['fillmath'] = 'Bitte löse folgende Gleichung:'; +$lang['soundlink'] = 'Wenn Du die Buchstaben auf dem Bild nicht lesen kannst, lade diese .wav Datei herunter, um sie vorgelesen zu bekommen.'; +$lang['honeypot'] = 'Dieses Feld bitte leer lassen'; diff --git a/sources/lib/plugins/captcha/lang/de-informal/settings.php b/sources/lib/plugins/captcha/lang/de-informal/settings.php new file mode 100644 index 0000000..2c2ee6f --- /dev/null +++ b/sources/lib/plugins/captcha/lang/de-informal/settings.php @@ -0,0 +1,22 @@ + + */ +$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['regprotect'] = 'Auch die Anmelde-Seite Schützen?'; +$lang['forusers'] = 'CAPTCHA auch für angemeldete Benutzer verwenden?'; +$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 --git a/sources/lib/plugins/captcha/lang/de/lang.php b/sources/lib/plugins/captcha/lang/de/lang.php new file mode 100644 index 0000000..ac6fa4a --- /dev/null +++ b/sources/lib/plugins/captcha/lang/de/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Das CAPTCHA wurde nicht korrekt beantwortet.'; +$lang['fillcaptcha'] = 'Bitte übertragen Sie die Buchstaben in das Eingabefeld.'; +$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 --git a/sources/lib/plugins/captcha/lang/de/settings.php b/sources/lib/plugins/captcha/lang/de/settings.php new file mode 100644 index 0000000..47e6a3f --- /dev/null +++ b/sources/lib/plugins/captcha/lang/de/settings.php @@ -0,0 +1,23 @@ + + * @author Thomas Templin + */ +$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['regprotect'] = 'Protect the registration form as well?'; +$lang['forusers'] = 'Use CAPTCHA for logged in users, too?'; +$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'] = 'Width of the CAPTCHA image (pixel)'; +$lang['height'] = 'Height of the CAPTCHA image (pixel)'; +$lang['question'] = 'Frage für den "Feste Frage" Modus.'; +$lang['answer'] = 'Antwort für den "Feste Frage" Modus.'; diff --git a/sources/lib/plugins/captcha/lang/en/audio/LICENSE b/sources/lib/plugins/captcha/lang/en/audio/LICENSE new file mode 100644 index 0000000..e97f8cc --- /dev/null +++ b/sources/lib/plugins/captcha/lang/en/audio/LICENSE @@ -0,0 +1,4 @@ +This work is licensed under the Creative Commons Sampling Plus 1.0 License. To +view a copy of this license, visit +http://creativecommons.org/licenses/sampling+/1.0/ or send a letter to Creative +Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. diff --git a/sources/lib/plugins/captcha/lang/en/audio/README b/sources/lib/plugins/captcha/lang/en/audio/README new file mode 100644 index 0000000..979c5f0 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/en/audio/README @@ -0,0 +1,13 @@ +Author: Michael Klier +Link: http://www.chimeric.de/projects/npa +Voice: Christian Spellenberg + +These samples represent the NATO phonetical alphabet. They are protected +by the Creative Commons Sampling Plus 1.0 License. You are free to use +and redistribute these samples under the conditions defined by the +license. For further information read the LICENSE file and visit +http://www.creativecommons.org. + +Note: The original high quality wave files were downsampled and converted + to 8-Bit mono files for distribution with the CAPTCHA plugin. Visit + the link above for the original files. diff --git a/sources/lib/plugins/captcha/lang/en/audio/a.wav b/sources/lib/plugins/captcha/lang/en/audio/a.wav new file mode 100644 index 0000000..e7505ca Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/a.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/b.wav b/sources/lib/plugins/captcha/lang/en/audio/b.wav new file mode 100644 index 0000000..eb9fffa Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/b.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/c.wav b/sources/lib/plugins/captcha/lang/en/audio/c.wav new file mode 100644 index 0000000..117fc93 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/c.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/d.wav b/sources/lib/plugins/captcha/lang/en/audio/d.wav new file mode 100644 index 0000000..9a1ea52 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/d.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/e.wav b/sources/lib/plugins/captcha/lang/en/audio/e.wav new file mode 100644 index 0000000..0770161 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/e.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/f.wav b/sources/lib/plugins/captcha/lang/en/audio/f.wav new file mode 100644 index 0000000..dc4ff2b Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/f.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/g.wav b/sources/lib/plugins/captcha/lang/en/audio/g.wav new file mode 100644 index 0000000..df4d6d4 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/g.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/h.wav b/sources/lib/plugins/captcha/lang/en/audio/h.wav new file mode 100644 index 0000000..50365bb Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/h.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/i.wav b/sources/lib/plugins/captcha/lang/en/audio/i.wav new file mode 100644 index 0000000..bb1875a Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/i.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/j.wav b/sources/lib/plugins/captcha/lang/en/audio/j.wav new file mode 100644 index 0000000..56a9535 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/j.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/k.wav b/sources/lib/plugins/captcha/lang/en/audio/k.wav new file mode 100644 index 0000000..28e0fd9 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/k.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/l.wav b/sources/lib/plugins/captcha/lang/en/audio/l.wav new file mode 100644 index 0000000..a56a314 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/l.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/m.wav b/sources/lib/plugins/captcha/lang/en/audio/m.wav new file mode 100644 index 0000000..d081c81 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/m.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/n.wav b/sources/lib/plugins/captcha/lang/en/audio/n.wav new file mode 100644 index 0000000..bd4304d Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/n.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/o.wav b/sources/lib/plugins/captcha/lang/en/audio/o.wav new file mode 100644 index 0000000..02ffa9b Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/o.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/p.wav b/sources/lib/plugins/captcha/lang/en/audio/p.wav new file mode 100644 index 0000000..1863235 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/p.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/q.wav b/sources/lib/plugins/captcha/lang/en/audio/q.wav new file mode 100644 index 0000000..24fc9c0 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/q.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/r.wav b/sources/lib/plugins/captcha/lang/en/audio/r.wav new file mode 100644 index 0000000..8f55782 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/r.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/s.wav b/sources/lib/plugins/captcha/lang/en/audio/s.wav new file mode 100644 index 0000000..c92e5ba Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/s.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/t.wav b/sources/lib/plugins/captcha/lang/en/audio/t.wav new file mode 100644 index 0000000..4fc1955 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/t.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/u.wav b/sources/lib/plugins/captcha/lang/en/audio/u.wav new file mode 100644 index 0000000..cc142fd Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/u.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/v.wav b/sources/lib/plugins/captcha/lang/en/audio/v.wav new file mode 100644 index 0000000..246553d Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/v.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/w.wav b/sources/lib/plugins/captcha/lang/en/audio/w.wav new file mode 100644 index 0000000..b0d7659 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/w.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/x.wav b/sources/lib/plugins/captcha/lang/en/audio/x.wav new file mode 100644 index 0000000..726fedc Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/x.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/y.wav b/sources/lib/plugins/captcha/lang/en/audio/y.wav new file mode 100644 index 0000000..4edf31f Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/y.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/audio/z.wav b/sources/lib/plugins/captcha/lang/en/audio/z.wav new file mode 100644 index 0000000..f329629 Binary files /dev/null and b/sources/lib/plugins/captcha/lang/en/audio/z.wav differ diff --git a/sources/lib/plugins/captcha/lang/en/lang.php b/sources/lib/plugins/captcha/lang/en/lang.php new file mode 100644 index 0000000..7163928 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/en/lang.php @@ -0,0 +1,12 @@ + + */ + +$lang['testfailed'] = "Sorry, but the CAPTCHA wasn't answered correctly. Maybe you're not human at all?"; +$lang['fillcaptcha'] = "Please fill all the letters into the box to prove you're human."; +$lang['fillmath'] = "Please solve the following equation to prove you're human."; +$lang['soundlink'] = "If you can't read the letters on the image, download this .wav file to get them read to you."; +$lang['honeypot'] = "Please keep this field empty: "; diff --git a/sources/lib/plugins/captcha/lang/en/settings.php b/sources/lib/plugins/captcha/lang/en/settings.php new file mode 100644 index 0000000..eee2f82 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/en/settings.php @@ -0,0 +1,23 @@ + + */ + +$lang['mode'] = "Which type of CAPTCHA to use?"; +$lang['mode_o_js'] = "Text (prefilled with JavaScript)"; +$lang['mode_o_text'] = "Text (manual only)"; +$lang['mode_o_math'] = "Math Problem"; +$lang['mode_o_question'] = "Fixed Question"; +$lang['mode_o_image'] = "Image (bad accessibility)"; +$lang['mode_o_audio'] = "Image+Audio (better accessibility)"; +$lang['mode_o_figlet'] = "Figlet ASCII Art (bad accessibility)"; + +$lang['regprotect'] = "Protect the registration form as well?"; +$lang['forusers'] = "Use CAPTCHA for logged in users, too?"; +$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"; diff --git a/sources/lib/plugins/captcha/lang/eo/lang.php b/sources/lib/plugins/captcha/lang/eo/lang.php new file mode 100644 index 0000000..01ed128 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/eo/lang.php @@ -0,0 +1,13 @@ + + * @author Robert Bogenschneider + */ +$lang['testfailed'] = 'Pardonon, sed CAPTCHA ne respondis korekte. Eble vi tute ne estas homo, ĉu?'; +$lang['fillcaptcha'] = 'Bonvolu tajpi ĉiujn literojn en la kampeton, por pruvi ke vi estas homo.'; +$lang['fillmath'] = 'Bonvolu solvi sekvan ekvacion por pruvi, ke vi estas homa.'; +$lang['soundlink'] = 'Se vi ne povas legi la literojn en la bildo, ŝarĝu tiun .wav-dosieron por aŭdi ilin.'; +$lang['honeypot'] = 'Bonvolu lasi tiun kampon malplena:'; diff --git a/sources/lib/plugins/captcha/lang/eo/settings.php b/sources/lib/plugins/captcha/lang/eo/settings.php new file mode 100644 index 0000000..129c139 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/eo/settings.php @@ -0,0 +1,23 @@ + + * @author Robert Bogenschneider + */ +$lang['mode'] = 'Kiun varianton de CAPTCHA uzi?'; +$lang['mode_o_js'] = 'Teksto (prilaborita per Java-skripto)'; +$lang['mode_o_text'] = 'Teksto (nur permane)'; +$lang['mode_o_math'] = 'Matematika problemo'; +$lang['mode_o_question'] = 'Fiksa demando'; +$lang['mode_o_image'] = 'Bildo (malbona alirebleco)'; +$lang['mode_o_audio'] = 'Bildo+Sono (pli bona alirebleco)'; +$lang['mode_o_figlet'] = 'Figlet ASCII - arto (malbona alirebleco)'; +$lang['regprotect'] = 'Ĉu protekti ankaŭ la paĝon por registriĝo?'; +$lang['forusers'] = 'Uzi CAPTCHA-n ankaŭ por ensalutintaj uzantoj?'; +$lang['lettercount'] = 'Kvanto da uzendaj literoj (3-16). Se vi pligrandigas la kvanton, certigu ke vi same pligrandigas la larĝecon de la suba bildo.'; +$lang['width'] = 'Larĝeco de CAPTCHA-bildo (pikseloj)'; +$lang['height'] = 'Alteco de CAPTCHA-bildo (pikseloj)'; +$lang['question'] = 'Demando por fiks-demanda funkciado'; +$lang['answer'] = 'Respondo por fiks-demanda funkciado'; diff --git a/sources/lib/plugins/captcha/lang/es/lang.php b/sources/lib/plugins/captcha/lang/es/lang.php new file mode 100644 index 0000000..91f5396 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/es/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Lo sentimos, pero el CAPTCHA no fue respondido correctamente. Tal vez no eres una persona.'; +$lang['fillcaptcha'] = 'Por favor, complete todas las letras de la caja para demostrar que eres una persona.'; +$lang['fillmath'] = 'Por favor, resuelve la siguiente ecuación para demostrar que eres una persona.'; +$lang['soundlink'] = 'Si no puede leer toda las letras de la imagen, descargue el archivo wav que lo leerá por ti.'; +$lang['honeypot'] = 'Por favor, mantenga este campo vacío: '; diff --git a/sources/lib/plugins/captcha/lang/es/settings.php b/sources/lib/plugins/captcha/lang/es/settings.php new file mode 100644 index 0000000..ec11cd2 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/es/settings.php @@ -0,0 +1,21 @@ + + */ +$lang['mode'] = '¿Qué tipo de CAPTCHA usará?'; +$lang['mode_o_js'] = 'Texto (rellenados con JavaScript)'; +$lang['mode_o_text'] = 'Texto (manual)'; +$lang['mode_o_math'] = 'Problemas de matemáticas'; +$lang['mode_o_question'] = 'Pregunta fija'; +$lang['mode_o_image'] = 'Imagen (peor accesibilidad)'; +$lang['mode_o_audio'] = 'Imagen + Audio (peor accesibilidad)'; +$lang['regprotect'] = '¿Quiere proteger el formulario de inscripción así?'; +$lang['forusers'] = '¿Utilizar CAPTCHA para los usuarios registrados también?'; +$lang['lettercount'] = 'Número de letras para usar (3-16). Si aumenta la cantidad, asegúrese de incrementar el ancho de la imagen de abajo también.'; +$lang['width'] = 'Ancho de la imagen CAPTCHA (pixel)'; +$lang['height'] = 'Altura de la imagen CAPTCHA (pixel)'; +$lang['question'] = 'Pregunta para el modo de pregunta fija'; +$lang['answer'] = 'Responda al modo de pregunta fija'; diff --git a/sources/lib/plugins/captcha/lang/fr/lang.php b/sources/lib/plugins/captcha/lang/fr/lang.php new file mode 100644 index 0000000..a1b3e53 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/fr/lang.php @@ -0,0 +1,14 @@ + + * @author bruno + * @author Fabrice Dejaigher + */ +$lang['testfailed'] = 'Désolé, vous n\'avez pas répondu correctement au test anti-spam. Peut-être n\'êtes vous pas humain ?'; +$lang['fillcaptcha'] = 'Merci de recopier le code ci-contre pour prouver que vous êtes humain :'; +$lang['fillmath'] = 'S\'il vous plaît résolvez l\'équation suivante pour prouver que vous êtes humain.'; +$lang['soundlink'] = 'Si vous ne pouvez pas lire le code, téléchargez ce fichier .wav pour l\'écouter.'; +$lang['honeypot'] = 'Merci de laisser ce champ vide : '; diff --git a/sources/lib/plugins/captcha/lang/fr/settings.php b/sources/lib/plugins/captcha/lang/fr/settings.php new file mode 100644 index 0000000..d462610 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/fr/settings.php @@ -0,0 +1,24 @@ + + * @author bruno + * @author Fabrice Dejaigher + */ +$lang['mode'] = 'Quel type de CAPTCHA utiliser ?'; +$lang['mode_o_js'] = 'Texte (prérempli avec JavaScript)'; +$lang['mode_o_text'] = 'Texte (remplissage manuel)'; +$lang['mode_o_math'] = 'Problème mathématique'; +$lang['mode_o_question'] = 'Question fixe'; +$lang['mode_o_image'] = 'Image (mauvaise accessibilité)'; +$lang['mode_o_audio'] = 'Image + Audio (meilleure accessibilité)'; +$lang['mode_o_figlet'] = 'ASCII Art (mauvaise accessibilité)'; +$lang['regprotect'] = 'Protéger également le formulaire d\'inscription ?'; +$lang['forusers'] = 'Utiliser également le CAPTCHA pour les utilisateurs connectés ?'; +$lang['lettercount'] = 'Nombre de lettres à utiliser (3 à 16). Pensez à augmenter la taille de l\'image ci-dessous en adéquation avec le nombre de lettres afin que celles-ci soient correctement affichées.'; +$lang['width'] = 'Largeur de l\'image du CAPTCHA (en pixels)'; +$lang['height'] = 'Hauteur de l\'image du CAPTCHA (en pixels)'; +$lang['question'] = 'Question pour le mode \'question fixe\''; +$lang['answer'] = 'Réponse pour le mode \'question fixe\''; diff --git a/sources/lib/plugins/captcha/lang/hu/lang.php b/sources/lib/plugins/captcha/lang/hu/lang.php new file mode 100644 index 0000000..64df116 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/hu/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Rosszul válaszoltál a CAPTCHA-ra. Lehet, hogy nem is ember vagy?'; +$lang['fillcaptcha'] = 'Kérlek írd be az összes betűt a dobozba, hogy bebizonyítsd, ember vagy.'; +$lang['fillmath'] = 'Kérled oldd meg az alábbi egyenletet, hogy bebizonyítsd, ember vagy.'; +$lang['soundlink'] = 'Ha nem látod a képen szereplő szöveget, töltsd le ezt a .wav fájlt, amiben felolvassák.'; +$lang['honeypot'] = 'Ezt a mezőt kérlek hagyd üresen:'; diff --git a/sources/lib/plugins/captcha/lang/hu/settings.php b/sources/lib/plugins/captcha/lang/hu/settings.php new file mode 100644 index 0000000..d0e99fc --- /dev/null +++ b/sources/lib/plugins/captcha/lang/hu/settings.php @@ -0,0 +1,23 @@ + + * @author Marina Vladi + */ +$lang['mode'] = 'Milyen CAPTCHA-t használjunk?'; +$lang['mode_o_js'] = 'Szöveg (JavaScript által kitöltve)'; +$lang['mode_o_text'] = 'Szöveg (kézzel kitöltendő)'; +$lang['mode_o_math'] = 'Matematikai feladat'; +$lang['mode_o_question'] = 'Biztonsági kérdés'; +$lang['mode_o_image'] = 'Kép (nehezen érthető)'; +$lang['mode_o_audio'] = 'Kép+hang (jobban érthető)'; +$lang['mode_o_figlet'] = 'FIGlet-betűrajz (nehezen érthető)'; +$lang['regprotect'] = 'A regisztrációlapot is védetté tegyük?'; +$lang['forusers'] = 'Bejelentkezett felhasználóknál is használjunk CAPTCHA-t?'; +$lang['lettercount'] = 'Felhasználandó betűk száma (3-16). Ha növeled a karakterek számát, ne felejtsd el a kép szélességét is megváltoztatni.'; +$lang['width'] = 'CAPTCHA-hoz felhasznált kép szélessége (pixel)'; +$lang['height'] = 'CAPTCHA-hoz felhasznált kép magassága (pixel)'; +$lang['question'] = 'Biztonsági kérdés mód kérdése'; +$lang['answer'] = 'Válasz a biztonsági kérdésre'; diff --git a/sources/lib/plugins/captcha/lang/it/lang.php b/sources/lib/plugins/captcha/lang/it/lang.php new file mode 100644 index 0000000..2ef15e6 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/it/lang.php @@ -0,0 +1,11 @@ + + * @author Hideaki SAWADA + */ +$lang['testfailed'] = '申し訳ありませんが、CAPTCHAに対して適切に応答していません。おそらくですが人ではありませんね?'; +$lang['fillcaptcha'] = '人間の証明として、ボックス内の全ての文字を入力してください。'; +$lang['fillmath'] = '人間の証明として、以下の数式の答えを入力して下さい。'; +$lang['soundlink'] = '画像の文字が読めなければ、文字を読んだ.wavファイルをダウンロードして下さい。'; +$lang['honeypot'] = 'この項目は空のままにして下さい:'; diff --git a/sources/lib/plugins/captcha/lang/ja/settings.php b/sources/lib/plugins/captcha/lang/ja/settings.php new file mode 100644 index 0000000..bed5532 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/ja/settings.php @@ -0,0 +1,23 @@ + + * @author Hideaki SAWADA + */ +$lang['mode'] = '認証の方式'; +$lang['mode_o_js'] = '文字 (JavaScriptによる自動入力)'; +$lang['mode_o_text'] = '文字 (手動入力)'; +$lang['mode_o_math'] = '計算式'; +$lang['mode_o_question'] = '固定質問'; +$lang['mode_o_image'] = '画像 (低アクセシビリティ)'; +$lang['mode_o_audio'] = '画像+音声 (中アクセシビリティ)'; +$lang['mode_o_figlet'] = 'Figlet [アルファベットAA] (低アクセシビリティ)'; +$lang['regprotect'] = 'ユーザー登録時にCAPTCHA認証を行う'; +$lang['forusers'] = 'ログインユーザーに対してもCAPTCHA認証を行う'; +$lang['lettercount'] = '使用する文字数(3~16)。文字数を増やす場合は下の画像の幅も同様に増やして下さい。'; +$lang['width'] = 'CAPTCHA画像の幅 (ピクセル)'; +$lang['height'] = 'CAPTCHA画像の高さ(ピクセル)'; +$lang['question'] = '固定質問方式の質問'; +$lang['answer'] = '固定質問方式の回答'; diff --git a/sources/lib/plugins/captcha/lang/ko/lang.php b/sources/lib/plugins/captcha/lang/ko/lang.php new file mode 100644 index 0000000..b227c41 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/ko/lang.php @@ -0,0 +1,13 @@ + + * @author Myeongjin + */ +$lang['testfailed'] = '죄송하지만 CAPTCHA(캡차)가 올바르지 않습니다. 아마도 전혀 인간이 아니죠?'; +$lang['fillcaptcha'] = '인간임을 증명하기 위해 상자에 있는 모든 글자를 채워주세요.'; +$lang['fillmath'] = '인간임을 증명하기 위해 다음 방정식을 푸세요.'; +$lang['soundlink'] = '그림에 있는 글자를 읽을 수 없다면, 당신에게 들려줄 이 .wav 파일을 다운로드하세요.'; +$lang['honeypot'] = '이 필드는 비어 있도록 유지하세요:'; diff --git a/sources/lib/plugins/captcha/lang/ko/settings.php b/sources/lib/plugins/captcha/lang/ko/settings.php new file mode 100644 index 0000000..58d7761 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/ko/settings.php @@ -0,0 +1,23 @@ + + * @author Myeongjin + */ +$lang['mode'] = '어떤 CAPTCHA(캡차) 종류를 사용하겠습니까?'; +$lang['mode_o_js'] = '글자 (자바스크립트로 미리 채워짐)'; +$lang['mode_o_text'] = '글자 (수동만)'; +$lang['mode_o_math'] = '수학 문제'; +$lang['mode_o_question'] = '고정된 질문'; +$lang['mode_o_image'] = '그림 (접근성이 낮음)'; +$lang['mode_o_audio'] = '그림+소리 (접근성이 더 나음)'; +$lang['mode_o_figlet'] = 'Figlet ASCII 아트 (접근성이 낮음)'; +$lang['regprotect'] = '등록 양식에도 보호하겠습니까?'; +$lang['forusers'] = '로그인한 사용자도 CAPTCHA(캡차)를 사용하겠습니까?'; +$lang['lettercount'] = '사용할 글자 수. (3-16) 양을 증가하면, 아래 그림의 너비도 증가해야 합니다.'; +$lang['width'] = 'CAPTCHA(캡차) 그림의 너비 (픽셀)'; +$lang['height'] = 'CAPTCHA(캡차) 그림의 높이 (픽셀)'; +$lang['question'] = '고정된 질문 모드에 대한 질문'; +$lang['answer'] = '고정된 질문 모드에 대한 답변'; diff --git a/sources/lib/plugins/captcha/lang/nl/lang.php b/sources/lib/plugins/captcha/lang/nl/lang.php new file mode 100644 index 0000000..bf07a56 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/nl/lang.php @@ -0,0 +1,14 @@ + + * @author Mark C. Prins + * @author Mark Prins + */ +$lang['testfailed'] = 'Sorry, maar de CAPTCHA is onjuist beantwoord. Misschien ben je toch geen mens?'; +$lang['fillcaptcha'] = 'Tik de letters in het onderstaande vakje over om aan te tonen dat je een mens bent.'; +$lang['fillmath'] = 'Geef antwoord op de rekensom om aan te tonen dat je een mens bent.'; +$lang['soundlink'] = 'Als je de letters in de afbeelding niet kunt lezen kun je dit .wav bestand downloaden om ze te laten voorlezen.'; +$lang['honeypot'] = 'Dit veld leeg laten'; diff --git a/sources/lib/plugins/captcha/lang/nl/settings.php b/sources/lib/plugins/captcha/lang/nl/settings.php new file mode 100644 index 0000000..9c34ba6 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/nl/settings.php @@ -0,0 +1,24 @@ + + * @author Mark C. Prins + * @author Mark Prins + */ +$lang['mode'] = 'Welk type CAPTCHA wil je gebruiken?'; +$lang['mode_o_js'] = 'Tekst (automatisch ingevuld via JavaScript)'; +$lang['mode_o_text'] = 'Tekst (handmatig overtikken)'; +$lang['mode_o_math'] = 'Wiskunde opgave (eenvoudige rekensom)'; +$lang['mode_o_question'] = 'Vaste vraag'; +$lang['mode_o_image'] = 'Afbeelding (slechte toegankelijkhied)'; +$lang['mode_o_audio'] = 'Afbeelding+Audio (betere toegankelijkheid)'; +$lang['mode_o_figlet'] = 'Figlet ASCII Art (slechte toegankelijkheid)'; +$lang['regprotect'] = 'Het aanmeldformulier ook beschermen?'; +$lang['forusers'] = 'Ook CAPTCHA voor ingelogde gebruikers gebruiken?'; +$lang['lettercount'] = 'Aantal te gebruiken letters (3-16). Let er op ook de breedte van de afbeelding hieronder te vergroten als het aantal wordt verhoogd'; +$lang['width'] = 'Breedte van de CAPTCHA afbeelding (pixels)'; +$lang['height'] = 'Hoogte van de CAPTCHA afbeelding (pixels)'; +$lang['question'] = 'Vraag voor de vaste vraag modus'; +$lang['answer'] = 'Antwoord voor de vaste vraag modus'; diff --git a/sources/lib/plugins/captcha/lang/pl/lang.php b/sources/lib/plugins/captcha/lang/pl/lang.php new file mode 100644 index 0000000..cb23f92 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/pl/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Wybacz, ale CAPTCHA nie została uzupełniona poprawnie. Może wcale nie jesteś człowiekiem?'; +$lang['fillcaptcha'] = 'Proszę wprowadzić wszystkie znaki w pole, by udowodnić, że jesteś człowiekiem.'; +$lang['fillmath'] = 'Proszę rozwiązać poniższe równanie, by udowodnić, że jesteś człowiekiem.'; +$lang['soundlink'] = 'Jeżeli nie jesteś w stanie przeczytać znaków widocznych na obrazie pobierz plik .wav, w którym zawarta jest ich głosowa reprezentacja.'; +$lang['honeypot'] = 'Proszę pozostawić to pole puste.'; diff --git a/sources/lib/plugins/captcha/lang/pl/settings.php b/sources/lib/plugins/captcha/lang/pl/settings.php new file mode 100644 index 0000000..a362e71 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/pl/settings.php @@ -0,0 +1,22 @@ + + * @author Mati + */ +$lang['mode'] = 'Jaki typ CAPTCHA zastosować?'; +$lang['mode_o_text'] = 'Tekst (tylko ręcznie)'; +$lang['mode_o_math'] = 'Problem matematyczny'; +$lang['mode_o_question'] = 'Stałe pytanie'; +$lang['mode_o_image'] = 'Obraz (słaba dostępność)'; +$lang['mode_o_audio'] = 'Obraz+Dźwięk (lepsza dostępność)'; +$lang['mode_o_figlet'] = 'Sztuka figletowych ASCII (słaba dostępność)'; +$lang['regprotect'] = 'Ochraniać również proces rejestracji?'; +$lang['forusers'] = 'Stosować CAPTCHA również dla zalogowanych użytkowników?'; +$lang['lettercount'] = 'Wykorzystywane liczby i litery (3-16). Pamiętaj by wraz ze wzrostem ich ilości zwiększać również szerokość obrazu poniżej.'; +$lang['width'] = 'Szerokość obrazu CAPTCHA (w pikselach)'; +$lang['height'] = 'Wysokość obrazu CAPTCHA (w pikselach)'; +$lang['question'] = 'Pytanie stosowane w trybie stałego pytania'; +$lang['answer'] = 'Odpowiedź na stałe pytanie'; diff --git a/sources/lib/plugins/captcha/lang/pt-br/lang.php b/sources/lib/plugins/captcha/lang/pt-br/lang.php new file mode 100644 index 0000000..7a37dd1 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/pt-br/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Desculpe, mas o CAPTCHA não foi preenchido corretamente. Talvez você não seja humano?'; +$lang['fillcaptcha'] = 'Por favor preencha todas as letras dentro da caixa para provar que você é humano.'; +$lang['fillmath'] = 'Por favor resolva a seguinte equação para provar que você é humano.'; +$lang['soundlink'] = 'Se você não pode ler as letras na imagem, faça o download desse .wav para que elas sejam lidas para você.'; +$lang['honeypot'] = 'Por favor deixe esse campo em branco:'; diff --git a/sources/lib/plugins/captcha/lang/pt-br/settings.php b/sources/lib/plugins/captcha/lang/pt-br/settings.php new file mode 100644 index 0000000..cd275bc --- /dev/null +++ b/sources/lib/plugins/captcha/lang/pt-br/settings.php @@ -0,0 +1,22 @@ + + */ +$lang['mode'] = 'Qual tipo de CAPTCHA usar?'; +$lang['mode_o_js'] = 'Texto (pré-preenchido com JavaScript)'; +$lang['mode_o_text'] = 'Texto (somente manual)'; +$lang['mode_o_math'] = 'Problema de Matemática'; +$lang['mode_o_question'] = 'Questão Resolvida'; +$lang['mode_o_image'] = 'Imagem (acessibilidade ruim)'; +$lang['mode_o_audio'] = 'Imagem+Áudio (acessibilidade melhor)'; +$lang['mode_o_figlet'] = 'Figlet ASCII Art (acessibilidade ruim)'; +$lang['regprotect'] = 'Também proteger o formulário de registro?'; +$lang['forusers'] = 'Também usar CAPTCHA para usuários logados?'; +$lang['lettercount'] = 'Número de letras para usar (3-16). Se você aumentar a quantidade, lembre de também aumentar a largura da imagem abaixo.'; +$lang['width'] = 'Largura da imagem do CAPTCHA (pixel)'; +$lang['height'] = 'Altura da imagem do CAPTCHA (pixel)'; +$lang['question'] = 'Pergunta para o modo de pergunta fixa'; +$lang['answer'] = 'Resposta para o modo de pergunta fixa'; diff --git a/sources/lib/plugins/captcha/lang/pt/lang.php b/sources/lib/plugins/captcha/lang/pt/lang.php new file mode 100644 index 0000000..3ee95d5 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/pt/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Infelizmente o CAPTCHA não foi respondido corretamente. Talvez você afinal não seja humano?'; +$lang['fillcaptcha'] = 'Por favor preencha todas as letras na caixa para provar que é humano.'; +$lang['fillmath'] = 'Por favor resolva a seguinte equação para provar que é humano.'; +$lang['soundlink'] = 'Se não pode ler as letras na imagem, descarregue este ficheiro .wav para as ouvir.'; +$lang['honeypot'] = 'Por favor mantenha este campo vazio:'; diff --git a/sources/lib/plugins/captcha/lang/pt/settings.php b/sources/lib/plugins/captcha/lang/pt/settings.php new file mode 100644 index 0000000..4e8fc74 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/pt/settings.php @@ -0,0 +1,22 @@ + + */ +$lang['mode'] = 'Que tipo de CAPTCHA usar?'; +$lang['mode_o_js'] = 'Texto (pré-preenchido com JavaScript)'; +$lang['mode_o_text'] = 'Texto (somente manual)'; +$lang['mode_o_math'] = 'Problema Matemático'; +$lang['mode_o_question'] = 'Pergunta Fixa'; +$lang['mode_o_image'] = 'Imagem (má acessibilidade)'; +$lang['mode_o_audio'] = 'Imagem+Áudio (melhor acessibilidade)'; +$lang['mode_o_figlet'] = 'Arte em ASCII Figlet (má acessibilidade)'; +$lang['regprotect'] = 'Também proteger o formulário de registo?'; +$lang['forusers'] = 'Também usar CAPTCHA para utilizadores autenticados?'; +$lang['lettercount'] = 'Número de letras a usar (3-16). Se aumentar a quantidade, assegure-se de aumentar também a largura da imagem, abaixo.'; +$lang['width'] = 'Largura da imagem CAPTCHA (pixel)'; +$lang['height'] = 'Altura da imagem CAPTCHA (pixel)'; +$lang['question'] = 'Pergunta para o modo de pergunta fixa'; +$lang['answer'] = 'Resposta para o modo de pergunta fixa'; diff --git a/sources/lib/plugins/captcha/lang/ru/lang.php b/sources/lib/plugins/captcha/lang/ru/lang.php new file mode 100644 index 0000000..4810ec3 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/ru/lang.php @@ -0,0 +1,13 @@ + + * @author Ilya Rozhkov + */ +$lang['testfailed'] = 'Извините, код подтверждения введён неверно.'; +$lang['fillcaptcha'] = 'Пожалуйста, введите код подтверждения, чтобы доказать, что вы не робот:'; +$lang['fillmath'] = 'Ответьте пожалуйста на вопрос, чтобы доказать, что вы человек.'; +$lang['soundlink'] = 'Если вы не можете прочитать символы на изображении, загрузите и воспроизведите wav-файл.'; +$lang['honeypot'] = 'Пожалуйста, оставьте это поле пустым:'; diff --git a/sources/lib/plugins/captcha/lang/ru/settings.php b/sources/lib/plugins/captcha/lang/ru/settings.php new file mode 100644 index 0000000..f6f5348 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/ru/settings.php @@ -0,0 +1,23 @@ + + * @author Ilya Rozhkov + */ +$lang['mode'] = 'Какой тип CAPTCHA использовать?'; +$lang['mode_o_js'] = 'Текст (заполнение JavaScript)'; +$lang['mode_o_text'] = 'Текст (ручной ввод)'; +$lang['mode_o_math'] = 'Математическая задача'; +$lang['mode_o_question'] = 'Конкретный вопрос'; +$lang['mode_o_image'] = 'Изображение (хорошая защита)'; +$lang['mode_o_audio'] = 'Изображение и звук (плохая защита)'; +$lang['mode_o_figlet'] = 'Figlet ASCII Art (хорошая защита)'; +$lang['regprotect'] = 'Защитить регистрационную форму?'; +$lang['forusers'] = 'Использоваться CAPTCHA для зарегистрированных пользователей?'; +$lang['lettercount'] = 'Количество букв (3-16). Если вы увеличиваете количество букв, не забудьте увеличить ширину изображения ниже.'; +$lang['width'] = 'Ширина изображения CAPTCHA (пиксель)'; +$lang['height'] = 'Высота изображения CAPTCHA (пиксель)'; +$lang['question'] = 'Вопрос для режима конкретного вопроса'; +$lang['answer'] = 'Ответ для режима конкретного вопроса '; diff --git a/sources/lib/plugins/captcha/lang/sk/lang.php b/sources/lib/plugins/captcha/lang/sk/lang.php new file mode 100644 index 0000000..f04ab4c --- /dev/null +++ b/sources/lib/plugins/captcha/lang/sk/lang.php @@ -0,0 +1,13 @@ + + * @author Martin Michalek + */ +$lang['testfailed'] = 'Ľutujem, ale na CAPTCHA nebolo odpovedané správne. Je možné, že by ste vôbec neboli človekom?'; +$lang['fillcaptcha'] = 'Vyplňte prosím všetky písmená v poli, aby ste dokázali, že nie ste skript.'; +$lang['fillmath'] = 'Prosím vyriešte nasledujúcu rovnicu, aby sme vás odlíšili od automatických web nástrojov.'; +$lang['soundlink'] = 'Ak nedokážete prečítať písmená na obrázku, stiahnite si tento .wav súbor a text vám prečítame.'; +$lang['honeypot'] = 'Prosím nechajte toto pole prázdne:'; diff --git a/sources/lib/plugins/captcha/lang/sk/settings.php b/sources/lib/plugins/captcha/lang/sk/settings.php new file mode 100644 index 0000000..92e8738 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/sk/settings.php @@ -0,0 +1,23 @@ + + * @author Martin Michalek + */ +$lang['mode'] = 'Ktorý typ CAPTCHA sa má použiť?'; +$lang['mode_o_js'] = 'Text (predvyplnený JavaScriptom)'; +$lang['mode_o_text'] = 'Text (iba manuálne vložený)'; +$lang['mode_o_math'] = 'Matematický problém'; +$lang['mode_o_question'] = 'Pevne zadaná otázka'; +$lang['mode_o_image'] = 'Obrázok (pre ľudí s postihom)'; +$lang['mode_o_audio'] = 'Obrázok a zvuk (pre ľudí s menším postihom)'; +$lang['mode_o_figlet'] = 'ASCII obrázok (pre ľudí s postihom)'; +$lang['regprotect'] = 'Chrániť tiež registračný formulár?'; +$lang['forusers'] = 'Používať CAPTCHA aj pre registrovaných užívateľov?'; +$lang['lettercount'] = 'Počet písmen (3-16). Ak zvýšite počet, zväčšite tiež šírku obrázka uvedeného nižšie.'; +$lang['width'] = 'Šírka CAPTCHA obrázku (v bodoch)'; +$lang['height'] = 'Výška CAPTCHA obrázku (v bodoch)'; +$lang['question'] = 'Otázka pre typ pevne zadanej otázky'; +$lang['answer'] = 'Odpoveď pre typ pevne zadanej otázky'; diff --git a/sources/lib/plugins/captcha/lang/tr/settings.php b/sources/lib/plugins/captcha/lang/tr/settings.php new file mode 100644 index 0000000..c2f01ac --- /dev/null +++ b/sources/lib/plugins/captcha/lang/tr/settings.php @@ -0,0 +1,10 @@ + + */ +$lang['mode_o_math'] = 'Matematik Problemi'; +$lang['mode_o_question'] = 'Sabit Soru'; +$lang['mode_o_image'] = 'Resim (Kötü erişebilirlik)'; diff --git a/sources/lib/plugins/captcha/lang/zh-tw/lang.php b/sources/lib/plugins/captcha/lang/zh-tw/lang.php new file mode 100644 index 0000000..a0c7284 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/zh-tw/lang.php @@ -0,0 +1,10 @@ + + */ + +$lang['testfailed'] = "很抱歉,您沒有輸入正確的 CAPTCHA 驗證碼。"; +$lang['fillcaptcha'] = "請將字母填入方框。"; +$lang['soundlink'] = "如果您無法閱讀圖片中的字母,請下載收聽這個 WAV 檔。"; diff --git a/sources/lib/plugins/captcha/lang/zh-tw/settings.php b/sources/lib/plugins/captcha/lang/zh-tw/settings.php new file mode 100644 index 0000000..3543249 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/zh-tw/settings.php @@ -0,0 +1,19 @@ + + */ + +$lang['mode'] = "使用哪種 CAPTCHA 類型?"; +$lang['mode_o_js'] = "文字 (預先用 Javascript 填入)"; +$lang['mode_o_text'] = "文字 (手動填入)"; +$lang['mode_o_image'] = "圖片 (易用性差)"; +$lang['mode_o_audio'] = "圖片+聲音 (易用性較佳)"; +$lang['mode_o_figlet'] = "Figlet ASCII 藝術字 (易用性差)"; + +$lang['regprotect'] = "保護註冊表單嗎?"; +$lang['forusers'] = "已登入使用者也要 CAPTCHA 驗證嗎?"; +$lang['width'] = "CAPTCHA 圖片寬度 (像素)"; +$lang['height'] = "CAPTCHA 圖片高度 (像素)"; + diff --git a/sources/lib/plugins/captcha/lang/zh/lang.php b/sources/lib/plugins/captcha/lang/zh/lang.php new file mode 100644 index 0000000..7a01198 --- /dev/null +++ b/sources/lib/plugins/captcha/lang/zh/lang.php @@ -0,0 +1,13 @@ + + * @author lainme + */ +$lang['testfailed'] = '抱歉,您输入的验证码不正确。'; +$lang['fillcaptcha'] = '请在输入框中填入验证码以证明您不是机器人。'; +$lang['fillmath'] = '请填入算式的结果以证明您不是机器人。'; +$lang['soundlink'] = '如果您无法阅读图片中的字母,请下载此 .wav 文件。'; +$lang['honeypot'] = '请将此区域留空:'; diff --git a/sources/lib/plugins/captcha/lang/zh/settings.php b/sources/lib/plugins/captcha/lang/zh/settings.php new file mode 100644 index 0000000..c476e4e --- /dev/null +++ b/sources/lib/plugins/captcha/lang/zh/settings.php @@ -0,0 +1,23 @@ + + * @author lainme + */ +$lang['mode'] = '使用什么类型的验证码?'; +$lang['mode_o_js'] = '文本 (预先由 JavaScript 填写)'; +$lang['mode_o_text'] = '文本 (手动输入)'; +$lang['mode_o_math'] = '算术题'; +$lang['mode_o_question'] = '固定问题'; +$lang['mode_o_image'] = '图片 (无障碍性差)'; +$lang['mode_o_audio'] = '图片+音频 (更好的无障碍性)'; +$lang['mode_o_figlet'] = 'Figlet ASCII 艺术 (无障碍性差)'; +$lang['regprotect'] = '同时保护注册表单吗?'; +$lang['forusers'] = '对已登入的用户也适用吗?'; +$lang['lettercount'] = '使用字母的数目 (3-16)。如果您增加数目,请确保同时增加图片的宽度。'; +$lang['width'] = '验证码图片宽度 (像素)'; +$lang['height'] = '验证码图片高度 (像素)'; +$lang['question'] = '固定问题模式的问题'; +$lang['answer'] = '固定问题模式的答案'; diff --git a/sources/lib/plugins/captcha/plugin.info.txt b/sources/lib/plugins/captcha/plugin.info.txt new file mode 100644 index 0000000..ae49ee6 --- /dev/null +++ b/sources/lib/plugins/captcha/plugin.info.txt @@ -0,0 +1,8 @@ +base captcha +author Andreas Gohr +email andi@splitbrain.org +date 2014-01-05 +name CAPTCHA Plugin +desc Use a CAPTCHA challenge to protect DokuWiki against automated spam +url http://www.dokuwiki.org/plugin:captcha + diff --git a/sources/lib/plugins/captcha/script.js b/sources/lib/plugins/captcha/script.js new file mode 100644 index 0000000..75b69ce --- /dev/null +++ b/sources/lib/plugins/captcha/script.js @@ -0,0 +1,12 @@ +/** + * Autofill and hide the whole captcha stuff in the simple JS mode + */ +jQuery(function () { + var $code = jQuery('#plugin__captcha_code'); + if (!$code.length) return; + + var $box = jQuery('#plugin__captcha_wrapper input[type=text]'); + $box.first().val($code.text().replace(/([^A-Z])+/g, '')); + + jQuery('#plugin__captcha_wrapper').hide(); +}); diff --git a/sources/lib/plugins/captcha/sound.png b/sources/lib/plugins/captcha/sound.png new file mode 100644 index 0000000..6056d23 Binary files /dev/null and b/sources/lib/plugins/captcha/sound.png differ diff --git a/sources/lib/plugins/captcha/style.css b/sources/lib/plugins/captcha/style.css new file mode 100644 index 0000000..9f6ec0c --- /dev/null +++ b/sources/lib/plugins/captcha/style.css @@ -0,0 +1,23 @@ +.dokuwiki #plugin__captcha_wrapper img { + margin: 1px; + vertical-align: bottom; + border: 1px solid __border__; +} + +.dokuwiki #plugin__captcha_wrapper pre { + font-size: 70%; + font-family: monospace; + font-weight: bold; + border: none; + background-color: __background__; + color: __text__; + padding: 0; +} + +.dokuwiki #plugin__captcha_wrapper .no { + display: none; +} + +.dokuwiki #plugin__captcha_wrapper { +clear: left; +} diff --git a/sources/lib/plugins/captcha/wav.php b/sources/lib/plugins/captcha/wav.php new file mode 100644 index 0000000..87be955 --- /dev/null +++ b/sources/lib/plugins/captcha/wav.php @@ -0,0 +1,86 @@ + + */ + +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/../../../'); +define('NOSESSION', true); +define('DOKU_DISABLE_GZIP_OUTPUT', 1); +require_once(DOKU_INC.'inc/init.php'); +require_once(DOKU_INC.'inc/auth.php'); + +$ID = $_REQUEST['id']; +/** @var $plugin helper_plugin_captcha */ +$plugin = plugin_load('helper', 'captcha'); + +if($plugin->getConf('mode') != 'audio') { + http_status(404); + exit; +} + +$rand = $plugin->decrypt($_REQUEST['secret']); +$code = strtolower($plugin->_generateCAPTCHA($plugin->_fixedIdent(), $rand)); + +// prepare an array of wavfiles +$lc = dirname(__FILE__).'/lang/'.$conf['lang'].'/audio/'; +$en = dirname(__FILE__).'/lang/en/audio/'; +$wavs = array(); +for($i = 0; $i < $plugin->getConf('lettercount'); $i++) { + $file = $lc.$code{$i}.'.wav'; + if(!@file_exists($file)) $file = $en.$code{$i}.'.wav'; + $wavs[] = $file; +} + +header('Content-type: audio/x-wav'); +header('Content-Disposition: attachment;filename=captcha.wav'); + +echo joinwavs($wavs); + +/** + * Join multiple wav files + * + * All wave files need to have the same format and need to be uncompressed. + * The headers of the last file will be used (with recalculated datasize + * of course) + * + * @link http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/ + * @link http://www.thescripts.com/forum/thread3770.html + */ +function joinwavs($wavs) { + $fields = join( + '/', array( + 'H8ChunkID', 'VChunkSize', 'H8Format', + 'H8Subchunk1ID', 'VSubchunk1Size', + 'vAudioFormat', 'vNumChannels', 'VSampleRate', + 'VByteRate', 'vBlockAlign', 'vBitsPerSample' + ) + ); + + $data = ''; + foreach($wavs as $wav) { + $fp = fopen($wav, 'rb'); + $header = fread($fp, 36); + $info = unpack($fields, $header); + + // read optional extra stuff + if($info['Subchunk1Size'] > 16) { + $header .= fread($fp, ($info['Subchunk1Size'] - 16)); + } + + // read SubChunk2ID + $header .= fread($fp, 4); + + // read Subchunk2Size + $size = unpack('vsize', fread($fp, 4)); + $size = $size['size']; + + // read data + $data .= fread($fp, $size); + } + + return $header.pack('V', strlen($data)).$data; +} +