Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/26/2010 05:49:48 PM (15 years ago)
Author:
apeatling
Message:

Fixed forum post activity tracking, now links directly to the forum post. Only show post form on the last page of posts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/groups/single/forum/topic.php

    r2170 r2460  
    33    <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form">
    44
    5         <div class="pagination">
     5        <div class="pagination no-ajax">
    66
    77            <div id="post-count" class="pag-count">
     
    3737                    </div>
    3838
    39                     <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_post_is_mine() ) : ?>
    40                         <div class="admin-links"><?php bp_the_topic_post_admin_links() ?></div>
    41                     <?php endif; ?>
     39                    <div class="admin-links">
     40                        <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_post_is_mine() ) : ?>
     41                            <?php bp_the_topic_post_admin_links() ?>
     42                        <?php endif; ?>
     43                        <a href="#post-<?php bp_the_topic_post_id() ?>" title="<?php _e( 'Permanent link to this post', 'buddypress' ) ?>">#</a>
     44                    </div>
    4245                </li>
    4346
     
    4548        </ul>
    4649
     50        <div class="pagination no-ajax">
     51
     52            <div id="post-count" class="pag-count">
     53                <?php bp_the_topic_pagination_count() ?>
     54            </div>
     55
     56            <div class="pagination-links" id="topic-pag">
     57                <?php bp_the_topic_pagination() ?>
     58            </div>
     59
     60        </div>
     61
    4762        <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?>
    4863
    49             <?php if ( bp_get_the_topic_is_topic_open() ) : ?>
     64            <?php if ( bp_get_the_topic_is_last_page() ) : ?>
    5065
    51                 <div id="post-topic-reply">
    52                     <a name="post-reply"></a>
     66                <?php if ( bp_get_the_topic_is_topic_open() ) : ?>
    5367
    54                     <?php if ( !bp_group_is_member() ) : ?>
    55                         <p><?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ) ?></p>
    56                     <?php endif; ?>
     68                    <div id="post-topic-reply">
     69                        <p id="post-reply"></p>
    5770
    58                     <?php do_action( 'groups_forum_new_reply_before' ) ?>
     71                        <?php if ( !bp_group_is_member() ) : ?>
     72                            <p><?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ) ?></p>
     73                        <?php endif; ?>
    5974
    60                     <p><strong><?php _e( 'Add a reply:', 'buddypress' ) ?></strong></p>
     75                        <?php do_action( 'groups_forum_new_reply_before' ) ?>
    6176
    62                     <textarea name="reply_text" id="reply_text"></textarea>
     77                        <h4><?php _e( 'Add a reply:', 'buddypress' ) ?></h4>
    6378
    64                     <div class="submit">
    65                         <input type="submit" name="submit_reply" id="submit" value="<?php _e( 'Post Reply', 'buddypress' ) ?>" />
     79                        <textarea name="reply_text" id="reply_text"></textarea>
     80
     81                        <div class="submit">
     82                            <input type="submit" name="submit_reply" id="submit" value="<?php _e( 'Post Reply', 'buddypress' ) ?>" />
     83                        </div>
     84
     85                        <?php do_action( 'groups_forum_new_reply_after' ) ?>
     86
     87                        <?php wp_nonce_field( 'bp_forums_new_reply' ) ?>
    6688                    </div>
    6789
    68                     <?php do_action( 'groups_forum_new_reply_after' ) ?>
     90                <?php else : ?>
    6991
    70                     <?php wp_nonce_field( 'bp_forums_new_reply' ) ?>
    71                 </div>
     92                    <div id="message" class="info">
     93                        <p><?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ) ?></p>
     94                    </div>
    7295
    73             <?php else : ?>
    74 
    75                 <div id="message" class="info">
    76                     <p><?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ) ?></p>
    77                 </div>
     96                <?php endif; ?>
    7897
    7998            <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.