Skip to:
Content
Pages
Categories
Search
Top
Bottom

Bump Activity to top Plugin

  • @tse11

    Participant

    I know that this plugin is very old and hasn’t been maintained but it still works in Buddypress 2.2/

    https://wordpress.org/plugins/buddypress-activity-stream-bump-to-top/

    The dilemma I am having is that I’d like to change the date and time formatting on the activity streams, and I can do this, however, when Bump to Top is activated, it only shows the updated date; making it look like the post was just made- when really only a comment was made.

    For example:
    User 1 posted an update March 1 2015 12:30pm, User 2 commented March 5 2015 at 6am, the activity meta shows: User 1 posted an update March 5 2015 at 6am which obviously is user 2’s activity comment date.

    How to rectify this?

Viewing 11 replies - 1 through 11 (of 11 total)
  • @henrywright

    Moderator

    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?

    @tse11

    Participant

    @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.

    @tse11

    Participant

    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.

    @haagsekak

    Participant

    @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

    @danbp

    Participant

    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

    @tse11

    Participant

    @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!

    @mrgiblets

    Participant

    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.

    @tse11

    Participant

    @mrgiblets I agree. It is definitely a must-have in a social network.

    @bigkahunaburger

    Participant

    @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: ";
    }

    @namrons

    Participant

    @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.

    @henrywright

    Moderator

    Hi @namrons, unfortunately I have no spare time right now to develop this. Hope you find someone who can help you out!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Bump Activity to top Plugin’ is closed to new replies.
Skip to toolbar