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-themes/bp-sn-parent/friends/friends-loop.php

    r2077 r2168  
    33<div id="friends-loop">
    44
    5     <?php if ( bp_has_friendships() ) : ?>
     5    <?php if ( bp_has_members( 'user_id=' . bp_displayed_user_id() ) ) : ?>
    66
    77        <div class="pagination">
    88
    9             <div class="pag-count">
    10                 <?php bp_friend_pagination_count() ?>
     9            <div class="pag-count" id="member-dir-count">
     10                <?php bp_members_pagination_count() ?>
    1111            </div>
    1212
    13             <div class="pagination-links" id="pag">
    14                 <?php bp_friend_pagination() ?>
     13            <div class="pagination-links" id="member-dir-pag">
     14                <?php bp_members_pagination_links() ?>
    1515            </div>
    1616
     
    2020
    2121        <ul id="friend-list" class="item-list">
    22             <?php while ( bp_user_friendships() ) : bp_the_friendship(); ?>
     22
     23            <?php while ( bp_members() ) : bp_the_member(); ?>
    2324
    2425                <li>
    25                     <?php bp_friend_avatar_thumb() ?>
    26                     <h4><?php bp_friend_link() ?></h4>
    27                     <span class="activity"><?php bp_friend_last_active() ?></span>
     26                    <div class="item-avatar">
     27                        <a href="<?php bp_member_link() ?>"><?php bp_member_avatar() ?></a>
     28                    </div>
    2829
    29                     <?php do_action( 'bp_my_friends_list_item' ) ?>
     30                    <div class="item">
     31                        <div class="item-title"><a href="<?php bp_member_link() ?>"><?php bp_member_name() ?></a></div>
     32                        <div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div>
     33
     34                        <div class="field-data">
     35                            <div class="field-name"><?php bp_member_total_friend_count() ?></div>
     36                            <div class="field-name xprofile-data"><?php bp_member_random_profile_data() ?></div>
     37                        </div>
     38
     39                        <?php do_action( 'bp_directory_members_featured_item' ) ?>
     40                    </div>
    3041
    3142                    <div class="action">
     
    3748
    3849            <?php endwhile; ?>
     50
     51            <?php do_action( 'bp_after_my_friends_list' ) ?>
     52
    3953        </ul>
    40 
    41         <?php do_action( 'bp_after_my_friends_list' ) ?>
    4254
    4355    <?php else: ?>
    4456
    45         <?php if ( bp_friends_is_filtered() ) : ?>
     57        <div id="message" class="info">
     58            <p><?php _e( "No friends were found.", 'buddypress' ) ?></p>
     59        </div>
    4660
    47             <div id="message" class="info">
    48                 <p><?php _e( "No friends matched your search filter terms", 'buddypress' ) ?></p>
    49             </div>
    50 
    51         <?php else : ?>
    52 
    53             <div id="message" class="info">
    54                 <p><?php bp_word_or_name( __( "Your friends list is currently empty", 'buddypress' ), __( "%s's friends list is currently empty", 'buddypress' ) ) ?></p>
    55             </div>
    56 
    57         <?php endif; ?>
    58 
    59         <?php if ( bp_is_home() && !bp_friends_is_filtered() ) : ?>
    60 
    61             <?php do_action( 'bp_before_random_members_list' ) ?>
    62 
    63             <h3><?php _e( 'Why not make friends with some of these members?', 'buddypress' ) ?></h3>
    64             <?php bp_friends_random_members() ?>
    65 
    66             <?php do_action( 'bp_after_random_members_list' ) ?>
    67 
    68         <?php endif; ?>
    69 
    70     <?php endif;?>
     61    <?php endif; ?>
    7162
    7263</div>
Note: See TracChangeset for help on using the changeset viewer.