Changeset 3987
- Timestamp:
- 02/01/2011 11:54:03 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-admin.php
r3977 r3987 28 28 29 29 if ( !empty( $current_blog ) ) { 30 if ( $current_blog->blog_id != BP_ROOT_BLOG ) 30 if ( $current_blog->blog_id != BP_ROOT_BLOG ) { 31 31 return false; 32 } 32 33 } 33 34 … … 66 67 67 68 <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> 70 71 </div> 71 72 72 <?php do_action( 'bp_admin_notices' ) ?>73 <?php do_action( 'bp_admin_notices' ); ?> 73 74 74 75 <form action="<?php echo site_url( '/wp-admin/admin.php?page=bp-general-settings' ) ?>" method="post" id="bp-admin-form"> … … 115 116 <div class="wrap"> 116 117 117 <h2><?php _e( 'BuddyPress Settings', 'buddypress' ) ?></h2> 118 <?php screen_icon( 'buddypress' ); ?> 119 120 <h2><?php _e( 'BuddyPress General Settings', 'buddypress' ); ?></h2> 118 121 119 122 <?php if ( isset( $_POST['bp-admin'] ) ) : ?> 120 123 121 124 <div id="message" class="updated fade"> 122 <p><?php _e( 'Settings Saved', 'buddypress' ) ?></p>125 <p><?php _e( 'Settings Saved', 'buddypress' ); ?></p> 123 126 </div> 124 127 … … 132 135 <?php if ( bp_is_active( 'xprofile' ) ) : ?> 133 136 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>146 137 <tr> 147 138 <th scope="row"><?php _e( 'Disable BuddyPress to WordPress profile syncing?', 'buddypress' ) ?>:</th> … … 161 152 </td> 162 153 </tr> 154 163 155 <tr> 164 156 <th scope="row"><?php _e( 'Disable avatar uploads? (Gravatars will still work)', 'buddypress' ) ?>:</th> … … 168 160 </td> 169 161 </tr> 162 170 163 <tr> 171 164 <th scope="row"><?php _e( 'Disable user account deletion?', 'buddypress' ) ?>:</th> … … 205 198 </table> 206 199 207 <?php do_action( 'bp_core_admin_screen' ) ?>200 <?php do_action( 'bp_core_admin_screen' ); ?> 208 201 209 202 <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' ); ?>" /> 211 204 </p> 212 205 213 <?php wp_nonce_field( 'bp-admin' ) ?>206 <?php wp_nonce_field( 'bp-admin' ); ?> 214 207 215 208 </form> … … 252 245 <div class="wrap"> 253 246 254 <h2><?php _e( 'BuddyPress Component Setup', 'buddypress' ) ?></h2> 247 <?php screen_icon( 'buddypress'); ?> 248 249 <h2><?php _e( 'BuddyPress Component Settings', 'buddypress' ); ?></h2> 255 250 256 251 <?php if ( isset( $_POST['bp-admin-component-submit'] ) ) : ?> 257 252 258 253 <div id="message" class="updated fade"> 259 <p><?php _e( 'Settings Saved', 'buddypress' ) ?></p> 254 255 <p><?php _e( 'Settings Saved', 'buddypress' ); ?></p> 256 260 257 </div> 261 258 … … 264 261 <form action="" method="post" id="bp-admin-component-form"> 265 262 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 ?> 273 270 274 271 <p class="submit clear"> … … 276 273 </p> 277 274 278 <?php wp_nonce_field( 'bp-admin-component-setup' ) ?>275 <?php wp_nonce_field( 'bp-admin-component-setup' ); ?> 279 276 280 277 </form> … … 301 298 $optional_components = array( 302 299 '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' ) 305 302 ), 306 303 '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' ) 309 306 ), 310 307 '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' ) 313 310 ), 314 311 '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' ) 317 314 ), 318 315 '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' ) 321 318 ), 322 319 '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' ) 325 322 ) 326 323 ); … … 328 325 if ( is_multisite() ) { 329 326 $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' ) 332 329 ); 333 330 } … … 337 334 <?php /* The setup wizard uses different, more descriptive text here */ ?> 338 335 <?php if ( empty( $bp_wizard ) ) : ?> 339 <h3><?php _e( 'Optional Components', 'buddypress' ) ?></h3> 336 337 <h3><?php _e( 'Active Components', 'buddypress' ); ?></h3> 340 338 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 342 341 <?php endif ?> 343 342 344 343 <table class="form-table"> 345 344 <tbody> 345 346 346 <?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 360 362 <?php endforeach ?> 363 361 364 </tbody> 362 365 </table> … … 364 367 <?php /* Make sure that the blogs component is deactivated when multisite is shut off */ ?> 365 368 <?php if ( !is_multisite() ) : ?> 369 366 370 <input type="hidden" name="bp_components[bp-blogs.php]" value="0" /> 371 367 372 <?php endif ?> 368 373 … … 385 390 // An array of strings looped over to create component setup markup 386 391 $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' ) 393 398 ); 394 399 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> 406 408 407 409 <table class="form-table"> 408 410 <tbody> 411 409 412 <?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 424 429 <?php endforeach ?> 430 425 431 </tbody> 426 432 </table> -
trunk/bp-core/bp-core-functions.php
r3982 r3987 146 146 'capability' => 'manage_options', 147 147 'file' => 'bp-general-settings', 148 'function' => 'bp_core_admin_ dashboard',148 'function' => 'bp_core_admin_component_setup', 149 149 'position' => 2 150 150 ) ); 151 151 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' ); 155 154 156 155 // Add a hook for css/js 157 foreach( $hooks as $hook ) {156 foreach( $hooks as $hook ) 158 157 add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' ); 159 } 158 160 159 } 161 160 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_core_add_admin_menu', 9 ); -
trunk/bp-core/css/admin.dev.css
r3771 r3987 1 div#icon-buddypress { 2 background: url( ../images/icons32.png ) no-repeat -4px 0px; 3 } 4 1 5 div#bp-admin { 2 6 margin: 25px 15px 25px 0; -
trunk/bp-xprofile/admin/css/admin.dev.css
r3771 r3987 1 1 /* Profile field group main admin page */ 2 div#icon-buddypress { 3 background: url( ../../../bp-core/images/icons32.png ) no-repeat -4px 0px; 4 } 2 5 #tabs { 3 6 position: relative; -
trunk/bp-xprofile/bp-xprofile-admin.php
r3949 r3987 39 39 40 40 <div class="wrap"> 41 <div class="icon32" id="icon-tools"><br></div> 41 42 <?php screen_icon( 'buddypress' ); ?> 43 42 44 <h2> 43 45 44 <?php _e( ' Profile Field Setup', 'buddypress'); ?>46 <?php _e( 'Extended Profile Fields', 'buddypress'); ?> 45 47 46 48 <a id="add_group" class="button add-new-h2" href="admin.php?page=bp-profile-setup&mode=add_group"><?php _e( 'Add New Group', 'buddypress' ); ?></a> -
trunk/bp-xprofile/bp-xprofile-buddybar.php
r3955 r3987 22 22 23 23 // 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' ); 25 25 } 26 26 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'xprofile_add_admin_menu' );
Note: See TracChangeset
for help on using the changeset viewer.