ndex.php yi açıp şu kodu bulun
PHP Kodu:
// ### LOGGED IN USERS #################################################
üstüne bunları ekleyin
PHP Kodu:
// ############# Paul Marsden - Who has posted today v1.40 ###############
$now = TIMENOW ;
require_once('./includes/functions_misc.php';
$cutoff = vbmktime(0, 0, 0, vbdate('m', $now. false, false), vbdate('d', $now. false, false), vbdate('Y', $now. false, false));
//$cutoff = $now - 86400 ; // Uncomment this line if you want a rolling last 24 hours.
$todaysposters = $DB_site->query("SELECT userid, lastpost, options, username, opentag, closetag
FROM " . TABLE_PREFIX . "user as user
LEFT JOIN " . TABLE_PREFIX . "usergroup as usergroup ON(user.usergroupid = usergroup.usergroupid)
WHERE lastpost > " .$cutoff. " ORDER BY username" );
unset ($posttoday);
$posterstoday = 0;
while ($today = $DB_site->fetch_array($todaysposters))
{
$today[visible] = 1 ;
$posterstoday += 1;
if ($today[options] & $_USEROPTIONS[invisible])
{
$today[visible] = 0 ;
if (($permissions['genericpermissions'] & CANSEEHIDDEN) OR $today['userid'] == $bbuserinfo['userid'])
{
$today[visible] = 2 ;
}
}
if ($today[visible])
{
$wrdate = vbdate($vboptions['timeformat'], $today['lastpost']);
$posttoday .= "<a href='search.php?do=finduser&u=$today[userid]' title='$wrdate' >";
if ($today[visible] == 2)
{
$posttoday .= $today['opentag'].$today[username].$today['closetag']."</a>*, ";
}
else
{
$posttoday .= $today['opentag'].$today[username].$today['closetag']."</a>, ";
}
}
}
if ($posttoday)
{
$posttoday = substr($posttoday, 0, strlen($posttoday)-2);
}
// ############# End of Who has posted today ###############
FORuMHOME adlı template i açın ve şu kodu bulun
PHP Kodu:
<!-- end logged-in users -->
altına bunları ekleyiniz..
PHP Kodu:
<!-- Todays posters -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar" href="#top" onclick="return toggle_collapse('forumhome_todayposters'"><img id="collapseimg_forumhome_todayposters" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayposters].gif" alt="" border="0" /></a>
Total members that have posted today: $posterstoday
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayposters" style="$vbcollapse[collapseobj_forumhome_todayposters]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="Users online today" border="0" /></td>
<td class="alt1" width="100%"><div class="smallfont">$posttoday</div></td>
</tr>
</tbody>
<!-- End Todays posters -->
son olarak phpmyadmin veya adminpanel de aşağıdaki döngüyü gerçekleştirin
PHP Kodu:
ALTER TABLE user ADD INDEX (lastpost) ;