Hi @tse11
Looking at the plugin’s source, I can see the function etivite_bp_activity_bump_time_since()
filters bp_activity_time_since
. The bump date is updated by function etivite_bp_activity_bump_comment_posted()
.
I realise the plugin may be 2+ years old but have you tried contacting the plugin author to see if any support is available?
@henrywright thank you for pointing me in the right direction by explaining the filtering, etc. I may have enough to go on, now. No, I haven’t tried contacting the author, that’s an idea, too. Thanks again.
It seems the author no longer offers support for this plugin, and I have been unable to add a function to change the format still.
I tried this:
function format_activity_date() {
$activityDate=bp_get_activity_date_recorded();
// Get GMT offset from root blog
$root_blog_offset = get_blog_option( BP_ROOT_BLOG, 'gmt_offset' );
// Calculate offset time
$time_offset = $time + ( $root_blog_offset * 3600 );
// Format the time using the offset and return it; date-i18n retrieves the date in localized format
return '' . date_i18n("l, M j, Y, g:ia T", strtotime($activityDate) + $time_offset) . '';
}
add_filter('etivite_bp_activity_bump_comment_posted', 'format_activity_date');
But it still is showing only one date rather than “user1 posted an update:” updated by user2:”
Any ideas @henrywright or anyone would be so appreciated.
@tse11 so did you get it to work?
I installed it on wp 3.9.3 with bp 2.0.1.
I can’t find anything better out there. If yours is working then let me know and also what versions you are using. Right now I very much need the functionality of bumping the recent activity to the top. I will worry about the formatting later.
Also where did you add the code?
Thanks for your feedback
There is a plugin which may be helpfull, even if it doesn’t automatically push any activity to the top. But you can make it sticky by hand. Works with 2.2.1
Activity Sticker by @imath
@haagsekak I’m sorry, no I didn’t find a solution. Each time I try to modify the plugin’s date either via a new filter/function it only displays one date, really frustrating!
Reading the plug-in faq this plug-in is never going to do what you want it to.
When a new comment is posted to an activity record - this plugin will copy the original date_recorded to the activity_meta table. The main activity date_recorded is then overwritten with the last activity comment reply date.
Reading that, how they’ve made this plug-in work is by re-writing the original post’s date with the date of the latest comment, in effect changing the original post date.
It’s probably going to need a complete re-write to make it work the way you want it to. I’m very surprised that somebody else hasn’t released a plug-in like this though. Pretty standard functionality for a social network site.
@mrgiblets I agree. It is definitely a must-have in a social network.
@tse11
If it’s only a issue over confusion on the original post date you could always add “Last Active” before the date via css:
.time-since:before {
content: "Last Active: ";
}
@henrywright I’m a fan of your Buddypress Mute plugin. Would you consider (if you have the time) producing a working version of this “Bump Activity to top Plugin”? The original dev is not active any more. Hard to believe there’s no other solution out there. Perhaps I’m underestimating the complexity, though.
Hi @namrons, unfortunately I have no spare time right now to develop this. Hope you find someone who can help you out!