Skip to:
Content

BuddyPress.org

Changeset 3987


Ignore:
Timestamp:
02/01/2011 11:54:03 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Introduce icons32.png to project, and use through-out admin area. Also clean up some component grammar and verbiage, and hide the admin dashboard menu item until it is closer to completion.

Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-admin.php

    r3977 r3987  
    2828
    2929    if ( !empty( $current_blog ) ) {
    30         if ( $current_blog->blog_id != BP_ROOT_BLOG )
     30        if ( $current_blog->blog_id != BP_ROOT_BLOG ) {
    3131            return false;
     32        }
    3233    }
    3334
     
    6667
    6768        <div id="bp-admin-header">
    68             <h3><?php _e( 'BuddyPress', 'buddypress' ) ?></h3>
    69             <h2><?php _e( 'Dashboard',  'buddypress' ) ?></h2>
     69            <h3><?php _e( 'BuddyPress', 'buddypress' ); ?></h3>
     70            <h2><?php _e( 'Dashboard',  'buddypress' ); ?></h2>
    7071        </div>
    7172
    72         <?php do_action( 'bp_admin_notices' ) ?>
     73        <?php do_action( 'bp_admin_notices' ); ?>
    7374
    7475        <form action="<?php echo site_url( '/wp-admin/admin.php?page=bp-general-settings' ) ?>" method="post" id="bp-admin-form">
     
    115116    <div class="wrap">
    116117
    117         <h2><?php _e( 'BuddyPress Settings', 'buddypress' ) ?></h2>
     118        <?php screen_icon( 'buddypress' ); ?>
     119
     120        <h2><?php _e( 'BuddyPress General Settings', 'buddypress' ); ?></h2>
    118121
    119122        <?php if ( isset( $_POST['bp-admin'] ) ) : ?>
    120123
    121124            <div id="message" class="updated fade">
    122                 <p><?php _e( 'Settings Saved', 'buddypress' ) ?></p>
     125                <p><?php _e( 'Settings Saved', 'buddypress' ); ?></p>
    123126            </div>
    124127
     
    132135                    <?php if ( bp_is_active( 'xprofile' ) ) : ?>
    133136
    134                         <tr>
    135                             <th scope="row"><?php _e( 'Base profile group name', 'buddypress' ) ?>:</th>
    136                             <td>
    137                                 <input name="bp-admin[bp-xprofile-base-group-name]" id="bp-xprofile-base-group-name" value="<?php echo esc_attr( stripslashes( get_site_option( 'bp-xprofile-base-group-name' ) ) ) ?>" />
    138                             </td>
    139                         </tr>
    140                         <tr>
    141                             <th scope="row"><?php _e( 'Full Name field name', 'buddypress' ) ?>:</th>
    142                             <td>
    143                                 <input name="bp-admin[bp-xprofile-fullname-field-name]" id="bp-xprofile-fullname-field-name" value="<?php echo esc_attr( stripslashes( get_site_option( 'bp-xprofile-fullname-field-name' ) ) ) ?>" />
    144                             </td>
    145                         </tr>
    146137                        <tr>
    147138                            <th scope="row"><?php _e( 'Disable BuddyPress to WordPress profile syncing?', 'buddypress' ) ?>:</th>
     
    161152                        </td>
    162153                    </tr>
     154
    163155                    <tr>
    164156                        <th scope="row"><?php _e( 'Disable avatar uploads? (Gravatars will still work)', 'buddypress' ) ?>:</th>
     
    168160                        </td>
    169161                    </tr>
     162
    170163                    <tr>
    171164                        <th scope="row"><?php _e( 'Disable user account deletion?', 'buddypress' ) ?>:</th>
     
    205198            </table>
    206199
    207             <?php do_action( 'bp_core_admin_screen' ) ?>
     200            <?php do_action( 'bp_core_admin_screen' ); ?>
    208201
    209202            <p class="submit">
    210                 <input class="button-primary" type="submit" name="bp-admin-submit" id="bp-admin-submit" value="<?php _e( 'Save Settings', 'buddypress' ) ?>"/>
     203                <input class="button-primary" type="submit" name="bp-admin-submit" id="bp-admin-submit" value="<?php _e( 'Save Settings', 'buddypress' ); ?>" />
    211204            </p>
    212205
    213             <?php wp_nonce_field( 'bp-admin' ) ?>
     206            <?php wp_nonce_field( 'bp-admin' ); ?>
    214207
    215208        </form>
     
    252245    <div class="wrap">
    253246
    254         <h2><?php _e( 'BuddyPress Component Setup', 'buddypress' ) ?></h2>
     247        <?php screen_icon( 'buddypress'); ?>
     248
     249        <h2><?php _e( 'BuddyPress Component Settings', 'buddypress' ); ?></h2>
    255250
    256251        <?php if ( isset( $_POST['bp-admin-component-submit'] ) ) : ?>
    257252
    258253            <div id="message" class="updated fade">
    259                 <p><?php _e( 'Settings Saved', 'buddypress' ) ?></p>
     254
     255                <p><?php _e( 'Settings Saved', 'buddypress' ); ?></p>
     256
    260257            </div>
    261258
     
    264261        <form action="" method="post" id="bp-admin-component-form">
    265262
    266            
    267 
    268             <?php $disabled_components = get_site_option( 'bp-deactivated-components' ); ?>
    269            
    270             <?php bp_core_admin_component_options() ?>
    271            
    272             <?php bp_core_admin_page_options() ?>
     263            <?php
     264
     265                $disabled_components = get_site_option( 'bp-deactivated-components' );
     266                bp_core_admin_component_options();
     267                bp_core_admin_page_options();
     268
     269            ?>
    273270
    274271            <p class="submit clear">
     
    276273            </p>
    277274
    278             <?php wp_nonce_field( 'bp-admin-component-setup' ) ?>
     275            <?php wp_nonce_field( 'bp-admin-component-setup' ); ?>
    279276
    280277        </form>
     
    301298    $optional_components = array(
    302299        'xprofile' => array(
    303             'title'     => __( "Extended Profiles", 'buddypress' ),
    304             'description'   => __( "Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.", 'buddypress' )
     300            'title'       => __( 'Extended Profiles', 'buddypress' ),
     301            'description' => __( 'Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.', 'buddypress' )
    305302        ),
    306303        'friends' => array(
    307             'title'     => __( "Friend Connections", 'buddypress' ),
    308             'description'   => __( "Let your users make connections so they can track the activity of others, or filter on only those users they care about the most.", 'buddypress' )
     304            'title'       => __( 'Friend Connections', 'buddypress' ),
     305            'description' => __( 'Let your users make connections so they can track the activity of others, or filter on only those users they care about the most.', 'buddypress' )
    309306        ),
    310307        'messages' => array(
    311             'title'     => __( "Private Messaging", 'buddypress' ),
    312             'description'   => __( "Private messaging will allow your users to talk to each other directly, and in private. Not just limited to one on one discussions, your users can send messages to multiple recipients.", 'buddypress' )
     308            'title'       => __( 'Private Messaging', 'buddypress' ),
     309            'description' => __( 'Private messaging will allow your users to talk to each other directly, and in private. Not just limited to one on one discussions, your users can send messages to multiple recipients.', 'buddypress' )
    313310        ),
    314311        'activity' => array(
    315             'title'     => __( "Activity Streams", 'buddypress' ),
    316             'description'   => __( "Global, personal and group activity streams with threaded commenting, direct posting, favoriting and @mentions. All with full RSS feed and email notification support.", 'buddypress' )
     312            'title'       => __( 'Activity Streams', 'buddypress' ),
     313            'description' => __( 'Global, personal and group activity streams with threaded commenting, direct posting, favoriting and @mentions. All with full RSS feed and email notification support.', 'buddypress' )
    317314        ),
    318315        'groups' => array(
    319             'title'     => __( "Extensible Groups", 'buddypress' ),
    320             'description'   => __( "Powerful public, private or hidden groups allow your users to break the discussion down into specific topics with a separate activity stream and member listing.", 'buddypress' )
     316            'title'       => __( 'Extensible Groups', 'buddypress' ),
     317            'description' => __( 'Powerful public, private or hidden groups allow your users to break the discussion down into specific topics with a separate activity stream and member listing.', 'buddypress' )
    321318        ),
    322319        'forums' => array(
    323             'title'     => __( "Discussion Forums", 'buddypress' ),
    324             'description'   => __( "Full powered discussion forums built directly into groups allow for more conventional in-depth conversations. NOTE: This will require an extra (but easy) setup step.", 'buddypress' )
     320            'title'       => __( 'Discussion Forums', 'buddypress' ),
     321            'description' => __( 'Full powered discussion forums built directly into groups allow for more conventional in-depth conversations. NOTE: This will require an extra (but easy) setup step.', 'buddypress' )
    325322        )
    326323    );
     
    328325    if ( is_multisite() ) {
    329326        $optional_components['blogs'] = array(
    330             'title'     => __( "Blog Tracking", 'buddypress' ),
    331             'description'   => __( "Track new blogs, new posts and new comments across your entire blog network.", 'buddypress' )
     327            'title'       => __( 'Blog Tracking', 'buddypress' ),
     328            'description' => __( 'Track new blogs, new posts and new comments across your entire blog network.', 'buddypress' )
    332329        );
    333330    }
     
    337334    <?php /* The setup wizard uses different, more descriptive text here */ ?>
    338335    <?php if ( empty( $bp_wizard ) ) : ?>
    339         <h3><?php _e( 'Optional Components', 'buddypress' ) ?></h3>
     336
     337        <h3><?php _e( 'Active Components', 'buddypress' ); ?></h3>
    340338               
    341         <p><?php _e( "Select the BuddyPress components you'd like to enable.", 'buddypress' ) ?></p>
     339        <p><?php _e( 'Choose which BuddyPress components you would like to use.', 'buddypress' ); ?></p>
     340
    342341    <?php endif ?>
    343342   
    344343    <table class="form-table">
    345344        <tbody>
     345
    346346            <?php foreach ( $optional_components as $name => $labels ) : ?>
    347             <tr valign="top">
    348                 <th scope="row">
    349                     <?php echo esc_html( $labels['title'] ) ?>
    350                 </th>
    351                
    352                 <td>
    353                     <label for="bp_components[bp-<?php echo esc_attr( $name ) ?>.php]">
    354                         <input type="checkbox" name="bp_components[bp-<?php echo esc_attr( $name ) ?>.php]" value="1"<?php if ( !isset( $disabled_components['bp-' . esc_attr( $name ) . '.php'] ) ) : ?> checked="checked"<?php endif ?> />
    355                         <?php echo esc_html( $labels['description'] ) ?>
    356                     </label>
    357 
    358                 </td>
    359             </tr>
     347
     348                <tr valign="top">
     349                    <th scope="row"><?php echo esc_html( $labels['title'] ); ?></th>
     350
     351                    <td>
     352                        <label for="bp_components[bp-<?php echo esc_attr( $name ); ?>.php]">
     353                            <input type="checkbox" name="bp_components[bp-<?php echo esc_attr( $name ); ?>.php]" value="1"<?php if ( !isset( $disabled_components['bp-' . esc_attr( $name ) . '.php'] ) ) : ?> checked="checked"<?php endif ?> />
     354
     355                            <?php echo esc_html( $labels['description'] ); ?>
     356
     357                        </label>
     358
     359                    </td>
     360                </tr>
     361
    360362            <?php endforeach ?>
     363
    361364        </tbody>
    362365    </table>
     
    364367    <?php /* Make sure that the blogs component is deactivated when multisite is shut off */ ?>
    365368    <?php if ( !is_multisite() ) : ?>
     369
    366370        <input type="hidden" name="bp_components[bp-blogs.php]" value="0" />
     371
    367372    <?php endif ?>
    368373   
     
    385390    // An array of strings looped over to create component setup markup
    386391    $directory_pages = array(
    387         'groups' => __( "Groups Directory", 'buddypress' ),
    388         'forums' => __( "Forums Directory", 'buddypress' ),
    389         'members' => __( "Members Directory", 'buddypress' ),
    390         'activity' => __( "Activity", 'buddypress' ),
    391         'register' => __( "Register", 'buddypress' ),
    392         'activate' => __( "Activate", 'buddypress' )
     392        'groups'   => __( 'Groups Directory', 'buddypress' ),
     393        'forums'   => __( 'Forums Directory', 'buddypress' ),
     394        'members'  => __( 'Members Directory', 'buddypress' ),
     395        'activity' => __( 'Activity', 'buddypress' ),
     396        'register' => __( 'Register', 'buddypress' ),
     397        'activate' => __( 'Activate', 'buddypress' )
    393398    );
    394399   
    395     if ( is_multisite() ) {
    396         $directory_pages['blogs'] = __( "Blogs Directory", 'buddypress' );
    397     }
    398    
    399     ?>
    400    
    401     <h3><?php _e( "BuddyPress Page Setup", 'buddypress' ) ?></h3>
    402    
    403     <p><?php _e( "Choose the WordPress pages you'd like to associate with the following BuddyPress content.", 'buddypress' ) ?></p>
    404    
    405     <p><?php _e( "Leaving any of these items unset makes that content inaccessible to visitors, so be sure to fill this section out carefully.", 'buddypress' ) ?></p>
     400    if ( is_multisite() )
     401        $directory_pages['blogs'] = __( "Blogs Directory", 'buddypress' ); ?>
     402   
     403    <h3><?php _e( 'Page Setup', 'buddypress' ); ?></h3>
     404   
     405    <p><?php _e( 'Choose the WordPress pages you would like to associate with the following BuddyPress content.', 'buddypress' ); ?></p>
     406   
     407    <p><?php _e( 'Leaving any of these items unset makes that content inaccessible to visitors, so be sure to fill this section out carefully.', 'buddypress' ); ?></p>
    406408   
    407409    <table class="form-table">
    408410        <tbody>
     411
    409412            <?php foreach ( $directory_pages as $name => $label ) : ?>
    410             <tr valign="top">
    411                 <th scope="row">
    412                     <label for="bp_pages[<?php echo esc_attr( $name ) ?>]"><?php echo esc_html( $label ) ?></label>
    413                 </th>
    414                
    415                 <td>
    416                     <?php echo wp_dropdown_pages( array(
    417                         'name' => 'bp_pages[' . esc_attr( $name ) . ']',
    418                         'echo' => false,
    419                         'show_option_none' => __( '- Select -', 'buddypress' ),
    420                         'selected' => !empty( $existing_pages[$name] ) ? $existing_pages[$name] : false
    421                     ) ) ?>
    422                 </td>
    423             </tr>
     413
     414                <tr valign="top">
     415                    <th scope="row">
     416                        <label for="bp_pages[<?php echo esc_attr( $name ) ?>]"><?php echo esc_html( $label ) ?></label>
     417                    </th>
     418
     419                    <td>
     420                        <?php echo wp_dropdown_pages( array(
     421                            'name'             => 'bp_pages[' . esc_attr( $name ) . ']',
     422                            'echo'             => false,
     423                            'show_option_none' => __( '- None -', 'buddypress' ),
     424                            'selected'         => !empty( $existing_pages[$name] ) ? $existing_pages[$name] : false
     425                        ) ) ?>
     426                    </td>
     427                </tr>
     428
    424429            <?php endforeach ?>
     430
    425431        </tbody>
    426432    </table>
  • trunk/bp-core/bp-core-functions.php

    r3982 r3987  
    146146        'capability' => 'manage_options',
    147147        'file'       => 'bp-general-settings',
    148         'function'   => 'bp_core_admin_dashboard',
     148        'function'   => 'bp_core_admin_component_setup',
    149149        'position'   => 2
    150150    ) );
    151151
    152     $hooks[] = add_submenu_page( 'bp-general-settings', __( 'BuddyPress Dashboard', 'buddypress' ), __( 'Dashboard', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_dashboard' );
    153     $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Settings', 'buddypress' ),       __( 'Settings',  'buddypress' ), 'manage_options', 'bp-settings',         'bp_core_admin_settings'  );
    154     $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Component Setup', 'buddypress' ),             __( 'Component Setup',  'buddypress' ), 'manage_options', 'bp-component-setup',         'bp_core_admin_component_setup'  );
     152    $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Components', 'buddypress' ), __( 'Components', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_component_setup'  );
     153    $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Settings',   'buddypress' ), __( 'Settings',   'buddypress' ), 'manage_options', 'bp-settings',         'bp_core_admin_settings'         );
    155154
    156155    // Add a hook for css/js
    157     foreach( $hooks as $hook ) {
     156    foreach( $hooks as $hook )
    158157        add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' );
    159     }
     158
    160159}
    161160add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_core_add_admin_menu', 9 );
  • trunk/bp-core/css/admin.dev.css

    r3771 r3987  
     1div#icon-buddypress {
     2    background: url( ../images/icons32.png ) no-repeat -4px 0px;
     3}
     4
    15div#bp-admin {
    26    margin: 25px 15px 25px 0;
  • trunk/bp-xprofile/admin/css/admin.dev.css

    r3771 r3987  
    11/* Profile field group main admin page */
     2div#icon-buddypress {
     3    background: url( ../../../bp-core/images/icons32.png ) no-repeat -4px 0px;
     4}
    25#tabs {
    36    position: relative;
  • trunk/bp-xprofile/bp-xprofile-admin.php

    r3949 r3987  
    3939
    4040    <div class="wrap">
    41         <div class="icon32" id="icon-tools"><br></div>
     41
     42        <?php screen_icon( 'buddypress' ); ?>
     43
    4244        <h2>
    4345
    44             <?php _e( 'Profile Field Setup', 'buddypress'); ?>
     46            <?php _e( 'Extended Profile Fields', 'buddypress'); ?>
    4547
    4648            <a id="add_group" class="button add-new-h2" href="admin.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ); ?></a>
  • trunk/bp-xprofile/bp-xprofile-buddybar.php

    r3955 r3987  
    2222
    2323    // Add the administration tab under the "Site Admin" tab for site administrators
    24     add_submenu_page( 'bp-general-settings', __( 'Profile Field Setup', 'buddypress' ), __( 'Profile Field Setup', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' );
     24    add_submenu_page( 'bp-general-settings', __( 'Profile Fields', 'buddypress' ), __( 'Profile Fields', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' );
    2525}
    2626add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'xprofile_add_admin_menu' );
Note: See TracChangeset for help on using the changeset viewer.