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
../themes/theme/activity/post-form.phpOption 1:
- add a new field genre to the database.bp_activity table
bp-themes/bp-default/_inc/global.jsadd the data to the ajax postbp-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()
Option 2:
Could I do something like…
bp_activity_update_meta( $activity_id, 'genre', $_POST['genre'] );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.