View Full Version : Printing Last Post time and date
antilife
05-28-2001, 07:47 AM
Hi.
I've added a new column to my members page where I want to put the time and date of each members last post but can't work out which variable etc I need. Could someone help me...
Thanks
Mike Sullivan
05-28-2001, 03:57 PM
You need to add date processing similar to this line:
$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);
Tanya
05-28-2001, 04:15 PM
Please could you be more specific, I know I have to add something to the memberslistbit template but not sure what
Tanya
05-28-2001, 08:05 PM
.
Mike Sullivan
05-28-2001, 08:09 PM
I'm sorry, but incessant bumping does not make me very eager to help you hack your board.
NORRITT
05-29-2001, 01:11 PM
;)
John Percival
05-30-2001, 06:52 AM
Put the code that Ed gave into your memberlist.php file, replacing [datejoined] with [lastpost], at about line 116.
You can then use $userinfo[lastpost] in you memberlistbit template.
John
antilife
06-05-2001, 12:15 PM
Ok that works great but can I really be cheeky and ask one more thing. At the moment it says 01-01-1970 in the lastposted column if they have never posted. Can it be changed to 'never'
John Percival
06-05-2001, 05:21 PM
Yes, you just need to check to see if the [lastpost] field is equal to 0.
John
antilife
06-05-2001, 07:28 PM
Ok what sort of code do i need to put where?
Freddie Bingham
10-30-2001, 10:27 PM
if ($userinfo['lastpost']) {
$userinfo[lastpost]=vbdate($dateformat,$userinfo[lastpost]);
} else {
$userinfo[lastpost] = 'Never';
}
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.