Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.10 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * BuddyPress - Groups Loop
  5. *
  6. * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
  7. *
  8. * @package BuddyPress
  9. * @subpackage bp-default
  10. */
  11.  
  12. ?>
  13.  
  14. <?php do_action( 'bp_before_groups_loop' ); ?>
  15.  
  16. <div id="tabs-container">
  17. <div id="object-nav">
  18. <ul class="tabs-nav">
  19. <li class="nav-one"><a href="#popular" class="current"><?php _e('Popular', 'OneCommunity'); ?></a></li>
  20. <li class="nav-two"><a href="#active"><?php _e('Active', 'OneCommunity'); ?></a></li>
  21. <li class="nav-three"><a href="#alphabetical"><?php _e('Alphabetical', 'OneCommunity'); ?></a></li>
  22. <li class="nav-four"><a href="#newest"><?php _e('Newest', 'OneCommunity'); ?></a></li>
  23. </ul>
  24. </div>
  25.  
  26. <div class="list-wrap">
  27.  
  28. <!-- GROUPS LOOP POPULAR -->
  29. <?php if ( bp_has_groups( 'type=popular&max=false&per_page=500' ) ) : ?>
  30.  
  31. <ul id="popular">
  32. <?php while ( bp_groups() ) : bp_the_group(); ?>
  33. <li <?php bp_group_class(); ?>>
  34. <div class="group-box">
  35. <div class="group-box-image-container">
  36. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  37. </div>
  38. <div class="group-box-bottom">
  39. <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>
  40. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  41. <?php bp_group_member_count(); ?></div>
  42. </div>
  43. </div><!--group-box ends-->
  44. </li>
  45. <?php endwhile; ?>
  46. </ul>
  47.  
  48. <div class="clear"></div>
  49. <?php do_action( 'bp_after_groups_loop' ) ?>
  50.  
  51. <?php else: ?>
  52. <ul id="popular">
  53. <div id="message" class="info" style="width:50%">
  54. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  55. </div><br />
  56. </ul>
  57. <?php endif; ?>
  58. <!-- POPULAR GROUPS LOOP END -->
  59.  
  60.  
  61. <!-- NEWEST GROUPS LOOP START -->
  62. <?php if ( bp_has_groups( 'type=newest&max=false&per_page=500' ) ) : ?>
  63.  
  64. <ul id="newest" class="hidden-tab">
  65. <?php while ( bp_groups() ) : bp_the_group(); ?>
  66. <li <?php bp_group_class(); ?>>
  67. <div class="group-box">
  68. <div class="group-box-image-container">
  69. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  70. </div>
  71. <div class="group-box-bottom">
  72. <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>
  73. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  74. <?php bp_group_member_count(); ?></div>
  75. </div>
  76. </div><!--group-box ends-->
  77. </li>
  78. <?php endwhile; ?>
  79. </ul>
  80.  
  81. <div class="clear"></div>
  82. <?php do_action( 'bp_after_groups_loop' ) ?>
  83.  
  84. <?php else: ?>
  85. <ul id="newest" class="hidden-tab">
  86. <div id="message" class="info" style="width:50%">
  87. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  88. </div><br />
  89. </ul>
  90. <?php endif; ?>
  91.  
  92. <!-- NEWEST GROUPS LOOP END -->
  93.  
  94.  
  95. <!-- LAST ACTIVE GROUPS LOOP START -->
  96.  
  97. <?php if ( bp_has_groups( 'type=active&max=false&per_page=500' ) ) : ?>
  98.  
  99. <ul id="active" class="hidden-tab">
  100. <?php while ( bp_groups() ) : bp_the_group(); ?>
  101. <li <?php bp_group_class(); ?>>
  102. <div class="group-box">
  103. <div class="group-box-image-container">
  104. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  105. </div>
  106. <div class="group-box-bottom">
  107. <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>
  108. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  109. <?php bp_group_member_count(); ?></div>
  110. </div>
  111. </div><!--group-box ends-->
  112. </li>
  113. <?php endwhile; ?>
  114. </ul>
  115.  
  116. <div class="clear"></div>
  117. <?php do_action( 'bp_after_groups_loop' ) ?>
  118.  
  119. <?php else: ?>
  120. <ul id="active" class="hidden-tab">
  121. <div id="message" class="info" style="width:50%">
  122. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  123. </div><br />
  124. </ul>
  125. <?php endif; ?>
  126. <!-- LAST ACTIVE GROUPS LOOP END -->
  127.  
  128.  
  129.  
  130. <!-- ALPHABETICAL GROUPS LOOP -->
  131. <?php if ( bp_has_groups( 'type=alphabetical&max=false&per_page=500' ) ) : ?>
  132.  
  133. <ul id="alphabetical" class="hidden-tab">
  134. <?php while ( bp_groups() ) : bp_the_group(); ?>
  135. <li <?php bp_group_class(); ?>>
  136. <div class="group-box">
  137. <div class="group-box-image-container">
  138. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  139. </div>
  140. <div class="group-box-bottom">
  141. <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>
  142. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  143. <?php bp_group_member_count(); ?></div>
  144. </div>
  145. </div><!--group-box ends-->
  146. </li>
  147. <?php endwhile; ?>
  148. </ul>
  149.  
  150. <div class="clear"></div>
  151. <?php do_action( 'bp_after_groups_loop' ) ?>
  152.  
  153. <?php else: ?>
  154. <ul id="alphabetical" class="hidden-tab">
  155. <div id="message" class="info" style="width:50%">
  156. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  157. </div><br />
  158. </ul>
  159. <?php endif; ?>
  160. <!-- ALPHABETICAL GROUPS LOOP END -->
  161.  
  162.  
  163.  
  164.  
  165.  
  166. </div> <!-- List Wrap -->
  167. </div> <!-- tabs-container -->
  168.  
  169.  
  170. <?php do_action( 'bp_after_groups_loop' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement