Changeset 5388
- Timestamp:
- 11/27/2011 04:16:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/groups/single/forum/topic.php
r5184 r5388 1 1 <?php do_action( 'bp_before_group_forum_topic' ); ?> 2 2 3 <?php if ( bp_has_forum_topic_posts() ) : ?> 3 <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form"> 4 <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> 5 <ul> 6 <?php if ( is_user_logged_in() ) : ?> 7 8 <li> 9 <a href="<?php bp_forum_topic_new_reply_link() ?>" class="new-reply-link"><?php _e( 'New Reply', 'buddypress' ) ?></a> 10 </li> 11 12 <?php endif; ?> 13 14 <?php if ( bp_forums_has_directory() ) : ?> 15 16 <li> 17 <a href="<?php bp_forums_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a> 18 </li> 19 20 <?php endif; ?> 21 22 </ul> 23 </div> 24 25 <div id="topic-meta"> 26 <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3> 27 28 <?php if ( bp_forum_topic_has_tags() ) : ?> 29 30 <div class="topic-tags"> 31 32 <?php _e( 'Topic tags:', 'buddypress' ) ?> <?php bp_forum_topic_tag_list() ?> 33 34 </div> 35 36 <?php endif; ?> 37 38 <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?> 39 40 <div class="last admin-links"> 41 42 <?php bp_the_topic_admin_links() ?> 43 44 </div> 45 46 <?php endif; ?> 47 48 <?php do_action( 'bp_group_forum_topic_meta' ); ?> 49 50 </div> 4 51 5 <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form">6 52 7 <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> 8 <ul> 9 <?php if ( is_user_logged_in() ) : ?> 10 11 <li> 12 <a href="<?php bp_forum_topic_new_reply_link() ?>" class="new-reply-link"><?php _e( 'New Reply', 'buddypress' ) ?></a> 13 </li> 14 15 <?php endif; ?> 16 17 <?php if ( bp_forums_has_directory() ) : ?> 18 19 <li> 20 <a href="<?php bp_forums_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a> 21 </li> 22 23 <?php endif; ?> 24 25 </ul> 26 </div> 27 28 <div id="topic-meta"> 29 <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3> 30 31 <?php if ( bp_forum_topic_has_tags() ) : ?> 32 33 <div class="topic-tags"> 34 35 <?php _e( 'Topic tags:', 'buddypress' ) ?> <?php bp_forum_topic_tag_list() ?> 36 37 </div> 38 39 <?php endif; ?> 40 41 <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?> 42 43 <div class="last admin-links"> 44 45 <?php bp_the_topic_admin_links() ?> 46 47 </div> 48 49 <?php endif; ?> 50 51 <?php do_action( 'bp_group_forum_topic_meta' ); ?> 52 53 </div> 53 <?php if ( bp_has_forum_topic_posts() ) : ?> 54 54 55 55 <div class="pagination no-ajax"> … … 114 114 </div> 115 115 116 <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?> 116 <?php else: ?> 117 118 <div id="message" class="info"> 119 <p><?php _e( 'There are no posts for this topic.', 'buddypress' ) ?></p> 120 </div> 121 122 <?php endif;?> 117 123 118 <?php if ( bp_get_the_topic_is_last_page() ) : ?>124 <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?> 119 125 120 <?php if ( bp_get_the_topic_is_topic_open() && !bp_group_is_user_banned() ) : ?>126 <?php if ( bp_get_the_topic_is_last_page() ) : ?> 121 127 122 <div id="post-topic-reply"> 123 <p id="post-reply"></p> 128 <?php if ( bp_get_the_topic_is_topic_open() && !bp_group_is_user_banned() ) : ?> 124 129 125 <?php if ( bp_groups_auto_join() && !bp_group_is_member() ) : ?> 126 <p><?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ) ?></p> 127 <?php endif; ?> 130 <div id="post-topic-reply"> 131 <p id="post-reply"></p> 128 132 129 <?php do_action( 'groups_forum_new_reply_before' ) ?> 133 <?php if ( bp_groups_auto_join() && !bp_group_is_member() ) : ?> 134 <p><?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ) ?></p> 135 <?php endif; ?> 130 136 131 <h4><?php _e( 'Add a reply:', 'buddypress' ) ?></h4>137 <?php do_action( 'groups_forum_new_reply_before' ) ?> 132 138 133 <textarea name="reply_text" id="reply_text"></textarea>139 <h4><?php _e( 'Add a reply:', 'buddypress' ) ?></h4> 134 140 135 <div class="submit"> 136 <input type="submit" name="submit_reply" id="submit" value="<?php _e( 'Post Reply', 'buddypress' ) ?>" /> 137 </div> 141 <textarea name="reply_text" id="reply_text"></textarea> 138 142 139 <?php do_action( 'groups_forum_new_reply_after' ) ?> 140 141 <?php wp_nonce_field( 'bp_forums_new_reply' ) ?> 143 <div class="submit"> 144 <input type="submit" name="submit_reply" id="submit" value="<?php _e( 'Post Reply', 'buddypress' ) ?>" /> 142 145 </div> 143 146 144 <?php elseif ( !bp_group_is_user_banned() ) :?>147 <?php do_action( 'groups_forum_new_reply_after' ) ?> 145 148 146 <div id="message" class="info"> 147 <p><?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ) ?></p> 148 </div> 149 <?php wp_nonce_field( 'bp_forums_new_reply' ) ?> 150 </div> 149 151 150 <?php endif; ?> 152 <?php elseif ( !bp_group_is_user_banned() ) : ?> 153 154 <div id="message" class="info"> 155 <p><?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ) ?></p> 156 </div> 151 157 152 158 <?php endif; ?> … … 154 160 <?php endif; ?> 155 161 156 < /form><!-- #forum-topic-form -->162 <?php endif; ?> 157 163 158 <?php else: ?> 159 160 <div id="message" class="info"> 161 <p><?php _e( 'There are no posts for this topic.', 'buddypress' ) ?></p> 162 </div> 163 164 <?php endif;?> 164 </form><!-- #forum-topic-form --> 165 165 166 166 <?php do_action( 'bp_after_group_forum_topic' ) ?>
Note: See TracChangeset
for help on using the changeset viewer.