[buddypress-trac] [BuddyPress] #4414: Admin UI for Groups management

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Aug 31 03:47:20 UTC 2012


#4414: Admin UI for Groups management
-------------------------------------------------+-------------------------
 Reporter:  boonebgorges                         |       Owner:
     Type:  enhancement                          |  boonebgorges
 Priority:  normal                               |      Status:  assigned
Component:  Administration                       |   Milestone:  1.7
 Severity:  major                                |     Version:
 Keywords:  has-patch needs-ui needs-testing     |  Resolution:
  dev-feedback                                   |
-------------------------------------------------+-------------------------

Comment (by boonebgorges):

 In r6282 I added support for BP_Group_Extension plugins to add their own
 metaboxes to the Dashboard UI. It works just like
 create_screen()/create_screen_save() and edit_screen()/edit_screen_save().
 I'll write something up for the codex and bpdevel, but here is a minimal
 plugin to give you the idea:

 {{{
 class Test_4414 extends BP_Group_Extension {
         function __construct() {
                 $this->name = '4414';
                 $this->slug = 'test-4414';
                 $this->enable_admin_item = true;
         }

         function admin_screen( $group_id ) {
                 $meta_value = groups_get_groupmeta( $group_id,
 'test_4414_meta' );
                 ?>
                 <input type="text" name="test-field" value="<?php echo
 esc_attr( $meta_value ) ?>" />
                 <?php
         }

         function admin_screen_save( $group_id ) {
                 $meta_value = isset( $_POST['test-field'] ) ? $_POST
 ['test-field'] : '';
                 groups_update_groupmeta( $group_id, 'test_4414_meta',
 $meta_value );
         }
 }
 bp_register_group_extension( 'Test_4414' );
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4414#comment:26>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list