Omit time stamps from Activity/feed so only date stamps show

Is it possible to omit time stamps from a Buddypress install so that users only see the date submitted? I have an install where users are active in the site, but at late hours of the night/morning. They’ve asked for timestamps to be omitted the feed so they can focus on collaborating more, not worrying about if others will see that they’re night owls. Thanks.

Looking at the activity entry file that time stamp is part of the bp_activity_action() template tag, looking that up in core bp-activity-templatetags.php and it shows bp_activity_time_since applied to $content for that template tag.

@pjnu – unfortunately those “time since” messages are embedded quite deep in the core template tags used by the default theme, and are not the most obvious to remove / change.

It can be done however.

The time since text is inserted by a routine called bp_insert_activity_meta() that’s called from the tags the default template uses: bp_activity_action() and bp_activity_content_body().

There’s no easy way to filter those tags to alter the time presentation [EDIT: perhaps there is – see other comments], so the easiest route is to modify your theme taking out the calls to bp_activity_action() and bp_activity_content_body(), and replacing them with calls to get the parts of the message individually:

e.g. you can call bp_get_activity_date_recorded() to get the date as a datetime stamp which you can then format with the PHP date() function to display as you want it.

These template tags are all declared in bp-activity-templatetags.php

There’s no straight template tag to get the activity_action without the activity_meta (and timestamp) being added – so, we write our own function for that in bp-custom.php and call it from our theme:

looking at the filter suggested by @hnla – It looks like you could make that work as well. Rather than setting the content to ” “, you would set it to the date submitted (which I think you are still wanting to display).