Aardvark Topsites 5.x versiyonlarında Yeni Kullanıcıları listeleyen yeni modülün kurulumu aşağıdadır. Bu modül özellikle yeni gelen üyeleri takip etmekte zorluk çeken webmasterlar için elzemdir. Modül ilk etapta son 10 siteyi listemektedir, bu 10 rakamını değiştirmek için new_members.php dosyasını editörle açın ve bu satırı bulun. $TMPL['num'] = 10; buradaki değeri istediğiniz gibi değiştirebilirsiniz.
1. Öncelikle new_members.php dosyasını "sources" klasörü içine kopyalamalısınız. Bu dosyanın kodları aşağıdadır.
new_members.php dosyası (Aşağıdaki kodları boş bir notdefterine ekleyin ve new_members.php olarak kaydedin.)
<?php
//===========================================================================\\
// Aardvark Topsites PHP 5 \\
// Copyright (c) 2003-2006 Jeremy Scheff. All rights reserved. \\
//---------------------------------------------------------------------------\\
// http://www.aardvarktopsitesphp.com/ http://www.avatic.com/ \\
//---------------------------------------------------------------------------\\
// This program is free software; you can redistribute it and/or modify it \\
// under the terms of the GNU General Public License as published by the \\
// Free Software Foundation; either version 2 of the License, or (at your \\
// option) any later version. \\
// \\
// This program is distributed in the hope that it will be useful, but \\
// WITHOUT ANY WARRANTY; without even the implied warranty of \\
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General \\
// Public License for more details. \\
//===========================================================================\\
if (!defined('ATSPHP')) {
die("This file cannot be accessed directly.");
}
class new_members extends base {
function new_members() {
global $CONF, $DB, $FORM, $LNG, $TMPL;
$TMPL['header'] = 'Yeni Üyeler';
$settings = $DB->fetch("SELECT * FROM {$CONF['sql_prefix']}_settings", __FILE__, __LINE__);
$CONF = array_merge($CONF, $settings);
$CONF['skins_path'] = "{$CONF['path']}/skins";
$CONF['skins_url'] = "{$CONF['list_url']}/skins";
$TMPL['skins_url'] = $CONF['skins_url'];
$TMPL['list_name'] = $CONF['list_name'];
$TMPL['list_url'] = $CONF['list_url'];
// Combine the GET and POST input
$FORM = array_merge($_GET, $_POST);
// The language file
require_once("{$CONF['path']}/languages/{$CONF['default_language']}.php");
// The skin
$TMPL['skin_name'] = $CONF['default_skin'];
require_once("{$CONF['path']}/sources/misc/skin.php");
if (isset($FORM['num'])) {
$TMPL['num'] = intval($FORM['num']);
}
if (!isset($TMPL['num']) || !$TMPL['num']) {
$TMPL['num'] = 25;
}
$TMPL['sites'] = '';
$result = $DB->select_limit("SELECT *
FROM {$CONF['sql_prefix']}_sites
WHERE active = 1
ORDER BY join_date DESC
", $TMPL['num'], 0, __FILE__, __LINE__);
while ($row = $DB->fetch_array($result)) {
$TMPL = array_merge($TMPL, $row);
$skin = new skin('ssi_new_row');
$TMPL['sites'] .= $skin->make();
}
$LNG['ssi_new'] = sprintf($LNG['ssi_new'], $TMPL['num']);
$skin = new skin('ssi_new');
$TMPL['content'] = $this->do_skin('ssi_new');
//echo $skin->make();
}
}
?>2. index.php dosyasını editör programı ile açın ve şu kodları bulun: Bu kodlar mevcut kodlar, mevcut kodları Yeni Kodlar ile değiştirin.
Mevcut Kodlar:
$action = array(
'admin' => 1,
'in' => 1,
'join' => 1,
'lost_pw' => 1,
'out' => 1,
'page' => 1,
'rankings' => 1,
'rate' => 1,
'search' => 1,
'stats' => 1,
'user_cp' => 1
);
Yeni Kodlar:
$action = array(
'admin' => 1,
'in' => 1,
'join' => 1,
'lost_pw' => 1,
'out' => 1,
'page' => 1,
'rankings' => 1,
'rate' => 1,
'search' => 1,
'stats' => 1,
'user_cp' => 1,
'new_members' => 1
);
3. Kullandığınız skin klasöürü içindeki, wrapper.html dosyasını editör programı ile açın ve aşağıdaki linki sol menüde biryere yerleştirin.
<a href="{$list_url}/index.php?a=new_members" class="menu">Yeni Üyelerimiz[/url]
4. Kullandığınız skin klasöürü içindeki, ssi_new_row.html dosyasını editör programı ile açın ve aşağıdaki kodları ekleyin.
<div class="table_border">
<table><tr>
<td rowspan="2" class="table_top_stats" width="10%" align="center"><img src="http://www.myrank.org/v1/sme_rank.php?site={$url}" alt="" /></td>
<td rowspan="2" class="table_top_stats" width="28%"><b>{$lng->g_category}:</b> <a href="{$list_url}/index.php?cat={$category}">{$category}</a></td>
<td class="table_description"><a href="{$url}" onclick="out('{$username}');">{$title}</a> <br /> {$description}<br />
<td class="table_stats"><a href="{$list_url}/index.php?a=stats&u={$username}"><img src="{$skins_url}/{$skin_name}/stats.png" alt="Stats" border="0" height="21" width="21" /></a></td>
</tr>
</table>
</div>