PDA

View Full Version : Date & Time of Profile Visitor



admin
14-09-2009, 07:56 PM
A simple mod to show the date and time of the profile visitor when you hover your cursor over their username in Recent Visitors in member.php.


1. Go to your Admin CP > Plugins & Products > Download / Upload Plugins > Upload the sml file profile_visitor_datetime.xml

2. Change the template "memberinfo_visitorbit" from:

<li class="smallfont"><a href="member.php?$session[sessionurl]u=$user[userid]">$user[musername]</a>$user[invisiblemark]$user[buddymark] </li>

To:

<li class="smallfont"><a href="member.php?$session[sessionurl]u=$user[userid]" title="$userdateline">$user[musername]</a>$user[invisiblemark]$user[buddymark] </li>

Save the template.

3. Open the file includes/class_profileblock.php and find the following line around line 1159:

eval('$visitorbits .= "' . fetch_template('memberinfo_visitorbit') . '";');

Add above it:

$user['date'] = vbdate($this->registry->options['dateformat'],$user['dateline']);
$user['time'] = vbdate($this->registry->options['timeformat'], $user['dateline']);
$userdateline = $user['date'] .' '. $user['time'];

Save and upload the file.