smf için hızlı kayıt sistemi
sources-->Boardindex.php dosyasını açıyoruz
// Remember the most recent topic for optimizing the recent posts feature.
$most_recent_topic = array(
'timestamp' => 0,
'ref' => null
);
Altına Ekle;
// Generate a visual verification code to make sure the user is no bot.
$context['visual_verification'] = empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1;
if ($context['visual_verification'])
{
$context['use_graphic_library'] = in_array('gd', get_loaded_extensions());
$context['verificiation_image_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand());
// Only generate a new code if one hasn't been set yet
if (!isset($_SESSION['visual_verification_code']))
{
// Skip I, J, L, O and Q.
$character_range = array_merge(range('A', 'H'), array('K', 'M', 'N', 'P'), range('R', 'Z'));
// Generate a new code.
$_SESSION['visual_verification_code'] = '';
for ($i = 0; $i < 5; $i++)
$_SESSION['visual_verification_code'] .= $character_range[array_rand($character_range)];
}
}
// If we have GD, try the nice code.
elseif (empty($_REQUEST['format']))
{
require_once($sourcedir . '/Subs-Graphics.php');
if (in_array('gd', get_loaded_extensions()) && !showCodeImage($_SESSION['visual_verification_code']))
header('HTTP/1.1 400 Bad Request');
// Otherwise just show a pre-defined letter.
elseif (isset($_REQUEST['letter']))
{
$_REQUEST['letter'] = (int) $_REQUEST['letter'];
if ($_REQUEST['letter'] > 0 && $_REQUEST['letter'] <= strlen($_SESSION['visual_verification_code']) && !showLetterImage(strtolower($_SESSION['visual_verification_code']{$_REQUEST['letter'] - 1})))
header('HTTP/1.1 400 Bad Request');
}
// You must be up to no good.
else
header('HTTP/1.1 400 Bad Request');
}
elseif ($_REQUEST['format'] === '.wav')
{
require_once($sourcedir . '/Subs-Sound.php');
if (!createWaveFile($_SESSION['visual_verification_code']))
header('HTTP/1.1 400 Bad Request');
}
Kullandığımız temanın boardindex.template.php dosyasını açıyoruz
global $context, $settings, $options, $txt, $scripturl, $modSettings;
Altına Ekle;
// hizli kayit basladi
if( $context['user']['is_guest'] )
{
echo '
<table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="3" style="margin-bottom: 0ex;">
<td class="catbg"> Hızlı Kayıt Sistemi</td>
</table>
<div class="tborder">
<div valign="center" class="windowbg2">
<form action="'. $scripturl. '?action=register2" method="post" style="margin: 0px 1px 1px 0; text-align:left;" name="creator" id="creator">
<table align="center">
<tr>
<td colspan="20"><font color="#476C8E"><strong><center>Yanlızca 10 saniyenizi üye olmak için ayırırsanız sitemizden daha fazla yararlanırsınız;)</center></strong></font></td>
</tr>
<tr>
<td>Kullanıcı adınız:</td>
<td><input type="text" name="user" size="10" maxlength="30" /> </td>
<td>Şifreniz:</td>
<td><input type="password" name="passwrd1" size="10" /> </td>
<td>Şifrenizi tekrar yazın: </td><td><input type="password" name="passwrd2" size="10" /></td>
<td>E-mail adresiniz:</td>
<td colspan="2"><input name="email" type="text" /> </td>
<td colspan="3"><input name="regagree" type="hidden" value="checked" /></td>
</tr></table>
<table align="center">';
if ($context['visual_verification'])
{
echo '
<tr>
<td width="35%" align="top">
<b>Resim doğrulaması:</b>
<div class="smalltext">Resimde gösterilen harfleri giriniz</div>
</td>
';
if ($context['use_graphic_library'])
echo '
<td ><img src="', $context['verificiation_image_href'], '" alt="', $txt['visual_verification_description'], '" id="verificiation_image" /></td>';
else
echo '
<td ><img src="', $context['verificiation_image_href'], ';letter=1" alt="', $txt['visual_verification_description'], '" id="verificiation_image_1" />
<img src="', $context['verificiation_image_href'], ';letter=2" alt="', $txt['visual_verification_description'], '" id="verificiation_image_2" />
<img src="', $context['verificiation_image_href'], ';letter=3" alt="', $txt['visual_verification_description'], '" id="verificiation_image_3" />
<img src="', $context['verificiation_image_href'], ';letter=4" alt="', $txt['visual_verification_description'], '" id="verificiation_image_4" />
<img src="', $context['verificiation_image_href'], ';letter=5" alt="', $txt['visual_verification_description'], '" id="verificiation_image_5" /></td>';
echo '
<td><input type="text" name="visual_verification_code" size="30" tabindex="', $context['tabindex']++, '" /></td>
<td class="smalltext">
<a href="', $context['verificiation_image_href'], ';sound" onclick="return reqWin(this.href, 400, 120);">Harfleri Dinle</a></td>
</tr>';
}
echo'
<tr>
<td colspan="9" align="center"><input type="submit" value="Şimdi üye ol" /></td>
</tr>
</table>
</form>
</div>
</div><br />
';
}
// hizli kayit bitti
alıntıdırrr
[/b]
Linkback: https://www.buyuknet.com/smf-icin-hizli-kayit-sistemi-t21868.0.html