Add Custom BuddyPress Activity Item

Hey guys,

I’m hoping there is a Wordpress/BuddyPress wizard who can help me create a new activity item. I have a button on the user profile page which is NOT an XProfile field which I need to add to activity. So when the user clicks the button a new activity will be created in their activity stream. I have successfully added a custom post type to the activity stream so when the user creates a post it shows in activity, but I cannot figure out how to apply the same function I used for the custom post type to the button click.

I know I need to create a function and call it onClick or onChange, but the only functions I can find are for adding custom post types. Here is the code layout which is typically used for adding custom post types:

function bp_custom_record_activity() {
    $activity_id = bp_activity_add( array(
        'id'		    => '',
        'action'            => '',
        'content'           => '',
        'component'         => '',
        'type'              => '',
        'primary_link'	    => '',
        'user_id'	    => '',
        'item_id'	    => '',
        'secondary_item_id' => '',
        'recorded_time'	    => '',
        'hide_sitewide'	    => '',
    ) );
    return $activity_id;

And here is my Checkbox:

<div id="bd-button">   
<form name="bdchkbox">
  <input type="checkbox" hidden="hidden" name="bdchk" id="bdchk" onChange="submit()"><span id="bdlbl">Featured</span> 

I really appreciate any assistance!

Anyone have any ideas???

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.