Log in

View Full Version : modified to say how long ago the topic was created


great kitten
07-13-2011, 04:56 AM
I look for this modification

https://vborg.vbsupport.ru/external/2011/07/35.png

I have this code, but I can not say 'today' when creating a theme today, looks like this "(He <1 day)" and "yesterday" when I spend a day

and if you could put in gray and remove the "()" would be perfect, thanks

$startparts = explode('/', vbdate('m/d/Y', $thread['dateline'], true));
$endparts = explode('/', vbdate('m/d/Y', TIMENOW, true));
$startdate = gregoriantojd($startparts[0], $startparts[1], $startparts[2]);
$enddate = gregoriantojd($endparts[0], $endparts[1], $endparts[2]);
$days = ($enddate - $startdate == 0) ? '< 1' : $enddate - $startdate;

if ($thread['dateline'])
{
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
$thread['threaddate'] = " Hace $days d?as";
}

Post Reader
07-15-2011, 01:52 AM
tried closing the angle brackets? like

'<1>'

?

great kitten
07-18-2011, 06:00 AM
now appears "<1> days" but does not say "today"