Skip to:
Content

BuddyPress.org


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

Backwards compatibility updates for 1.0.3 built themes

File:
1 edited

Legend:

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

    r1826 r1834  
    231231   
    232232?> 
    233     <div class="bp-widget">
    234         <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></h4>
     233    <div class="info-group">
     234        <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <span><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></span></h4>
    235235        <?php if ( $group_ids ) { ?>
    236236            <ul class="horiz-gallery">
     
    242242                }
    243243            ?>              <li>
    244                     <a href="<?php echo bp_get_group_permalink( $group ) ?>"><img src="<?php echo attribute_escape( $group->avatar_thumb ); ?>" class="avatar" alt="<?php _e( 'Group Avatar', 'buddypress' ) ?>" /></a>
     244                    <a href="<?php echo bp_get_group_permalink( $group ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $group->id, 'object' => 'group', 'type' => 'thumb' ) ) ?></a>
    245245                    <h5><a href="<?php echo bp_get_group_permalink( $group ) ?>"><?php echo attribute_escape( $group->name ) ?></a></h5>
    246246                </li>
     
    256256<?php
    257257}
     258
     259/* DEPRECATED - use bp_has_topics() template loop */
     260function bp_group_active_forum_topics( $total_topics = 3, $group = false ) {
     261    global $groups_template, $forum_template;
     262
     263    if ( !$group )
     264        $group =& $groups_template->group;
     265       
     266    $forum_id = groups_get_groupmeta( $group->id, 'forum_id' );
     267
     268    if ( $forum_id && $forum_id != '' ) {
     269        if ( function_exists( 'bp_forums_setup' ) ) {
     270            $latest_topics = bp_forums_get_forum_topics( array( 'forum_id' => $forum_id ) );
     271       
     272            if ( $latest_topics ) { ?>
     273                <ul class="item-list" id="recent-forum-topics"><?php
     274               
     275                $counter = 0;
     276               
     277                foreach( $latest_topics as $topic ) {
     278                    $alt = ( $counter % 2 == 1 ) ? ' class="alt"' : '';
     279                    $forum_template->topic = (object)$topic; ?>
     280                   
     281                    <li<?php echo $alt ?>>
     282                        <div class="avatar">
     283                            <?php bp_the_topic_poster_avatar() ?>
     284                        </div>
     285
     286                        <a href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>"><?php bp_the_topic_title() ?></a>
     287                        <span class="small">- <?php bp_the_topic_total_post_count() ?> </span>
     288                        <p><span class="activity"><?php echo sprintf( __( 'updated %s ago', 'buddypress' ), bp_the_topic_time_since_last_post( false ) ) ?></span></p>
     289               
     290                        <div class="latest-post">
     291                            <?php _e( 'Latest by', 'buddypress' ) ?> <?php bp_the_topic_last_poster_name() ?>:
     292                            <?php bp_the_topic_latest_post_excerpt() ?>
     293                        </div>
     294                    </li>
     295                    <?php $counter++ ?>
     296                   
     297                <?php } ?>
     298                </ul>
     299                <?php
     300            } else {
     301            ?>
     302                <div id="message" class="info">
     303                    <p><?php _e( 'There are no active forum topics for this group', 'buddypress' ) ?></p>
     304                </div>
     305            <?php
     306            }
     307        }
     308    }
     309}
     310
    258311
    259312/* DEPRECATED - use group invite template loop (see groups/create.php in skeleton BuddyPress theme) */
     
    479532            <?php if ( bp_are_previous_group_creation_steps_complete( 'group-avatar' ) ) { ?>
    480533                <div class="left-menu">
    481                     <?php bp_group_current_avatar() ?>
     534                    <?php bp_new_group_avatar() ?>
    482535                </div>
    483536               
Note: See TracChangeset for help on using the changeset viewer.