PDA

View Full Version : Forum Display Enhancements - Show lastpost time only in last day range


ThorstenA
02-18-2007, 10:00 PM
Show lastpost time only in last day range


Do you have some forums that are not visited that much? You can provide information about lastposttime just for your active forums with this code modification.



#1 Find in includes/functions_forumlist.php


$lastpostinfo['lastpostdate'] = vbdate($vbulletin->options['dateformat'], $lastpostinfo['lastpost'], 1);
$lastpostinfo['lastposttime'] = vbdate($vbulletin->options['timeformat'], $lastpostinfo['lastpost']);

#2 Replace with


if($lastpostinfo['lastpost'] > (TIMENOW - 60*60*24))
{
$lastpostinfo['lastpostdate'] = vbdate($vbulletin->options['dateformat'], $lastpostinfo['lastpost'], 1);
$lastpostinfo['lastposttime'] = vbdate($vbulletin->options['timeformat'], $lastpostinfo['lastpost']);
}

#3 Done

gforce75
05-28-2007, 01:10 AM
Do you have any images showing how this works? I'll be willing to try it :p

mgurain
10-08-2007, 08:14 AM
Hi ThorstenA,
could this be done without php-file editing ? Idea is great!

ThorstenA
10-12-2007, 10:28 AM
I did not find any other way accomplish this the time I wrote this modification. But maybe it's possible now. You can suggest this feature for being standard on vbulletin.com suggestion forum here:

http://www.vbulletin.com/forum/forumdisplay.php?f=55