Forum Replies Created
-
In reply to: Activity meta update and $activity_id
Didn’t see your post…
Anyway, honestly I have no idea why it works but I’m glad it does.In reply to: Activity meta update and $activity_idOooooohh!
So I started blindly fiddling with the parameters and something worked

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…
Thanks Paul!
In reply to: Activity meta update and $activity_idOh 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.
In reply to: Activity meta update and $activity_idNo, 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.
In reply to: Activity meta update and $activity_idUnfortunately 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.