Skip to:
Content
Pages
Categories
Search
Top
Bottom

Timestamp in topic replys as clock.

  • @barabajen

    Member

    since my last try of getting help with my bbpress installation was a total succes I´ll try again.

    How do I change the timestamp (“posted for XX minutes ago”) to a regular clock. “Posted 13.16, september 10th”

    Thanks for your help

    /Patric

Viewing 4 replies - 1 through 4 (of 4 total)
  • @kawauso

    Member

    In post.php, change <?php printf( __('Posted %s ago'), bb_get_post_time() ); ?> to <?php printf( __('Posted %s'), bb_get_post_time(array('format'=>'datetime')) ); ?>. You need to change the option datetime_format to change how the date/time is formatted, not sure where that’s set, so the All Options plugin might help.

    @barabajen

    Member

    Help,

    I changed to the above. Checked so that the datetime_format was put as it should be (as far as my knowledge says.

    but the result came out: Posted 12pm30UTC305709UTC

    Any ideas?

    @chandersbs

    Member

    Try this code instead, this is what I’m using on my own forums:

    <?php printf( __('Posted on %s'), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?>

    @barabajen

    Member

    Thanks for the help, both of you. The last reply was the one that was needed.

    Great!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar