Extending Activity: How to Store Additional Info?
First off, BP is quite impressive, nice work. I’m a PHP programmer getting ready to hack the BP core but I was hoping for some input. I would like to add an additional field to the /activity/ screen. This concerns the Buddpress plugin at wp-content/buddypress.
First I add a new dropdown genre to the html form in
- add a new field genre to the database.bp_activity table
bp-themes/bp-default/_inc/global.jsadd the data to the ajax post
bp-themes/bp-default/_inc/ajax.phpadd the data to the parameter array in bp_dtheme_post_update()
bp-activity.phpadd the data to the parameter array in bp_activity_post_update()
bp-activity/bp-activity-classes.phpadd the data to the sql string in save()
Could I do something like…
bp_activity_update_meta( $activity_id, 'genre', $_POST['genre'] );
You must be logged in to reply to this topic.