Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/13/2009 01:24:21 AM (17 years ago)
Author:
apeatling
Message:

Add first revision of new default BuddyPress parent theme. This theme is designed to be extended from with child themes, not used directly. The original default themes from the old two theme system are deprecated, but will remain compatible with 1.1. Still more work to do there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/deprecated/bp-groups-deprecated.php

    r1649 r1655  
    134134    return $member_theme;
    135135}
    136 add_filter( 'stylesheet', 'groups_force_buddypress_stylesheet', 1, 1 );
     136add_filter( 'stylesheet', 'groups_force_buddypress_stylesheet' );
    137137
    138138function groups_add_js() {
     
    231231   
    232232?> 
    233     <div class="info-group">
     233    <div class="bp-widget">
    234234        <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></h4>
    235235        <?php if ( $group_ids ) { ?>
     
    265265?>
    266266    <div class="left-menu">
    267         <h4><?php _e( 'Select Friends', 'buddypress' ) ?> <img id="ajax-loader" src="<?php echo $bp->groups->image_base ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></h4>
     267        <h4><?php _e( 'Select Friends', 'buddypress' ) ?> <span class="ajax-loader"></span></h4>
    268268        <?php bp_group_list_invite_friends() ?>
    269269        <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ) ?>
     
    601601add_action( 'wp_ajax_group_filter', 'groups_ajax_group_filter' );
    602602
    603 function groups_ajax_widget_groups_list() {
    604     global $bp;
    605 
    606     /* If we are using a BuddyPress 1.1+ theme ignore this. */
    607     if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
    608         return false;
    609        
    610     check_ajax_referer('groups_widget_groups_list');
    611 
    612     switch ( $_POST['filter'] ) {
    613         case 'newest-groups':
    614             $type = 'newest';
    615         break;
    616         case 'recently-active-groups':
    617             $type = 'active';
    618         break;
    619         case 'popular-groups':
    620             $type = 'popular';
    621         break;
    622     }
    623 
    624     if ( bp_has_site_groups( 'type=' . $type . '&per_page=' . $_POST['max_groups'] . '&max=' . $_POST['max_groups'] ) ) : ?>
    625         <?php echo "0[[SPLIT]]"; ?>
    626                
    627         <ul id="groups-list" class="item-list">
    628             <?php while ( bp_site_groups() ) : bp_the_site_group(); ?>
    629                 <li>
    630                     <div class="item-avatar">
    631                         <a href="<?php bp_the_site_group_link() ?>"><?php bp_the_site_group_avatar_thumb() ?></a>
    632                     </div>
    633 
    634                     <div class="item">
    635                         <div class="item-title"><a href="<?php bp_the_site_group_link() ?>" title="<?php bp_the_site_group_name() ?>"><?php bp_the_site_group_name() ?></a></div>
    636                         <div class="item-meta">
    637                             <span class="activity">
    638                                 <?php
    639                                 if ( 'newest-groups' == $_POST['filter'] ) {
    640                                     bp_the_site_group_date_created();
    641                                 } else if ( 'recently-active-groups' == $_POST['filter'] ) {
    642                                     bp_the_site_group_last_active();
    643                                 } else if ( 'popular-groups' == $_POST['filter'] ) {
    644                                     bp_the_site_group_member_count();
    645                                 }
    646                                 ?>
    647                             </span>
    648                         </div>
    649                     </div>
    650                 </li>
    651 
    652             <?php endwhile; ?>
    653         </ul>       
    654         <?php wp_nonce_field( 'groups_widget_groups_list', '_wpnonce-groups' ); ?>
    655         <input type="hidden" name="groups_widget_max" id="groups_widget_max" value="<?php echo attribute_escape( $_POST['max_groups'] ); ?>" />
    656        
    657     <?php else: ?>
    658 
    659         <?php echo "-1[[SPLIT]]<li>" . __("No groups matched the current filter.", 'buddypress'); ?>
    660 
    661     <?php endif;
    662    
    663 }
    664 add_action( 'wp_ajax_widget_groups_list', 'groups_ajax_widget_groups_list' );
    665 
    666603function groups_ajax_member_list() {
    667604    global $bp;
Note: See TracChangeset for help on using the changeset viewer.