1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Add "Hours Ago" to forum list

Discussion in 'Styling and Customization Questions' started by mobilephone2003, Feb 8, 2015.

  1. Currently, when a forum topic is replied to, and the reply time is shown in the forum list, it seems to go...

    "posted 59 minutes ago"


    "Posted today at 9:30PM"

    I'd love for this to go on to say "hours ago" up to a defined amount, as this makes the forum look more fresh of content, instead of just timestamped after an hour.

    Is this possible?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I believe this requires modifying getRelativeDateTime in library/XenForo/Locale.php.
  3. I'm guessing proceeding line 524:

    if ($interval < 86400)
    return str_replace(
    '{minutes}', floor($interval / 24), $phrases['x_hours_ago']

    Or similar? New to this, sorry.

Share This Page