Skip to:
Content

BuddyPress.org

Changeset 2972


Ignore:
Timestamp:
04/28/2010 11:06:48 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2129.

Location:
branches/1.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-forums/bp-forums-templatetags.php

    r2953 r2972  
    592592            $class .= ' closed';
    593593
    594         return trim( $class );
     594        return apply_filters( 'bp_get_the_topic_css_class', trim( $class ) );
    595595    }
    596596
     
    859859    }
    860860
     861function bp_the_topic_post_css_class() {
     862    echo bp_get_the_topic_post_css_class();
     863}
     864
     865    function bp_get_the_topic_post_css_class() {
     866        global $topic_template;
     867
     868        $class = false;
     869
     870        if ( $topic_template->current_post % 2 == 1 )
     871            $class .= 'alt';
     872
     873        if ( 1 == (int)$topic_template->post->post_status )
     874            $class .= ' deleted';
     875
     876        if ( 0 == (int)$topic_template->post->post_status )
     877            $class .= ' open';
     878
     879        return apply_filters( 'bp_get_the_topic_post_css_class', trim( $class ) );
     880    }
     881
    861882function bp_the_topic_post_poster_avatar( $args = '' ) {
    862883    echo bp_get_the_topic_post_poster_avatar( $args );
  • branches/1.2/bp-themes/bp-default/_inc/global.js

    r2964 r2972  
    820820    /** Alternate Highlighting ******************************************/
    821821
    822     jq('table tr, div.message-box, ul#topic-post-list li').each( function(i) {
     822    jq('table tr, div.message-box').each( function(i) {
    823823        if ( i % 2 != 1 )
    824824            jq(this).addClass('alt');
  • branches/1.2/bp-themes/bp-default/groups/single/forum/topic.php

    r2971 r2972  
    3131            <?php while ( bp_forum_topic_posts() ) : bp_the_forum_topic_post(); ?>
    3232
    33                 <li id="post-<?php bp_the_topic_post_id() ?>">
     33                <li id="post-<?php bp_the_topic_post_id() ?>" class="<?php bp_the_topic_post_css_class() ?>">
    3434                    <div class="poster-meta">
    3535                        <a href="<?php bp_the_topic_post_poster_link() ?>">
Note: See TracChangeset for help on using the changeset viewer.