Skip to:
Content
Pages
Categories
Search
Top
Bottom

Removing TimeSince from Sitewide Activity

  • Avatar of Roland Fauster
    Roland Fauster
    Participant

    @rfauster

    Hi

    Sorry for yet another question.

    I am trying to implement a sitewide activity stream in my sidebar. I modified my-friends.php for this and implement it in my sidebar using:

    <?php locate_template( array( 'activity/site-activity.php' ), true ) ?>

    While this all works fine I still can’t get my head around the filters and actions in WP/BP and therefore am unable to delete the Time Since Tags in the activity stream.

    in bp-activity.php I found

    return apply_filters( 'bp_activity_add_timesince_placeholder', $content );

    however i am not sure if I need to call remove_filter(), where and with what args!?

    Can any1 help?

    Cheers

    roland

Viewing 3 replies - 1 through 3 (of 3 total)
  • When it comes to hiding stuff… I’m always a fan of the ultra-low-tech CSS approach:

    span.time-since {display: none;}

    There are two instances of this class in the screen.file by the way

    .activity-list li span.time-since {}
    .widget_bp_activity_widget span.time-since {}

    You may want to use those classes to target where you want ‘time since’ to show or not show.

    Avatar of Roland Fauster
    Roland Fauster
    Participant

    @rfauster

    Thanx.. I will most likely end up using this approach eventhough I am a fan of small code and rather have these codes not render at all :)

    Avatar of epsi
    epsi
    Participant

    @epsi

    Though it is hardcoded in function bp_activity_content_filter in bp-activity-templatetags.php

    We can still comment those ‘the exploded %s’ and bp_activity_insert_time_since .

    The more I see the code,

    The more I appreciate BP coders ( Mr Peatling? ).

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.