Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * BuddyPress - Groups Loop
- *
- * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
- ?>
- <?php do_action( 'bp_before_groups_loop' ); ?>
- <div id="tabs-container">
- <div id="object-nav">
- <ul class="tabs-nav">
- <li class="nav-one"><a href="#popular" class="current"><?php _e('Popular', 'OneCommunity'); ?></a></li>
- <li class="nav-two"><a href="#active"><?php _e('Active', 'OneCommunity'); ?></a></li>
- <li class="nav-three"><a href="#alphabetical"><?php _e('Alphabetical', 'OneCommunity'); ?></a></li>
- <li class="nav-four"><a href="#newest"><?php _e('Newest', 'OneCommunity'); ?></a></li>
- </ul>
- </div>
- <div class="list-wrap">
- <!-- GROUPS LOOP POPULAR -->
- <?php if ( bp_has_groups( 'type=popular&max=false&per_page=500' ) ) : ?>
- <ul id="popular">
- <?php while ( bp_groups() ) : bp_the_group(); ?>
- <li <?php bp_group_class(); ?>>
- <div class="group-box">
- <div class="group-box-image-container">
- <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
- </div>
- <div class="group-box-bottom">
- <div class="group-box-title"><a href="<?php bp_group_permalink() ?>"><?php $grouptitle = bp_get_group_name(); $getlength = strlen($grouptitle); $thelength = 20; echo mb_substr($grouptitle, 0, $thelength, 'UTF-8'); if ($getlength > $thelength) echo "..."; ?></a></div>
- <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
- <?php bp_group_member_count(); ?></div>
- </div>
- </div><!--group-box ends-->
- </li>
- <?php endwhile; ?>
- </ul>
- <div class="clear"></div>
- <?php do_action( 'bp_after_groups_loop' ) ?>
- <?php else: ?>
- <ul id="popular">
- <div id="message" class="info" style="width:50%">
- <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
- </div><br />
- </ul>
- <?php endif; ?>
- <!-- POPULAR GROUPS LOOP END -->
- <!-- NEWEST GROUPS LOOP START -->
- <?php if ( bp_has_groups( 'type=newest&max=false&per_page=500' ) ) : ?>
- <ul id="newest" class="hidden-tab">
- <?php while ( bp_groups() ) : bp_the_group(); ?>
- <li <?php bp_group_class(); ?>>
- <div class="group-box">
- <div class="group-box-image-container">
- <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
- </div>
- <div class="group-box-bottom">
- <div class="group-box-title"><a href="<?php bp_group_permalink() ?>"><?php $grouptitle = bp_get_group_name(); $getlength = strlen($grouptitle); $thelength = 20; echo mb_substr($grouptitle, 0, $thelength, 'UTF-8'); if ($getlength > $thelength) echo "..."; ?></a></div>
- <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
- <?php bp_group_member_count(); ?></div>
- </div>
- </div><!--group-box ends-->
- </li>
- <?php endwhile; ?>
- </ul>
- <div class="clear"></div>
- <?php do_action( 'bp_after_groups_loop' ) ?>
- <?php else: ?>
- <ul id="newest" class="hidden-tab">
- <div id="message" class="info" style="width:50%">
- <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
- </div><br />
- </ul>
- <?php endif; ?>
- <!-- NEWEST GROUPS LOOP END -->
- <!-- LAST ACTIVE GROUPS LOOP START -->
- <?php if ( bp_has_groups( 'type=active&max=false&per_page=500' ) ) : ?>
- <ul id="active" class="hidden-tab">
- <?php while ( bp_groups() ) : bp_the_group(); ?>
- <li <?php bp_group_class(); ?>>
- <div class="group-box">
- <div class="group-box-image-container">
- <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
- </div>
- <div class="group-box-bottom">
- <div class="group-box-title"><a href="<?php bp_group_permalink() ?>"><?php $grouptitle = bp_get_group_name(); $getlength = strlen($grouptitle); $thelength = 20; echo mb_substr($grouptitle, 0, $thelength, 'UTF-8'); if ($getlength > $thelength) echo "..."; ?></a></div>
- <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
- <?php bp_group_member_count(); ?></div>
- </div>
- </div><!--group-box ends-->
- </li>
- <?php endwhile; ?>
- </ul>
- <div class="clear"></div>
- <?php do_action( 'bp_after_groups_loop' ) ?>
- <?php else: ?>
- <ul id="active" class="hidden-tab">
- <div id="message" class="info" style="width:50%">
- <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
- </div><br />
- </ul>
- <?php endif; ?>
- <!-- LAST ACTIVE GROUPS LOOP END -->
- <!-- ALPHABETICAL GROUPS LOOP -->
- <?php if ( bp_has_groups( 'type=alphabetical&max=false&per_page=500' ) ) : ?>
- <ul id="alphabetical" class="hidden-tab">
- <?php while ( bp_groups() ) : bp_the_group(); ?>
- <li <?php bp_group_class(); ?>>
- <div class="group-box">
- <div class="group-box-image-container">
- <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
- </div>
- <div class="group-box-bottom">
- <div class="group-box-title"><a href="<?php bp_group_permalink() ?>"><?php $grouptitle = bp_get_group_name(); $getlength = strlen($grouptitle); $thelength = 20; echo mb_substr($grouptitle, 0, $thelength, 'UTF-8'); if ($getlength > $thelength) echo "..."; ?></a></div>
- <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
- <?php bp_group_member_count(); ?></div>
- </div>
- </div><!--group-box ends-->
- </li>
- <?php endwhile; ?>
- </ul>
- <div class="clear"></div>
- <?php do_action( 'bp_after_groups_loop' ) ?>
- <?php else: ?>
- <ul id="alphabetical" class="hidden-tab">
- <div id="message" class="info" style="width:50%">
- <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
- </div><br />
- </ul>
- <?php endif; ?>
- <!-- ALPHABETICAL GROUPS LOOP END -->
- </div> <!-- List Wrap -->
- </div> <!-- tabs-container -->
- <?php do_action( 'bp_after_groups_loop' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement