Skip to:
Content

BuddyPress.org

Ticket #2063: aps-theme-patch1.diff

File aps-theme-patch1.diff, 2.2 KB (added by andrew_s1, 16 years ago)

add new action hooks for modifying appearance of posts and topics

  • bp-themes/bp-default/groups/single/forum/topic.php

     
    2424                </div>
    2525
    2626                <ul id="topic-post-list" class="item-list">
    27                         <?php while ( bp_forum_topic_posts() ) : bp_the_forum_topic_post(); ?>
    28 
    29                                 <li id="post-<?php bp_the_topic_post_id() ?>">
     27                        <?php while ( bp_forum_topic_posts() ) : bp_the_forum_topic_post();  ?>
     28                                <li <?php
     29                                        $topic_post_id = bp_get_the_topic_post_id();
     30                                        echo "id='post-$topic_post_id' class='",
     31                                                                apply_filters('bp_single_forum_topic_post_css',array('class'=>'', 'post_id'=>$topic_post_id)),
     32                                                                "'";
     33                                        ?> >
    3034                                        <div class="poster-meta">
    3135                                                <a href="<?php bp_the_topic_post_poster_link() ?>">
    3236                                                        <?php bp_the_topic_post_poster_avatar( 'width=40&height=40' ) ?>
     
    3943                                        </div>
    4044
    4145                                        <div class="admin-links">
    42                                                 <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_post_is_mine() ) : ?>
    43                                                         <?php bp_the_topic_post_admin_links() ?>
    44                                                 <?php endif; ?>
    45                                                 <a href="#post-<?php bp_the_topic_post_id() ?>" title="<?php _e( 'Permanent link to this post', 'buddypress' ) ?>">#</a>
     46                                                <?php
     47                                                if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_post_is_mine() ) :
     48                                                        bp_the_topic_post_admin_links();
     49                                                endif;
     50                                                do_action( 'bp_single_forum_topic_links' , $topic_post_id );
     51                                                ?>
     52                                                <a href="#post-<?php echo $topic_post_id; ?>" title="<?php _e( 'Permanent link to this post', 'buddypress' ) ?>">#</a>
    4653                                        </div>
    4754                                </li>
    4855
  • bp-themes/bp-default/forums/forums-loop.php

     
    3030
    3131                        <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th>
    3232                        <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ) ?></th>
     33                        <?php do_action( 'bp_directory_forums_extra_cell_head' ); ?>
    3334                </tr>
    3435
    3536                <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>