Location: PHPKode > projects > ZompLog > plugins/captcha/plugin.php
<?php
/*
This ANTI-Spam plugin adds a Captcha-Image to your Comment-Forms
Developed by Thomas Rager www.ragersweb.de 

This Script is free for personal use.
*/

//main configuration
$plugin_name = "Captcha"; // note: this should be the same name as the name of the plugin-folder (lowercase)
$plugin_author = "Thomas Rager/Tim Glabisch";
$plugin_description = "This ANTI-Spam plugin adds a Captcha-Image to your Comment-Forms. The plugin is slightly different from Ragers Captcha.";
$plugin_version = "1.0";

//Default Settings  

$sql="SELECT * FROM $prefix" . "_captcha WHERE setting LIKE 'bug'";
$query=mysql_query($sql);
$bug=mysql_fetch_assoc($query);

$sql="SELECT * FROM $prefix" . "_captcha WHERE setting LIKE 'headline'";
$query=mysql_query($sql);
$headline=mysql_fetch_assoc($query);


if($hook == 'spamwordslist'){
	session_start();
	if (strtoupper($_POST['captcha_input'])!=$_SESSION['ragersCaptcha']){
		$messages[]=$bug["value"];
	}

}


if ($hook == 'theme-display-comments'){


?>
<div class="menutitle"><?php echo $headline["value"] ?></div>
<img src="<?php echo ROOT?>plugins/captcha/image.php" style="float:none;"/><br />
<input name="captcha_input" type="text" id="captcha_input" /><br />
<?php
}
?>
Return current item: ZompLog