2 tane apisinide yazdım hocam eskiye çevirdim ama hala X gözüküyor :/
Bu arada kayıt ol kısmında recapty çalışıyor ama loginde çalışmıyor.
x görünmesi recaptcha api yazmadığın içindir
veritabanından çekmesi için eklentinin editlenmesi lazım ki o biraz uğraştırır
indirdiğin xml kodunu açıp istediğin php kodunu ekleyebilirsin istediğin yerine
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="captchalogin" active="1">
<title>LoginResimDogrulama</title>
<description>Spam Bot Engelleyen Özel Login Resim Doðrulama.</description>
<version>1.00</version>
<url>
http://www.tr-vbulletin.com/vbulletin-3-eklentileri/spam-bot-uye-onleyen-ozel-login-resim-dogrulama-197.html
</url>
<versioncheckurl />
<dependencies>
</dependencies>
<codes>
</codes>
<templates>
</templates>
<plugins>
<plugin active="1" executionorder="5">
<title>LoginResimDogrulama - Ajax Arama</title>
<hookname>ajax_start</hookname>
<phpcode><![CDATA[
if ($vbulletin->options['captchaLogin_enabled']) {
if ($_GET['do'] == 'CheckTheImageCodeLogin') {
$result = $vbulletin->db->query_first("
SELECT COUNT(*) as imagecode FROM " . TABLE_PREFIX . "regimage
WHERE regimagehash = '" . $vbulletin->db->escape_string($_GET['imagehash']) . "'
AND imagestamp = '" . $vbulletin->db->escape_string($_GET['imagestamp']) . "'
");
$count = $result['imagecode'];
if ($count > 0)
{
$return_value = $_GET['imagestamp'] . ",Working";
} else {
$return_value = $_GET['imagestamp'] . ",Invalid";
}
echo $return_value;
} elseif ( $_GET['do'] == 'loadimagemd5' ) {
require_once(DIR . '/includes/functions_regimage.php');
$imagehash = fetch_regimage_hash();
echo $imagehash;
}
}
]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>LoginResimDogrulama - Kontrol et</title>
<hookname>login_verify_success</hookname>
<phpcode><![CDATA[if ($vbulletin->options['captchaLogin_enabled']) {
$vbulletin->input->clean_array_gpc('p', array(
'vb_login_username' => TYPE_STR,
'vb_login_password' => TYPE_STR,
'vb_login_md5password' => TYPE_STR,
'vb_login_md5password_utf' => TYPE_STR,
'postvars' => TYPE_STR,
'imagehash' => TYPE_STR,
'imagestamp' => TYPE_STR,
'cookieuser' => TYPE_BOOL,
'logintype' => TYPE_STR,
'cssprefs' => TYPE_STR,
));
require_once(DIR . '/includes/spam_engel.php');
$admincpcheck = $vbulletin->db->query_first("
SELECT usergroupid
FROM " . TABLE_PREFIX . "user
WHERE username = '" . $vbulletin->db->escape_string($vbulletin->GPC['vb_login_username']). "'");
if ((!in_array($admincpcheck['usergroupid'], explode(",", $vbulletin->options['captchaLogin_usergroups'], -1))) && (!verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))) {
eval(standard_error('Sorry but the string you entered did not match the images text.'));
}
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>LoginResimDogrulama - Þablon Düzenleme</title>
<hookname>parse_templates</hookname>
<phpcode><![CDATA[
if ($vbulletin->options['captchaLogin_enabled']) {
$replacement = ' <!-- login form -->
<form action=\"' . $vbulletin->options['bburl'] . '/login.php?do=login\" method=\"post\" onsubmit=\"md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])\">
<script type=\"text/javascript\" src=\"clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]\"></script>
<table cellpadding=\"0\" cellspacing=\"$stylevar[formspacer]\" border=\"0\" id=\"login_user_pass\">
<tr>
<td class=\"smallfont\"><label for=\"navbar_username\">$vbphrase[username]</label></td>
<td><input type=\"text\" class=\"bginput\" style=\"font-size: 11px\" name=\"vb_login_username\" id=\"navbar_username\" size=\"10\" accesskey=\"u\" tabindex=\"101\" value=\"$vbphrase[username]\" onfocus=\"if (this.value == \'$vbphrase[username]\') this.value = \'\';\" /></td>
<td class=\"smallfont\" colspan=\"2\" nowrap=\"nowrap\"><label for=\"cb_cookieuser_navbar\"><input type=\"checkbox\" name=\"cookieuser\" value=\"1\" tabindex=\"103\" id=\"cb_cookieuser_navbar\" accesskey=\"c\" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class=\"smallfont\"><label for=\"navbar_password\">$vbphrase[password]</label></td>
<td><input type=\"password\" class=\"bginput\" style=\"font-size: 11px\" name=\"vb_login_password\" id=\"navbar_password\" size=\"10\" tabindex=\"102\" onkeypress=\"if (event.keyCode == 13){ document.getElementById(\'firstpart\').click(); }\"
/></td>
<td><input id=\"firstpart\" type=\"button\" onclick=\"displayimagecode();\" class=\"button\" value=\"$vbphrase[log_in]\" tabindex=\"104\" title=\"$vbphrase[enter_username_to_login_or_register]\" accesskey=\"s\" /></td>
</tr>
</table>
<table cellpadding=\"0\" cellspacing=\"$stylevar[formspacer]\" border=\"0\" id=\"login_image_code\" style=\"display:none;\">
<tr>
<td valign=\"middle\" width=\"159px\" height=\"49\" class=\"style1\" >
<table width=\"164\" height=\"49\" style=\"text-align:center\"><tr><td>
<img id=\"imageregload\" src=\"http://www.ajaxload.info/cache/ff/ff/ff/00/00/00/4-0.gif\" border=\"0\" /><img id=\"imagereg\" src=\"\" width=\"159\" height=\"49\" border=\"0\" style=\"display: none;\" onclick=\"refreshimage();\" /><img id=\"progress_imagereg\" style=\"display: none; float:$stylevar[right]\" src=\"$stylevar[imgdir_misc]/progress.gif\" alt=\"\" />
</td></tr></table>
</td>
<td>
<input id=\"imagestamp\" type=\"text\" class=\"bginput\" name=\"imagestamp\" size=\"10\" maxlength=\"9\" onblur=\"CheckTheImageCode();\" style=\"width: 100px\" /><br /><input id=\"imagehash\" type=\"hidden\" name=\"imagehash\" value=\"$imagehash\" /><input type=\"submit\" class=\"bginput\" name=\"imagestamp0\" value=\"Onayla\" size=\"10\" maxlength=\"9\" style=\"width: 100px; height: 22px;\" />
</td>
</tr>
<script type=\"text/javascript\">
function displayimagecode() {
document.getElementById(\'login_user_pass\').style.display = \'none\';
document.getElementById(\'login_image_code\').style.display = \'block\';
makeajaxregRequest( \'' . $vbulletin->options['bburl'] . '/ajax.php?do=loadimagemd5\', \'do=loadimagemd5\', \'loadimagemd5\');
}
function refreshimage() {
var poststr = \"do=imagereg&imagehash=\" + document.getElementById(\'imagehash\').value;
makeajaxregRequest( \'' . $vbulletin->options['bburl'] . '/ajax.php?do=imagereg&imagehash=\' + document.getElementById(\'imagehash\').value, poststr, \'refresh\');
}
var isWorking = false;
function handleHttpResponse_3() {
if (http.readyState == 4) {
if (http.responseText.indexOf(\'invalid\') == -1) {
// Split the comma delimited response into an array
results = http.responseText.split(\",\");
if (results[1] == \"Working\") {
//document.getElementById(\'imagestamp\').value = unescape(results[0]);
document.getElementById(\'imagestamp\').setAttribute(\"class\", \"inputgood\");
document.getElementById(\'imagestamp\').setAttribute(\"className\", \"inputgood\");
isWorking = false;
} else {
document.getElementById(\'imagestamp\').value = \'\';
document.getElementById(\'imagestamp\').setAttribute(\"class\", \"inputbad\");
document.getElementById(\'imagestamp\').setAttribute(\"className\", \"inputbad\");
isWorking = false;
var poststr = \"do=imagereg&imagehash=\" + document.getElementById(\'imagehash\').value;
makeajaxregRequest( \'' . $vbulletin->options['bburl'] . '/ajax.php?do=imagereg&imagehash=\' + document.getElementById(\'imagehash\').value, poststr, \'refresh\');
}
}
}
}
function CheckTheImageCode() {
if (!isWorking && http) {
http.open(\"GET\", \'' . $vbulletin->options['bburl'] . '/ajax.php?do=CheckTheImageCodeLogin&imagehash=\' + document.getElementById(\'imagehash\').value + \'&imagestamp=\' + document.getElementById(\'imagestamp\').value, true);
http.onreadystatechange = handleHttpResponse_3;
isWorking = true;
http.send(null);
}
}
function makeajaxregRequest(url, parameters, param) {
ajaxreg_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
ajaxreg_request = new XMLHttpRequest();
if (ajaxreg_request.overrideMimeType) {
// set type accordingly to anticipated content type
//ajaxreg_request.overrideMimeType(\'text/xml\');
ajaxreg_request.overrideMimeType(\'text/html\');
}
} else if (window.ActiveXObject) { // IE
try {
ajaxreg_request = new ActiveXObject(\"Msxml2.XMLHTTP\");
} catch (e) {
try {
ajaxreg_request = new ActiveXObject(\"Microsoft.XMLHTTP\");
} catch (e) {}
}
}
if (!ajaxreg_request) {
alert(\'Cannot create XMLHTTP instance\');
return false;
}
if (param == \'refresh\') {
ajaxreg_request.onreadystatechange = alertajaxregContents;
} else if ( param == \'loadimagemd5\' ) {
ajaxreg_request.onreadystatechange = loadimagemd5Contents;
}
ajaxreg_request.open(\'POST\', url, true);
ajaxreg_request.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");
ajaxreg_request.setRequestHeader(\"Content-length\", parameters.length);
ajaxreg_request.setRequestHeader(\"Connection\", \"close\");
ajaxreg_request.send(parameters);
}
function loadimagemd5Contents(){
if (ajaxreg_request.readyState == 4) {
if (ajaxreg_request.status == 200) {
document.getElementById(\'imagehash\').value = ajaxreg_request.responseText;
document.getElementById(\'imagereg\').src = \'' . $vbulletin->options['bburl'] . '/image.php?type=regcheck&imagehash=\' + ajaxreg_request.responseText;
document.getElementById(\'imageregload\').style.display = \'none\';
document.getElementById(\'imagereg\').style.display = \'inline\';
}
}
}
function alertajaxregContents(){
if (ajaxreg_request.readyState == 4) {
if (ajaxreg_request.status == 200) {
var imagehash = ajaxreg_request.responseText.match(/<imagehash>(.*)<\/imagehash>/);
document.getElementById(\'imagehash\').value = imagehash[1];
document.getElementById(\'imagereg\').src = \'' . $vbulletin->options['bburl'] . '/image.php?type=regcheck&imagehash=\' + imagehash[1];
} else {
alert(\'There was a problem with the request.\');
}
}
}
function getHTTPObject() {
var xmlhttp;
/*@cc_on
@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");
} catch (e) {
try {
xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");
} catch (E) {
xmlhttp = false;
}
}
@else
xmlhttp = false;
@end @*/
if (!xmlhttp && typeof XMLHttpRequest != \'undefined\') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object
</script>
</table>
<input type=\"hidden\" name=\"s\" value=\"$session[sessionhash]\" />
<input type=\"hidden\" name=\"do\" value=\"login\" />
<input type=\"hidden\" name=\"vb_login_md5password\" />
<input type=\"hidden\" name=\"vb_login_md5password_utf\" />
</form>
<!-- / login form -->
';
$vbulletin->templatecache['navbar'] = preg_replace('#<!-- login form -->.*<!-- \/ login form -->#s',$replacement, $vbulletin->templatecache['navbar']);
$vbulletin->templatecache['header'] = preg_replace('#<!-- login form -->.*<!-- \/ login form -->#s',$replacement, $vbulletin->templatecache['header']);
$vbulletin->templatecache['STANDARD_ERROR_LITE'] = preg_replace('#<fieldset class=\\\"fieldset\\\">.*</fieldset>#s', '', $vbulletin->templatecache['STANDARD_ERROR_LITE']);
$vbulletin->templatecache['STANDARD_ERROR'] = preg_replace('#<fieldset class=\\\"fieldset\\\">.*</fieldset>#s', '', $vbulletin->templatecache['STANDARD_ERROR']);
$vbulletin->templatecache['STANDARD_ERROR_LOGIN'] = preg_replace('#<fieldset class=\\\"fieldset\\\">.*</fieldset>#s', '', $vbulletin->templatecache['STANDARD_ERROR_LOGIN']);
}
]]></phpcode>
</plugin>
</plugins>
<phrases>
<phrasetype name="vBulletin Settings" fieldname="vbsettings">
<phrase name="setting_captchaLogin_enabled_desc" date="0" username="" version=""><![CDATA[Etkinleþtirmek için evet seçeneðini ayarlayýn.]]></phrase>
<phrase name="setting_captchaLogin_enabled_title" date="0" username="" version=""><![CDATA[LoginResimDogrulama - Aktif?]]></phrase>
<phrase name="setting_captchaLogin_usergroups_desc" date="0" username="" version=""><![CDATA[Admincp veya modcp eriþimi olan kullanýcý gruplarý koyun. Ör: 5,6,7.]]></phrase>
<phrase name="setting_captchaLogin_usergroups_title" date="0" username="" version=""><![CDATA[LoginResimDogrulama - Üye gruplarý]]></phrase>
<phrase name="settinggroup_captchaLogin_settings" date="0" username="" version=""><![CDATA[LoginResimDogrulama - Ayarlar]]></phrase>
</phrasetype>
</phrases>
<options>
<settinggroup name="captchaLogin_settings" displayorder="570">
<setting varname="captchaLogin_enabled" displayorder="10">
<datatype>boolean</datatype>
<optioncode>yesno</optioncode>
<defaultvalue>1</defaultvalue>
</setting>
<setting varname="captchaLogin_usergroups" displayorder="190">
<datatype>free</datatype>
<defaultvalue>5,6,7</defaultvalue>
</setting>
</settinggroup>
</options>
<helptopics>
</helptopics>
<cronentries>
</cronentries>
<faqentries>
</faqentries>
</product>XML içeriği burada hocam nereye ne eklenmesi gerektiğini bilmiyorum
Bunu editlerek yapabilir miyiz yoksa baştan yapmak daha mı kolay olur.