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/forums/forums-loop.php

    r3771 r3810  
    1 <?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?>
     1<?php
    22
    3 <?php do_action( 'bp_before_forums_loop' ) ?>
     3/**
     4 * BuddyPress - Forums Loop
     5 *
     6 * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
     7 *
     8 * @package BuddyPress
     9 * @subpackage bp-default
     10 */
     11
     12?>
     13
     14<?php do_action( 'bp_before_forums_loop' ); ?>
    415
    516<?php if ( bp_has_forum_topics( bp_ajax_querystring( 'forums' ) ) ) : ?>
     
    819
    920        <div class="pag-count" id="topic-count-top">
    10             <?php bp_forum_pagination_count() ?>
     21
     22            <?php bp_forum_pagination_count(); ?>
     23
    1124        </div>
    1225
    1326        <div class="pagination-links" id="topic-pag-top">
    14             <?php bp_forum_pagination() ?>
     27
     28            <?php bp_forum_pagination(); ?>
     29
    1530        </div>
    1631
    1732    </div>
    1833
    19     <?php do_action( 'bp_before_directory_forums_list' ) ?>
     34    <?php do_action( 'bp_before_directory_forums_list' ); ?>
    2035
    2136    <table class="forum zebra">
    2237        <thead>
    2338            <tr>
    24                 <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th>
    25                 <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th>
     39                <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ); ?></th>
     40                <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ); ?></th>
    2641
    2742                <?php if ( !bp_is_group_forum() ) : ?>
    28                     <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th>
     43
     44                    <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ); ?></th>
     45
    2946                <?php endif; ?>
    3047
    31                 <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th>
    32                 <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ) ?></th>
     48                <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ); ?></th>
     49                <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ); ?></th>
    3350
    34                 <?php do_action( 'bp_directory_forums_extra_cell_head' ) ?>
     51                <?php do_action( 'bp_directory_forums_extra_cell_head' ); ?>
    3552
    3653            </tr>
     
    4158            <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>
    4259
    43             <tr class="<?php bp_the_topic_css_class() ?>">
     60            <tr class="<?php bp_the_topic_css_class(); ?>">
    4461                <td class="td-title">
    45                     <a class="topic-title" href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>">
    46                         <?php bp_the_topic_title() ?>
     62                    <a class="topic-title" href="<?php bp_the_topic_permalink(); ?>" title="<?php bp_the_topic_title(); ?> - <?php _e( 'Permalink', 'buddypress' ); ?>">
     63
     64                        <?php bp_the_topic_title(); ?>
     65
    4766                    </a>
    4867                </td>
    4968                <td class="td-poster">
    50                     <a href="<?php bp_the_topic_permalink() ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ) ?></a>
    51                     <div class="poster-name"><?php bp_the_topic_last_poster_name() ?></div>
     69                    <a href="<?php bp_the_topic_permalink(); ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ); ?></a>
     70                    <div class="poster-name"><?php bp_the_topic_last_poster_name(); ?></div>
    5271                </td>
    5372
    5473                <?php if ( !bp_is_group_forum() ) : ?>
     74
    5575                    <td class="td-group">
    56                         <a href="<?php bp_the_topic_object_permalink() ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) ?></a>
    57                         <div class="object-name"><a href="<?php bp_the_topic_object_permalink() ?>" title="<?php bp_the_topic_object_name() ?>"><?php bp_the_topic_object_name() ?></a></div>
     76                        <a href="<?php bp_the_topic_object_permalink(); ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ); ?></a>
     77                        <div class="object-name"><a href="<?php bp_the_topic_object_permalink(); ?>" title="<?php bp_the_topic_object_name(); ?>"><?php bp_the_topic_object_name(); ?></a></div>
    5878                    </td>
     79
    5980                <?php endif; ?>
    6081
    6182                <td class="td-postcount">
    62                     <?php bp_the_topic_total_posts() ?>
     83
     84                    <?php bp_the_topic_total_posts(); ?>
     85
    6386                </td>
    6487                <td class="td-freshness">
    65                     <?php bp_the_topic_time_since_last_post() ?>
     88                    <?php bp_the_topic_time_since_last_post(); ?>
    6689                </td>
    6790
    68                 <?php do_action( 'bp_directory_forums_extra_cell' ) ?>
     91                <?php do_action( 'bp_directory_forums_extra_cell' ); ?>
     92
    6993            </tr>
    7094
    71             <?php do_action( 'bp_directory_forums_extra_row' ) ?>
     95            <?php do_action( 'bp_directory_forums_extra_row' ); ?>
    7296
    7397            <?php endwhile; ?>
     
    76100    </table>
    77101
    78     <?php do_action( 'bp_after_directory_forums_list' ) ?>
     102    <?php do_action( 'bp_after_directory_forums_list' ); ?>
    79103
    80104    <div id="pag-bottom" class="pagination">
    81105
    82106        <div class="pag-count" id="topic-count-bottom">
    83             <?php bp_forum_pagination_count() ?>
     107            <?php bp_forum_pagination_count(); ?>
    84108        </div>
    85109
    86110        <div class="pagination-links" id="topic-pag-bottom">
    87             <?php bp_forum_pagination() ?>
     111            <?php bp_forum_pagination(); ?>
    88112        </div>
    89113
     
    93117
    94118    <div id="message" class="info">
    95         <p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ) ?></p>
     119        <p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ); ?></p>
    96120    </div>
    97121
    98 <?php endif;?>
     122<?php endif; ?>
    99123
    100 <?php do_action( 'bp_after_forums_loop' ) ?>
     124<?php do_action( 'bp_after_forums_loop' ); ?>
Note: See TracChangeset for help on using the changeset viewer.