Skip to:
Content

BuddyPress.org

Changeset 2197


Ignore:
Timestamp:
12/18/2009 09:34:41 AM (17 years ago)
Author:
apeatling
Message:

Default theme css fixes and template updates.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2184 r2197  
    13891389        global $bp;
    13901390
    1391         if ( BP_ACTIVITY_SLUG == $bp->current_component && ( !$bp->current_action || 'my-activity' == $bp->current_action ) )
     1391        if ( BP_ACTIVITY_SLUG == $bp->current_component )
    13921392                return true;
    13931393
     
    14521452        global $bp;
    14531453
    1454         if ( BP_GROUPS_SLUG == $bp->current_component && ( !$bp->current_action || 'my-groups' == $bp->current_action ) )
     1454        if ( BP_GROUPS_SLUG == $bp->current_component )
    14551455                return true;
    14561456
     
    15221522}
    15231523
     1524function bp_is_group_forum_topic_edit() {
     1525        global $bp;
     1526
     1527        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'forum' == $bp->current_action && 'topic' == $bp->action_variables[0] && 'edit' == $bp->action_variables[2] )
     1528                return true;
     1529
     1530        return false;
     1531}
     1532
    15241533function bp_is_group_members() {
    15251534        global $bp;
     
    15341543        global $bp;
    15351544
    1536         if ( BP_GROUPS_SLUG == $bp->current_component && 'invites' == $bp->current_action )
     1545        if ( BP_GROUPS_SLUG == $bp->current_component && 'send-invites' == $bp->current_action )
     1546                return true;
     1547
     1548        return false;
     1549}
     1550
     1551function bp_is_group_membership_request() {
     1552        global $bp;
     1553
     1554        if ( BP_GROUPS_SLUG == $bp->current_component && 'request-membership' == $bp->current_action )
    15371555                return true;
    15381556
     
    15611579        global $bp;
    15621580
    1563         if ( BP_BLOGS_SLUG == $bp->current_component && ( !$bp->current_action || 'my-blogs' == $bp->current_action ) )
     1581        if ( BP_BLOGS_SLUG == $bp->current_component )
    15641582                return true;
    15651583
     
    15971615        global $bp;
    15981616
    1599         if ( BP_FRIENDS_SLUG == $bp->current_component && ( !$bp->current_action || 'my-friends' == $bp->current_action ) )
     1617        if ( BP_FRIENDS_SLUG == $bp->current_component )
    16001618                return true;
    16011619
     
    16071625
    16081626        if ( BP_FRIENDS_SLUG == $bp->current_component && 'requests' == $bp->current_action )
     1627                return true;
     1628
     1629        return false;
     1630}
     1631
     1632function bp_is_user_messages() {
     1633        global $bp;
     1634
     1635        if ( BP_MESSAGES_SLUG == $bp->current_component )
    16091636                return true;
    16101637
     
    17681795                if ( bp_is_group_forum_topic() )
    17691796                        $bp_classes[] = 'group-forum-topic';
     1797
     1798                if ( bp_is_group_forum_topic_edit() )
     1799                        $bp_classes[] = 'group-forum-topic-edit';
    17701800
    17711801                if ( bp_is_group_forum() )
  • trunk/bp-themes/bp-default/groups/single/forum.php

    r2184 r2197  
    1 <?php if ( bp_is_group_forum_topic() ) : ?>
     1<?php if ( bp_is_group_forum_topic_edit() ) : ?>
     2        <?php locate_template( array( 'groups/single/forum/edit.php' ), true ) ?>
    23
     4<?php elseif ( bp_is_group_forum_topic() ) : ?>
    35        <?php locate_template( array( 'groups/single/forum/topic.php' ), true ) ?>
    46
  • trunk/bp-themes/bp-default/groups/single/forum/edit.php

    r2170 r2197  
    1 <?php get_header() ?>
     1<?php if ( bp_has_topic_posts() ) : ?>
    22
    3 <div class="content-header">
    4        
    5 </div>
     3        <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form">
    64
    7 <div id="content">
    8         <?php do_action( 'template_notices' ) // (error/success feedback) ?>
    9        
    10         <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?>
    11        
    12         <div class="left-menu">
    13                 <?php locate_template( array( 'groups/single/menu.php' ), true ) ?>
     5                <div id="topic-meta">
     6                        <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3>
     7                        <a class="button" href="<?php bp_forum_permalink() ?>/">&larr; <?php _e( 'Group Forum', 'buddypress' ) ?></a> &nbsp; <a class="button" href="<?php bp_forum_directory_permalink() ?>/"><?php _e( 'Group Forum Directory', 'buddypress') ?></a></span>
     8
     9                        <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?>
     10                                <div class="admin-links"><?php bp_the_topic_admin_links() ?></div>
     11                        <?php endif; ?>
     12                </div>
     13
     14                <?php if ( bp_group_is_member() ) : ?>
     15
     16                        <?php if ( bp_is_edit_topic() ) : ?>
     17
     18                                <div id="edit-topic">
     19
     20                                        <?php do_action( 'groups_forum_edit_topic_before' ) ?>
     21
     22                                        <p><strong><?php _e( 'Edit Topic:', 'buddypress' ) ?></strong></p>
     23
     24                                        <label for="topic_title"><?php _e( 'Title:', 'buddypress' ) ?></label>
     25                                        <input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title() ?>" />
     26
     27                                        <label for="topic_text"><?php _e( 'Content:', 'buddypress' ) ?></label>
     28                                        <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text() ?></textarea>
     29
     30                                        <?php do_action( 'groups_forum_edit_topic_after' ) ?>
     31
     32                                        <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p>
     33
     34                                        <?php wp_nonce_field( 'bp_forums_edit_topic' ) ?>
     35
     36                                </div>
     37
     38                        <?php else : ?>
     39
     40                                <div id="edit-post">
     41
     42                                        <?php do_action( 'groups_forum_edit_post_before' ) ?>
     43
     44                                        <p><strong><?php _e( 'Edit Post:', 'buddypress' ) ?></strong></p>
     45
     46                                        <textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text() ?></textarea>
     47
     48                                        <?php do_action( 'groups_forum_edit_post_after' ) ?>
     49
     50                                        <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p>
     51
     52                                        <?php wp_nonce_field( 'bp_forums_edit_post' ) ?>
     53
     54                                </div>
     55
     56                        <?php endif; ?>
     57
     58                <?php endif; ?>
     59
     60        </form>
     61
     62<?php else: ?>
     63
     64        <div id="message" class="info">
     65                <p><?php _e( 'This topic does not exist.', 'buddypress' ) ?></p>
    1466        </div>
    1567
    16         <div class="main-column">
    17                 <div class="inner-tube">
    18                        
    19                         <div id="group-name">
    20                                 <h1><a href="<?php bp_group_permalink() ?>"><?php bp_group_name() ?></a></h1>
    21                                 <p class="status"><?php bp_group_type() ?></p>
    22                         </div>
    23 
    24                         <div class="bp-widget">
    25                                 <?php if ( bp_has_topic_posts() ) : ?>
    26                                 <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form">
    27                        
    28                                         <h4><?php _e( 'Forum', 'buddypress' ); ?></h4>
    29                                
    30                                         <ul id="topic-post-list" class="item-list">
    31                                                 <li id="topic-meta">
    32                                                         <a href="<?php bp_forum_permalink() ?>"><?php _e( 'Forum', 'buddypress') ?></a> &raquo;
    33                                                         <strong><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</strong>
    34                                                 </li>
    35                                         </ul>
    36                                        
    37                                         <?php if ( bp_group_is_member() ) : ?>
    38                                                
    39                                                 <?php if ( bp_is_edit_topic() ) : ?>
    40                                                        
    41                                                         <div id="edit-topic">
    42 
    43                                                                 <?php do_action( 'groups_forum_edit_topic_before' ) ?>
    44                                                        
    45                                                                 <p><strong><?php _e( 'Edit Topic:', 'buddypress' ) ?></strong></p>
    46                                                        
    47                                                                 <label for="topic_title"><?php _e( 'Title:', 'buddypress' ) ?></label>
    48                                                                 <input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title() ?>" />
    49                                
    50                                                                 <label for="topic_text"><?php _e( 'Content:', 'buddypress' ) ?></label>
    51                                                                 <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text() ?></textarea>
    52                                        
    53                                                                 <?php do_action( 'groups_forum_edit_topic_after' ) ?>
    54                                        
    55                                                                 <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p>
    56                                                        
    57                                                                 <?php wp_nonce_field( 'bp_forums_edit_topic' ) ?>
    58                                                        
    59                                                         </div>
    60                                                        
    61                                                 <?php else : ?>
    62                                                        
    63                                                         <div id="edit-post">
    64 
    65                                                                 <?php do_action( 'groups_forum_edit_post_before' ) ?>
    66                                                        
    67                                                                 <p><strong><?php _e( 'Edit Post:', 'buddypress' ) ?></strong></p>
    68 
    69                                                                 <textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text() ?></textarea>
    70                
    71                                                                 <?php do_action( 'groups_forum_edit_post_after' ) ?>
    72                                        
    73                                                                 <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p>
    74                                                        
    75                                                                 <?php wp_nonce_field( 'bp_forums_edit_post' ) ?>
    76                                                        
    77                                                         </div>
    78                                                        
    79                                                 <?php endif; ?>
    80                                        
    81                                         <?php endif; ?>
    82                                        
    83                                 </form>
    84                                 <?php else: ?>
    85 
    86                                         <div id="message" class="info">
    87                                                 <p><?php _e( 'This topic does not exist.', 'buddypress' ) ?></p>
    88                                         </div>
    89 
    90                                 <?php endif;?>
    91 
    92                         </div>
    93                        
    94                 </div>
    95         </div>
    96 
    97         <?php endwhile; endif; ?>
    98 </div>
    99 
    100 <?php get_footer() ?>
     68<?php endif;?>
  • trunk/bp-themes/bp-default/groups/single/home.php

    r2191 r2197  
    2424                                <?php do_action( 'template_notices' ) ?>
    2525
    26                                 <?php if ( 'admin' == bp_current_action() ) : ?>
     26                                <?php if ( bp_is_group_admin_page() ) : ?>
    2727                                        <?php locate_template( array( 'groups/single/admin.php' ), true ) ?>
    2828
    29                                 <?php elseif ( 'members' == bp_current_action() ) : ?>
     29                                <?php elseif ( bp_is_group_members() ) : ?>
    3030                                        <?php locate_template( array( 'groups/single/members.php' ), true ) ?>
    3131
    32                                 <?php elseif ( 'send-invites' == bp_current_action() ) : ?>
     32                                <?php elseif ( bp_is_group_invites() ) : ?>
    3333                                        <?php locate_template( array( 'groups/single/send-invites.php' ), true ) ?>
    3434
    35                                 <?php elseif ( 'request-membership' == bp_current_action() ) : ?>
     35                                <?php elseif ( bp_is_group_membership_request() ) : ?>
    3636                                        <?php locate_template( array( 'groups/single/request-membership.php' ), true ) ?>
    3737
    38                                 <?php elseif ( 'forum' == bp_current_action() ) : ?>
     38                                <?php elseif ( bp_is_group_forum() ) : ?>
    3939                                        <?php locate_template( array( 'groups/single/forum.php' ), true ) ?>
    4040
  • trunk/bp-themes/bp-default/groups/single/plugins.php

    r2170 r2197  
    77                        <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?>
    88
    9                         <?php locate_template( array( 'groups/single/group-header.php' ), true ) ?>
     9                        <div id="item-header">
     10                                <?php locate_template( array( 'groups/single/group-header.php' ), true ) ?>
     11                        </div>
    1012
    11                         <?php do_action( 'bp_template_content' ) ?>
     13                        <div id="item-nav">
     14                                <div class="item-list-tabs no-ajax" id="user-nav">
     15                                        <ul>
     16                                                <?php bp_get_options_nav() ?>
    1217
    13                         <?php do_action( 'bp_directory_members_content' ) ?>
     18                                                <?php do_action( 'bp_members_directory_member_types' ) ?>
     19                                        </ul>
     20                                </div>
     21                        </div>
     22
     23                        <div id="item-body">
     24
     25                                <?php do_action( 'bp_template_content' ) ?>
     26
     27                                <?php do_action( 'bp_directory_members_content' ) ?>
     28
     29                        </div><!-- #item-body -->
    1430
    1531                        <?php endwhile; endif; ?>
     32
    1633                </div><!-- .padder -->
    1734        </div><!-- #content -->
  • trunk/bp-themes/bp-default/members/single/home.php

    r2191 r2197  
    2121
    2222                        <div id="item-body">
    23 
    24                                 <?php if ( 'home' == bp_current_component() || 'activity' == bp_current_component() || !bp_current_component() ) : ?>
     23                                <?php if ( bp_is_user_activity() || !bp_current_component() ) : ?>
    2524                                        <?php locate_template( array( 'members/single/activity.php' ), true ) ?>
    2625
    27                                 <?php elseif ( 'blogs' == bp_current_component() ) : ?>
     26                                <?php elseif ( bp_is_user_blogs() ) : ?>
    2827                                        <?php locate_template( array( 'members/single/blogs.php' ), true ) ?>
    2928
    30                                 <?php elseif ( 'friends' == bp_current_component() ) : ?>
     29                                <?php elseif ( bp_is_user_friends() ) : ?>
    3130                                        <?php locate_template( array( 'members/single/friends.php' ), true ) ?>
    3231
    33                                 <?php elseif ( 'groups' == bp_current_component() ) : ?>
     32                                <?php elseif ( bp_is_user_groups() ) : ?>
    3433                                        <?php locate_template( array( 'members/single/groups.php' ), true ) ?>
    3534
    36                                 <?php elseif ( 'messages' == bp_current_component() ) : ?>
     35                                <?php elseif ( bp_is_user_messages() ) : ?>
    3736                                        <?php locate_template( array( 'members/single/messages.php' ), true ) ?>
    3837
    39                                 <?php elseif ( 'profile' == bp_current_component() ) : ?>
     38                                <?php elseif ( bp_is_user_profile() ) : ?>
    4039                                        <?php locate_template( array( 'members/single/profile.php' ), true ) ?>
    41 
    42                                 <?php else : ?>
    43                                         <?php locate_template( array( 'members/single/plugins.php' ), true ) ?>
    4440
    4541                                <?php endif; ?>
  • trunk/bp-themes/bp-default/members/single/plugins.php

    r2179 r2197  
    1 <div class="item-list-tabs no-ajax" id="user-subnav">
    2         <ul>
    3                 <?php bp_get_options_nav() ?>
    4         </ul>
    5 </div>
     1<?php get_header() ?>
    62
    7 <?php do_action( 'bp_template_content' ) ?>
     3        <?php do_action( 'bp_before_directory_members_content' ) ?>
    84
    9 <?php do_action( 'bp_directory_members_content' ) ?>
     5        <div id="content">
     6                <div class="padder">
     7
     8                        <div id="item-header">
     9                                <?php locate_template( array( 'members/single/member-header.php' ), true ) ?>
     10                        </div>
     11
     12                        <div id="item-nav">
     13                                <div class="item-list-tabs no-ajax" id="user-nav">
     14                                        <ul>
     15                                                <?php bp_get_user_nav() ?>
     16
     17                                                <?php do_action( 'bp_members_directory_member_types' ) ?>
     18                                        </ul>
     19                                </div>
     20                        </div>
     21
     22                        <div id="item-body">
     23
     24                                <div class="item-list-tabs no-ajax" id="user-subnav">
     25                                        <ul>
     26                                                <?php bp_get_options_nav() ?>
     27                                        </ul>
     28                                </div>
     29
     30                                <?php do_action( 'bp_template_content' ) ?>
     31
     32                                <?php do_action( 'bp_directory_members_content' ) ?>
     33
     34                        </div><!-- #item-body -->
     35
     36                </div><!-- .padder -->
     37        </div><!-- #content -->
     38
     39        <?php locate_template( array( 'sidebar.php' ), true ) ?>
     40
     41        <?php do_action( 'bp_after_directory_members_content' ) ?>
     42
     43<?php get_footer() ?>
Note: See TracChangeset for help on using the changeset viewer.