Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/09/2009 10:20:13 PM (17 years ago)
Author:
apeatling
Message:

Backwards compatibility updates for 1.0.3 built themes

File:
1 edited

Legend:

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

    r1832 r1834  
    708708                return apply_filters( 'bp_get_group_all_members_permalink', bp_get_group_permalink( $group ) . '/members' );
    709709        }
    710 
    711 function bp_group_active_forum_topics( $total_topics = 3, $group = false ) {
    712         global $groups_template, $forum_template;
    713 
    714         if ( !$group )
    715                 $group =& $groups_template->group;
    716 
    717         $forum_id = groups_get_groupmeta( $group->id, 'forum_id' );
    718 
    719         if ( $forum_id && $forum_id != '' ) {
    720                 if ( function_exists( 'bp_forums_setup' ) ) {
    721                         $latest_topics = bp_forums_get_forum_topics( $forum_id );
    722                
    723                         if ( $latest_topics ) { ?>
    724                                 <ul class="item-list" id="recent-forum-topics"><?php
    725                                
    726                                 $counter = 0;
    727                                
    728                                 foreach( $latest_topics as $topic ) {
    729                                         $alt = ( $counter % 2 == 1 ) ? ' class="alt"' : '';
    730                                         $forum_template->topic = (object)$topic; ?>
    731                                        
    732                                         <li<?php echo $alt ?>>
    733                                                 <div class="avatar">
    734                                                         <?php bp_the_topic_poster_avatar() ?>
    735                                                 </div>
    736 
    737                                                 <a href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>"><?php bp_the_topic_title() ?></a>
    738                                                 <span class="small">- <?php bp_the_topic_total_post_count() ?> </span>
    739                                                 <p><span class="activity"><?php echo sprintf( __( 'updated %s ago', 'buddypress' ), bp_the_topic_time_since_last_post( false ) ) ?></span></p>
    740                                
    741                                                 <div class="latest-post">
    742                                                         <?php _e( 'Latest by', 'buddypress' ) ?> <?php bp_the_topic_last_poster_name() ?>:
    743                                                         <?php bp_the_topic_latest_post_excerpt() ?>
    744                                                 </div>
    745                                         </li>
    746                                         <?php $counter++ ?>
    747                                        
    748                                 <?php } ?>
    749                                 </ul>
    750                                 <?php
    751                         } else {
    752                         ?>
    753                                 <div id="message" class="info">
    754                                         <p><?php _e( 'There are no active forum topics for this group', 'buddypress' ) ?></p>
    755                                 </div>
    756                         <?php
    757                         }
    758                 }
    759         }
    760 }
    761710
    762711function bp_group_search_form() {
Note: See TracChangeset for help on using the changeset viewer.