Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/22/2011 10:13:25 AM (14 years ago)
Author:
johnjamesjacoby
Message:

First pass at normalizing bp-default template files. This includes:

A ton of code cleanup
Using new functions found in BP 1.3
Template header documentation
Improve pagination style and position on root component templates

File:
1 edited

Legend:

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

    r3790 r3810  
    1 <?php get_header() ?>
     1<?php
     2
     3/**
     4 * BuddyPress - Members Directory
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<?php get_header(); ?>
     13
     14    <?php do_action( 'bp_before_directory_groups_content' ); ?>
    215
    316    <div id="content">
     
    619        <form action="" method="post" id="members-directory-form" class="dir-form">
    720
    8             <h3><?php _e( 'Members Directory', 'buddypress' ) ?></h3>
    9 
    10             <?php do_action( 'bp_before_directory_members_content' ) ?>
     21            <h3><?php _e( 'Members Directory', 'buddypress' ); ?></h3>
    1122
    1223            <div id="members-dir-search" class="dir-search" role="search">
    13                 <?php bp_directory_members_search_form() ?>
     24
     25                <?php bp_directory_members_search_form(); ?>
     26
    1427            </div><!-- #members-dir-search -->
    1528
    1629            <div class="item-list-tabs" role="navigation">
    1730                <ul>
    18                     <li class="selected" id="members-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Members (%s)', 'buddypress' ), bp_get_total_member_count() ) ?></a></li>
     31                    <li class="selected" id="members-all"><a href="<?php bp_root_domain(); ?>"><?php printf( __( 'All Members (%s)', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
    1932
    2033                    <?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    21                         <li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_FRIENDS_SLUG . '/my-friends/' ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
     34
     35                        <li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_FRIENDS_SLUG . '/my-friends/' ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
     36
    2237                    <?php endif; ?>
    2338
    24                     <?php do_action( 'bp_members_directory_member_types' ) ?>
     39                    <?php do_action( 'bp_members_directory_member_types' ); ?>
     40
     41                </ul>
     42            </div><!-- .item-list-tabs -->
     43
     44            <div class="item-list-tabs" id="subnav" role="navigation">
     45                <ul>
     46
     47                    <?php do_action( 'bp_members_directory_member_sub_types' ); ?>
    2548
    2649                    <li id="members-order-select" class="last filter">
    2750
    28                         <?php _e( 'Order By:', 'buddypress' ) ?>
     51                        <?php _e( 'Order By:', 'buddypress' ); ?>
     52
    2953                        <select>
    30                             <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
    31                             <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ) ?></option>
     54                            <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     55                            <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option>
    3256
    3357                            <?php if ( bp_is_active( 'profile' ) ) : ?>
    34                                 <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option>
     58
     59                                <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     60
    3561                            <?php endif; ?>
    3662
    37                             <?php do_action( 'bp_members_directory_order_options' ) ?>
     63                            <?php do_action( 'bp_members_directory_order_options' ); ?>
     64
    3865                        </select>
    3966                    </li>
    4067                </ul>
    41             </div><!-- .item-list-tabs -->
     68            </div>
     69
     70            <?php do_action( 'bp_before_directory_members_list' ); ?>
    4271
    4372            <div id="members-dir-list" class="members dir-list">
    44                 <?php locate_template( array( 'members/members-loop.php' ), true ) ?>
     73
     74                <?php locate_template( array( 'members/members-loop.php' ), true ); ?>
     75
    4576            </div><!-- #members-dir-list -->
    4677
    47             <?php do_action( 'bp_directory_members_content' ) ?>
     78            <?php do_action( 'bp_directory_members_content' ); ?>
    4879
    49             <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ) ?>
    50 
    51             <?php do_action( 'bp_after_directory_members_content' ) ?>
     80            <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>
    5281
    5382        </form><!-- #members-directory-form -->
     
    5685    </div><!-- #content -->
    5786
    58     <?php get_sidebar() ?>
     87    <?php do_action( 'bp_after_directory_members_content' ); ?>
    5988
    60 <?php get_footer() ?>
     89<?php get_sidebar(); ?>
     90<?php get_footer(); ?>
Note: See TracChangeset for help on using the changeset viewer.