Giter VIP home page Giter VIP logo

captcha-extended's Introduction

Captcha Extended
================

Captcha Extended is an extension written for Yii framework.
It enhances original captcha code delivered along with the framework.

Features
========
- supports modes: logical, words, mathverbal, math, default
- supports extended characters latin1, latin2 (utf-8) including middle- east- european and cyrillyc characters
- implements masking elements: dots density, through lines, fillSections, font color varying.

INSTALLATION
============

1) Unzip CaptchaExtended.zip files into ../protected/extensions/captchaExtended/*.*

2) Register class paths to [CaptchaExtendedAction] and [CaptchaExtendedValidator], e.g. in components/controller.php:

	public function init(){
		// register class paths for extension captcha extended
		Yii::$classMap = array_merge( Yii::$classMap, array(
			'CaptchaExtendedAction' => Yii::getPathOfAlias('ext.captchaExtended').DIRECTORY_SEPARATOR.'CaptchaExtendedAction.php',
			'CaptchaExtendedValidator' => Yii::getPathOfAlias('ext.captchaExtended').DIRECTORY_SEPARATOR.'CaptchaExtendedValidator.php'
		));
	}

3) Define action in controller, e.g. SiteController:

	public function actions(){
		return array(
			'captcha'=>array(
				'class'=>'CaptchaExtendedAction',
			),
		);
	}

4) Define client validation in model::rules():

	public function rules(){
		return array(
			array('verifyCode', 'CaptchaExtendedValidator', 'allowEmpty'=>!CCaptcha::checkRequirements()),
		);
	}
	
5) If needed, collect localized strings via CLI command "yiic message messages/config.php" and translate captcha related strings.

6) If needed, you can tune captcha modes and visibility options: 
	- In "words" mode, you can place your own file [words.txt] or [words.yourlanguage.txt]
	- If needed, you can ..
		-> set the dots density [0-100], 
		-> the number of through lines [0-] 
		-> the number of fillSections [0-], 
		-> font and background colors

7) Test & enjoy!

=============================

Please report bug to lubosdz AT hotmail DOT com.

Thanx
Lubos
29/08/2011
Bratislava, Slovakia

captcha-extended's People

Contributors

babobski avatar

Watchers

James Cloos avatar  avatar  avatar

captcha-extended's Issues

Division by zero

sometimes will erros
this code
$scale = min(($this->width - $this->padding * 2) / $w,($this->height - $this->padding * 2) / $h);

errs:"Division by zero "

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.