Skip to:

Demo Data Plugin with BuddyPress 1.2

  • Profile photo of Chris Taylor
    Chris Taylor


    Hi everyone,

    I have a problem with my Demo Data Plugin ( in Buddypress 1.2. The functions that add dummy wire messages no longer work, and looking for the string “wire” in the BP source gives very few results. I guess it’s all rolled into the activity system now, yes?

    So my question is: can I use thebp_activity_add function to add wire messages to groups and profiles? The defaults for this function are:

    $defaults = array(
    'id' => false, // Pass an existing activity ID to update an existing entry.

    'action' => '', // The activity action - e.g. "Jon Doe posted an update"
    'content' => '', // Optional: The content of the activity item e.g. "BuddyPress is awesome guys!"

    'component' => false, // The name/ID of the component e.g. groups, profile, mycomponent
    'type' => false, // The activity type e.g. activity_update, profile_updated
    'primary_link' => '', // Optional: The primary URL for this item in RSS feeds (defaults to activity permalink)

    'user_id' => $bp->loggedin_user->id, // Optional: The user to record the activity for, can be false if this activity is not for a user.
    'item_id' => false, // Optional: The ID of the specific item being recorded, e.g. a blog_id
    'secondary_item_id' => false, // Optional: A second ID used to further filter e.g. a comment_id
    'recorded_time' => gmdate( "Y-m-d H:i:s" ), // The GMT time that this activity was recorded
    'hide_sitewide' => false // Should this be hidden on the sitewide activity stream?

    So to add a dummy wire message to a group I’d use:

    bp_activity_add( array(
    "action"=>"Posted a Wire message",
    "content"=>"Lorem ipsum...",
    "item_id"=>[ the group ID ]

    If anyone uses this plugin and can help with any other bugs I’d be very grateful.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Profile photo of Mike Pratt
    Mike Pratt


    I do not use the plugin but you should know that the wire no longer exists in 1.2. It has been rolled into Status Updates

    Profile photo of chembro303


    Chris – your latest update says compatible with standard wordpress but I have WordPress 2.9.2 and BP 1.2.3 and can’t find your plugin settings screen in my dashboard after activating. Can you tell me where to look?

    Profile photo of Andy Peatling
    Andy Peatling


    $activity_id = bp_activity_post_update( array( ‘content’ => $content, ‘user_id’ => $user_id ) );

    $activity_id = groups_post_update( array( ‘content’ => $content, ‘user_id’ => $user_id, ‘group_id’ => $group_id ) );

    The functions above will post an update by the user on their profile, or in a group. It will return the activity ID which you can use to attach a comment:

    $comment_id = bp_activity_new_comment( array( ‘activity_id’ => $activity_id, ‘content’ => $content, ‘user_id’ => $user_id, ‘parent_id’ => [optional] ) );

    You could post a reply to that comment by using the same function and passing the $comment_id as the parent_id param.

    Profile photo of Tom Longmate
    Tom Longmate


    @chembro303 – I have the same issue, did you manage to find the form screen anywhere in regular WordPress?

    Profile photo of Chris Taylor
    Chris Taylor


    Thanks Andy, I’ll try to use that syntax in the plugin.

    @chembro303 and @amigolargo: The Demo Data menu item is under “Tools” in standard WordPress. Let me know if you still have problems (I keep a closer eye on the WP forums, but I’ll try to remember to check here as well).

    Profile photo of syedmasudulhasib


    This is smh reply

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Demo Data Plugin with BuddyPress 1.2’ is closed to new replies.
Skip to toolbar