View Full Version : Last Visited Time in Getinfo profile?
Me2Be
03-21-2001, 04:05 PM
I'd like to add a field where it shows the time a user last visited (in addition to the last post) in the user's profile (getinfo template).
Is this easy or hard to do?
add this on about line 1070 of member.php $user_lasttime = vbdate($timeformat,$userinfo[lastactivity]);
$user_lastdate = vbdate($dateformat,$userinfo[lastactivity]); then include $user_lasttime and $user_lastdate somewhere in your getinfo template :)
You may want to set it to N/A if the user has chosen to be invisible or alternatively set it to N/A for everyone but usergroupid 6.
In Member.php do a search for getinfo. Within that section look for:
$lastpostdate=vbdate($dateformat,$userinfo[lastpost]);
Put this after it:
$lastvisitdate=vbdate($dateformat,$userinfo[lastvisit]);
Freddie, how do you set it to N/A?
Wayne, is this in addition to what Kier said?
No... He just beat me to it.
Do something like this.
if ($userinfo[invisible]) {
$lastvisit = "N/A";
} else {
$user_lasttime = vbdate($timeformat,$userinfo[lastactivity]);
$user_lastdate = vbdate($dateformat,$userinfo[lastactivity]);
$lastvisit = $user_lastdate . "at". $user_lasttime;
}
Then put $lastvisit in your template.
You are both just SOOOOO fast! Thank you :)
goxy63
01-06-2009, 01:13 PM
Can anyone modify above mentioned code that on mouse-hoover we can see date and time when visitor was there in profile !?
Where in template to place '$lastvisit' .....
Thanks in advance for any answer
__________________________________________________
Didnt want to post again in this thread so I write it here....(this part should be under Lynne's post)
@Lynne
oOOOoooUUUPS
Sorryz, didnt saw that, found thread through search....:D
Lynne
01-06-2009, 02:10 PM
You shouldn't bump a eight year old thread. You should just start your own thread - it's easier for people to follow.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.