Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Date and Time for previous posts

edited September 2011 in Vanilla 2.0 - 2.8
Is there a way that the date and time can be shown on previous posts?

I would like:

"Posted at: 29th September, 10:23am" in stead of just "29th September"



Tagged:

Answers

  • IIRC
    The format is defined in config.php (use example (ie. current) available in config-default.php), it's base on strftime format.
  • date and time can be shown on previous posts
    Explain previous posts. If there's a post from 2008, do you really want it to show that the user posted it on october 1st 2008 at 9:08 am?
    There is a mechanism (with some logic) behind showing the time and date when the posts were made. Do you want to break into that mechanism?
    Look at some of the really old threads here and then some recent posts in that threads, you'll see the difference in showing date and time for those posts.

    There was an error rendering this rich post.

  • I do like the fact that TODAY only shows time, this is cool.
  • Maybe not for 2008, but yesterday would be nice...

    I want to know what time yesterday something was posted.

    It just says "September 22nd"

    My forum is a Forex forum the forex market is open 24 hours a day.

    My users will place images on the site and having time and date when analysing financial charting images is needed.

    Cheers for the reply so far :-)
  • For starters, look at /library/core/class.format.php and then the Date() function
    personally, I think your answer lies in this code:
    // Alter the timestamp based on the user's hour offset $Session = Gdn::Session(); if ($Session->UserID > 0) $Timestamp += ($Session->User->HourOffset * 3600);And so there's a user's hour offset somewhere which you can set to whatever to make your dates show up differently

    There was an error rendering this rich post.

  • Sorry to bring this up (is this from 2011? 2010? 2009?) :D

    Would it be possible without too much hassle to maybe show the exact timestamp when the date is hovered?

    Rgds
  • Let's see if I can split the thread if we deviate from the original topic
    If you want to see the exact timestamp (real, long dateformat could be better) You'll have to do some programming then.
    <a href="url" alt="alternate">Just a link</a>
    By using alt="something" and you hover over it, you'll get that alternate text.

    There was an error rendering this rich post.

  • You can also put php into the alt tag.

    There was an error rendering this rich post.

  • Let's see if I can split the thread if we deviate from the original topic
    If you want to see the exact timestamp (real, long dateformat could be better) You'll have to do some programming then.
    <a href="url" alt="alternate">Just a link</a>
    By using alt="something" and you hover over it, you'll get that alternate text.
    Thanks I'll look into it.
  • Did anyone managed to do what @michaelfasani asked for?

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Sign In or Register to comment.