Log in

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?

03-21-2001, 04:17 PM
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 :)

03-21-2001, 04:19 PM
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.

03-21-2001, 04:21 PM
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]);

03-21-2001, 04:23 PM
Freddie, how do you set it to N/A?

Wayne, is this in addition to what Kier said?

03-21-2001, 04:27 PM
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.

03-21-2001, 04:28 PM
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.