Skip to:
Content
Pages
Categories
Search
Top
Bottom

Trying to generate an activity id


  • davidpaulalbert
    Member

    @davidpaulalbert

    Been spinning my wheels on this for hours. Trying to generate an $activity_id var using the following:

    global $bp;
    $activity_id = bp_activity_get_activity_id( array(
    ‘user_id’ => $post->author_id,
    ‘type’ => ‘new_blog_post’,
    ‘component’ => ‘blogs’,
    ‘item_id’ => 1,
    ‘secondary_item_id’ => $post->ID

    I’m running this in the loop for posts. Essentially I’m trying to recreate a “favorite button” hack I read about here: http://www.dnxpert.com/2010/06/11/mark-blog-post-as-favorite-in-buddypress/ which if you read the comments, does seem to work for people running BP 1.5.5 w/ WP 3.3.

    The problem is I simply cannot get the $activity_id to generate. When I try to echo it out I get nothing…if anyone can shed some insight, I would appreciate it immensely.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trying to generate an activity id’ is closed to new replies.
Skip to toolbar