Skip to:
Content

BuddyPress.org

Changeset 1311


Ignore:
Timestamp:
04/04/2009 07:08:16 PM (11 years ago)
Author:
apeatling
Message:

Added bp-loader.php to the repo, that will selectively load components based on what the user has enabled/disabled via the "BuddyPress > Component Setup" admin panel.

BuddyPress is now just one plugin to activate, once activated you can disable components via the menu mentioned above. This has been done to provide better support for the auto-update functionality, and to try to reduce the "plugin suite" confusion. Each component is still a separate plugin, but they are just not activated individually.

Also added a "BuddyPress" top level navigation item to the admin panel. BuddyPress settings are all now contained under this menu. "Groups" still sits in site admin though, as it fits in well with the "Users" and "Blogs" menus.

Location:
trunk
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Activity Streams
    4 Plugin URI: http://buddypress.org/
    5 Description: Activates activity streams for all users, plus a site-wide activity stream.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    11 
    12 require_once( 'bp-core.php' );
    13 
    14 define ( 'BP_ACTIVITY_IS_INSTALLED', 1 );
     2
    153define ( 'BP_ACTIVITY_VERSION', '1.0-RC2' );
    164define ( 'BP_ACTIVITY_DB_VERSION', '1300' );
  • trunk/bp-blogs.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Blog Tracking
    4 Plugin URI: http://buddypress.org/
    5 Description: Tracks blogs, blog posts and blogs comments for a user across a WPMU installation.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    11 
    12 require_once( 'bp-core.php' );
    132
    143define ( 'BP_BLOGS_VERSION', '1.0-RC2' );
  • trunk/bp-core.php

    r1309 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Core
    4 Plugin URI: http://buddypress.org/
    5 Description: This plugin must be activated when using any other BuddyPress plugins.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    112
    123/* Define the current version number for checking if DB tables are up to date. */
     
    191182}
    192183add_action( 'wp', 'bp_core_setup_session', 3 );
    193 
    194184
    195185function bp_core_install() {
     
    275265       
    276266    /* Add the administration tab under the "Site Admin" tab for site administrators */
    277     add_submenu_page( 'wpmu-admin.php', __("BuddyPress", 'buddypress'), __("BuddyPress", 'buddypress'), 1, "bp_core_admin_settings", "bp_core_admin_settings" );
    278 
     267    add_menu_page( __("BuddyPress", 'buddypress'), __("BuddyPress", 'buddypress'), 2, 'bp-core.php', "bp_core_admin_settings" );
     268    add_submenu_page( 'bp-core.php', __("General Settings", 'buddypress'), __("General Settings", 'buddypress'), 1, 'bp-core.php', "bp_core_admin_settings" );
     269    add_submenu_page( 'bp-core.php', __("Component Setup", 'buddypress'), __("Component Setup", 'buddypress'), 2, __FILE__, "bp_core_admin_component_setup" );
    279270}
    280271add_action( 'admin_menu', 'bp_core_add_admin_menu' );
     
    13781369    global $wpdb;
    13791370    ?>
    1380 <!-- Generated in <?php timer_stop(1); ?> seconds. <?php echo $wpdb->num_queries; ?> queries. -->
     1371<!-- Generated in <?php timer_stop(1); ?> seconds. -->
    13811372    <?php
    13821373}
  • trunk/bp-core/bp-core-admin.php

    r1303 r1311  
    3131       
    3232        <h2><?php _e( 'BuddyPress Settings', 'buddypress' ) ?></h2>
    33    
     33
     34        <?php if ( isset( $_POST['bp-admin'] ) ) : ?>
     35            <div id="message" class="updated fade">
     36                <p><?php _e( 'Settings Saved', 'buddypress' ) ?></p>
     37            </div>
     38        <?php endif; ?>
     39
    3440        <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" id="bp-admin-form">
    3541       
     
    104110   
    105111            <p class="submit">
    106                 <input type="submit" name="bp-admin-submit" id="bp-admin-submit" value="<?php _e( 'Save Settings', 'buddypress' ) ?>"/>
     112                <input class="button-primary" type="submit" name="bp-admin-submit" id="bp-admin-submit" value="<?php _e( 'Save Settings', 'buddypress' ) ?>"/>
    107113            </p>
    108114
    109115            <?php do_action( 'bp_core_admin_screen' ) ?>
    110            
    111             <h4><?php _e( 'BuddyPress Version Numbers', 'buddypress' ) ?></h4>
    112            
    113             <?php bp_core_print_version_numbers() ?>
    114        
    115             <?php wp_nonce_field( 'bp-admin') ?>
     116
     117            <?php wp_nonce_field( 'bp-admin' ) ?>
    116118       
    117119        </form>
     
    122124}
    123125
     126function bp_core_admin_component_setup() {
     127    global $wpdb, $bp;
    124128?>
     129   
     130    <?php
     131    if ( isset( $_POST['bp-admin-component-submit'] ) && isset( $_POST['bp_components'] ) ) {
     132        if ( !check_admin_referer('bp-admin-component-setup') )
     133            return false;
     134       
     135        // Settings form submitted, now save the settings.
     136        foreach ( $_POST['bp_components'] as $key => $value ) {
     137            if ( !(int) $value )
     138                $disabled[$key] = 1;   
     139        }
     140        update_site_option( 'bp-deactivated-components', $disabled );
     141    }
     142    ?>
     143   
     144    <div class="wrap">
     145       
     146        <h2><?php _e( 'BuddyPress Component Setup', 'buddypress' ) ?></h2>
     147       
     148        <?php if ( isset( $_POST['bp-admin-component-submit'] ) ) : ?>
     149            <div id="message" class="updated fade">
     150                <p><?php _e( 'Settings Saved', 'buddypress' ) ?></p>
     151            </div>
     152        <?php endif; ?>
     153   
     154        <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" id="bp-admin-component-form">
     155       
     156            <p>
     157            <?php _e(
     158                'By default, all BuddyPress components are enabled. You can selectively disable any of the
     159                components by using the form below. Your BuddyPress installation will continue to function
     160                however the features associated with the disabled components will no longer be accessible to
     161                your anyone using the site.
     162                ')?>
     163            </p>
     164           
     165            <?php $disabled_components = get_site_option( 'bp-deactivated-components' ); ?>
     166           
     167            <table class="form-table" style="width: 80%">
     168            <tbody>
     169                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-activity.php') ) : ?>
     170                <tr>
     171                    <td><h3><?php _e( 'Activity Streams', 'buddypress' ) ?></h3><p><?php _e( 'Tracks user activity across the entire site.', 'buddypress' ) ?></p></td>
     172                    <td>
     173                        <input type="radio" name="bp_components[bp-activity.php]" value="1"<?php if ( !isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     174                        <input type="radio" name="bp_components[bp-activity.php]" value="0"<?php if ( isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     175                    </td>           
     176                </tr>
     177                <?php endif; ?>
     178                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-blogs.php') ) : ?>
     179                <tr>
     180                    <td><h3><?php _e( 'Blog Tracking', 'buddypress' ) ?></h3><p><?php _e( 'Tracks blogs, blog posts and blogs comments for a user across a WPMU installation.', 'buddypress' ) ?></p></td>
     181                    <td>
     182                        <input type="radio" name="bp_components[bp-blogs.php]" value="1"<?php if ( !isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     183                        <input type="radio" name="bp_components[bp-blogs.php]" value="0"<?php if ( isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     184                    </td>           
     185                </tr>
     186                <?php endif; ?>
     187                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-forums.php') ) : ?>
     188                <tr>
     189                    <td><h3><?php _e( 'bbPress Forums', 'buddypress' ) ?></h3><p><?php _e( 'Activates bbPress forum support within BuddyPress groups or any other custom component.', 'buddypress' ) ?></p></td>
     190                    <td>
     191                        <input type="radio" name="bp_components[bp-forums.php]" value="1"<?php if ( !isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     192                        <input type="radio" name="bp_components[bp-forums.php]" value="0"<?php if ( isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     193                    </td>           
     194                </tr>
     195                <?php endif; ?>
     196                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-friends.php') ) : ?>
     197                <tr>
     198                    <td><h3><?php _e( 'Friends', 'buddypress' ) ?></h3><p><?php _e( 'Allows the creation of friend connections between users.', 'buddypress' ) ?></p></td>
     199                    <td>
     200                        <input type="radio" name="bp_components[bp-friends.php]" value="1"<?php if ( !isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     201                        <input type="radio" name="bp_components[bp-friends.php]" value="0"<?php if ( isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     202                    </td>           
     203                </tr>
     204                <?php endif; ?>
     205                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-groups.php') ) : ?>
     206                <tr>
     207                    <td><h3><?php _e( 'Groups', 'buddypress' ) ?></h3><p><?php _e( 'Let users create, join and participate in groups.', 'buddypress' ) ?></p></td>
     208                    <td>
     209                        <input type="radio" name="bp_components[bp-groups.php]" value="1"<?php if ( !isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     210                        <input type="radio" name="bp_components[bp-groups.php]" value="0"<?php if ( isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     211                    </td>           
     212                </tr>
     213                <?php endif; ?>
     214                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-messages.php') ) : ?>
     215                <tr>
     216                    <td><h3><?php _e( 'Private Messaging', 'buddypress' ) ?></h3><p><?php _e( 'Let users send private messages to one another. Site admins can also send site-wide notices.', 'buddypress' ) ?></p></td>
     217                    <td>
     218                        <input type="radio" name="bp_components[bp-messages.php]" value="1"<?php if ( !isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     219                        <input type="radio" name="bp_components[bp-messages.php]" value="0"<?php if ( isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     220                    </td>           
     221                </tr>
     222                <?php endif; ?>
     223                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-wire.php') ) : ?>
     224                <tr>
     225                    <td><h3><?php _e( 'Comment Wire', 'buddypress' ) ?></h3><p><?php _e( 'Let users leave a comment on groups, profiles and custom components.', 'buddypress' ) ?></p></td>
     226                    <td>
     227                        <input type="radio" name="bp_components[bp-wire.php]" value="1"<?php if ( !isset( $disabled_components['bp-wire.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     228                        <input type="radio" name="bp_components[bp-wire.php]" value="0"<?php if ( isset( $disabled_components['bp-wire.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     229                    </td>           
     230                </tr>
     231                <?php endif; ?>
     232                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-xprofile.php') ) : ?>
     233                <tr>
     234                    <td><h3><?php _e( 'Extended Profiles', 'buddypress' ) ?></h3><p><?php _e( 'Activates customizable profiles and avatars for site users.', 'buddypress' ) ?></p></td>
     235                    <td width="45%">
     236                        <input type="radio" name="bp_components[bp-xprofile.php]" value="1"<?php if ( !isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Enabled &nbsp;
     237                        <input type="radio" name="bp_components[bp-xprofile.php]" value="0"<?php if ( isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> Disabled
     238                    </td>           
     239                </tr>
     240                <?php endif; ?>
     241            </tbody>
     242            </table>
     243           
     244            <p class="submit">
     245                <input class="button-primary" type="submit" name="bp-admin-component-submit" id="bp-admin-component-submit" value="<?php _e( 'Save Settings', 'buddypress' ) ?>"/>
     246            </p>
     247           
     248            <?php wp_nonce_field( 'bp-admin-component-setup' ) ?>
     249       
     250        </form>
     251       
     252        <p>&nbsp;</p>
     253       
     254    </div>
     255   
     256<?php
     257}
     258
     259?>
  • trunk/bp-forums.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Forum Integration
    4 Plugin URI: http://buddypress.org/
    5 Description: Activates bbPress forum support within BuddyPress groups or any other custom component.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    11 
    12 /*
    13 BP-Forums component is based on the bbPress Live
    14 plugin created by Sam Bauers - http://unlettered.org/
    15 http://wordpress.org/extend/plugins/bbpress-live/
    16 */
    17 
    18 require_once( 'bp-core.php' );
    192
    203define ( 'BP_FORUMS_VERSION', '1.0-RC2' );
  • trunk/bp-forums/bp-forums-admin.php

    r1052 r1311  
    55    if ( is_site_admin() ) {
    66        /* Add the administration tab under the "Site Admin" tab for site administrators */
    7         add_submenu_page( 'wpmu-admin.php', __( 'bbPress Forums', 'buddypress' ), __( 'bbPress Forums', 'buddypress' ), 1, "bp_forums_settings", "bp_forums_bbpress_admin" );
     7        add_submenu_page( 'bp-core.php', __( 'Forums Setup', 'buddypress' ), __( 'Forums Setup', 'buddypress' ), 2, __FILE__, "bp_forums_bbpress_admin" );
    88    }
    99}
     
    5353
    5454        <h2><?php _e( 'Group Forum Settings', 'buddypress' ) ?></h2>
     55       
     56        <?php if ( isset( $_POST['submit'] ) ) : ?>
     57            <div id="message" class="updated fade">
     58                <p><?php _e( 'Settings Saved.', 'buddypress' ) ?></p>
     59            </div>
     60        <?php endif; ?>
    5561        <br />
    5662       
     
    6066        <p><?php _e( 'Once you have bbPress set up correctly, enter the options below so that BuddyPress can connect.', 'buddypress' ) ?></p>
    6167       
    62         <form action="<?php echo site_url() . '/wp-admin/admin.php?page=bp_forums_settings' ?>" name="bbpress-path-form" id="bbpress-path-form" method="post">             
     68        <form action="<?php echo site_url() . '/wp-admin/admin.php?page=' . BP_PLUGIN_DIR . '/bp-forums/bp-forums-admin.php' ?>" name="bbpress-path-form" id="bbpress-path-form" method="post">             
    6369            <input type="hidden" name="option_page" value="bbpress-live" />
    6470           
     
    106112            <br />
    107113            <p class="submit">
    108                 <input type="submit" name="submit" value="<?php _e('Save Settings', 'buddypress') ?>"/>
     114                <input class="button-primary" type="submit" name="submit" value="<?php _e('Save Settings', 'buddypress') ?>"/>
    109115            </p>
    110116            <?php wp_nonce_field('bbpress-settings') ?>
  • trunk/bp-friends.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Friends
    4 Plugin URI: http://buddypress.org/
    5 Description: Allows the creation of friend connections between users.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    11 
    12 require_once( 'bp-core.php' );
    13 
    14 define ( 'BP_FRIENDS_IS_INSTALLED', 1 );
     2
    153define ( 'BP_FRIENDS_VERSION', '1.0-RC2' );
    164define ( 'BP_FRIENDS_DB_VERSION', '1300' );
  • trunk/bp-groups.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Groups
    4 Plugin URI: http://buddypress.org/
    5 Description: Allows users to create, join and participate in groups.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    11  
    12 require_once( 'bp-core.php' );
    13 
    14 define ( 'BP_GROUPS_IS_INSTALLED', 1 );
     2
    153define ( 'BP_GROUPS_VERSION', '1.0-RC2' );
    164define ( 'BP_GROUPS_DB_VERSION', '1300' );
     
    2614require ( 'bp-groups/bp-groups-widgets.php' );
    2715require ( 'bp-groups/bp-groups-filters.php' );
    28 
    2916
    3017
     
    134121    if ( !$no_global )
    135122        global $bp;
    136        
    137    
    138    
     123
    139124    $bp->groups->table_name = $wpdb->base_prefix . 'bp_groups';
    140125    $bp->groups->table_name_members = $wpdb->base_prefix . 'bp_groups_members';
     
    165150    global $wpdb, $bp;
    166151   
    167     if ( !is_site_admin() )
    168         return false;
    169 
    170152    require ( 'bp-groups/bp-groups-admin.php' );
    171153
  • trunk/bp-messages.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Private Messaging
    4 Plugin URI: http://buddypress.org/
    5 Description: Enables the ability for users to send private messages to one another. Site admins can send site notices.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    11 
    12 require_once( 'bp-core.php' );
    13 
    14 define ( 'BP_MESSAGES_IS_INSTALLED', 1 );
     2
    153define ( 'BP_MESSAGES_VERSION', '1.0-RC2' );
    164define ( 'BP_MESSAGES_DB_VERSION', '1300' );
  • trunk/bp-wire.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Wire
    4 Plugin URI: http://buddypress.org/
    5 Description: Allows users to leave a comment on groups, profiles and custom components.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    112
    12 require_once( 'bp-core.php' );
    13 
    14 define ( 'BP_WIRE_IS_INSTALLED', 1 );
    15 define ( 'BP_WIRE_VERSION', '1.0-RC2' );
     3define( 'BP_WIRE_VERSION', '1.0-RC2' );
    164
    175/* Define the slug for the component */
  • trunk/bp-xprofile.php

    r1303 r1311  
    11<?php
    2 /*
    3 Plugin Name: BuddyPress Extended Profiles
    4 Plugin URI: http://buddypress.org/
    5 Description: Activates customizable profiles and avatars for site users.
    6 Author: BuddyPress
    7 Version: 1.0-RC2
    8 Author URI: http://buddypress.org
    9 Site Wide Only: true
    10 */
    11 
    12 require_once( 'bp-core.php' );
    13 
    14 /* Set the version number */
     2
    153define ( 'BP_XPROFILE_VERSION', '1.0-RC2' );
    164define ( 'BP_XPROFILE_DB_VERSION', '1300' );
     
    186174   
    187175    /* Add the administration tab under the "Site Admin" tab for site administrators */
    188     add_submenu_page( 'wpmu-admin.php', __("Profile Fields", 'buddypress'), __("Profile Fields", 'buddypress'), 1, "xprofile_settings", "xprofile_admin" );
     176    add_submenu_page( 'bp-core.php', __("Profile Field Setup", 'buddypress'), __("Profile Field Setup", 'buddypress'), 1, __FILE__, "xprofile_admin" );
    189177
    190178    /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
  • trunk/bp-xprofile/bp-xprofile-admin.php

    r1279 r1311  
    6161                            <th scope="col" colspan="<?php if ( $groups[$i]->can_delete ) { ?>3<?php } else { ?>5<?php } ?>"><?php echo $groups[$i]->name; ?></th>
    6262                            <?php if ( $groups[$i]->can_delete ) { ?>       
    63                                 <th scope="col"><a class="edit" href="admin.php?page=xprofile_settings&amp;mode=edit_group&amp;group_id=<?php echo $groups[$i]->id; ?>"><?php _e( 'Edit', 'buddypress' ) ?></a></th>
    64                                 <th scope="col"><a class="delete" href="admin.php?page=xprofile_settings&amp;mode=delete_group&amp;group_id=<?php echo $groups[$i]->id; ?>"><?php _e( 'Delete', 'buddypress' ) ?></a></th>
     63                                <th scope="col"><a class="edit" href="admin.php?page=<?php echo BP_PLUGIN_DIR ?>/bp-xprofile.php&amp;mode=edit_group&amp;group_id=<?php echo $groups[$i]->id; ?>"><?php _e( 'Edit', 'buddypress' ) ?></a></th>
     64                                <th scope="col"><a class="delete" href="admin.php?page=<?php echo BP_PLUGIN_DIR ?>/bp-xprofile.php&amp;mode=delete_group&amp;group_id=<?php echo $groups[$i]->id; ?>"><?php _e( 'Delete', 'buddypress' ) ?></a></th>
    6565                            <?php } ?>
    6666                        </tr>
     
    8484                                    <td><?php echo $field->type; ?></td>
    8585                                    <td style="text-align:center;"><?php if ( $field->is_required ) { echo '<img src="' . $bp->profile->image_base . '/tick.gif" alt="' . _e( 'Yes', 'buddypress' ) . '" />'; } else { ?>--<?php } ?></td>
    86                                     <td style="text-align:center;"><?php if ( !$field->can_delete ) { ?><strike><?php _e( 'Edit', 'buddypress' ) ?></strike><?php } else { ?><a class="edit" href="admin.php?page=xprofile_settings&amp;group_id=<?php echo $groups[$i]->id; ?>&amp;field_id=<?php echo $field->id; ?>&amp;mode=edit_field"><?php _e( 'Edit', 'buddypress' ) ?></a><?php } ?></td>
    87                                     <td style="text-align:center;"><?php if ( !$field->can_delete ) { ?><strike><?php _e( 'Delete', 'buddypress' ) ?></strike><?php } else { ?><a class="delete" href="admin.php?page=xprofile_settings&amp;field_id=<?php echo $field->id; ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ) ?></a><?php } ?></td>
     86                                    <td style="text-align:center;"><?php if ( !$field->can_delete ) { ?><strike><?php _e( 'Edit', 'buddypress' ) ?></strike><?php } else { ?><a class="edit" href="admin.php?page=<?php echo BP_PLUGIN_DIR ?>/bp-xprofile.php&amp;group_id=<?php echo $groups[$i]->id; ?>&amp;field_id=<?php echo $field->id; ?>&amp;mode=edit_field"><?php _e( 'Edit', 'buddypress' ) ?></a><?php } ?></td>
     87                                    <td style="text-align:center;"><?php if ( !$field->can_delete ) { ?><strike><?php _e( 'Delete', 'buddypress' ) ?></strike><?php } else { ?><a class="delete" href="admin.php?page=<?php echo BP_PLUGIN_DIR ?>/bp-xprofile.php&amp;field_id=<?php echo $field->id; ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ) ?></a><?php } ?></td>
    8888                                </tr>
    8989                           
     
    9595                        <?php } ?>
    9696                            <tr class="nodrag">
    97                                 <td colspan="6"><a href="admin.php?page=xprofile_settings&amp;group_id=<?php echo $groups[$i]->id; ?>&amp;mode=add_field"><?php _e( 'Add New Field', 'buddypress' ) ?></a></td>
     97                                <td colspan="6"><a href="admin.php?page=<?php echo BP_PLUGIN_DIR ?>/bp-xprofile.php&amp;group_id=<?php echo $groups[$i]->id; ?>&amp;mode=add_field"><?php _e( 'Add New Field', 'buddypress' ) ?></a></td>
    9898                            </tr>
    9999                    </tbody>
     
    104104           
    105105                <p>
    106                     <a href="admin.php?page=xprofile_settings&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ) ?></a>
     106                    <a href="admin.php?page=<?php echo BP_PLUGIN_DIR ?>/bp-xprofile.php&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ) ?></a>
    107107                </p>
    108108               
    109109        <?php } else { ?>
    110110            <div id="message" class="error"><p><?php _e('You have no groups.', 'buddypress' ); ?></p></div>
    111             <p><a href="admin.php?page=xprofile_settings&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ) ?></a></p>
     111            <p><a href="admin.php?page=<?php echo BP_PLUGIN_DIR ?>/bp-xprofile.php&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ) ?></a></p>
    112112        <?php } ?>
    113113    </div>
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r1303 r1311  
    9999        if ( !$this->id ) {
    100100            $title = __('Add Group', 'buddypress');
    101             $action = "admin.php?page=xprofile_settings&amp;mode=add_group";
     101            $action = "admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;mode=add_group";
    102102        } else {
    103103            $title = __('Edit Group', 'buddypress');
    104             $action = "admin.php?page=xprofile_settings&amp;mode=edit_group&amp;group_id=" . $this->id;         
     104            $action = "admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;mode=edit_group&amp;group_id=" . $this->id;         
    105105        }
    106106    ?>
     
    661661                           <input type="text" name="<?php echo $type ?>_option[<?php echo $j ?>]" id="<?php echo $type ?>_option<?php echo $j ?>" value="<?php echo attribute_escape( $options[$i]->name ) ?>" />
    662662                           <input type="<?php echo $default_input ?>" name="isDefault_<?php echo $type ?>_option<?php echo $default_name; ?>" <?php if ( (int) $options[$i]->is_default_option ) {?> checked="checked"<?php } ?> " value="<?php echo $j ?>" /> <?php _e( 'Default Value', 'buddypress' ) ?>
    663                         <a href="admin.php?page=xprofile_settings&amp;mode=delete_option&amp;option_id=<?php echo $options[$i]->id ?>" class="ajax-option-delete" id="delete-<?php echo $options[$i]->id ?>">[x]</a></p>
     663                        <a href="admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;mode=delete_option&amp;option_id=<?php echo $options[$i]->id ?>" class="ajax-option-delete" id="delete-<?php echo $options[$i]->id ?>">[x]</a></p>
    664664                        </p>
    665665                    <?php } // end for ?>
     
    687687        if ( !$this->id ) {
    688688            $title = __('Add Field', 'buddypress');
    689             $action = "admin.php?page=xprofile_settings&amp;group_id=" . $this->group_id . "&amp;mode=add_field";
     689            $action = "admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;group_id=" . $this->group_id . "&amp;mode=add_field";
    690690        } else {
    691691            $title = __('Edit Field', 'buddypress');
    692             $action = "admin.php?page=xprofile_settings&amp;mode=edit_field&amp;group_id=" . $this->group_id . "&amp;field_id=" . $this->id;           
     692            $action = "admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;mode=edit_field&amp;group_id=" . $this->group_id . "&amp;field_id=" . $this->id;           
    693693            $options = $this->get_children();
    694694        }
     
    751751                <p class="submit">
    752752                        &nbsp;<input type="submit" value="<?php _e("Save", 'buddypress') ?> &raquo;" name="saveField" id="saveField" style="font-weight: bold" />
    753                          <?php _e('or', 'buddypress') ?> <a href="admin.php?page=xprofile_settings" style="color: red"><?php _e( 'Cancel', 'buddypress' ) ?></a>
     753                         <?php _e('or', 'buddypress') ?> <a href="admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php" style="color: red"><?php _e( 'Cancel', 'buddypress' ) ?></a>
    754754                </p>
    755755           
     
    774774    /** Static Functions **/
    775775    function render_prebuilt_fields() {
    776         $action = "admin.php?page=xprofile_settings&amp;group_id=" . $this->group_id . "&amp;mode=add_field";
     776        $action = "admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;group_id=" . $this->group_id . "&amp;mode=add_field";
    777777       
    778778        // Files in wp-content/themes directory and one subdir down
Note: See TracChangeset for help on using the changeset viewer.