Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/09/2008 07:18:50 AM (17 years ago)
Author:
apeatling
Message:

Updated widget functions to fix item ordering.

File:
1 edited

Legend:

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

    r375 r380  
    3333        . $after_title; ?>
    3434   
    35     <?php $groups = BP_Groups_Group::get_newest( $options['max_groups'] ); ?>
     35    <?php $groups = groups_get_popular( $options['max_groups'] ); ?>
    3636   
    3737    <?php if ( $groups ) : ?>
    3838        <div class="item-options" id="groups-list-options">
    3939            <img id="ajax-loader-groups" src="<?php echo $bp['groups']['image_base'] ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /> &nbsp;
    40             <a href="<?php echo site_url() . '/groups' ?>" id="newest-groups" class="selected"><?php _e("Newest") ?></a> |
     40            <a href="<?php echo site_url() . '/groups' ?>" id="newest-groups"><?php _e("Newest") ?></a> |
    4141            <a href="<?php echo site_url() . '/groups' ?>" id="recently-active-groups"><?php _e("Active") ?></a> |
    42             <a href="<?php echo site_url() . '/groups' ?>" id="popular-groups"><?php _e("Popular") ?></a>
     42            <a href="<?php echo site_url() . '/groups' ?>" id="popular-groups" class="selected"><?php _e("Popular") ?></a>
    4343        </div>
    4444        <ul id="groups-list" class="item-list">
     
    5252                    <div class="item">
    5353                        <div class="item-title"><a href="<?php echo bp_group_permalink( $group ) ?>" title="<?php echo $group->name ?>"><?php echo $group->name ?></a></div>
    54                         <div class="item-meta"><span class="activity"><?php echo bp_core_get_last_activity( $group->date_created, __('created '), __(' ago') ) ?></span></div>
     54                        <div class="item-meta">
     55                        <span class="activity">
     56                            <?php
     57                            if ( $group->total_member_count == 1 )
     58                                echo $group->total_member_count . __(' member');
     59                            else
     60                                echo $group->total_member_count . __(' members');
     61                            ?>
     62                        </span></div>
    5563                    </div>
    5664                </li>
Note: See TracChangeset for help on using the changeset viewer.