هاك الاعضاء الذين تواجدوا اليوم في المنتدى
فتح ملف/ index.php
بحث عن/
كود PHP:
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
اضف فوقه /
كود PHP:
// ### TODAY ONLINE USERS BY ANIMEWEBBY ###########################################
$todayactiveusers = '';
$todaystarttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$todaynumbervisible = 0;
$todaynumberregistered = 0;
$todayforumusers = $DB_site->query("SELECT
user.userid, user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible, user.usergroupid, user.lastactivity,
IF(displaygroupid=0, user.usergroupid, user.displaygroupid) AS displaygroupid
FROM " . TABLE_PREFIX . "user
WHERE user.lastactivity >= $todaystarttime
ORDER BY " . iif($permissions['genericpermissions'] & CANSEEHIDDEN, 'invisible ASC, ') . "username ASC, lastactivity DESC
");
if ($bbuserinfo['userid'])
{
// fakes the user being online for an initial page view of index.php
$bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
$todayuserinfos = array
(
$bbuserinfo['userid'] => array
(
'userid' => $bbuserinfo['userid'],
'username' => $bbuserinfo['username'],
'invisible' => $bbuserinfo['invisible'],
'lastactivity' => TIMENOW,
'musername' => fetch_musername($bbuserinfo, 'joingroupid')
)
);
$todaynumberregistered = 1;
$todaynumbervisible = 1;
fetch_online_status($todayuserinfos[$bbuserinfo['userid']]);
$todayloggedin = $todayuserinfos[$bbuserinfo['userid']];
eval('$todayactiveusers = ", ' . fetch_template('forumhome_todayloggedinuser') . '";');
}
else
{
$todayuserinfos = array();
}
while ($todayloggedin = $DB_site->fetch_array($todayforumusers))
{
$todayuserid = $todayloggedin[userid];
if (!$todayuserid)
{ // Guest
$todaynumberguest++;
}
else if (empty($todayuserinfos["$todayuserid"]['lastactivity']) OR ($todayuserinfos["$todayuserid"]['lastactivity'] < $todayloggedin['lastactivity']))
{
$todayuserinfos["$todayuserid"] = $todayloggedin;
$todaynumberregistered++;
$todayloggedin['musername'] = fetch_musername($todayloggedin);
if ($todayloggedin['invisible'])
{
if (($permissions['genericpermissions'] & CANSEEHIDDEN) OR $todayloggedin['userid'] == $bbuserinfo['userid'])
{
// user is online and invisible BUT bbuser can see them
$todayloggedin['invisiblemark'] = '*';
$todaynumbervisible++;
eval('$todayactiveusers .= ", ' . fetch_template('forumhome_todayloggedinuser') . '";');
}
}
else
{
// user is online and visible
$todaynumbervisible++;
eval('$todayactiveusers .= ", ' . fetch_template('forumhome_todayloggedinuser') . '";');
}
//if (fetch_online_status($todayloggedin))
//{
// $todaynumbervisible++;
// eval('$todayactiveusers .= ", ' . fetch_template('forumhome_todayloggedinuser') . '";');
//}
}
}
// memory saving
unset($todayuserinfos, $todayloggedin);
$todayactiveusers = substr($todayactiveusers , 2); // get rid of initial comma
$DB_site->free_result($todayloggedins);
$todaynumberinvisible = $todaynumberregistered - $todaynumbervisible;
$todaytotalonline = $todaynumberregistered - $todaynumberinvisible;
// ### MAX LOGGEDIN USERS ################################
$todaymaxusers = unserialize($datastore['todaymaxonline']);
if (intval($todaymaxusers['todaymaxonline']) <= $todaynumberregistered)
{
$todaymaxusers['todaymaxonline'] = $todaynumberregistered;
$todaymaxusers['todaymaxonlinedate'] = TIMENOW;
$DB_site->query("REPLACE INTO " . TABLE_PREFIX . "datastore (title, data) VALUES ('todaymaxonline', '" . addslashes(serialize($todaymaxusers)) . "')");
}
$todayrecordusers = $todaymaxusers['todaymaxonline'];
$todayrecorddate = vbdate($vboptions['dateformat'], $todaymaxusers['todaymaxonlinedate'], 1);
أضف تمبلت جديد بأسم / forumhome_todayloggedinuser
كود PHP:
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid">
<input style="font-size: 10px; vertical-align: middle; color: #3858AD; font-family: MS Sans Serif; letter-spacing: 0px; text-align: center; border-style: solid; border-width: 1px; padding-left: 0px; padding-right: 2px; padding-top: 0px; padding-bottom: 0px; background-color: #FFFFFF" size="15" value="$todayloggedin[musername]" name="oline"></a>$invisibleuser
أفتح تمبلت /FORUMHOME
بحث عن/
كود PHP:
<!-- end logged-in users -->
</if>
أضف تحته التالي /
كود PHP:
<!-- today logged-in users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayactiveusers')"><img id="collapseimg_forumhome_todayactiveusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayactiveusers].gif" alt="" border="0" /></a>
عدد الاعضاء الذي تواجدوا اليوم في المنتدى : $todaytotalonline
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayactiveusers" style="$vbcollapse[collapseobj_forumhome_todayactiveusers]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" border="0" /></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div>$todayactiveusers</div>
</div>
</td>
</tr>
</tbody>
<!-- end today logged-in users-->
أخوي راجع تركيب الهاك و ان شاء الله خير
اذا ما ظبطت اعلمني
سلام عليكم