Skip to:
Content

BuddyPress.org

Changeset 3808


Ignore:
Timestamp:
01/22/2011 08:58:56 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Clean up single member root template files

Location:
trunk/bp-themes/bp-default/members/single
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/members/single/activity.php

    r3771 r3808  
    11<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
    22        <ul>
     3
    34                <?php bp_get_options_nav() ?>
    45
    … …  
    89                                <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
    910
    10                                 <?php if ( 'groups' != bp_current_action() ) : ?>
    11                                         <?php if ( bp_is_active( 'blogs' ) ) : ?>
     11                                <?php
     12                                if ( 'groups' != bp_current_action() ) :
     13                                        if ( bp_is_active( 'blogs' ) ) : ?>
     14
    1215                                                <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
    1316                                                <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
    14                                         <?php endif; ?>
    1517
    16                                         <?php if ( bp_is_active( 'friends' ) ) : ?>
     18                                        <?php
     19                                        endif;
     20
     21                                        if ( bp_is_active( 'friends' ) ) : ?>
     22
    1723                                                <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option>
    18                                         <?php endif; ?>
    19                                 <?php endif; ?>
    2024
    21                                 <?php if ( bp_is_active( 'forums' ) ) : ?>
     25                                        <?php endif;
     26
     27                                endif;
     28
     29                                if ( bp_is_active( 'forums' ) ) : ?>
     30
    2231                                        <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
    2332                                        <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
    24                                 <?php endif; ?>
    2533
    26                                 <?php if ( bp_is_active( 'groups' ) ) : ?>
     34                                <?php endif;
     35
     36                                if ( bp_is_active( 'groups' ) ) : ?>
     37
    2738                                        <option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option>
    2839                                        <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option>
    29                                 <?php endif; ?>
    3040
    31                                 <?php do_action( 'bp_member_activity_filter_options' ) ?>
     41                                <?php endif;
     42
     43                                do_action( 'bp_member_activity_filter_options' ); ?>
     44
    3245                        </select>
    3346                </li>
    … …  
    3548</div><!-- .item-list-tabs -->
    3649
    37 <?php do_action( 'bp_before_member_activity_post_form' ) ?>
     50<?php do_action( 'bp_before_member_activity_post_form' ); ?>
    3851
    39 <?php if ( is_user_logged_in() && bp_is_my_profile() && ( '' == bp_current_action() || 'just-me' == bp_current_action() ) ) : ?>
    40         <?php locate_template( array( 'activity/post-form.php'), true ) ?>
    41 <?php endif; ?>
     52<?php
     53if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_is_current_action() || bp_is_current_action( 'just-me' ) ) )
     54        locate_template( array( 'activity/post-form.php'), true );
    4255
    43 <?php do_action( 'bp_after_member_activity_post_form' ) ?>
    44 <?php do_action( 'bp_before_member_activity_content' ) ?>
     56do_action( 'bp_after_member_activity_post_form' );
     57do_action( 'bp_before_member_activity_content' ); ?>
    4558
    4659<div class="activity" role="main">
    47         <?php locate_template( array( 'activity/activity-loop.php' ), true ) ?>
     60
     61        <?php locate_template( array( 'activity/activity-loop.php' ), true ); ?>
     62
    4863</div><!-- .activity -->
    4964
    50 <?php do_action( 'bp_after_member_activity_content' ) ?>
     65<?php do_action( 'bp_after_member_activity_content' ); ?>
  • trunk/bp-themes/bp-default/members/single/blogs.php

    r3771 r3808  
    11<div class="item-list-tabs" id="subnav" role="navigation">
    22        <ul>
    3                 <?php bp_get_options_nav() ?>
     3
     4                <?php bp_get_options_nav(); ?>
    45
    56                <li id="blogs-order-select" class="last filter">
    6                         <?php _e( 'Order By:', 'buddypress' ) ?>
     7
     8                        <?php _e( 'Order By:', 'buddypress' ); ?>
     9
    710                        <select id="blogs-all">
    8                                 <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
    9                                 <option value="newest"><?php _e( 'Newest', 'buddypress' ) ?></option>
    10                                 <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option>
     11                                <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     12                                <option value="newest"><?php _e( 'Newest', 'buddypress' ); ?></option>
     13                                <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
    1114
    12                                 <?php do_action( 'bp_member_blog_order_options' ) ?>
     15                                <?php do_action( 'bp_member_blog_order_options' ); ?>
     16
    1317                        </select>
    1418                </li>
    … …  
    1620</div><!-- .item-list-tabs -->
    1721
    18 <?php do_action( 'bp_before_member_blogs_content' ) ?>
     22<?php do_action( 'bp_before_member_blogs_content' ); ?>
    1923
    2024<div class="blogs myblogs" role="main">
    21         <?php locate_template( array( 'blogs/blogs-loop.php' ), true ) ?>
     25
     26        <?php locate_template( array( 'blogs/blogs-loop.php' ), true ); ?>
     27
    2228</div><!-- .blogs.myblogs -->
    2329
    24 <?php do_action( 'bp_after_member_blogs_content' ) ?>
     30<?php do_action( 'bp_after_member_blogs_content' ); ?>
  • trunk/bp-themes/bp-default/members/single/friends.php

    r3771 r3808  
    11<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
    22        <ul>
    3                 <?php if ( bp_is_my_profile() ) : ?>
    4                         <?php bp_get_options_nav() ?>
    5                 <?php endif; ?>
     3                <?php if ( bp_is_my_profile() ) bp_get_options_nav(); ?>
    64
    75                <li id="members-order-select" class="last filter">
    86
    97                        <?php _e( 'Order By:', 'buddypress' ) ?>
     8
    109                        <select id="members-all">
    1110                                <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
    … …  
    1413
    1514                                <?php do_action( 'bp_member_blog_order_options' ) ?>
     15
    1616                        </select>
    1717                </li>
    … …  
    1919</div>
    2020
    21 <?php if ( 'requests' == bp_current_action() ) : ?>
    22         <?php locate_template( array( 'members/single/friends/requests.php' ), true ) ?>
     21<?php
    2322
    24 <?php else : ?>
     23if ( bp_is_current_action( 'requests' ) ) :
     24         locate_template( array( 'members/single/friends/requests.php' ), true );
    2525
    26         <?php do_action( 'bp_before_member_friends_content' ) ?>
     26else :
     27        do_action( 'bp_before_member_friends_content' ); ?>
    2728
    2829        <div class="members friends">
    29                 <?php locate_template( array( 'members/members-loop.php' ), true ) ?>
     30
     31                <?php locate_template( array( 'members/members-loop.php' ), true ); ?>
     32
    3033        </div><!-- .members.friends -->
    3134
    32         <?php do_action( 'bp_after_member_friends_content' ) ?>
     35        <?php do_action( 'bp_after_member_friends_content' ); ?>
    3336
    3437<?php endif; ?>
  • trunk/bp-themes/bp-default/members/single/groups.php

    r3771 r3808  
    11<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
    22        <ul>
    3                 <?php if ( bp_is_my_profile() ) : ?>
    4                         <?php bp_get_options_nav() ?>
     3                <?php if ( bp_is_my_profile() ) bp_get_options_nav(); ?>
     4
     5                <?php if ( !bp_is_current_action( 'invites' ) ) : ?>
     6
     7                        <li id="groups-order-select" class="last filter">
     8
     9                                <?php _e( 'Order By:', 'buddypress' ) ?>
     10
     11                                <select id="groups-sort-by">
     12                                        <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     13                                        <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
     14                                        <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
     15                                        <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     16
     17                                        <?php do_action( 'bp_member_group_order_options' ) ?>
     18
     19                                </select>
     20                        </li>
     21
    522                <?php endif; ?>
    623
    7                 <?php if ( 'invites' != bp_current_action() ) : ?>
    8                 <li id="groups-order-select" class="last filter">
    9 
    10                         <?php _e( 'Order By:', 'buddypress' ) ?>
    11                         <select id="groups-sort-by">
    12                                 <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
    13                                 <option value="popular"><?php _e( 'Most Members', 'buddypress' ) ?></option>
    14                                 <option value="newest"><?php _e( 'Newly Created', 'buddypress' ) ?></option>
    15                                 <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option>
    16 
    17                                 <?php do_action( 'bp_member_group_order_options' ) ?>
    18                         </select>
    19                 </li>
    20                 <?php endif; ?>
    2124        </ul>
    2225</div><!-- .item-list-tabs -->
    2326
    24 <?php if ( 'invites' == bp_current_action() ) : ?>
    25         <?php locate_template( array( 'members/single/groups/invites.php' ), true ) ?>
     27<?php
    2628
    27 <?php else : ?>
     29if ( bp_is_current_action( 'invites' ) ) :
     30        locate_template( array( 'members/single/groups/invites.php' ), true );
    2831
    29         <?php do_action( 'bp_before_member_groups_content' ) ?>
     32else :
     33        do_action( 'bp_before_member_groups_content' ); ?>
    3034
    3135        <div class="groups mygroups">
    32                 <?php locate_template( array( 'groups/groups-loop.php' ), true ) ?>
     36
     37                <?php locate_template( array( 'groups/groups-loop.php' ), true ); ?>
     38
    3339        </div>
    3440
    35         <?php do_action( 'bp_after_member_groups_content' ) ?>
     41        <?php do_action( 'bp_after_member_groups_content' ); ?>
    3642
    3743<?php endif; ?>
  • trunk/bp-themes/bp-default/members/single/home.php

    r3790 r3808  
    1 <?php get_header() ?>
     1<?php get_header(); ?>
    22
    33        <div id="content">
    44                <div class="padder">
    55
    6                         <?php do_action( 'bp_before_member_home_content' ) ?>
     6                        <?php do_action( 'bp_before_member_home_content' ); ?>
    77
    88                        <div id="item-header" role="complementary">
    … …  
    1616                                        <ul>
    1717
    18                                                 <?php bp_get_displayed_user_nav() ?>
     18                                                <?php bp_get_displayed_user_nav(); ?>
    1919
    20                                                 <?php do_action( 'bp_member_options_nav' ) ?>
     20                                                <?php do_action( 'bp_member_options_nav' ); ?>
    2121
    2222                                        </ul>
    … …  
    2525
    2626                        <div id="item-body">
    27                                 <?php do_action( 'bp_before_member_body' ); ?>
     27                                <?php do_action( 'bp_before_member_body' );
    2828
    29                                 <?php if ( bp_is_user_activity() || !bp_current_component() ) : ?>
    30                                         <?php locate_template( array( 'members/single/activity.php' ), true ); ?>
     29                                if ( bp_is_user_activity() || !bp_current_component() ) :
     30                                        locate_template( array( 'members/single/activity.php' ), true );
    3131
    32                                 <?php elseif ( bp_is_user_blogs() ) : ?>
    33                                         <?php locate_template( array( 'members/single/blogs.php' ), true ); ?>
     32                                 elseif ( bp_is_user_blogs() ) :
     33                                        locate_template( array( 'members/single/blogs.php'    ), true );
    3434
    35                                 <?php elseif ( bp_is_user_friends() ) : ?>
    36                                         <?php locate_template( array( 'members/single/friends.php' ), true ); ?>
     35                                elseif ( bp_is_user_friends() ) :
     36                                        locate_template( array( 'members/single/friends.php'  ), true );
    3737
    38                                 <?php elseif ( bp_is_user_groups() ) : ?>
    39                                         <?php locate_template( array( 'members/single/groups.php' ), true ); ?>
     38                                elseif ( bp_is_user_groups() ) :
     39                                        locate_template( array( 'members/single/groups.php'   ), true );
    4040
    41                                 <?php elseif ( bp_is_user_messages() ) : ?>
    42                                         <?php locate_template( array( 'members/single/messages.php' ), true ); ?>
     41                                elseif ( bp_is_user_messages() ) :
     42                                        locate_template( array( 'members/single/messages.php' ), true );
    4343
    44                                 <?php elseif ( bp_is_user_profile() ) : ?>
    45                                         <?php locate_template( array( 'members/single/profile.php' ), true ); ?>
     44                                elseif ( bp_is_user_profile() ) :
     45                                        locate_template( array( 'members/single/profile.php'  ), true );
    4646
    47                                 <?php else : ?>
    48                                         <?php
    49                                                 // If nothing sticks, load a generic template
    50                                                 locate_template( array( 'members/single/front.php' ), true );
    51                                         ?>
    52                                 <?php endif; ?>
     47                                // If nothing sticks, load a generic template
     48                                else :
     49                                        locate_template( array( 'members/single/front.php'    ), true );
    5350
    54                                 <?php do_action( 'bp_after_member_body' ); ?>
     51                                endif;
     52
     53                                do_action( 'bp_after_member_body' ); ?>
    5554
    5655                        </div><!-- #item-body -->
    … …  
    6261
    6362<?php get_sidebar(); ?>
    64 <?php get_footer() ?>
     63<?php get_footer(); ?>
  • trunk/bp-themes/bp-default/members/single/member-header.php

    r3771 r3808  
    1 <?php do_action( 'bp_before_member_header' ) ?>
     1<?php do_action( 'bp_before_member_header' ); ?>
    22
    33<div id="item-header-avatar">
    4         <a href="<?php bp_user_link() ?>">
    5                 <?php bp_displayed_user_avatar( 'type=full' ) ?>
     4        <a href="<?php bp_user_link(); ?>">
     5
     6                <?php bp_displayed_user_avatar( 'type=full' ); ?>
     7
    68        </a>
    79</div><!-- #item-header-avatar -->
    … …  
    911<div id="item-header-content">
    1012
    11         <h2 class="fn"><a href="<?php bp_displayed_user_link() ?>"><?php bp_displayed_user_fullname() ?></a> <span class="highlight">@<?php bp_displayed_user_username() ?> <span>?</span></span></h2>
    12         <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ) ?></span>
     13        <h2 class="fn">
     14                <a href="<?php bp_displayed_user_link(); ?>"><?php bp_displayed_user_fullname(); ?></a>
     15                <span class="highlight">@<?php bp_displayed_user_username(); ?> <span>?</span></span>
     16        </h2>
     17        <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
    1318
    14         <?php do_action( 'bp_before_member_header_meta' ) ?>
     19        <?php do_action( 'bp_before_member_header_meta' ); ?>
    1520
    1621        <div id="item-meta">
     22
    1723                <?php if ( bp_is_active( 'activity' ) ) : ?>
     24
    1825                        <div id="latest-update">
    19                                 <?php bp_activity_latest_update( bp_displayed_user_id() ) ?>
     26
     27                                <?php bp_activity_latest_update( bp_displayed_user_id() ); ?>
     28
    2029                        </div>
     30
    2131                <?php endif; ?>
    2232
    … …  
    2838
    2939                <?php
    30                  /***
    31                   * If you'd like to show specific profile fields here use:
    32                   * bp_profile_field_data( 'field=About Me' ); -- Pass the name of the field
    33                   */
    34                 ?>
     40                /***
     41                 * If you'd like to show specific profile fields here use:
     42                 * bp_profile_field_data( 'field=About Me' ); -- Pass the name of the field
     43                 */
     44                 do_action( 'bp_profile_header_meta' );
    3545
    36                 <?php do_action( 'bp_profile_header_meta' ) ?>
     46                ?>
    3747
    3848        </div><!-- #item-meta -->
    … …  
    4050</div><!-- #item-header-content -->
    4151
    42 <?php do_action( 'bp_after_member_header' ) ?>
     52<?php do_action( 'bp_after_member_header' ); ?>
    4353
    44 <?php do_action( 'template_notices' ) ?>
     54<?php do_action( 'template_notices' ); ?>
  • trunk/bp-themes/bp-default/members/single/messages.php

    r3771 r3808  
    99<?php
    1010
    11         if ( 'compose' == bp_current_action() ) :
     11        if ( bp_is_current_action( 'compose' ) ) :
    1212                locate_template( array( 'members/single/messages/compose.php' ), true );
    1313
    14         elseif ( 'view' == bp_current_action() ) :
     14        elseif ( bp_is_current_action( 'view' ) ) :
    1515                locate_template( array( 'members/single/messages/single.php' ), true );
    1616
    … …  
    2121
    2222                <?php
    23                         if ( 'notices' == bp_current_action() ) :
     23                        if ( bp_is_current_action( 'notices' ) )
    2424                                locate_template( array( 'members/single/messages/notices-loop.php' ), true );
    25 
    26                         else :
     25                        else
    2726                                locate_template( array( 'members/single/messages/messages-loop.php' ), true );
    28 
    29                         endif;
    3027                ?>
    3128
  • trunk/bp-themes/bp-default/members/single/plugins.php

    r3771 r3808  
    1 <?php get_header() ?>
     1<?php get_header(); ?>
    22
    33        <div id="content">
    44                <div class="padder">
    55
    6                         <?php do_action( 'bp_before_member_plugin_template' ) ?>
     6                        <?php do_action( 'bp_before_member_plugin_template' ); ?>
    77
    88                        <div id="item-header">
    9                                 <?php locate_template( array( 'members/single/member-header.php' ), true ) ?>
     9
     10                                <?php locate_template( array( 'members/single/member-header.php' ), true ); ?>
     11
    1012                        </div><!-- #item-header -->
    1113
    … …  
    1315                                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
    1416                                        <ul>
    15                                                 <?php bp_get_displayed_user_nav() ?>
    1617
    17                                                 <?php do_action( 'bp_member_options_nav' ) ?>
     18                                                <?php bp_get_displayed_user_nav(); ?>
     19
     20                                                <?php do_action( 'bp_member_options_nav' ); ?>
     21
    1822                                        </ul>
    1923                                </div>
    … …  
    2125
    2226                        <div id="item-body" role="main">
    23                                 <?php do_action( 'bp_before_member_body' ) ?>
     27
     28                                <?php do_action( 'bp_before_member_body' ); ?>
    2429
    2530                                <div class="item-list-tabs no-ajax" id="subnav">
    2631                                        <ul>
    27                                                 <?php bp_get_options_nav() ?>
    2832
    29                                                 <?php do_action( 'bp_member_plugin_options_nav' ) ?>
     33                                                <?php bp_get_options_nav(); ?>
     34
     35                                                <?php do_action( 'bp_member_plugin_options_nav' ); ?>
     36
    3037                                        </ul>
    3138                                </div><!-- .item-list-tabs -->
    3239
    33                                 <h3><?php do_action( 'bp_template_title' ) ?></h3>
     40                                <h3><?php do_action( 'bp_template_title' ); ?></h3>
    3441
    35                                 <?php do_action( 'bp_template_content' ) ?>
     42                                <?php do_action( 'bp_template_content' ); ?>
    3643
    37                                 <?php do_action( 'bp_after_member_body' ) ?>
     44                                <?php do_action( 'bp_after_member_body' ); ?>
    3845
    3946                        </div><!-- #item-body -->
    4047
    41                         <?php do_action( 'bp_after_member_plugin_template' ) ?>
     48                        <?php do_action( 'bp_after_member_plugin_template' ); ?>
    4249
    4350                </div><!-- .padder -->
    4451        </div><!-- #content -->
    4552
    46         <?php get_sidebar() ?>
    47 
    48 <?php get_footer() ?>
     53<?php get_sidebar(); ?>
     54<?php get_footer(); ?>
  • trunk/bp-themes/bp-default/members/single/profile.php

    r3806 r3808  
    1616
    1717        <?php
    18                 if ( 'edit' == bp_current_action() ) :
     18                if ( bp_is_current_action( 'edit' ) )
    1919                        locate_template( array( 'members/single/profile/edit.php' ), true );
    20 
    21                 elseif ( 'change-avatar' == bp_current_action() ) :
     20                elseif ( bp_is_current_action( 'change-avatar' ) )
    2221                        locate_template( array( 'members/single/profile/change-avatar.php' ), true );
    23 
    24                 elseif ( bp_is_active( 'profile' ) ) :
     22                elseif ( bp_is_active( 'profile' ) )
    2523                        locate_template( array( 'members/single/profile/profile-loop.php' ), true );
    26 
    27                 else :
     24                else
    2825                        locate_template( array( 'members/single/profile/profile-wp.php' ), true );
    29 
    30                 endif;
    3126        ?>
    3227
Note: See TracChangeset for help on using the changeset viewer.