1. Edit
functions.php located in
inc folder
2. Find
if($diff <= 60)
{
// Less than a minute
$relative['prefix'] = $lang->rel_less_than;
}
3. Replace it with
if($diff <= 60)
{
// seconds ago
if($diff == 1) {
return $diff . ' second ago';
}
return $diff . ' seconds ago';
}
This doesn't work for me.
(2015-10-03, 08:18 PM)Ben C Wrote: [ -> ]This doesn't work for me.
That's weird. You sure you did it right?
Yep, throws up with a lot of fatal errors.
(2015-10-04, 10:17 AM)Ben C Wrote: [ -> ]Yep, throws up with a lot of fatal errors.
Mind showing me the errors? it's works just fine on my end.
Might be the ternary operators (though I don't know why). Try using this instead:
if($diff <= 60)
{
// seconds ago
if($diff == 1) {
return $diff . ' second ago';
}
return $diff . ' seconds ago';
}
Now given: Parse error: syntax error, unexpected 'else' (T_ELSE) in /home/public_html/inc/functions.php on line 481
(2015-10-04, 03:33 PM)Ben C Wrote: [ -> ]Now given: Parse error: syntax error, unexpected 'else' (T_ELSE) in /home/thetechf/public_html/inc/functions.php on line 481
if($diff <= 60)
{
// seconds ago
if($diff == 1) {
return $diff . ' second ago';
}
else {
return $diff . ' seconds ago';
}
}
try that.