From the beginning.
Please revert your file includes/class_profile.php first
Revert and open your
memberinfo_visitorbit template:
search for:
HTML Code:
<li class="smallfont">
replace with:
HTML Code:
<li class="smallfont" style="margin-top: 4px">$user[onlinestatus] <img style="position: relative; top: 3px" src="$user[avatarurl]" height="15px" width="12px" alt="<phrase 1="$user[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
Open template
memberinfo_block_recentvisitors:
Change
ol and
/ol in
ul and
/ul
Open file includes/class_profileblock.php:
search for:
PHP Code:
$visitors_db = $this->registry->db->query_read_slave("
SELECT user.userid, user.username, user.usergroupid, user.displaygroupid, profilevisitor.visible
$hook_query_fields
FROM " . TABLE_PREFIX . "profilevisitor AS profilevisitor
INNER JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = profilevisitor.visitorid)
$hook_query_joins
WHERE profilevisitor.userid = " . $this->profile->userinfo['userid'] . "
" . (!($this->registry->userinfo['permissions']['genericpermissions'] & $this->registry->bf_ugp_genericpermissions['canseehidden']) ? " AND (visible = 1 OR profilevisitor.visitorid = " . $this->registry->userinfo['userid'] . ")" : "") . "
$hook_query_where
ORDER BY profilevisitor.dateline DESC
LIMIT $options[profilemaxvisitors]
");
replace with:
PHP Code:
$visitors_db = $this->registry->db->query_read_slave("
SELECT user.*, (user.options & " . $this->registry->bf_misc_useroptions['invisible'] . ") as invisible
" . ($this->registry->options['avatarenabled'] ?
", avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline AS avatardateline, customavatar.filedata_thumb, customavatar.height AS avheight, customavatar.width AS avwidth, customavatar.width_thumb AS avwidth_thumb, customavatar.height_thumb AS avheight_thumb" : "") . ", profilevisitor.visible
$hook_query_fields
FROM " . TABLE_PREFIX . "profilevisitor AS profilevisitor
INNER JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = profilevisitor.visitorid)"
. ($this->registry->options['avatarenabled'] ? "
LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON (customavatar.userid = user.userid) " : '') . "
$hook_query_joins
WHERE profilevisitor.userid = " . $this->profile->userinfo['userid'] . "
" . (!($this->registry->userinfo['permissions']['genericpermissions'] & $this->registry->bf_ugp_genericpermissions['canseehidden']) ? " AND (profilevisitor.visible = 1 OR profilevisitor.visitorid = " . $this->registry->userinfo['userid'] . ")" : "") . "
$hook_query_where
ORDER BY profilevisitor.dateline DESC
LIMIT $options[profilemaxvisitors]
");
search for:
PHP Code:
$visitors["$user[username]"] = $user;
above add:
PHP Code:
fetch_online_status($user, true);
fetch_avatar_from_userinfo($user, true);
Ready!
Quote:
how to add the the time the user visited.
|
http://your-vb.com/showthread.php?t=114
Regards,
Stoebi