Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/14/2009 03:24:05 PM (16 years ago)
Author:
apeatling
Message:

Committing core code support for new default theme.

Removed all deprecated code since it will be released as a separate plugin for backwards compatibility if people need it.

Removed the wire and status updates components since there is no support in the theme for these. If people still want this functionality then I'm sure there is someone in the community that could spend a bit of time and release them as plugins. I'm happy to guide.

Removed a lot of template loop duplication. There are no longer site loops and user loops (e.g. bp_has_site_groups() / bp_has_groups() ). There are now bp_has_members(), bp_has_groups(), bp_has_blogs() and you can pass a "user_id" parameter into these loops to limit results to only that user or users.

Merged activity stream functions. There are no longer functions for bp_activity_get_sitewide() / bp_activity_get_for_user() / bp_activity_get_friends_activity() instead there is simply one function: bp_activity_get() and you can pass in parameters to filter on just friends, for a single user, or anything your heart desires. Actually, filtering is extremely fine grained, so I encourage devs to check out the filter functions.

Lots of other code cleanup.

The new default theme will be committed straight after this. The original default folder will be renamed to bp-classic.

File:
1 edited

Legend:

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

    r2077 r2168  
    7777                    </td>
    7878                </tr>
    79                 <?php if ( function_exists('bp_wire_install') ) { ?>
    80                 <tr>
    81                     <th scope="row"><?php _e( 'Allow non-friends to post on profile wires?', 'buddypress' ) ?>:</th>
    82                     <td>
    83                         <input type="radio" name="bp-admin[non-friend-wire-posting]"<?php if ( (int)get_site_option( 'non-friend-wire-posting' ) ) : ?> checked="checked"<?php endif; ?> id="bp-admin-non-friend-wire-post" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> &nbsp;
    84                         <input type="radio" name="bp-admin[non-friend-wire-posting]"<?php if ( !(int)get_site_option( 'non-friend-wire-posting' ) ) : ?> checked="checked"<?php endif; ?> id="bp-admin-non-friend-wire-post" value="0" /> <?php _e( 'No', 'buddypress' ) ?>
    85                     </td>
    86                 </tr>
    87                 <?php } ?>
    8879                <tr>
    8980                    <th scope="row"><?php _e( 'Disable user account deletion?', 'buddypress' ) ?>:</th>
     
    10192                    </td>
    10293                </tr>
    103                 <?php endif; ?>
    104 
    105                 <?php $themes = bp_core_get_buddypress_themes() ?>
    106                 <?php if ( $themes ) : ?>
    107                     <tr>
    108                         <th scope="row"><?php _e('Select theme to use for BuddyPress generated pages', 'buddypress' ) ?>:</th>
    109                         <td>
    110                                 <select name="bp-admin[active-member-theme]" id="active-member-theme">
    111                                 <?php
    112                                 for ( $i = 0; $i < count($themes); $i++ ) {
    113                                     if ( $themes[$i]['template'] == get_site_option( 'active-member-theme' ) ) {
    114                                         $selected = ' selected="selected"';
    115                                     } else {
    116                                         $selected = '';
    117                                     }
    118                                 ?>
    119                                 <option<?php echo $selected ?> value="<?php echo $themes[$i]['template'] ?>"><?php echo $themes[$i]['name'] ?> (<?php echo $themes[$i]['version'] ?>)</option>
    120                                 <?php } ?>
    121                             </select>
    122                         </td>
    123                     </tr>
    124                 <?php else : ?>
    125                     <?php if ( '' == locate_template( array( 'registration/register.php' ), false ) && $current_blog->blog_id == BP_ROOT_BLOG ) : ?>
    126                         <div class="error">
    127                             <p><?php _e( '<strong>Your currently active theme is not BuddyPress enabled.</strong><p style="margin: 2px 0">Visit <a href="http://buddypress.org/extend/themes/">http://buddypress.org/extend/themes/</a> to browse themes that include support for BuddyPress features.</p>', 'buddypress' ) ?></p>
    128                         </div>
    129                     <?php endif; ?>
    13094                <?php endif; ?>
    13195
     
    206170                <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-activity.php') ) : ?>
    207171                <tr>
    208                     <td><h3><?php _e( 'Activity Streams', 'buddypress' ) ?></h3><p><?php _e( 'Tracks user activity across the entire site.', 'buddypress' ) ?></p></td>
     172                    <td><h3><?php _e( 'Activity Streams', 'buddypress' ) ?></h3><p><?php _e( 'Allow users to post activity updates and track all activity across the entire site.', 'buddypress' ) ?></p></td>
    209173                    <td>
    210174                        <input type="radio" name="bp_components[bp-activity.php]" value="1"<?php if ( !isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     
    255219                        <input type="radio" name="bp_components[bp-messages.php]" value="1"<?php if ( !isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    256220                        <input type="radio" name="bp_components[bp-messages.php]" value="0"<?php if ( isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    257                     </td>
    258                 </tr>
    259                 <?php endif; ?>
    260                 <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-wire.php') ) : ?>
    261                 <tr>
    262                     <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>
    263                     <td>
    264                         <input type="radio" name="bp_components[bp-wire.php]" value="1"<?php if ( !isset( $disabled_components['bp-wire.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    265                         <input type="radio" name="bp_components[bp-wire.php]" value="0"<?php if ( isset( $disabled_components['bp-wire.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    266221                    </td>
    267222                </tr>
     
    276231                </tr>
    277232                <?php endif; ?>
    278                 <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-status.php') ) : ?>
    279                 <tr>
    280                     <td><h3><?php _e( 'Status Updates', 'buddypress' ) ?></h3><p><?php _e( 'Allow users to post status updates.', 'buddypress' ) ?></p></td>
    281                     <td width="45%">
    282                         <input type="radio" name="bp_components[bp-status.php]" value="1"<?php if ( !isset( $disabled_components['bp-status.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    283                         <input type="radio" name="bp_components[bp-status.php]" value="0"<?php if ( isset( $disabled_components['bp-status.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    284                     </td>
    285                 </tr>
    286                 <?php endif; ?>
    287233            </tbody>
    288234            </table>
Note: See TracChangeset for help on using the changeset viewer.