Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Didn’t see your post…
    Anyway, honestly I have no idea why it works but I’m glad it does.

    Oooooohh!

    So I started blindly fiddling with the parameters and something worked :D
    I thought if $activity_id is the 4th parameter and have no idea what would be the 3rd one I passed a bogus parameter and what do you know… it worked.

    `function add_title_to_activity( $content, $user_id, $null, $activity_id ) {
    bp_activity_update_meta( $activity_id, ‘title’, $_POST );
    }

    add_action( ‘bp_groups_posted_update’, ‘add_title_to_activity’, 10, 4 );`

    Data get entered correctly into the db table but just to do things right… what are all the parameters of the functions?
    This is voodoo stuff to me really… :D

    Thanks Paul!

    Oh you mean it should be:

    `add_action( ‘bp_groups_posted_update’, ‘add_title_to_activity’, 10, 4 );`

    ?

    I tried that and it’s the same outcome.

    No, I’m afraid you didn’t understand. My problem is that the value of $activity_id is 1 with each and every posted update. This is just here in my function. The rest of the script is functioning correctly.

    So with the function from my first post the database entries from bp_activity_meta table look like this:

    id = “14”
    activity_id = “1” <<<
    meta_key = “title”
    meta_value = “Some Title Blah blah…”

    So on every new activity update there isn’t a new entry but just updates meta_value with whatever contains $_POST.

    Unfortunately for me I haven’t managed to find a solution.

    Doesn’t anyone know how to get the id of the activity update in bp_custom.php?

    Any hints greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar