Menü

Login

Aktuelle Version

Forum > Captcha Addon für Registrierung *

DOTLAN Intranet / Portal >> Konfiguration, Erweiterungen, Addons > Captcha Addon für Registrierung
Antwort erstellen
Autor Thema: Captcha Addon für Registrierung
Griffon
06.09.2009 um 00:30 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

Download Secure Image from http://www.phpcaptcha.org/download

- Download http://www.phpcaptcha.org/latest.zip
- Unzip and rename Folder to "si"
- Download http://www.phpcaptcha.org/latest/audio.zip
- Unzip "audio" folder into /si/

- Edit /si/secureimage.php
Code:

# /si/secureimage.php
<?php
include_once("../global.php");

[...]


- Edit /includes/custom.user.php
- Search for the register -> agb block and add this block afterwords.

Code:
# /includes/custom.user.php : line 248
"captcha" => array(
"title" => _("Security Code"),
"sub" => "",
"field" => "", // absichtlich kein feld. Da nur Gegencheck
"customhtml" => '
<table cellpadding="0" cellspacing="0" border="0"><tr><td>
<img id="siimage" align="left" style="padding-right: 5px; border: 0" src="/si/securimage_show.php?sid='.md5(time()).'" />
<a tabindex="-1" style="border-style: none" href="/si/securimage_play.php" title="Audible Version of CAPTCHA"><img src="/si/images/audio_icon.gif" alt="Audio Version" align="top" border="0" onclick="this.blur()" /></a><br />
<a tabindex="-1" style="border-style: none" href="#" title="Refresh Image" onclick="document.getElementById(\'siimage\').src = \'/si/securimage_show.php?sid=\' + Math.random(); return false"><img src="/si/images/refresh.gif" alt="Reload Image" border="0" onclick="this.blur()" align="bottom" /></a>
</td><td style="padding-left: 20px;">
<b>Verify Code:</b>
<input type="text" name="data[register__captcha]" size="5" maxlength="4" />
</td></tr></table>
',
"check" => array(
"function" => array('
include_once($global["script_root"]."/si/securimage.php");
$securimage = new Securimage();
if(!$securimage->check($value))
$error["register__captcha"] = _("Security Code was incorrect. Please try again.");
'),
"notmatch" => array(),
"match" => array(),
),
),


Viel Spaß damit. Achja: Feedback wäre nett. Oder war der eine Spammer der sich bei dotlan heute registriert hat ein seltener Einzelfall?
 
SNKBT
07.08.2012 um 22:41 QuoteProfileSend PM
NEW

Clan: ERENYA
Postings: 10

Hallo Griffon,

dieser Beitrag ist nun 3 Jahre alt, dennnoch möchte ich ein kleines Feedback geben.
Mitlerweile hat sich das Captcha auf 6 Zeichen verlängert, was folgenden Einfluss auf die /includes/custom.user.php Datei hat:
Code:
"captcha" => array(
"title" => _("Security Code"),
"sub" => "",
"field" => "", // absichtlich kein feld. Da nur Gegencheck
"customhtml" => '<table cellpadding="0" cellspacing="0" border="0"><tr><td>
<img id="siimage" align="left" style="padding-right: 5px; border: 0" src="/si/securimage_show.php?sid='.md5(time()).'" />
<a tabindex="-1" style="border-style: none" href="/si/securimage_play.php" title="Audible Version of CAPTCHA"><img src="/si/images/audio_icon.gif" alt="Audio Version" align="top" border="0" onclick="this.blur()" /></a><br />
<a tabindex="-1" style="border-style: none" href="#" title="Refresh Image" onclick="document.getElementById(\'siimage\').src = \'/si/securimage_show.php?sid=\' + Math.random(); return false"><img src="/si/images/refresh.gif" alt="Reload Image" border="0" onclick="this.blur()" align="bottom" /></a>
</td><td style="padding-left: 20px;">
<b>Verify Code:</b>
<input type="text" name="data[register__captcha]" size="6" maxlength="6" />
</td></tr></table>',
"check" => array(
"function" => array('include_once($global["script_root"]."/si/securimage.php");
$securimage = new Securimage();
if(!$securimage->check($value))
$error["register__captcha"] = _("Security Code was incorrect. Please try again.");
'),
"notmatch" => array(),
"match" => array(),
),
),

Ansonsten funktioniert das "Plugin" tiptop!
Gruss
 
[ Antwort erstellen ]