From 3def1abf47ecc7b1d52d99d9c2eee9abce2f4afb Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 15 Oct 2017 04:52:26 +0100 Subject: [PATCH] MEDIUM: Update plugin captcha to v2017-06-16 --- public_html/lib/plugins/captcha/.travis.yml | 13 + public_html/lib/plugins/captcha/EasySVG.php | 516 ++++++++++++++++++ .../lib/plugins/captcha/_test/helper.test.php | 149 +++++ public_html/lib/plugins/captcha/action.php | 229 +++++--- .../lib/plugins/captcha/conf/default.php | 6 +- .../lib/plugins/captcha/conf/metadata.php | 4 +- public_html/lib/plugins/captcha/fonts/README | 7 +- .../fonts/goudy_bookletter_1911-webfont.svg | 145 +++++ .../captcha/fonts/ostrich-sans-black.svg | 141 +++++ public_html/lib/plugins/captcha/helper.php | 178 +++++- .../lib/plugins/captcha/lang/ar/settings.php | 4 +- .../lib/plugins/captcha/lang/cs/lang.php | 15 +- .../lib/plugins/captcha/lang/cs/settings.php | 34 +- .../lib/plugins/captcha/lang/cy/lang.php | 12 + .../lib/plugins/captcha/lang/cy/settings.php | 22 + .../lib/plugins/captcha/lang/da/lang.php | 2 +- .../lib/plugins/captcha/lang/da/settings.php | 5 +- .../plugins/captcha/lang/de-informal/lang.php | 11 +- .../captcha/lang/de-informal/settings.php | 13 +- .../lib/plugins/captcha/lang/de/lang.php | 2 +- .../lib/plugins/captcha/lang/de/settings.php | 14 +- .../lib/plugins/captcha/lang/en/settings.php | 4 +- .../lib/plugins/captcha/lang/eo/lang.php | 11 +- .../lib/plugins/captcha/lang/eo/settings.php | 29 +- .../lib/plugins/captcha/lang/es/settings.php | 3 +- .../lib/plugins/captcha/lang/fa/lang.php | 12 + .../lib/plugins/captcha/lang/fa/settings.php | 23 + .../lib/plugins/captcha/lang/fr/lang.php | 2 +- .../lib/plugins/captcha/lang/fr/settings.php | 8 +- .../lib/plugins/captcha/lang/hu/lang.php | 2 +- .../lib/plugins/captcha/lang/hu/settings.php | 3 +- .../lib/plugins/captcha/lang/is/lang.php | 12 + .../lib/plugins/captcha/lang/is/settings.php | 22 + .../lib/plugins/captcha/lang/it/lang.php | 16 +- .../lib/plugins/captcha/lang/it/settings.php | 33 +- .../lib/plugins/captcha/lang/ja/lang.php | 2 +- .../lib/plugins/captcha/lang/ja/settings.php | 7 +- .../lib/plugins/captcha/lang/ko/lang.php | 2 +- .../lib/plugins/captcha/lang/ko/settings.php | 6 +- .../lib/plugins/captcha/lang/nl/lang.php | 2 +- .../lib/plugins/captcha/lang/nl/settings.php | 7 +- .../lib/plugins/captcha/lang/nn/settings.php | 3 +- .../lib/plugins/captcha/lang/no/lang.php | 5 +- .../lib/plugins/captcha/lang/no/settings.php | 5 +- .../lib/plugins/captcha/lang/pl/settings.php | 3 +- .../lib/plugins/captcha/lang/pt-br/lang.php | 6 +- .../plugins/captcha/lang/pt-br/settings.php | 16 +- .../lib/plugins/captcha/lang/pt/settings.php | 3 +- .../lib/plugins/captcha/lang/ru/settings.php | 3 +- .../lib/plugins/captcha/lang/sk/settings.php | 3 +- .../lib/plugins/captcha/lang/sv/lang.php | 12 + .../lib/plugins/captcha/lang/sv/settings.php | 24 + .../lib/plugins/captcha/lang/tr/lang.php | 16 +- .../lib/plugins/captcha/lang/tr/settings.php | 34 +- .../lib/plugins/captcha/lang/uk/settings.php | 3 +- .../lib/plugins/captcha/lang/zh-tw/lang.php | 2 +- .../plugins/captcha/lang/zh-tw/settings.php | 8 +- .../lib/plugins/captcha/lang/zh/lang.php | 2 +- .../lib/plugins/captcha/lang/zh/settings.php | 8 +- .../lib/plugins/captcha/plugin.info.txt | 2 +- public_html/lib/plugins/captcha/script.js | 36 +- public_html/lib/plugins/captcha/style.css | 19 +- public_html/lib/plugins/captcha/wav.php | 6 +- 63 files changed, 1685 insertions(+), 262 deletions(-) create mode 100644 public_html/lib/plugins/captcha/.travis.yml create mode 100644 public_html/lib/plugins/captcha/EasySVG.php create mode 100644 public_html/lib/plugins/captcha/_test/helper.test.php create mode 100644 public_html/lib/plugins/captcha/fonts/goudy_bookletter_1911-webfont.svg create mode 100644 public_html/lib/plugins/captcha/fonts/ostrich-sans-black.svg create mode 100644 public_html/lib/plugins/captcha/lang/cy/lang.php create mode 100644 public_html/lib/plugins/captcha/lang/cy/settings.php create mode 100644 public_html/lib/plugins/captcha/lang/fa/lang.php create mode 100644 public_html/lib/plugins/captcha/lang/fa/settings.php create mode 100644 public_html/lib/plugins/captcha/lang/is/lang.php create mode 100644 public_html/lib/plugins/captcha/lang/is/settings.php create mode 100644 public_html/lib/plugins/captcha/lang/sv/lang.php create mode 100644 public_html/lib/plugins/captcha/lang/sv/settings.php diff --git a/public_html/lib/plugins/captcha/.travis.yml b/public_html/lib/plugins/captcha/.travis.yml new file mode 100644 index 00000000..321f5542 --- /dev/null +++ b/public_html/lib/plugins/captcha/.travis.yml @@ -0,0 +1,13 @@ +language: php +php: + - "7.0" + - "5.6" + - "5.5" + - "5.4" + - "5.3" +env: + - DOKUWIKI=master + - DOKUWIKI=stable +before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh +install: sh travis.sh +script: cd _test && phpunit --stderr --group plugin_captcha diff --git a/public_html/lib/plugins/captcha/EasySVG.php b/public_html/lib/plugins/captcha/EasySVG.php new file mode 100644 index 00000000..82b0b55e --- /dev/null +++ b/public_html/lib/plugins/captcha/EasySVG.php @@ -0,0 +1,516 @@ + + * @version 0.1b + * + * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform + * @see http://stackoverflow.com/questions/14684846/flattening-svg-matrix-transforms-in-inkscape + * @see http://stackoverflow.com/questions/7742148/how-to-convert-text-to-svg-paths + */ +class EasySVG { + + protected $font; + protected $svg; + + public function __construct() { + // default font data + $this->font = new stdClass; + $this->font->id = ''; + $this->font->horizAdvX = 0; + $this->font->unitsPerEm = 0; + $this->font->ascent = 0; + $this->font->descent = 0; + $this->font->glyphs = array(); + $this->font->size = 20; + $this->font->color = ''; + $this->font->lineHeight = 1; + $this->font->letterSpacing = 0; + + $this->clearSVG(); + } + + public function clearSVG() { + $this->svg = new SimpleXMLElement(''); + } + + /** + * Function takes UTF-8 encoded string and returns unicode number for every character. + * @param string $str + * @return string + */ + private function _utf8ToUnicode( $str ) { + $unicode = array(); + $values = array(); + $lookingFor = 1; + + for ($i = 0; $i < strlen( $str ); $i++ ) { + $thisValue = ord( $str[ $i ] ); + if ( $thisValue < 128 ) $unicode[] = $thisValue; + else { + if ( count( $values ) == 0 ) $lookingFor = ( $thisValue < 224 ) ? 2 : 3; + $values[] = $thisValue; + if ( count( $values ) == $lookingFor ) { + $number = ( $lookingFor == 3 ) ? + ( ( $values[0] % 16 ) * 4096 ) + ( ( $values[1] % 64 ) * 64 ) + ( $values[2] % 64 ): + ( ( $values[0] % 32 ) * 64 ) + ( $values[1] % 64 ); + + $unicode[] = $number; + $values = array(); + $lookingFor = 1; + } + } + } + + return $unicode; + } + + /** + * Set font params (short-hand method) + * @param string $filepath + * @param integer $size + * @param string $color + */ + public function setFont( $filepath, $size, $color ) { + $this->setFontSVG($filepath); + $this->setFontSize($size); + $this->setFontColor($color); + } + + /** + * Set font size for display + * @param int $size + * @return void + */ + public function setFontSize( $size ) { + $this->font->size = $size; + } + + /** + * Set font color + * @param string $color + * @return void + */ + public function setFontColor( $color ) { + $this->font->color = $color; + } + + /** + * Set the line height from default (1) to custom value + * @param float $value + * @return void + */ + public function setLineHeight( $value ) { + $this->font->lineHeight = $value; + } + + /** + * Set the letter spacing from default (0) to custom value + * @param float $value + * @return void + */ + public function setLetterSpacing( $value ) { + $this->font->letterSpacing = $value; + } + + /** + * Function takes path to SVG font (local path) and processes its xml + * to get path representation of every character and additional + * font parameters + * @param string $filepath + * @return void + */ + public function setFontSVG( $filepath ) { + $this->font->glyphs = array(); + $z = new XMLReader; + $z->open($filepath); + + // move to the first node + while ($z->read()) { + $name = $z->name; + + if ($z->nodeType == XMLReader::ELEMENT) { + if ($name == 'font') { + $this->font->id = $z->getAttribute('id'); + $this->font->horizAdvX = $z->getAttribute('horiz-adv-x'); + } + + if ($name == 'font-face') { + $this->font->unitsPerEm = $z->getAttribute('units-per-em'); + $this->font->ascent = $z->getAttribute('ascent'); + $this->font->descent = $z->getAttribute('descent'); + } + + if ($name == 'glyph') { + $unicode = $z->getAttribute('unicode'); + $unicode = $this->_utf8ToUnicode($unicode); + + if (isset($unicode[0])) { + $unicode = $unicode[0]; + + $this->font->glyphs[$unicode] = new stdClass(); + $this->font->glyphs[$unicode]->horizAdvX = $z->getAttribute('horiz-adv-x'); + if (empty($this->font->glyphs[$unicode]->horizAdvX)) { + $this->font->glyphs[$unicode]->horizAdvX = $this->font->horizAdvX; + } + $this->font->glyphs[$unicode]->d = $z->getAttribute('d'); + + // save em value for letter spacing (109 is unicode for the letter 'm') + if ($unicode == '109') { + $this->font->em = $this->font->glyphs[$unicode]->horizAdvX; + } + } + } + } + } + } + + /** + * Add a path to the SVG + * @param string $def + * @param array $attributes + * @return SimpleXMLElement + */ + public function addPath($def, $attributes=array()) { + $path = $this->svg->addChild('path'); + foreach($attributes as $key=>$value){ + $path->addAttribute($key, $value); + } + $path->addAttribute('d', $def); + return $path; + } + + /** + * Add a text to the SVG + * @param string $def + * @param float $x + * @param float $y + * @param array $attributes + * @return SimpleXMLElement + */ + public function addText($text, $x=0, $y=0, $attributes=array()) { + $def = $this->textDef($text); + + if($x!=0 || $y!=0){ + $def = $this->defTranslate($def, $x, $y); + } + + if($this->font->color) { + $attributes['fill'] = $this->font->color; + } + + return $this->addPath($def, $attributes); + } + + + /** + * Function takes UTF-8 encoded string and size, returns xml for SVG paths representing this string. + * @param string $text UTF-8 encoded text + * @return string xml for text converted into SVG paths + */ + public function textDef($text) { + $def = array(); + + $horizAdvX = 0; + $horizAdvY = $this->font->ascent + $this->font->descent; + $fontSize = floatval($this->font->size) / $this->font->unitsPerEm; + $text = $this->_utf8ToUnicode($text); + + for($i = 0; $i < count($text); $i++) { + + $letter = $text[$i]; + + // line break support (10 is unicode for linebreak) + if($letter==10){ + $horizAdvX = 0; + $horizAdvY += $this->font->lineHeight * ( $this->font->ascent + $this->font->descent ); + continue; + } + + // extract character definition + $d = $this->font->glyphs[$letter]->d; + + // transform typo from original SVG format to straight display + $d = $this->defScale($d, $fontSize, -$fontSize); + $d = $this->defTranslate($d, $horizAdvX, $horizAdvY*$fontSize*2); + + $def[] = $d; + + // next letter's position + $horizAdvX += $this->font->glyphs[$letter]->horizAdvX * $fontSize + $this->font->em * $this->font->letterSpacing * $fontSize; + } + return implode(' ', $def); + } + + + /** + * Function takes UTF-8 encoded string and size, returns width and height of the whole text + * @param string $text UTF-8 encoded text + * @return array ($width, $height) + */ + public function textDimensions($text) { + $def = array(); + + $fontSize = floatval($this->font->size) / $this->font->unitsPerEm; + $text = $this->_utf8ToUnicode($text); + + $lineWidth = 0; + $lineHeight = ( $this->font->ascent + $this->font->descent ) * $fontSize * 2; + + $width = 0; + $height = $lineHeight; + + for($i = 0; $i < count($text); $i++) { + + $letter = $text[$i]; + + // line break support (10 is unicode for linebreak) + if($letter==10){ + $width = $lineWidth>$width ? $lineWidth : $width; + $height += $lineHeight * $this->font->lineHeight; + $lineWidth = 0; + continue; + } + + $lineWidth += $this->font->glyphs[$letter]->horizAdvX * $fontSize + $this->font->em * $this->font->letterSpacing * $fontSize; + } + + // only keep the widest line's width + $width = $lineWidth>$width ? $lineWidth : $width; + + return array($width, $height); + } + + + /** + * Function takes unicode character and returns the UTF-8 equivalent + * @param string $str + * @return string + */ + public function unicodeDef( $unicode ) { + + $horizAdvY = $this->font->ascent + $this->font->descent; + $fontSize = floatval($this->font->size) / $this->font->unitsPerEm; + + // extract character definition + $d = $this->font->glyphs[hexdec($unicode)]->d; + + // transform typo from original SVG format to straight display + $d = $this->defScale($d, $fontSize, -$fontSize); + $d = $this->defTranslate($d, 0, $horizAdvY*$fontSize*2); + + return $d; + } + + /** + * Returns the character width, as set in the font file + * @param string $str + * @param boolean $is_unicode + * @return float + */ + public function characterWidth( $char, $is_unicode = false ) { + if ($is_unicode){ + $letter = hexdec($char); + } + else { + $letter = $this->_utf8ToUnicode($char); + } + + if (!isset($this->font->glyphs[$letter])) + return NULL; + + $fontSize = floatval($this->font->size) / $this->font->unitsPerEm; + return $this->font->glyphs[$letter]->horizAdvX * $fontSize; + } + + + /** + * Applies a translate transformation to definition + * @param string $def definition + * @param float $x + * @param float $y + * @return string + */ + public function defTranslate($def, $x=0, $y=0){ + return $this->defApplyMatrix($def, array(1, 0, 0, 1, $x, $y)); + } + + /** + * Applies a translate transformation to definition + * @param string $def Definition + * @param integer $angle Rotation angle (degrees) + * @param integer $x X coordinate of rotation center + * @param integer $y Y coordinate of rotation center + * @return string + */ + public function defRotate($def, $angle, $x=0, $y=0){ + if($x==0 && $y==0){ + $angle = deg2rad($angle); + return $this->defApplyMatrix($def, array(cos($angle), sin($angle), -sin($angle), cos($angle), 0, 0)); + } + + // rotate by a given point + $def = $this->defTranslate($def, $x, $y); + $def = $this->defRotate($def, $angle); + $def = $this->defTranslate($def, -$x, -$y); + return $def; + } + + /** + * Applies a scale transformation to definition + * @param string $def definition + * @param integer $x + * @param integer $y + * @return string + */ + public function defScale($def, $x=1, $y=1){ + return $this->defApplyMatrix($def, array($x, 0, 0, $y, 0, 0)); + } + + /** + * Calculates the new definition with the matrix applied + * @param string $def + * @param array $matrix + * @return string + */ + public function defApplyMatrix($def, $matrix){ + + // if there are several shapes in this definition, do the operation for each + preg_match_all('/M[^zZ]*[zZ]/', $def, $shapes); + $shapes = $shapes[0]; + if(count($shapes)>1){ + foreach($shapes as &$shape) + $shape = $this->defApplyMatrix($shape, $matrix); + return implode(' ', $shapes); + } + + preg_match_all('/[a-zA-Z]+[^a-zA-Z]*/', $def, $instructions); + $instructions = $instructions[0]; + + $return = ''; + foreach($instructions as &$instruction){ + $i = preg_replace('/[^a-zA-Z]*/', '', $instruction); + preg_match_all('/\-?[0-9\.]+/', $instruction, $coords); + $coords = $coords[0]; + + if(empty($coords)){ + continue; + } + + $new_coords = array(); + while(count($coords)>0){ + + // do the matrix calculation stuff + list($a, $b, $c, $d, $e, $f) = $matrix; + + // exception for relative instruction + if( preg_match('/[a-z]/', $i) ){ + $e = 0; + $f = 0; + } + + // convert horizontal lineto (relative) + if( $i=='h' ){ + $i = 'l'; + $x = floatval( array_shift($coords) ); + $y = 0; + + // add new point's coordinates + $current_point = array( + $a*$x + $c*$y + $e, + $b*$x + $d*$y + $f, + ); + $new_coords = array_merge($new_coords, $current_point); + } + + // convert vertical lineto (relative) + elseif( $i=='v' ){ + $i = 'l'; + $x = 0; + $y = floatval( array_shift($coords) ); + + // add new point's coordinates + $current_point = array( + $a*$x + $c*$y + $e, + $b*$x + $d*$y + $f, + ); + $new_coords = array_merge($new_coords, $current_point); + } + + // convert quadratic bezier curve (relative) + elseif( $i=='q' ){ + $x = floatval( array_shift($coords) ); + $y = floatval( array_shift($coords) ); + + // add new point's coordinates + $current_point = array( + $a*$x + $c*$y + $e, + $b*$x + $d*$y + $f, + ); + $new_coords = array_merge($new_coords, $current_point); + + // same for 2nd point + $x = floatval( array_shift($coords) ); + $y = floatval( array_shift($coords) ); + + // add new point's coordinates + $current_point = array( + $a*$x + $c*$y + $e, + $b*$x + $d*$y + $f, + ); + $new_coords = array_merge($new_coords, $current_point); + } + + // every other commands + // @TODO: handle 'a,c,s' (elliptic arc curve) commands + // cf. http://www.w3.org/TR/SVG/paths.html#PathDataCurveCommands + else{ + $x = floatval( array_shift($coords) ); + $y = floatval( array_shift($coords) ); + + // add new point's coordinates + $current_point = array( + $a*$x + $c*$y + $e, + $b*$x + $d*$y + $f, + ); + $new_coords = array_merge($new_coords, $current_point); + } + + + } + + $instruction = $i . implode(',', $new_coords); + + // remove useless commas + $instruction = preg_replace('/,\-/','-', $instruction); + } + + return implode('', $instructions); + } + + + + /** + * + * Short-hand methods + * + */ + + + /** + * Return full SVG XML + * @return string + */ + public function asXML(){ + return $this->svg->asXML(); + } + + /** + * Adds an attribute to the SVG + * @param string $key + * @param string $value + */ + public function addAttribute($key, $value){ + return $this->svg->addAttribute($key, $value); + } +} diff --git a/public_html/lib/plugins/captcha/_test/helper.test.php b/public_html/lib/plugins/captcha/_test/helper.test.php new file mode 100644 index 00000000..3e79923d --- /dev/null +++ b/public_html/lib/plugins/captcha/_test/helper.test.php @@ -0,0 +1,149 @@ +field_in; + } + + public function get_field_sec() { + return $this->field_sec; + } + + public function get_field_hp() { + return $this->field_hp; + } + + public function storeCaptchaCookie($fixed, $rand) { + parent::storeCaptchaCookie($fixed, $rand); + } +} + +/** + * @group plugin_captcha + * @group plugins + */ +class helper_plugin_captcha_test extends DokuWikiTest { + + protected $pluginsEnabled = array('captcha'); + + public function testConfig() { + global $conf; + $conf['plugin']['captcha']['lettercount'] = 20; + + $helper = new helper_plugin_captcha_public(); + + // generateCAPTCHA generates a maximum of 16 chars + $code = $helper->_generateCAPTCHA("fixed", 0); + $this->assertEquals(16, strlen($code)); + } + + public function testDecrypt() { + + $helper = new helper_plugin_captcha_public(); + + $rand = "12345"; + $secret = $helper->encrypt($rand); + $this->assertNotSame(false, $secret); + $this->assertSame($rand, $helper->decrypt($secret)); + + $this->assertFalse($helper->decrypt('')); + $this->assertFalse($helper->decrypt('X')); + } + + public function testCheck() { + + global $INPUT, $ID; + + $helper = new helper_plugin_captcha_public(); + + $INPUT->set($helper->get_field_hp(), ''); + $INPUT->set($helper->get_field_in(), 'X'); + $INPUT->set($helper->get_field_sec(), ''); + + $this->assertFalse($helper->check(false)); + $INPUT->set($helper->get_field_sec(), 'X'); + $this->assertFalse($helper->check(false)); + + // create the captcha and store the cookie + $rand = 0; + $code = $helper->_generateCAPTCHA($helper->_fixedIdent(), $rand); + $helper->storeCaptchaCookie($helper->_fixedIdent(), $rand); + + // check with missing secrect -> fail + $INPUT->set($helper->get_field_in(), $code); + $this->assertFalse($helper->check(false)); + + // set secret -> success + $INPUT->set($helper->get_field_sec(), $helper->encrypt($rand)); + $this->assertTrue($helper->check(false)); + + // try again, cookie is gone -> fail + $this->assertFalse($helper->check(true)); + + // set the cookie but change the ID -> fail + $helper->storeCaptchaCookie($helper->_fixedIdent(), $rand); + $ID = 'test:fail'; + $this->assertFalse($helper->check(false)); + } + + public function testGenerate() { + + $helper = new helper_plugin_captcha_public(); + + $rand = 0; + $code = $helper->_generateCAPTCHA($helper->_fixedIdent(), $rand); + $newcode = $helper->_generateCAPTCHA($helper->_fixedIdent() . 'X', $rand); + $this->assertNotEquals($newcode, $code); + $newcode = $helper->_generateCAPTCHA($helper->_fixedIdent(), $rand + 0.1); + $this->assertNotEquals($newcode, $code); + } + + public function testCleanup() { + // we need a complete fresh environment: + $this->setUpBeforeClass(); + + global $conf; + $path = $conf['tmpdir'] . '/captcha/'; + $today = "$path/" . date('Y-m-d'); + + $helper = new helper_plugin_captcha_public(); + + // nothing at all + $dirs = glob("$path/*"); + $this->assertEquals(array(), $dirs); + + // store a cookie + $helper->storeCaptchaCookie('test', 0); + + // nothing but today's data + $dirs = glob("$path/*"); + $this->assertEquals(array($today), $dirs); + + // add some fake cookies + io_saveFile("$path/2017-01-01/foo.cookie", ''); + io_saveFile("$path/2017-01-02/foo.cookie", ''); + io_saveFile("$path/2017-01-03/foo.cookie", ''); + io_saveFile("$path/2017-01-04/foo.cookie", ''); + + // all directories there + $dirs = glob("$path/*"); + $this->assertEquals( + array( + "$path/2017-01-01", + "$path/2017-01-02", + "$path/2017-01-03", + "$path/2017-01-04", + $today + ), + $dirs + ); + + // clean up + $helper->_cleanCaptchaCookies(); + + // nothing but today's data + $dirs = glob("$path/*"); + $this->assertEquals(array($today), $dirs); + } +} diff --git a/public_html/lib/plugins/captcha/action.php b/public_html/lib/plugins/captcha/action.php index 92aab020..e49617b5 100644 --- a/public_html/lib/plugins/captcha/action.php +++ b/public_html/lib/plugins/captcha/action.php @@ -8,74 +8,166 @@ // 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'); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); class action_plugin_captcha extends DokuWiki_Action_Plugin { /** * register the eventhandlers */ - function register(&$controller) { + public function register(Doku_Event_Handler $controller) { + // check CAPTCHA success $controller->register_hook( 'ACTION_ACT_PREPROCESS', 'BEFORE', $this, - 'handle_act_preprocess', + 'handle_captcha_input', array() ); - // old hook - $controller->register_hook( - 'HTML_EDITFORM_INJECTION', - 'BEFORE', - $this, - 'handle_editform_output', - array('editform' => true, 'oldhook' => true) - ); - - // new hook + // inject in edit form $controller->register_hook( 'HTML_EDITFORM_OUTPUT', 'BEFORE', $this, - 'handle_editform_output', - array('editform' => true, 'oldhook' => false) + 'handle_form_output', + array() ); - if($this->getConf('regprotect')) { - // old hook - $controller->register_hook( - 'HTML_REGISTERFORM_INJECTION', - 'BEFORE', - $this, - 'handle_editform_output', - array('editform' => false, 'oldhook' => true) - ); + // inject in user registration + $controller->register_hook( + 'HTML_REGISTERFORM_OUTPUT', + 'BEFORE', + $this, + 'handle_form_output', + array() + ); - // new hook + // inject in password reset + $controller->register_hook( + 'HTML_RESENDPWDFORM_OUTPUT', + 'BEFORE', + $this, + 'handle_form_output', + array() + ); + + if($this->getConf('loginprotect')) { + // inject in login form $controller->register_hook( - 'HTML_REGISTERFORM_OUTPUT', + 'HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, - 'handle_editform_output', - array('editform' => false, 'oldhook' => false) + 'handle_form_output', + array() ); + // check on login + $controller->register_hook( + 'AUTH_LOGIN_CHECK', + 'BEFORE', + $this, + 'handle_login', + array() + ); + } + + // clean up captcha cookies + $controller->register_hook( + 'INDEXER_TASKS_RUN', + 'AFTER', + $this, + 'handle_indexer', + array() + ); + } + + /** + * Check if the current mode should be handled by CAPTCHA + * + * Note: checking needs to be done when a form has been submitted, not when the form + * is shown for the first time. Except for the editing process this is not determined + * by $act alone but needs to inspect other input variables. + * + * @param string $act cleaned action mode + * @return bool + */ + protected function needs_checking($act) { + global $INPUT; + + switch($act) { + case 'save': + return true; + case 'register': + case 'resendpwd': + return $INPUT->bool('save'); + case 'login': + // we do not handle this here, but in handle_login() + default: + return false; } } /** - * Will intercept the 'save' action and check for CAPTCHA first. + * Aborts the given mode + * + * Aborting depends on the mode. It might unset certain input parameters or simply switch + * the mode to something else (giving as return which needs to be passed back to the + * ACTION_ACT_PREPROCESS event) + * + * @param string $act cleaned action mode + * @return string the new mode to use */ - 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 + protected function abort_action($act) { + global $INPUT; + + switch($act) { + case 'save': + return 'preview'; + case 'register': + case 'resendpwd': + $INPUT->post->set('save', false); + return $act; + case 'login': + // we do not handle this here, but in handle_login() + default: + return $act; } + } + + /** + * Handles CAPTCHA check in login + * + * Logins happen very early in the DokuWiki lifecycle, so we have to intercept them + * in their own event. + * + * @param Doku_Event $event + * @param $param + */ + public function handle_login(Doku_Event $event, $param) { + global $INPUT; + if(!$this->getConf('loginprotect')) return; // no protection wanted + if(!$INPUT->bool('u')) return; // this login was not triggered by a form + + // we need to have $ID set for the captcha check + global $ID; + $ID = getID(); + + /** @var helper_plugin_captcha $helper */ + $helper = plugin_load('helper', 'captcha'); + if(!$helper->check()) { + $event->data['silent'] = true; // we have our own message + $event->result = false; // login fail + $event->preventDefault(); + $event->stopPropagation(); + } + } + + /** + * Intercept all actions and check for CAPTCHA first. + */ + public function handle_captcha_input(Doku_Event $event, $param) { + $act = act_clean($event->data); + if(!$this->needs_checking($act)) return; // do nothing if logged in user and no CAPTCHA required if(!$this->getConf('forusers') && $_SERVER['REMOTE_USER']) { @@ -83,30 +175,20 @@ class action_plugin_captcha extends DokuWiki_Action_Plugin { } // check captcha + /** @var helper_plugin_captcha $helper */ $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; - } + $event->data = $this->abort_action($act); } } /** - * Create the additional fields for the edit form + * Inject the CAPTCHA in a DokuForm */ - 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; - } + public function handle_form_output(Doku_Event $event, $param) { + // get position of submit button + $pos = $event->data->findElementByAttribute('type', 'submit'); + if(!$pos) return; // no button -> source view mode // do nothing if logged in user and no CAPTCHA required if(!$this->getConf('forusers') && $_SERVER['REMOTE_USER']) { @@ -114,36 +196,29 @@ class action_plugin_captcha extends DokuWiki_Action_Plugin { } // get the CAPTCHA + /** @var helper_plugin_captcha $helper */ $helper = plugin_load('helper', 'captcha'); - $out = $helper->getHTML(); + $out = $helper->getHTML(); - if($param['oldhook']) { - // old wiki - just print - echo $out; - } else { - // new wiki - insert at correct position - $event->data->insertElement($pos++, $out); - } + // new wiki - insert before the submit button + $event->data->insertElement($pos, $out); } /** - * Pre-Sanitize the action command - * - * Similar to act_clean in action.php but simplified and without - * error messages + * Clean cookies once per day */ - function _act_clean($act) { - // check if the action was given as array key - if(is_array($act)) { - list($act) = array_keys($act); - } + public function handle_indexer(Doku_Event $event, $param) { + $lastrun = getCacheName('captcha', '.captcha'); + $last = @filemtime($lastrun); + if(time() - $last < 24 * 60 * 60) return; - //remove all bad chars - $act = strtolower($act); - $act = preg_replace('/[^a-z_]+/', '', $act); + /** @var helper_plugin_captcha $helper */ + $helper = plugin_load('helper', 'captcha'); + $helper->_cleanCaptchaCookies(); + touch($lastrun); - return $act; + $event->preventDefault(); + $event->stopPropagation(); } - } diff --git a/public_html/lib/plugins/captcha/conf/default.php b/public_html/lib/plugins/captcha/conf/default.php index 7861b94c..426dc170 100644 --- a/public_html/lib/plugins/captcha/conf/default.php +++ b/public_html/lib/plugins/captcha/conf/default.php @@ -7,9 +7,9 @@ $conf['mode'] = 'js'; $conf['forusers'] = 0; -$conf['regprotect'] = 1; +$conf['loginprotect']= 0; $conf['lettercount'] = 5; -$conf['width'] = 115; -$conf['height'] = 22; +$conf['width'] = 125; +$conf['height'] = 30; $conf['question'] = 'What\'s the answer to life, the universe and everything?'; $conf['answer'] = '42'; diff --git a/public_html/lib/plugins/captcha/conf/metadata.php b/public_html/lib/plugins/captcha/conf/metadata.php index c0c66d4a..099a6a13 100644 --- a/public_html/lib/plugins/captcha/conf/metadata.php +++ b/public_html/lib/plugins/captcha/conf/metadata.php @@ -5,9 +5,9 @@ * @author Andreas Gohr */ -$meta['mode'] = array('multichoice', '_choices' => array('js', 'text', 'math', 'question', 'image', 'audio', 'figlet')); -$meta['regprotect'] = array('onoff'); +$meta['mode'] = array('multichoice', '_choices' => array('js', 'text', 'math', 'question', 'image', 'audio', 'svg', 'svgaudio', 'figlet')); $meta['forusers'] = array('onoff'); +$meta['loginprotect']= array('onoff'); $meta['lettercount'] = array('numeric', '_min' => 3, '_max' => 16); $meta['width'] = array('numeric', '_pattern' => '/[0-9]+/'); $meta['height'] = array('numeric', '_pattern' => '/[0-9]+/'); diff --git a/public_html/lib/plugins/captcha/fonts/README b/public_html/lib/plugins/captcha/fonts/README index 69edcbe5..beafa3bb 100644 --- a/public_html/lib/plugins/captcha/fonts/README +++ b/public_html/lib/plugins/captcha/fonts/README @@ -2,7 +2,12 @@ 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: +Provided TTF fonts for use with image CAPTCHA: VeraSe.ttf - Bitsream Vera, http://www-old.gnome.org/fonts/ Rufscript010.ttf - Rufscript, http://openfontlibrary.org/en/font/rufscript + +Provided SVG fonts for use with SVG CAPTCHA: + +ostrich-sans-black.svg - Ostrich Sans Black, https://github.com/theleagueof/ostrich-sans +goudy_bookletter_1911-webfont.svg - Goudy Bookletter 1911, https://github.com/theleagueof/goudy-bookletter-1911 diff --git a/public_html/lib/plugins/captcha/fonts/goudy_bookletter_1911-webfont.svg b/public_html/lib/plugins/captcha/fonts/goudy_bookletter_1911-webfont.svg new file mode 100644 index 00000000..b60239eb --- /dev/null +++ b/public_html/lib/plugins/captcha/fonts/goudy_bookletter_1911-webfont.svg @@ -0,0 +1,145 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : This font has been released into the public domain by its author Barry Schwartz This applies worldwideIn some countries this may not be legally possible if soBarry Schwartz grants anyone the right to use this work for any purpose without any conditions unless such conditions are required by law + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public_html/lib/plugins/captcha/fonts/ostrich-sans-black.svg b/public_html/lib/plugins/captcha/fonts/ostrich-sans-black.svg new file mode 100644 index 00000000..5001bbc3 --- /dev/null +++ b/public_html/lib/plugins/captcha/fonts/ostrich-sans-black.svg @@ -0,0 +1,141 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c 2011 by Tyler Finck All rights reserved +Designer : Tyler Finck +Foundry : Tyler Finck +Foundry URL : httpwwwsurslycom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public_html/lib/plugins/captcha/helper.php b/public_html/lib/plugins/captcha/helper.php index eb75366c..0d4f8836 100644 --- a/public_html/lib/plugins/captcha/helper.php +++ b/public_html/lib/plugins/captcha/helper.php @@ -3,11 +3,14 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr */ + // 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'); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); +/** + * Class helper_plugin_captcha + */ class helper_plugin_captcha extends DokuWiki_Plugin { protected $field_in = 'plugin__captcha'; @@ -40,11 +43,14 @@ class helper_plugin_captcha extends DokuWiki_Plugin { global $ID; $rand = (float) (rand(0, 10000)) / 10000; + $this->storeCaptchaCookie($this->_fixedIdent(), $rand); + if($this->getConf('mode') == 'math') { $code = $this->_generateMATH($this->_fixedIdent(), $rand); $code = $code[0]; $text = $this->getLang('fillmath'); } elseif($this->getConf('mode') == 'question') { + $code = ''; // not used $text = $this->getConf('question'); } else { $code = $this->_generateCAPTCHA($this->_fixedIdent(), $rand); @@ -67,6 +73,20 @@ class helper_plugin_captcha extends DokuWiki_Plugin { case 'js': $out .= ''.$this->_obfuscateText($code).''; break; + case 'svg': + $out .= ''; + $out .= $this->_svgCAPTCHA($code); + $out .= ''; + break; + case 'svgaudio': + $out .= ''; + $out .= $this->_svgCAPTCHA($code); + $out .= ''; + $out .= ''; + $out .= ''.$this->getLang('soundlink').''; + break; case 'image': $out .= ' '; @@ -106,8 +126,14 @@ class helper_plugin_captcha extends DokuWiki_Plugin { * @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]); + global $INPUT; + + $field_sec = $INPUT->str($this->field_sec); + $field_in = $INPUT->str($this->field_in); + $field_hp = $INPUT->str($this->field_hp); + + // reconstruct captcha from provided $field_sec + $rand = $this->decrypt($field_sec); if($this->getConf('mode') == 'math') { $code = $this->_generateMATH($this->_fixedIdent(), $rand); @@ -118,10 +144,13 @@ class helper_plugin_captcha extends DokuWiki_Plugin { $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]) !== '' + // compare values + if(!$field_sec || + !$field_in || + $rand === false || + utf8_strtolower($field_in) != utf8_strtolower($code) || + trim($field_hp) !== '' || + !$this->retrieveCaptchaCookie($this->_fixedIdent(), $rand) ) { if($msg) msg($this->getLang('testfailed'), -1); return false; @@ -129,6 +158,72 @@ class helper_plugin_captcha extends DokuWiki_Plugin { return true; } + /** + * Get the path where a captcha cookie would be stored + * + * We use a daily temp directory which is easy to clean up + * + * @param $fixed string the fixed part, any string + * @param $rand float some random number between 0 and 1 + * @return string the path to the cookie file + */ + protected function getCaptchaCookiePath($fixed, $rand) { + global $conf; + $path = $conf['tmpdir'] . '/captcha/' . date('Y-m-d') . '/' . md5($fixed . $rand) . '.cookie'; + io_makeFileDir($path); + return $path; + } + + /** + * remove all outdated captcha cookies + */ + public function _cleanCaptchaCookies() { + global $conf; + $path = $conf['tmpdir'] . '/captcha/'; + $dirs = glob("$path/*", GLOB_ONLYDIR); + $today = date('Y-m-d'); + foreach($dirs as $dir) { + if(basename($dir) === $today) continue; + if(!preg_match('/\/captcha\//', $dir)) continue; // safety net + io_rmdir($dir, true); + } + } + + /** + * Creates a one time captcha cookie + * + * This is used to prevent replay attacks. It is generated when the captcha form + * is shown and checked with the captcha check. Since we can not be sure about the + * session state (might be closed or open) we're not using it. + * + * We're not using the stored values for displaying the captcha image (or audio) + * but continue to use our encryption scheme. This way it's still possible to have + * multiple captcha checks going on in parallel (eg. with multiple browser tabs) + * + * @param $fixed string the fixed part, any string + * @param $rand float some random number between 0 and 1 + */ + protected function storeCaptchaCookie($fixed, $rand) { + $cache = $this->getCaptchaCookiePath($fixed, $rand); + touch($cache); + } + + /** + * Checks if the captcha cookie exists and deletes it + * + * @param $fixed string the fixed part, any string + * @param $rand float some random number between 0 and 1 + * @return bool true if the cookie existed + */ + protected function retrieveCaptchaCookie($fixed, $rand) { + $cache = $this->getCaptchaCookiePath($fixed, $rand); + if(file_exists($cache)) { + unlink($cache); + return true; + } + return false; + } + /** * Build a semi-secret fixed string identifying the current page and user * @@ -144,9 +239,9 @@ class helper_plugin_captcha extends DokuWiki_Plugin { global $ID; $lm = @filemtime(wikiFN($ID)); $td = date('Y-m-d'); - return auth_browseruid(). - auth_cookiesalt(). - $ID.$lm.$td; + return auth_browseruid() . + auth_cookiesalt() . + $ID . $lm . $td; } /** @@ -197,6 +292,19 @@ class helper_plugin_captcha extends DokuWiki_Plugin { return $new; } + /** + * Generate some numbers from a known string and random number + * + * @param $fixed string the fixed part, any string + * @param $rand float some random number between 0 and 1 + * @return string + */ + protected function _generateNumbers($fixed, $rand) { + $fixed = hexdec(substr(md5($fixed), 5, 5)); // use part of the md5 to generate an int + $rand = $rand * 0xFFFFF; // bitmask from the random number + return md5($rand ^ $fixed); // combine both values + } + /** * Generates a random char string * @@ -205,12 +313,13 @@ class helper_plugin_captcha extends DokuWiki_Plugin { * @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 + $numbers = $this->_generateNumbers($fixed, $rand); // now create the letters $code = ''; - for($i = 0; $i < ($this->getConf('lettercount') * 2); $i += 2) { + $lettercount = $this->getConf('lettercount') * 2; + if($lettercount > strlen($numbers)) $lettercount = strlen($numbers); + for($i = 0; $i < $lettercount; $i += 2) { $code .= chr(floor(hexdec($numbers[$i].$numbers[$i + 1]) / 10) + 65); } @@ -225,8 +334,7 @@ class helper_plugin_captcha extends DokuWiki_Plugin { * @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 + $numbers = $this->_generateNumbers($fixed, $rand); // first letter is the operator (+/-) $op = (hexdec($numbers[0]) > 8) ? -1 : 1; @@ -284,6 +392,43 @@ class helper_plugin_captcha extends DokuWiki_Plugin { imagedestroy($img); } + /** + * Create an SVG of the given text + * + * @param string $text + * @return string + */ + public function _svgCAPTCHA($text) { + require_once(__DIR__ . '/EasySVG.php'); + + $fonts = glob(__DIR__ . '/fonts/*.svg'); + + $x = 0; // where we start to draw + $y = 100; // our max height + + $svg = new EasySVG(); + + // draw the letters + $txtlen = strlen($text); + for($i = 0; $i < $txtlen; $i++) { + $char = $text[$i]; + $size = rand($y / 2, $y - $y * 0.1); // 50-90% + $svg->setFontSVG($fonts[array_rand($fonts)]); + + $svg->setFontSize($size); + $svg->setLetterSpacing(round(rand(1, 4) / 10, 2)); // 0.1 - 0.4 + $svg->addText($char, $x, rand(0, round($y - $size))); // random up and down + + list($w) = $svg->textDimensions($char); + $x += $w; + } + + $svg->addAttribute('width', $x . 'px'); + $svg->addAttribute('height', $y . 'px'); + $svg->addAttribute('viewbox', "0 0 $x $y"); + return $svg->asXML(); + } + /** * Encrypt the given string with the cookie salt * @@ -308,6 +453,7 @@ class helper_plugin_captcha extends DokuWiki_Plugin { */ public function decrypt($data) { $data = base64_decode($data); + if($data === false || $data === '') return false; if(function_exists('auth_decrypt')) { return auth_decrypt($data, auth_cookiesalt()); // since binky diff --git a/public_html/lib/plugins/captcha/lang/ar/settings.php b/public_html/lib/plugins/captcha/lang/ar/settings.php index 550e5da0..d5fbea1a 100644 --- a/public_html/lib/plugins/captcha/lang/ar/settings.php +++ b/public_html/lib/plugins/captcha/lang/ar/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author alhajr + * @author habiiibo */ $lang['mode'] = 'أي نوع من كلمة التحقق استخدامها؟'; $lang['mode_o_js'] = 'نص (مملوءة مسبقا مع جافا سكريبت)'; @@ -12,8 +13,9 @@ $lang['mode_o_math'] = 'مشكلة الرياضيات'; $lang['mode_o_question'] = 'مسألة ثابتة'; $lang['mode_o_image'] = 'الصورة (أسوأ إمكانية الوصول)'; $lang['mode_o_audio'] = 'الصورة + الصوت (أفضل إمكانية الوصول)'; -$lang['regprotect'] = 'حماية نموذج التسجيل كذلك؟'; +$lang['mode_o_figlet'] = 'برنامج صنع الكلمات (تعذر الوصول)'; $lang['forusers'] = 'استخدام كلمة التحقق في تسجيل المستخدمين، أيضا؟'; +$lang['loginprotect'] = 'لا بد من ادخال كود التحقق او كابتشا لمتابعة تسجيل الدخول؟'; $lang['lettercount'] = 'عدد من الرسائل لاستخدام (3-16). إذا قمت بزيادة كمية، ومن المؤكد أن زيادة العرض في الصورة أدناه كذلك.'; $lang['width'] = 'عرض الصورة كلمة التحقق (بالبكسل)'; $lang['height'] = 'ارتفاع الصورة كلمة التحقق (بالبكسل)'; diff --git a/public_html/lib/plugins/captcha/lang/cs/lang.php b/public_html/lib/plugins/captcha/lang/cs/lang.php index 3f6d7489..07b782f3 100644 --- a/public_html/lib/plugins/captcha/lang/cs/lang.php +++ b/public_html/lib/plugins/captcha/lang/cs/lang.php @@ -1,12 +1,13 @@ + * @author Jaroslav Lichtblau */ - -$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ý."; -$lang['fillmath'] = "Prosíme, vyřešte nasledující rovnici, abyste dokázali, že nejste robot."; - +$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['fillmath'] = 'Prosíme, vyřešte nasledující rovnici, 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ý.'; +$lang['honeypot'] = 'Ponechte prosím toto pole prázdné:'; diff --git a/public_html/lib/plugins/captcha/lang/cs/settings.php b/public_html/lib/plugins/captcha/lang/cs/settings.php index 732fecb0..d82633f0 100644 --- a/public_html/lib/plugins/captcha/lang/cs/settings.php +++ b/public_html/lib/plugins/captcha/lang/cs/settings.php @@ -1,18 +1,26 @@ + * @author Jaroslav Lichtblau + * @author Quark66 */ - -$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)"; - +$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_math'] = 'Matematický problém'; +$lang['mode_o_question'] = 'Vlastní otázka'; +$lang['mode_o_image'] = 'Obrázek (špatná přístupnost)'; +$lang['mode_o_audio'] = 'Obrázek (lepší přístupnost)'; +$lang['mode_o_svg'] = 'SVG (špatná dostupnost, čitelné)'; +$lang['mode_o_svgaudio'] = 'SVG+Audio (lepší dostupnost, čitelné)'; +$lang['mode_o_figlet'] = 'ASCII art figlet (špatná přístupnost) '; +$lang['forusers'] = 'Používat CAPTCHA i pro registrované uživatele?'; +$lang['loginprotect'] = 'Vyžadovat pro přihlášení CAPTCHA?'; +$lang['lettercount'] = 'Počet použitých písmen (3-16). Pokud navýšíte množství, ujistěte se, že jste navýšili i šířku obrázku níže.'; +$lang['width'] = 'Šírka CAPTCHA obrázku (v bodech)'; +$lang['height'] = 'Výška CAPTCHA obrázku (v bodech)'; +$lang['question'] = 'Otázka pro režim vlastní otázky'; +$lang['answer'] = 'Odpověď pro režim vlastní otázky'; diff --git a/public_html/lib/plugins/captcha/lang/cy/lang.php b/public_html/lib/plugins/captcha/lang/cy/lang.php new file mode 100644 index 00000000..42e3d517 --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/cy/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Sori, ond wnaethoch chi ddim ateb y CAPTCHA\'n gywir. Efallai \'dych chi ddim yn ddynol wedi\'r cyfan?'; +$lang['fillcaptcha'] = 'Llenwch pob llythyren i\'r blwch i brofi\'ch bod chi\'n ddynol.'; +$lang['fillmath'] = 'Datryswch yr hafaliad canlynol i brofi\'ch bod chi\'n ddynol.'; +$lang['soundlink'] = 'Os \'dych chi ddim yn gallu darllen llythrennau\'r ddelwedd, lawrlwythwch y ffeil .wav hwn er mwyn cael nhw wedi\'u darllen i chi.'; +$lang['honeypot'] = 'Cadwch y maes hwn yn wag:'; diff --git a/public_html/lib/plugins/captcha/lang/cy/settings.php b/public_html/lib/plugins/captcha/lang/cy/settings.php new file mode 100644 index 00000000..2e0a0b78 --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/cy/settings.php @@ -0,0 +1,22 @@ + + */ +$lang['mode'] = 'Pa fath CAPTCHA i\'w ddefnyddio?'; +$lang['mode_o_js'] = 'Testun (wedi\'i rhaglenwi gan JavaScript)'; +$lang['mode_o_text'] = 'Testun (gan law yn unig)'; +$lang['mode_o_math'] = 'Problem fathemategol'; +$lang['mode_o_question'] = 'Cwestiwn gosodedig'; +$lang['mode_o_image'] = 'Delwedd (hygyrchedd gwael)'; +$lang['mode_o_audio'] = 'Delwedd+Sain (gwell hygyrchedd)'; +$lang['mode_o_figlet'] = 'Celf Figlet ASCII (hygyrchedd gwael)'; +$lang['forusers'] = 'Defnyddio CAPTCHA ar gyfer defnyddwyr sydd wedi mewngofnodi hefyd?'; +$lang['loginprotect'] = 'Angen CAPTCHA i fewngofnodi?'; +$lang['lettercount'] = 'Bufer y llythrennau i\'w defnyddio (3-16). Os ydych chi\'n cynnyddu\'r nifer, sicrhewch eich bod chi\'n cynyddu lled y ddelwedd isod hefyd.'; +$lang['width'] = 'Lled y ddelwedd CAPTCHA (picsel)'; +$lang['height'] = 'Uchder y ddelwedd CAPTCHA (picsel)'; +$lang['question'] = 'Cwestiwn ar gyfer modd cwestiwn gosodedig'; +$lang['answer'] = 'Ateb ar gyfer modd cwestiwn gosodedig'; diff --git a/public_html/lib/plugins/captcha/lang/da/lang.php b/public_html/lib/plugins/captcha/lang/da/lang.php index 1820eb85..bed7a730 100644 --- a/public_html/lib/plugins/captcha/lang/da/lang.php +++ b/public_html/lib/plugins/captcha/lang/da/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author soer9648 */ $lang['testfailed'] = 'Desværre, CAPTCHA blev ikke besvaret korrekt. Du er muligvis ikke et menneske?'; diff --git a/public_html/lib/plugins/captcha/lang/da/settings.php b/public_html/lib/plugins/captcha/lang/da/settings.php index bc5357b4..36f62768 100644 --- a/public_html/lib/plugins/captcha/lang/da/settings.php +++ b/public_html/lib/plugins/captcha/lang/da/settings.php @@ -2,8 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author soer9648 + * @author Jacob Palm */ $lang['mode'] = 'Hvilken type CAPTCHA skal benyttes?'; $lang['mode_o_js'] = 'Tekst (præudfyldt af JavaScript)'; @@ -13,8 +14,8 @@ $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['loginprotect'] = 'Kræv CAPTCHA ved login?'; $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)'; diff --git a/public_html/lib/plugins/captcha/lang/de-informal/lang.php b/public_html/lib/plugins/captcha/lang/de-informal/lang.php index 867031ed..c09e261d 100644 --- a/public_html/lib/plugins/captcha/lang/de-informal/lang.php +++ b/public_html/lib/plugins/captcha/lang/de-informal/lang.php @@ -2,11 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Thomas Templin + * @author Daniel Eiter */ -$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['testfailed'] = 'Das CAPTCHA wurde nicht korrekt beantwortet. Vielleicht bist du gar kein Mensch?'; +$lang['fillcaptcha'] = 'Bitte gib alle Buchstaben in das Eingabefeld ein um zu zeigen dass du ein Mensch bist. '; +$lang['fillmath'] = 'Bitte löse folgende Gleichung um zu zeigen dass du ein Mensch bist. '; $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'; +$lang['honeypot'] = 'Dieses Feld bitte leer lassen:'; diff --git a/public_html/lib/plugins/captcha/lang/de-informal/settings.php b/public_html/lib/plugins/captcha/lang/de-informal/settings.php index 2c2ee6f6..fa8afe05 100644 --- a/public_html/lib/plugins/captcha/lang/de-informal/settings.php +++ b/public_html/lib/plugins/captcha/lang/de-informal/settings.php @@ -2,19 +2,24 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Thomas Templin + * @author Dana + * @author Daniel Eiter + * @author F. Mueller-Donath */ $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_js'] = 'Text (vorausgefüllt mit JavaScript)'; +$lang['mode_o_text'] = 'Text (nur manuell)'; $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_svg'] = 'SVG (nicht barrierefrei, lesbar)'; +$lang['mode_o_svgaudio'] = 'SVG + Audio (barrierefrei, lesbar)'; $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['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)'; diff --git a/public_html/lib/plugins/captcha/lang/de/lang.php b/public_html/lib/plugins/captcha/lang/de/lang.php index ac6fa4af..c6e6c5b5 100644 --- a/public_html/lib/plugins/captcha/lang/de/lang.php +++ b/public_html/lib/plugins/captcha/lang/de/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Andreas Gohr */ $lang['testfailed'] = 'Das CAPTCHA wurde nicht korrekt beantwortet.'; diff --git a/public_html/lib/plugins/captcha/lang/de/settings.php b/public_html/lib/plugins/captcha/lang/de/settings.php index 47e6a3fc..1cd79d4b 100644 --- a/public_html/lib/plugins/captcha/lang/de/settings.php +++ b/public_html/lib/plugins/captcha/lang/de/settings.php @@ -2,9 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Andreas Gohr * @author Thomas Templin + * @author Leo Rudin + * @author F. Mueller-Donath */ $lang['mode'] = 'Welcher CAPTCHA-Typ soll benutzt werden?'; $lang['mode_o_js'] = 'Text (automatisch ausgefüllt via JavaScript)'; @@ -13,11 +15,13 @@ $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_svg'] = 'SVG (nicht barrierefrei, lesbar)'; +$lang['mode_o_svgaudio'] = 'SVG + Audio (barrierefrei, lesbar)'; $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['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'] = 'Width of the CAPTCHA image (pixel)'; -$lang['height'] = 'Height of the CAPTCHA image (pixel)'; +$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 --git a/public_html/lib/plugins/captcha/lang/en/settings.php b/public_html/lib/plugins/captcha/lang/en/settings.php index eee2f82c..c3c33aa5 100644 --- a/public_html/lib/plugins/captcha/lang/en/settings.php +++ b/public_html/lib/plugins/captcha/lang/en/settings.php @@ -12,10 +12,12 @@ $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_svg'] = "SVG (bad accessibility, readable)"; +$lang['mode_o_svgaudio'] = "SVG+Audio (better accessibility, readable)"; $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['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)"; diff --git a/public_html/lib/plugins/captcha/lang/eo/lang.php b/public_html/lib/plugins/captcha/lang/eo/lang.php index 01ed128f..ff9058ea 100644 --- a/public_html/lib/plugins/captcha/lang/eo/lang.php +++ b/public_html/lib/plugins/captcha/lang/eo/lang.php @@ -3,11 +3,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Tradukis Ljosxa Kuznecov + * @author Ljosxa Kuznecov * @author Robert Bogenschneider + * @author Moisés Braga Ribeiro */ -$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['testfailed'] = 'Pardonon, sed la testo CAPTCHA ne estis respondita ĝuste. Eble vi tute ne estas homo, ĉu?'; +$lang['fillcaptcha'] = 'Bonvolu tajpi ĉiujn literojn en la kampon por pruvi ke vi estas homo.'; +$lang['fillmath'] = 'Bonvolu solvi la sekvan ekvacion por pruvi ke vi estas homo.'; +$lang['soundlink'] = 'Se vi ne povas legi la literojn en la bildo, elŝutu tiun dosieron .wav por aŭskulti ilin.'; $lang['honeypot'] = 'Bonvolu lasi tiun kampon malplena:'; diff --git a/public_html/lib/plugins/captcha/lang/eo/settings.php b/public_html/lib/plugins/captcha/lang/eo/settings.php index 129c1392..0a2fcb2d 100644 --- a/public_html/lib/plugins/captcha/lang/eo/settings.php +++ b/public_html/lib/plugins/captcha/lang/eo/settings.php @@ -2,22 +2,25 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Tradukis Ljosxa Kuznecov + * + * @author Ljosxa Kuznecov * @author Robert Bogenschneider + * @author Moisés Braga Ribeiro */ -$lang['mode'] = 'Kiun varianton de CAPTCHA uzi?'; -$lang['mode_o_js'] = 'Teksto (prilaborita per Java-skripto)'; +$lang['mode'] = 'Kian teston CAPTCHA uzi?'; +$lang['mode_o_js'] = 'Teksto (antaŭplenumita per Ĝavoskripto)'; $lang['mode_o_text'] = 'Teksto (nur permane)'; $lang['mode_o_math'] = 'Matematika problemo'; -$lang['mode_o_question'] = 'Fiksa demando'; +$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'; +$lang['mode_o_svg'] = 'SVG (malbona alirebleco, legebla)'; +$lang['mode_o_svgaudio'] = 'SVG+Sono (pli bona alirebleco, legebla)'; +$lang['mode_o_figlet'] = 'Bildo el Askia Arto (malbona alirebleco)'; +$lang['forusers'] = 'Ĉu uzi teston CAPTCHA ankaŭ por ensalutintaj uzantoj?'; +$lang['loginprotect'] = 'Ĉu postuli teston CAPTCHA por ensaluti?'; +$lang['lettercount'] = 'Kvanto da uzendaj literoj (3-16). Se vi pligrandigas la kvanton, certigu ke vi ankaŭ pligrandigas la larĝecon de la suba bildo.'; +$lang['width'] = 'Larĝeco de la CAPTCHA-bildo (rastrumeroj)'; +$lang['height'] = 'Alteco de la CAPTCHA-bildo (rastrumeroj)'; +$lang['question'] = 'Demando por la reĝimo de fiksa demando'; +$lang['answer'] = 'Respondo por la reĝimo de fiksa demando'; diff --git a/public_html/lib/plugins/captcha/lang/es/settings.php b/public_html/lib/plugins/captcha/lang/es/settings.php index ec11cd24..8e02dd3e 100644 --- a/public_html/lib/plugins/captcha/lang/es/settings.php +++ b/public_html/lib/plugins/captcha/lang/es/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Antonio Castilla */ $lang['mode'] = '¿Qué tipo de CAPTCHA usará?'; @@ -12,7 +12,6 @@ $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)'; diff --git a/public_html/lib/plugins/captcha/lang/fa/lang.php b/public_html/lib/plugins/captcha/lang/fa/lang.php new file mode 100644 index 00000000..53f1fecc --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/fa/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'متاسفم، شما به درستی مقدار کپچا را جواب نداده اید. لطفا با دقت بیشتری آن را پر نمایید.'; +$lang['fillcaptcha'] = 'لطفا تمام حروف تصویر کپچا را وارد نمایید. می خواهیم مطمئن شویم شما ربات نیستید.'; +$lang['fillmath'] = 'لطفا معادله را حل کرده و پاسخ را وارد نمایید. می خواهیم مطمئن شویم شما ربات نیستید.'; +$lang['soundlink'] = 'اگر تصویر نامفهوم است. این فایل صوتی را دانلود کرده تا آن را برای شما بخواند.'; +$lang['honeypot'] = 'لطفا این بخش را خالی بگذارید: '; diff --git a/public_html/lib/plugins/captcha/lang/fa/settings.php b/public_html/lib/plugins/captcha/lang/fa/settings.php new file mode 100644 index 00000000..bfc5c8e5 --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/fa/settings.php @@ -0,0 +1,23 @@ + + * @author Sam01 + */ +$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['mode_o_figlet'] = 'Figlet ASCII Art (دسترسی بد)'; +$lang['forusers'] = ' آیا برای کاربران وارد شده به سایت نیز از کپچا استفاده شود؟'; +$lang['loginprotect'] = 'برای ورود به سایت کپچا نیاز باشد؟'; +$lang['lettercount'] = 'تعداد حروف مورد استفاده (3 تا 16 حرف). اگر شما مقدار را اضافه می کنید، مطمئن شوید که عرض تصویر را متناظرا افزایش دهید.'; +$lang['width'] = 'عرض تصویر کپچا (پیکسل)'; +$lang['height'] = 'ارتفاع تصویر کپچا (پیکسل)'; +$lang['question'] = 'سوال برای حالت «سوال ثابت« '; +$lang['answer'] = 'پاسخ سوال برای حالت «سوال ثابت»'; diff --git a/public_html/lib/plugins/captcha/lang/fr/lang.php b/public_html/lib/plugins/captcha/lang/fr/lang.php index a1b3e533..fa57aed1 100644 --- a/public_html/lib/plugins/captcha/lang/fr/lang.php +++ b/public_html/lib/plugins/captcha/lang/fr/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Emmanuel Dupin * @author bruno * @author Fabrice Dejaigher diff --git a/public_html/lib/plugins/captcha/lang/fr/settings.php b/public_html/lib/plugins/captcha/lang/fr/settings.php index d4626108..50236dcc 100644 --- a/public_html/lib/plugins/captcha/lang/fr/settings.php +++ b/public_html/lib/plugins/captcha/lang/fr/settings.php @@ -2,10 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Emmanuel Dupin * @author bruno * @author Fabrice Dejaigher + * @author Pietroni + * @author Schplurtz le Déboulonné */ $lang['mode'] = 'Quel type de CAPTCHA utiliser ?'; $lang['mode_o_js'] = 'Texte (prérempli avec JavaScript)'; @@ -14,9 +16,11 @@ $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_svg'] = 'SVG (lisible, mauvaise accessibilité)'; +$lang['mode_o_svgaudio'] = 'SVG + Audio (lisible, 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['loginprotect'] = 'Exiger un CAPTCHA pour se connecter?'; $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)'; diff --git a/public_html/lib/plugins/captcha/lang/hu/lang.php b/public_html/lib/plugins/captcha/lang/hu/lang.php index 64df1163..49bd062e 100644 --- a/public_html/lib/plugins/captcha/lang/hu/lang.php +++ b/public_html/lib/plugins/captcha/lang/hu/lang.php @@ -7,6 +7,6 @@ */ $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['fillmath'] = 'Kérlek 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/public_html/lib/plugins/captcha/lang/hu/settings.php b/public_html/lib/plugins/captcha/lang/hu/settings.php index d0e99fc3..348363c4 100644 --- a/public_html/lib/plugins/captcha/lang/hu/settings.php +++ b/public_html/lib/plugins/captcha/lang/hu/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Serenity87HUN * @author Marina Vladi */ @@ -14,7 +14,6 @@ $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)'; diff --git a/public_html/lib/plugins/captcha/lang/is/lang.php b/public_html/lib/plugins/captcha/lang/is/lang.php new file mode 100644 index 00000000..652978c7 --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/is/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Því miður, en staðfestingarkóðanum var ekki rétt svarað. Kannski ertu ekki mennsk(ur) þrátt fyrir allt?'; +$lang['fillcaptcha'] = 'Vinsamlegast ritaðu alla stafina inn í reitinn til að sanna að þú sért manneskja.'; +$lang['fillmath'] = 'Vinsamlegast leystu eftirfarandi jöfnu til að sanna að þú sért manneskja.'; +$lang['soundlink'] = 'Ef þú getur ekki lesið stafina á myndinni, sæktu þá þessa .wav skrá til að fá stafina lesna fyrir þig.'; +$lang['honeypot'] = 'Vinsamlegast skildu þennan reit eftir auðan:'; diff --git a/public_html/lib/plugins/captcha/lang/is/settings.php b/public_html/lib/plugins/captcha/lang/is/settings.php new file mode 100644 index 00000000..2867f30f --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/is/settings.php @@ -0,0 +1,22 @@ + + */ +$lang['mode'] = 'Hverslags stafestingarkóða á að nota?'; +$lang['mode_o_js'] = 'Texta (fylltan fyrirfram með JavaScript)'; +$lang['mode_o_text'] = 'Texta (aðeins handvirkt)'; +$lang['mode_o_math'] = 'Stærðfræðiþraut'; +$lang['mode_o_question'] = 'Fyrirfram ákveðin spurning'; +$lang['mode_o_image'] = 'Mynd (slæmt aðgengi fatlaðra)'; +$lang['mode_o_audio'] = 'Mynd og hljóð (betra aðgengi fatlaðra)'; +$lang['mode_o_figlet'] = 'Figlet ASCII mynd (slæmt aðgengi fatlaðra)'; +$lang['forusers'] = 'Á að nota staðfestingarkóða fyrir innskráða notendur líka?'; +$lang['loginprotect'] = 'Þarf að nota staðfestingarkóða til að skrá inn?'; +$lang['lettercount'] = 'Fjöldi stafa sem á að nota (3-16). Ef þú eykur fjöldann, vertu þá viss um að auka breidd myndarinnar að neðan einnig.'; +$lang['width'] = 'Breidd staðfestingarmyndarinnar í punktum'; +$lang['height'] = 'Hæð staðfestingarmyndarinnar í punktum'; +$lang['question'] = 'Spurning fyrir fyrir ákveðnu staðfestingarspurninguna'; +$lang['answer'] = 'Svar fyrir fyrirfram ákveðnu staðfestingarspurninguna'; diff --git a/public_html/lib/plugins/captcha/lang/it/lang.php b/public_html/lib/plugins/captcha/lang/it/lang.php index 2ef15e68..444023c6 100644 --- a/public_html/lib/plugins/captcha/lang/it/lang.php +++ b/public_html/lib/plugins/captcha/lang/it/lang.php @@ -1,11 +1,13 @@ */ - -$lang['testfailed'] = "Spiacente, ma non hai risposto correttamente a CAPTCHA. Potresti non essere del tutto umano."; -$lang['fillcaptcha'] = "Per favore inserisci le lettere nel box accanto per provare che sei una persona reale."; -$lang['soundlink'] = "Se non riesci a leggere le lettere nell'immagine, scarica questo file .wav ed eseguilo, leggera' le lettere per te."; - +$lang['testfailed'] = 'Spiacente, ma non hai risposto correttamente a CAPTCHA. Potresti non essere del tutto umano.'; +$lang['fillcaptcha'] = 'Per favore inserisci le lettere nel box accanto per provare che sei una persona reale.'; +$lang['fillmath'] = 'Per favore risolvi la seguente equazione per dimostrare che sei un essere umano.'; +$lang['soundlink'] = 'Se non riesci a leggere le lettere nell\'immagine, scarica questo file .wav ed eseguilo, leggerà le lettere per te.'; +$lang['honeypot'] = 'Per favore lascia questo campo vuoto:'; diff --git a/public_html/lib/plugins/captcha/lang/it/settings.php b/public_html/lib/plugins/captcha/lang/it/settings.php index 6e121b2e..b45b9573 100644 --- a/public_html/lib/plugins/captcha/lang/it/settings.php +++ b/public_html/lib/plugins/captcha/lang/it/settings.php @@ -1,18 +1,23 @@ */ - -$lang['mode'] = "Che tipo di CAPTCHA vuoi usare?"; -$lang['mode_o_js'] = "Testo (precompilato con JavaScript)"; -$lang['mode_o_text'] = "Testo (Solo Manuale)"; -$lang['mode_o_image'] = "Immagine (Non molto Accessibile)"; -$lang['mode_o_audio'] = "Immagine + Audio (Migliore Accessibilit)"; - -$lang['regprotect'] = "Vuoi proteggere anche il modulo di iscrizione?"; -$lang['forusers'] = "Vuoi usare CAPTCHA anche per gli utenti loggati?"; -$lang['width'] = "Larghezza dell'immagine di CAPTCHA (pixel)"; -$lang['height'] = "Altezza dell'immagine di CAPTCHA (pixel)"; - +$lang['mode'] = 'Che tipo di CAPTCHA vuoi usare?'; +$lang['mode_o_js'] = 'Testo (precompilato con JavaScript)'; +$lang['mode_o_text'] = 'Testo (Solo Manuale)'; +$lang['mode_o_math'] = 'Problema di matematica'; +$lang['mode_o_question'] = 'Domanda Immutabile'; +$lang['mode_o_image'] = 'Immagine (Non molto Accessibile)'; +$lang['mode_o_audio'] = 'Immagine + Audio (Migliore Accessibilità)'; +$lang['mode_o_figlet'] = 'Immagine ASCII FIGlet (Non molto Accessibile)'; +$lang['forusers'] = 'Vuoi usare CAPTCHA anche per gli utenti loggati?'; +$lang['loginprotect'] = 'Richiedere un CAPTCHA per l\'accesso?'; +$lang['lettercount'] = 'Numero di lettere da usare (3-16). Se aumenti il numero, accertati di aumentare anche la larghezza dell\'immagine qui sotto.'; +$lang['width'] = 'Larghezza dell\'immagine di CAPTCHA (pixel)'; +$lang['height'] = 'Altezza dell\'immagine di CAPTCHA (pixel)'; +$lang['question'] = 'Domanda per la modalità Domanda Immutabile'; +$lang['answer'] = 'Risposta per la modalità Domanda Immutabile'; diff --git a/public_html/lib/plugins/captcha/lang/ja/lang.php b/public_html/lib/plugins/captcha/lang/ja/lang.php index 7e7fd259..a68aaf73 100644 --- a/public_html/lib/plugins/captcha/lang/ja/lang.php +++ b/public_html/lib/plugins/captcha/lang/ja/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author OHTSU Yoshifumi * @author Hideaki SAWADA */ diff --git a/public_html/lib/plugins/captcha/lang/ja/settings.php b/public_html/lib/plugins/captcha/lang/ja/settings.php index bed55329..c55c83a0 100644 --- a/public_html/lib/plugins/captcha/lang/ja/settings.php +++ b/public_html/lib/plugins/captcha/lang/ja/settings.php @@ -2,9 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author OHTSU Yoshifumi * @author Hideaki SAWADA + * @author Ikuo Obataya */ $lang['mode'] = '認証の方式'; $lang['mode_o_js'] = '文字 (JavaScriptによる自動入力)'; @@ -13,9 +14,11 @@ $lang['mode_o_math'] = '計算式'; $lang['mode_o_question'] = '固定質問'; $lang['mode_o_image'] = '画像 (低アクセシビリティ)'; $lang['mode_o_audio'] = '画像+音声 (中アクセシビリティ)'; +$lang['mode_o_svg'] = 'SVG (低アクセシビリティ・読みやすい)'; +$lang['mode_o_svgaudio'] = 'SVG+音声 (中アクセシビリティ・読みやすい)'; $lang['mode_o_figlet'] = 'Figlet [アルファベットAA] (低アクセシビリティ)'; -$lang['regprotect'] = 'ユーザー登録時にCAPTCHA認証を行う'; $lang['forusers'] = 'ログインユーザーに対してもCAPTCHA認証を行う'; +$lang['loginprotect'] = 'ログインにCAPTCHAを要求しますか?'; $lang['lettercount'] = '使用する文字数(3~16)。文字数を増やす場合は下の画像の幅も同様に増やして下さい。'; $lang['width'] = 'CAPTCHA画像の幅 (ピクセル)'; $lang['height'] = 'CAPTCHA画像の高さ(ピクセル)'; diff --git a/public_html/lib/plugins/captcha/lang/ko/lang.php b/public_html/lib/plugins/captcha/lang/ko/lang.php index 165499d6..fb254a0f 100644 --- a/public_html/lib/plugins/captcha/lang/ko/lang.php +++ b/public_html/lib/plugins/captcha/lang/ko/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Andreas Gohr * @author Myeongjin * @author chobkwon diff --git a/public_html/lib/plugins/captcha/lang/ko/settings.php b/public_html/lib/plugins/captcha/lang/ko/settings.php index 697a2451..49865a8e 100644 --- a/public_html/lib/plugins/captcha/lang/ko/settings.php +++ b/public_html/lib/plugins/captcha/lang/ko/settings.php @@ -2,21 +2,21 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Andreas Gohr * @author Myeongjin * @author chobkwon */ $lang['mode'] = '어떤 CAPTCHA(캡차) 종류를 사용하겠습니까?'; $lang['mode_o_js'] = '글자 (자바스크립트로 미리 채워짐)'; -$lang['mode_o_text'] = '글자 (설명서만)'; +$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['loginprotect'] = '로그인하려면 CAPTCHA(캡차)가 필요합니까?'; $lang['lettercount'] = '사용할 글자 수. (3-16) 양을 증가하면, 아래 그림의 너비도 증가해야 합니다.'; $lang['width'] = 'CAPTCHA(캡차) 그림의 너비 (픽셀)'; $lang['height'] = 'CAPTCHA(캡차) 그림의 높이 (픽셀)'; diff --git a/public_html/lib/plugins/captcha/lang/nl/lang.php b/public_html/lib/plugins/captcha/lang/nl/lang.php index bf07a56b..afc165f3 100644 --- a/public_html/lib/plugins/captcha/lang/nl/lang.php +++ b/public_html/lib/plugins/captcha/lang/nl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Ruben Schouten * @author Mark C. Prins * @author Mark Prins diff --git a/public_html/lib/plugins/captcha/lang/nl/settings.php b/public_html/lib/plugins/captcha/lang/nl/settings.php index 9c34ba6c..9b5dd8d2 100644 --- a/public_html/lib/plugins/captcha/lang/nl/settings.php +++ b/public_html/lib/plugins/captcha/lang/nl/settings.php @@ -2,10 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Ruben Schouten * @author Mark C. Prins * @author Mark Prins + * @author Johan Wijnker */ $lang['mode'] = 'Welk type CAPTCHA wil je gebruiken?'; $lang['mode_o_js'] = 'Tekst (automatisch ingevuld via JavaScript)'; @@ -14,9 +15,11 @@ $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_svg'] = 'SVG (slecht toegankelijk, leesbaar)'; +$lang['mode_o_svgaudio'] = 'SVG+Audio (beter toegankelijk, leesbaar)'; $lang['mode_o_figlet'] = 'Figlet ASCII Art (slechte toegankelijkheid)'; -$lang['regprotect'] = 'Het aanmeldformulier ook beschermen?'; $lang['forusers'] = 'Ook CAPTCHA voor ingelogde gebruikers gebruiken?'; +$lang['loginprotect'] = 'Vereis een CAPTCHA om in te loggen?'; $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)'; diff --git a/public_html/lib/plugins/captcha/lang/nn/settings.php b/public_html/lib/plugins/captcha/lang/nn/settings.php index ad500e6a..5bf2d601 100644 --- a/public_html/lib/plugins/captcha/lang/nn/settings.php +++ b/public_html/lib/plugins/captcha/lang/nn/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Pål Julius Skogholt */ $lang['mode'] = 'Kva type CAPTCA skal du bruke?'; @@ -13,7 +13,6 @@ $lang['mode_o_question'] = 'Fast spørsmål'; $lang['mode_o_image'] = 'Bilde (vanskeleg tilgjenge)'; $lang['mode_o_audio'] = 'Bilde og lys (betre tilgjenge)'; $lang['mode_o_figlet'] = 'Figlet ASCII-kunst (vanskeleg tilgjenge)'; -$lang['regprotect'] = 'Beskytt registreringsskjemaet og?'; $lang['forusers'] = 'Bruk CAPTCHA for innlogga brukarar'; $lang['lettercount'] = 'Kor mange bokstavar skal brukast (3-16). Dersom du aukar mengda, må du og utvide storleiken på feltet.'; $lang['width'] = 'Breidda på CAPTCHA-bildet (pikslar)'; diff --git a/public_html/lib/plugins/captcha/lang/no/lang.php b/public_html/lib/plugins/captcha/lang/no/lang.php index 6269d343..0ef17901 100644 --- a/public_html/lib/plugins/captcha/lang/no/lang.php +++ b/public_html/lib/plugins/captcha/lang/no/lang.php @@ -2,11 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Pål Julius Skogholt + * @author Arne Hanssen */ $lang['testfailed'] = 'Dessverre, du svarte ikke rett på CAPTCHAen. Kanskje du ikke er et menneske likevel?'; $lang['fillcaptcha'] = 'Vennligst fyll inn alle bokstavene i feltet for å bevise at du er et menneske.'; $lang['fillmath'] = 'Vennligst løys denne ligninga for å bevise at du er et menneske.'; -$lang['soundlink'] = 'Derosm du ikke kan lese bokstavene på bildet, last ned denne .wav-fila for å få de opplest.'; +$lang['soundlink'] = 'Dersom du ikke kan lese bokstavene på bildet, last ned denne .wav-fila for å få de opplest.'; $lang['honeypot'] = 'Vennligst hold dette feltet tomt.'; diff --git a/public_html/lib/plugins/captcha/lang/no/settings.php b/public_html/lib/plugins/captcha/lang/no/settings.php index aafc9615..677e6ce4 100644 --- a/public_html/lib/plugins/captcha/lang/no/settings.php +++ b/public_html/lib/plugins/captcha/lang/no/settings.php @@ -2,8 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Pål Julius Skogholt + * @author Daniel Raknes */ $lang['mode'] = 'Hvilken type CAPTCHA vil du bruke?'; $lang['mode_o_js'] = 'Tekst (forfylt med JavaScript)'; @@ -13,8 +14,8 @@ $lang['mode_o_question'] = 'Fast spørsmål'; $lang['mode_o_image'] = 'Bilde (vanskelig tilgjengelig)'; $lang['mode_o_audio'] = 'Bilde og lyd (bedre tilgjengelighet)'; $lang['mode_o_figlet'] = 'Figlet ASCII-kunst (vanskelig tilgjengelig)'; -$lang['regprotect'] = 'Beskytt registreringsskjemaet også?'; $lang['forusers'] = 'Bruke CAPTCHA for innlogga brukere?'; +$lang['loginprotect'] = 'Kreve CAPTCHA ved innlogging?'; $lang['lettercount'] = 'Antall bokstaver (3-16). Om du øker antallet må du også øke bredden av bildet under.'; $lang['width'] = 'Bredde på CAPTCHA-bildet (i piksler)'; $lang['height'] = 'Høyde på CAPTCHA-bildet (i piksler)'; diff --git a/public_html/lib/plugins/captcha/lang/pl/settings.php b/public_html/lib/plugins/captcha/lang/pl/settings.php index a362e715..33605edb 100644 --- a/public_html/lib/plugins/captcha/lang/pl/settings.php +++ b/public_html/lib/plugins/captcha/lang/pl/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Paweł Jan Czochański * @author Mati */ @@ -13,7 +13,6 @@ $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)'; diff --git a/public_html/lib/plugins/captcha/lang/pt-br/lang.php b/public_html/lib/plugins/captcha/lang/pt-br/lang.php index 7a37dd11..17964063 100644 --- a/public_html/lib/plugins/captcha/lang/pt-br/lang.php +++ b/public_html/lib/plugins/captcha/lang/pt-br/lang.php @@ -5,8 +5,8 @@ * * @author Juliano Marconi Lanigra */ -$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['testfailed'] = 'Desculpe, mas o CAPTCHA não foi respondido corretamente. Talvez você não seja humano?'; +$lang['fillcaptcha'] = 'Por favor digite 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['soundlink'] = 'Se você não pode ler as letras na imagem, faça o download desse arquivo .wav para que elas sejam lidas para você.'; $lang['honeypot'] = 'Por favor deixe esse campo em branco:'; diff --git a/public_html/lib/plugins/captcha/lang/pt-br/settings.php b/public_html/lib/plugins/captcha/lang/pt-br/settings.php index cd275bcb..207b24e4 100644 --- a/public_html/lib/plugins/captcha/lang/pt-br/settings.php +++ b/public_html/lib/plugins/captcha/lang/pt-br/settings.php @@ -4,18 +4,22 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Juliano Marconi Lanigra + * @author Oze Projetos + * @author Moisés Braga Ribeiro */ $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_question'] = 'Pergunta Fixa'; $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['mode_o_audio'] = 'Imagem+Áudio (melhor acessibilidade)'; +$lang['mode_o_svg'] = 'SVG (acessibilidade ruim, legível)'; +$lang['mode_o_svgaudio'] = 'SVG+Áudio (melhor acessibilidade, legível)'; +$lang['mode_o_figlet'] = 'Figura de Arte ASCII (acessibilidade ruim)'; +$lang['forusers'] = 'Usar CAPTCHA também para usuários logados?'; +$lang['loginprotect'] = 'Exigir um CAPTCHA para entrar?'; +$lang['lettercount'] = 'Número de letras para usar (3-16). Se você aumentar a quantidade, lembre-se 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'; diff --git a/public_html/lib/plugins/captcha/lang/pt/settings.php b/public_html/lib/plugins/captcha/lang/pt/settings.php index 4e8fc74b..4682f812 100644 --- a/public_html/lib/plugins/captcha/lang/pt/settings.php +++ b/public_html/lib/plugins/captcha/lang/pt/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author André Neves + * @author ANeves */ $lang['mode'] = 'Que tipo de CAPTCHA usar?'; $lang['mode_o_js'] = 'Texto (pré-preenchido com JavaScript)'; @@ -13,8 +14,8 @@ $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['loginprotect'] = 'Exigir um CAPTCHA para se autenticar.'; $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)'; diff --git a/public_html/lib/plugins/captcha/lang/ru/settings.php b/public_html/lib/plugins/captcha/lang/ru/settings.php index f6f5348b..dc013966 100644 --- a/public_html/lib/plugins/captcha/lang/ru/settings.php +++ b/public_html/lib/plugins/captcha/lang/ru/settings.php @@ -5,6 +5,7 @@ * * @author Aleksandr Selivanov * @author Ilya Rozhkov + * @author Shpak Andrey */ $lang['mode'] = 'Какой тип CAPTCHA использовать?'; $lang['mode_o_js'] = 'Текст (заполнение JavaScript)'; @@ -14,8 +15,8 @@ $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['loginprotect'] = 'Требовать ввод CAPTCHA для входа?'; $lang['lettercount'] = 'Количество букв (3-16). Если вы увеличиваете количество букв, не забудьте увеличить ширину изображения ниже.'; $lang['width'] = 'Ширина изображения CAPTCHA (пиксель)'; $lang['height'] = 'Высота изображения CAPTCHA (пиксель)'; diff --git a/public_html/lib/plugins/captcha/lang/sk/settings.php b/public_html/lib/plugins/captcha/lang/sk/settings.php index 92e87384..2f6c5821 100644 --- a/public_html/lib/plugins/captcha/lang/sk/settings.php +++ b/public_html/lib/plugins/captcha/lang/sk/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Jozef Riha * @author Martin Michalek */ @@ -14,7 +14,6 @@ $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)'; diff --git a/public_html/lib/plugins/captcha/lang/sv/lang.php b/public_html/lib/plugins/captcha/lang/sv/lang.php new file mode 100644 index 00000000..0bdf9997 --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/sv/lang.php @@ -0,0 +1,12 @@ + + */ +$lang['testfailed'] = 'Tyvärr men svaret på CAPTCHA var inte korrekt. Kanske är du inte människa trots allt?'; +$lang['fillcaptcha'] = 'Var god fyll i alla bokstäver i fältet för att bevisa att du är en människa.'; +$lang['fillmath'] = 'Var god lös följande ekvation för att bevisa att du är en människa.'; +$lang['soundlink'] = 'Om du inte kan läsa bokstäverna på bilden, ladda ner denna .wav-fil för att få dem upplästa.'; +$lang['honeypot'] = 'Var god håll detta fält tomt:'; diff --git a/public_html/lib/plugins/captcha/lang/sv/settings.php b/public_html/lib/plugins/captcha/lang/sv/settings.php new file mode 100644 index 00000000..85736f5b --- /dev/null +++ b/public_html/lib/plugins/captcha/lang/sv/settings.php @@ -0,0 +1,24 @@ + + */ +$lang['mode'] = 'Vilken typ av CAPTCHA vill du använda?'; +$lang['mode_o_js'] = 'Text (förifylld mha JavaScript)'; +$lang['mode_o_text'] = 'Text (endast manuell)'; +$lang['mode_o_math'] = 'Matematiskt problem'; +$lang['mode_o_question'] = 'Statisk frågeställning'; +$lang['mode_o_image'] = 'Bild (sämre tillgänglighet)'; +$lang['mode_o_audio'] = 'Bild+ljud (bättre tillgänglighet)'; +$lang['mode_o_svg'] = 'SVG (sämre tillgänglighet, läsbarhet)'; +$lang['mode_o_svgaudio'] = 'SVD+ljud (bättre tillgänglighet, läsbarhet)'; +$lang['mode_o_figlet'] = 'Figlet ASCII Art (sämre tillgänglighet)'; +$lang['forusers'] = 'Använd CAPTCHA även för inloggade användare?'; +$lang['loginprotect'] = 'Kräv CAPTCHA för att logga in?'; +$lang['lettercount'] = 'Antal bokstäver (3-16). Om du ökar antalet, se då till att även öka bredden på bilden nedan.'; +$lang['width'] = 'Bredd på CAPTCHA-bilden (i pixlar)'; +$lang['height'] = 'Höjd på CAPTCHA-bilden (i pixlar)'; +$lang['question'] = 'Fråga till statisk frågeställning-inställning'; +$lang['answer'] = 'Svar till statisk frågeställning-inställning'; diff --git a/public_html/lib/plugins/captcha/lang/tr/lang.php b/public_html/lib/plugins/captcha/lang/tr/lang.php index f5d16b25..5132d09d 100644 --- a/public_html/lib/plugins/captcha/lang/tr/lang.php +++ b/public_html/lib/plugins/captcha/lang/tr/lang.php @@ -1,12 +1,12 @@ */ - -$lang['testfailed'] = "Üzgünüz, CAPTCHA doğru cevaplanmadı. Belki bir insan değilsiniz (bot'sunuz)?"; -$lang['fillcaptcha'] = "İnsan olduğunuzu kanıtlamak için lütfen bütün harfleri kutuya giriniz."; -$lang['fillmath'] = "Lütfen şu eşitliği çözünüz ki insan olduğunuzu ispatlayınız."; -$lang['soundlink'] = "Eğer resimdeki harfleri okuyamıyorsanız, bu .wav dosyasını size okuması için indiriniz."; -$lang['honeypot'] = "Lütfen bu alanı boş bırakınız: "; +$lang['testfailed'] = 'Üzgünüz, CAPTCHA doğru cevaplanmadı. Belki bir insan değilsiniz (bot\'sunuz)?'; +$lang['fillcaptcha'] = 'İnsan olduğunuzu kanıtlamak için lütfen bütün harfleri kutuya giriniz.'; +$lang['fillmath'] = 'Lütfen şu eşitliği çözünüz ki insan olduğunuzu ispatlayınız.'; +$lang['soundlink'] = 'Eğer resimdeki harfleri okuyamıyorsanız, bu .wav dosyasını size okuması için indiriniz.'; +$lang['honeypot'] = 'Lütfen bu alanı boş bırakınız: '; diff --git a/public_html/lib/plugins/captcha/lang/tr/settings.php b/public_html/lib/plugins/captcha/lang/tr/settings.php index a71bd02a..3ab73a2d 100644 --- a/public_html/lib/plugins/captcha/lang/tr/settings.php +++ b/public_html/lib/plugins/captcha/lang/tr/settings.php @@ -2,23 +2,23 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Ehliman * @author Ozan Hacibekiroglu + * @author İlker R. Kapaç */ -$lang['mode'] = "Ne çeşit CAPTCHA kullanılacak?"; -$lang['mode_o_js'] = "Metin (JavaScript ile önceden doldurulur)"; -$lang['mode_o_text'] = "Metin (sadece manuel)"; -$lang['mode_o_math'] = "Matematik Problemi"; -$lang['mode_o_question'] = "Sabit Soru"; -$lang['mode_o_image'] = "Resim (Kötü erişebilirlik)"; -$lang['mode_o_audio'] = "Resim+Ses (iyi erişebilirlik)"; -$lang['mode_o_figlet'] = "Figlet ASCII Art (kötü erişebilirlik)"; - -$lang['regprotect'] = "Kayıt formu da korunsun mu?"; -$lang['forusers'] = "CAPTCHA giriş yapmış kullanıcılar için de kullanılsın mı?"; -$lang['lettercount']= "Kullanılacak harf sayısı (3-16). Karakter sayısını artırırsanız, resim genişliğinin de arttığından emin olunuz."; -$lang['width'] = "CAPTCHA resminin genişliği (piksel)"; -$lang['height'] = "CAPTCHA resminin yüksekliği (piksel)"; -$lang['question'] = "Sabit soru modu için Soru"; -$lang['answer'] = "Sabit soru modu için Cevap"; +$lang['mode'] = 'Ne çeşit CAPTCHA kullanılacak?'; +$lang['mode_o_js'] = 'Metin (JavaScript ile önceden doldurulur)'; +$lang['mode_o_text'] = 'Metin (sadece manuel)'; +$lang['mode_o_math'] = 'Matematik Problemi'; +$lang['mode_o_question'] = 'Sabit Soru'; +$lang['mode_o_image'] = 'Resim (Kötü erişebilirlik)'; +$lang['mode_o_audio'] = 'Resim+Ses (iyi erişebilirlik)'; +$lang['mode_o_figlet'] = 'Figlet ASCII Art (kötü erişebilirlik)'; +$lang['forusers'] = 'CAPTCHA giriş yapmış kullanıcılar için de kullanılsın mı?'; +$lang['loginprotect'] = 'Oturum açılışında CAPTCHA sorulsun mu?'; +$lang['lettercount'] = 'Kullanılacak harf sayısı (3-16). Karakter sayısını artırırsanız, resim genişliğinin de arttığından emin olunuz.'; +$lang['width'] = 'CAPTCHA resminin genişliği (piksel)'; +$lang['height'] = 'CAPTCHA resminin yüksekliği (piksel)'; +$lang['question'] = 'Sabit soru modu için soru'; +$lang['answer'] = 'Sabit soru modu için cevap'; diff --git a/public_html/lib/plugins/captcha/lang/uk/settings.php b/public_html/lib/plugins/captcha/lang/uk/settings.php index f630ca9a..949c6151 100644 --- a/public_html/lib/plugins/captcha/lang/uk/settings.php +++ b/public_html/lib/plugins/captcha/lang/uk/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Oleksandr Baranyuk */ $lang['mode'] = 'Який тип CAPTCHA використати?'; @@ -13,7 +13,6 @@ $lang['mode_o_question'] = 'Фіксоване питання'; $lang['mode_o_image'] = 'Зображення (погана впізнаваність)'; $lang['mode_o_audio'] = 'Зображення+аудіо (краща впізнаваність)'; $lang['mode_o_figlet'] = 'Картинка з ASCII-символів (погана впізнаваність)'; -$lang['regprotect'] = 'Захистити також реєстраційну форму?'; $lang['forusers'] = 'Використовувати CAPTCHA для авторизованих користувачів?'; $lang['lettercount'] = 'Кількість символів (3-16). Якщо ви збільшуєте кількість, розширте також картинку нижче.'; $lang['width'] = 'Ширина CAPTCHA-зображення (пікселів)'; diff --git a/public_html/lib/plugins/captcha/lang/zh-tw/lang.php b/public_html/lib/plugins/captcha/lang/zh-tw/lang.php index f1816a0a..4f6355f8 100644 --- a/public_html/lib/plugins/captcha/lang/zh-tw/lang.php +++ b/public_html/lib/plugins/captcha/lang/zh-tw/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Danny Lin * @author lioujheyu */ diff --git a/public_html/lib/plugins/captcha/lang/zh-tw/settings.php b/public_html/lib/plugins/captcha/lang/zh-tw/settings.php index 52062a7b..e4945633 100644 --- a/public_html/lib/plugins/captcha/lang/zh-tw/settings.php +++ b/public_html/lib/plugins/captcha/lang/zh-tw/settings.php @@ -2,19 +2,23 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Danny Lin * @author lioujheyu + * @author CHENG */ $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 藝術字 (易用性差)'; -$lang['regprotect'] = '保護註冊表單嗎?'; $lang['forusers'] = '已登入使用者也要 CAPTCHA 驗證嗎?'; +$lang['loginprotect'] = '登入前需要 CAPTCHA 驗證嗎?'; $lang['lettercount'] = '多少字母會被使用(3-16)。如果你增加使用個數,請確保同時加寬圖片長度'; $lang['width'] = 'CAPTCHA 圖片寬度 (像素)'; $lang['height'] = 'CAPTCHA 圖片高度 (像素)'; +$lang['question'] = '固定問題模式的問題'; +$lang['answer'] = '固定問題模式的答案'; diff --git a/public_html/lib/plugins/captcha/lang/zh/lang.php b/public_html/lib/plugins/captcha/lang/zh/lang.php index 7a011985..1846cd28 100644 --- a/public_html/lib/plugins/captcha/lang/zh/lang.php +++ b/public_html/lib/plugins/captcha/lang/zh/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Andreas Gohr * @author lainme */ diff --git a/public_html/lib/plugins/captcha/lang/zh/settings.php b/public_html/lib/plugins/captcha/lang/zh/settings.php index c476e4e9..28f3dc7f 100644 --- a/public_html/lib/plugins/captcha/lang/zh/settings.php +++ b/public_html/lib/plugins/captcha/lang/zh/settings.php @@ -2,9 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Andreas Gohr * @author lainme + * @author 橙子狼 <2949384951@qq.com> + * @author kuma */ $lang['mode'] = '使用什么类型的验证码?'; $lang['mode_o_js'] = '文本 (预先由 JavaScript 填写)'; @@ -13,9 +15,11 @@ $lang['mode_o_math'] = '算术题'; $lang['mode_o_question'] = '固定问题'; $lang['mode_o_image'] = '图片 (无障碍性差)'; $lang['mode_o_audio'] = '图片+音频 (更好的无障碍性)'; +$lang['mode_o_svg'] = 'SVG(不好的无障碍环境,易读的)'; +$lang['mode_o_svgaudio'] = 'SVG +音频(更好的无障碍环境,易读的)'; $lang['mode_o_figlet'] = 'Figlet ASCII 艺术 (无障碍性差)'; -$lang['regprotect'] = '同时保护注册表单吗?'; $lang['forusers'] = '对已登入的用户也适用吗?'; +$lang['loginprotect'] = '请输入验证码'; $lang['lettercount'] = '使用字母的数目 (3-16)。如果您增加数目,请确保同时增加图片的宽度。'; $lang['width'] = '验证码图片宽度 (像素)'; $lang['height'] = '验证码图片高度 (像素)'; diff --git a/public_html/lib/plugins/captcha/plugin.info.txt b/public_html/lib/plugins/captcha/plugin.info.txt index a51973f2..48172f8b 100644 --- a/public_html/lib/plugins/captcha/plugin.info.txt +++ b/public_html/lib/plugins/captcha/plugin.info.txt @@ -1,7 +1,7 @@ base captcha author Andreas Gohr email andi@splitbrain.org -date 2015-02-11 +date 2017-06-16 name CAPTCHA Plugin desc Use a CAPTCHA challenge to protect DokuWiki against automated spam url http://www.dokuwiki.org/plugin:captcha diff --git a/public_html/lib/plugins/captcha/script.js b/public_html/lib/plugins/captcha/script.js index 75b69cec..3cb402c1 100644 --- a/public_html/lib/plugins/captcha/script.js +++ b/public_html/lib/plugins/captcha/script.js @@ -1,12 +1,32 @@ -/** - * Autofill and hide the whole captcha stuff in the simple JS mode - */ + jQuery(function () { + var $wrap = jQuery('#plugin__captcha_wrapper'); + if(!$wrap.length) return; + + /** + * Autofill and hide the whole CAPTCHA stuff in the simple JS mode + */ var $code = jQuery('#plugin__captcha_code'); - if (!$code.length) return; + if ($code.length) { + var $box = $wrap.find('input[type=text]'); + $box.first().val($code.text().replace(/([^A-Z])+/g, '')); + $wrap.hide(); + } - var $box = jQuery('#plugin__captcha_wrapper input[type=text]'); - $box.first().val($code.text().replace(/([^A-Z])+/g, '')); - - jQuery('#plugin__captcha_wrapper').hide(); + /** + * Add a HTML5 player for the audio version of the CAPTCHA + */ + var $audiolink = $wrap.find('a'); + if($audiolink.length) { + var audio = document.createElement('audio'); + if(audio) { + audio.src = $audiolink.attr('href'); + $wrap.append(audio); + $audiolink.click(function (e) { + audio.play(); + e.preventDefault(); + e.stopPropagation(); + }); + } + } }); diff --git a/public_html/lib/plugins/captcha/style.css b/public_html/lib/plugins/captcha/style.css index 9f6ec0c6..6c0912f8 100644 --- a/public_html/lib/plugins/captcha/style.css +++ b/public_html/lib/plugins/captcha/style.css @@ -14,10 +14,27 @@ padding: 0; } +.dokuwiki #plugin__captcha_wrapper .svg { + display: inline-block; + background-color: __background__; + vertical-align: bottom; + border: 1px solid __border__; +} + +.dokuwiki #plugin__captcha_wrapper svg { + width: 100%; + height: 100%; +} +.dokuwiki #plugin__captcha_wrapper svg path { + fill: __text__; +} .dokuwiki #plugin__captcha_wrapper .no { display: none; } .dokuwiki #plugin__captcha_wrapper { -clear: left; + clear: left; + border: 1px solid __border__; + padding: 0.75em; + margin: 1em 0; } diff --git a/public_html/lib/plugins/captcha/wav.php b/public_html/lib/plugins/captcha/wav.php index 87be9555..7cc98cf5 100644 --- a/public_html/lib/plugins/captcha/wav.php +++ b/public_html/lib/plugins/captcha/wav.php @@ -16,7 +16,7 @@ $ID = $_REQUEST['id']; /** @var $plugin helper_plugin_captcha */ $plugin = plugin_load('helper', 'captcha'); -if($plugin->getConf('mode') != 'audio') { +if($plugin->getConf('mode') != 'audio' && $plugin->getConf('mode') != 'svgaudio') { http_status(404); exit; } @@ -28,7 +28,9 @@ $code = strtolower($plugin->_generateCAPTCHA($plugin->_fixedIdent(), $rand)); $lc = dirname(__FILE__).'/lang/'.$conf['lang'].'/audio/'; $en = dirname(__FILE__).'/lang/en/audio/'; $wavs = array(); -for($i = 0; $i < $plugin->getConf('lettercount'); $i++) { +$lettercount = $plugin->getConf('lettercount'); +if($lettercount > strlen($code)) $lettercount = strlen($code); +for($i = 0; $i < $lettercount; $i++) { $file = $lc.$code{$i}.'.wav'; if(!@file_exists($file)) $file = $en.$code{$i}.'.wav'; $wavs[] = $file;