Changeset 1834 for trunk/bp-groups/bp-groups-templatetags.php
- Timestamp:
- 09/09/2009 10:20:13 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups/bp-groups-templatetags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-templatetags.php
r1832 r1834 708 708 return apply_filters( 'bp_get_group_all_members_permalink', bp_get_group_permalink( $group ) . '/members' ); 709 709 } 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"><?php725 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 <?php751 } 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 <?php757 }758 }759 }760 }761 710 762 711 function bp_group_search_form() {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)