Skip to:
Content
Pages
Categories
Search
Top
Bottom

show time&date of topic&reply


  • alen9788
    Participant

    @alen9788

    I want to change the time show of “2 weeks, 1 day ago” in topic&reply to specific time&date such as Dec 6,2012 8:30 am.

    And i find the groups/single/forum/topic.php

    And replace <?php echo sprintf( __( ‘%1$s said %2$s:’, ‘buddypress’ ), bp_get_the_topic_post_poster_name(),

    bp_get_the_topic_post_time_since() ); ?>

    with

    <?php the_time(‘F j, Y’); ?> at <?php the_time(‘g:i a’); ?>

     

    And it does show the time&date but isn’t correct,it  shows  the topic time&date of setting up Buddypress  instead of topic&reply.I don’t know why.And I has builded the child theme of function bp.php

    Please tell me how to fix it in the child theme?I amn’t familiar with the codes,better to tell me the details,please

Viewing 1 replies (of 1 total)

  • danbpfr
    Participant

    @chouf1

    Hi,

    View here first: https://wordpress.org/search/mysql2date

    and try by replacing from

    echo sprintf( __( ‘%1$s said %2$s:’, ‘buddypress’ );

    to

    echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), true);

    This is what is used to show the date on feeds, witch has the same output you want. Maybe would work ? 😀

     

Viewing 1 replies (of 1 total)
  • The topic ‘show time&date of topic&reply’ is closed to new replies.
Skip to toolbar