Skip to:
Content
Pages
Categories
Search
Top
Bottom

Manually create activity posts


  • tifire
    Participant

    @tifire

    Wordpress version:3.8.1
    Buddypress version: 1.9.2

    I have searched this forum using google, but didn’t find an answer.

    My users got confused by the activity posting and the group creation. Some of them use the former, and others use the latter. I wanted to shutdown the group component of my site totally and allow users to post everything via the activity post form.

    So here are my questions:

    1. How can I create an activity post manually for an existing user? I figure I can do that by adding rows directly to the database table, but is there an easier way?

    2. As said above, I will need to convert previous group contents into activity posts (group description to activity content, group admin as activity poster ). But how do I maintain the order of current activity loop. It’s best to keep them as history activity posts instead of new posts.

    Good thing is that I only need to convert group descriptions, so it make things easier. Can someone help?

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

  • modemlooper
    Moderator

    @modemlooper

    Not going to be easy. So, you want to turn group activity into user activity?


    tifire
    Participant

    @tifire

    @modemlooper thank you for the response. No, I don’t need to turn group activity into user activity. Just want to manually create activity posts for users using the groups they created (using the group description). Never mind the group stuff, I can copy the group content myself.

    So maybe it’s better to put my question this way:
    How do I manually create an activity update for a specific user and keep it at the right place in the activity loop?

    For example, I need to create an activity update for user “tony”, and when it shows on the activity loop, it says “tony posted an update 4 weeks and 3 days ago”. It needs to be shown before any updates added 4 weeks and 4 days ago, and after 4 weeks 2 days ago.

    Thanks again.


    Renato Alves
    Moderator

    @espellcaste

    I have no idea how to do that, but just to clarify, I think what you are trying to do is exactly what @modemlooper suggested, it appears you’re trying to “change the location” from the groups activity to the user activity, maintaining the proper date, user and etc. Correct?!

    If that’s the case, maybe there is a way of automatically copying, with PHP, from the group to the user activity. The user is already set, because it is not gonna change, just the location is gonna change (it’s not gonna continue in the Groups, it’s gonna to the user activity). After copying, you could delete the groups activity and deactivate the Groups Component.

    I’m not aware how BuddyPress works with urls, but you would probably need to update to reflect the new location.


    modemlooper
    Moderator

    @modemlooper

    I’m confused to why you need to recreate the group creation activity notice. When a user creates a group it posts an activity “xx created the group xx”

    Also you seem to want an activity post to be sticky?


    tifire
    Participant

    @tifire

    @espellcaste thanks for the response. No, I don’t want to transfer the activity in a group to the user activity. I need to recreate a new “history” activity post using any text. Sorry I might got people confused by saying group description, even though it’s what I want to use for the activity text.


    @modemlooper
    thanks, but I don’t want to recreate the group creation notice, I need to create a new activity update. Forget about the group thing, do you happen to know how I can do that? Think about it this way, if a user deleted one of his activity post (posted 4 weeks and 3 days ago), how do I recreate one for him?


    modemlooper
    Moderator

    @modemlooper

    If it’s deleted it’s gone. Still confused about why the date or specific activity is important. How would you get group info if there are no groups?

    This is how you manually add activity with code: https://codex.buddypress.org/developer/function-examples/bp_activity_add/


    Renato Alves
    Moderator

    @espellcaste

    I’m also a little confused in what you’re trying to achieve. Would it be a history, like in notifications, but for the activities?


    tifire
    Participant

    @tifire

    @espellcaste It’s important for our specific project as we wanted to use activity post as a way of frond end posting. Thanks @modemlooper for the add activity function. It surely helped.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Manually create activity posts’ is closed to new replies.
Skip to toolbar