Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.37 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Frontpage 1
  4. */
  5. ?>
  6.  
  7. <?php get_header() ?>
  8.  
  9. <div id="content">
  10.  
  11. <div id="frontpage-info">
  12. <div id="frontpage-info-big"><?php echo get_theme_mod( 'DD_frontpage1_hello', 'Hello!' ); ?></div>
  13. <div id="frontpage-info-desc"><?php echo get_theme_mod( 'DD_frontpage1_desc', 'BuddyPress lets users register on your site and start creating profiles, posting messages, making connections, creating and interacting in groups and much more.' ); ?></div>
  14.  
  15. </div><!-- #frontpage-info -->
  16.  
  17. <?php do_action( 'bp_after_header' ) ?>
  18.  
  19. <?php do_action( 'bp_before_container' ) ?>
  20. <div class="clear"> </div>
  21.  
  22. <div class="frontpage">
  23.  
  24. <?php if ( function_exists( 'bp_is_active' ) ) { ?>
  25.  
  26. <div id="tabs-container">
  27. <div id="object-nav">
  28. <ul class="tabs-nav">
  29. <li class="nav-one"><a href="#popular" class="current"><?php _e('Popular', 'OneCommunity'); ?></a></li>
  30. <li class="nav-two"><a href="#active"><?php _e('Active', 'OneCommunity'); ?></a></li>
  31. <li class="nav-three"><a href="#alphabetical"><?php _e('Alphabetical', 'OneCommunity'); ?></a></li>
  32. <li class="nav-four"><a href="#newest"><?php _e('Newest', 'OneCommunity'); ?></a></li>
  33. </ul>
  34. </div>
  35.  
  36. <div class="list-wrap">
  37.  
  38. <!-- NEWEST GROUPS LOOP POPULAR -->
  39. <?php if ( bp_has_groups( 'type=popular&max=8' ) ) : ?>
  40.  
  41. <ul id="popular">
  42. <?php while ( bp_groups() ) : bp_the_group(); ?>
  43. <li>
  44. <div class="group-box">
  45. <div class="group-box-image-container">
  46. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  47. </div>
  48. <div class="group-box-bottom">
  49. <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>
  50. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  51. <?php bp_group_member_count(); ?></div>
  52. </div>
  53. </div><!--group-box ends-->
  54. </li>
  55. <?php endwhile; ?>
  56. </ul>
  57.  
  58. <div class="clear"></div>
  59. <?php do_action( 'bp_after_groups_loop' ) ?>
  60.  
  61. <?php else: ?>
  62.  
  63. <ul id="popular">
  64. <div id="message" class="info">
  65. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  66. </div>
  67. <br />
  68. </ul>
  69.  
  70. <?php endif; ?>
  71. <!-- POPULAR GROUPS LOOP END -->
  72.  
  73. <!-- NEWEST GROUPS LOOP START -->
  74. <?php if ( bp_has_groups( 'type=newest&max=8' ) ) : ?>
  75.  
  76. <ul id="newest" class="hidden-tab">
  77. <?php while ( bp_groups() ) : bp_the_group(); ?>
  78. <li>
  79. <div class="group-box">
  80. <div class="group-box-image-container">
  81. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  82. </div>
  83. <div class="group-box-bottom">
  84. <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>
  85. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  86. <?php bp_group_member_count(); ?></div>
  87. </div>
  88. </div><!--group-box ends-->
  89. </li>
  90. <?php endwhile; ?>
  91. </ul>
  92.  
  93. <div class="clear"></div>
  94. <?php do_action( 'bp_after_groups_loop' ) ?>
  95.  
  96. <?php else: ?>
  97.  
  98. <ul id="newest" class="hidden-tab">
  99. <div id="message" class="info">
  100. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  101. </div><br />
  102. </ul>
  103. <?php endif; ?>
  104.  
  105. <!-- NEWEST GROUPS LOOP END -->
  106.  
  107.  
  108. <!-- LAST ACTIVE GROUPS LOOP START -->
  109.  
  110. <?php if ( bp_has_groups( 'type=active&max=8' ) ) : ?>
  111.  
  112. <ul id="active" class="hidden-tab">
  113. <?php while ( bp_groups() ) : bp_the_group(); ?>
  114. <li>
  115. <div class="group-box">
  116. <div class="group-box-image-container">
  117. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  118. </div>
  119. <div class="group-box-bottom">
  120. <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>
  121. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  122. <?php bp_group_member_count(); ?></div>
  123. </div>
  124. </div><!--group-box ends-->
  125. </li>
  126. <?php endwhile; ?>
  127. </ul>
  128.  
  129. <div class="clear"></div>
  130. <?php do_action( 'bp_after_groups_loop' ) ?>
  131.  
  132. <?php else: ?>
  133.  
  134. <ul id="active" class="hidden-tab">
  135. <div id="message" class="info">
  136. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  137. </div><br />
  138. </ul>
  139. <?php endif; ?>
  140. <!-- LAST ACTIVE GROUPS LOOP END -->
  141.  
  142.  
  143.  
  144. <!-- ALPHABETICAL GROUPS LOOP -->
  145. <?php if ( bp_has_groups( 'type=alphabetical&max=8' ) ) : ?>
  146.  
  147. <ul id="alphabetical" class="hidden-tab">
  148. <?php while ( bp_groups() ) : bp_the_group(); ?>
  149. <li>
  150. <div class="group-box">
  151. <div class="group-box-image-container">
  152. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
  153. </div>
  154. <div class="group-box-bottom">
  155. <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>
  156. <div class="group-box-details"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?><br />
  157. <?php bp_group_member_count(); ?></div>
  158. </div>
  159. </div><!--group-box ends-->
  160. </li>
  161. <?php endwhile; ?>
  162. </ul>
  163.  
  164. <div class="clear"></div>
  165. <?php do_action( 'bp_after_groups_loop' ) ?>
  166.  
  167. <?php else: ?>
  168.  
  169. <ul id="alphabetical" class="hidden-tab">
  170. <div id="message" class="info">
  171. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  172. </div><br />
  173. </ul>
  174. <?php endif; ?>
  175. <!-- ALPHABETICAL GROUPS LOOP END -->
  176.  
  177.  
  178. </div> <!-- List Wrap -->
  179. </div> <!-- tabs-container -->
  180.  
  181. <div class="clear"> </div>
  182.  
  183.  
  184. <div class="frontpage-bottom-left">
  185.  
  186. <div class="front-box widget">
  187. <div class="front-box-title"><?php _e('Active Members', 'OneCommunity'); ?></div>
  188. <div class="front-box-child">
  189.  
  190. <?php if ( bp_has_members( 'type=active&max=8' ) ) : ?>
  191. <?php while ( bp_members() ) : bp_the_member(); ?>
  192. <a href="<?php bp_member_permalink() ?>" class="front-member-item" title="<?php bp_member_name(); ?>"><?php bp_member_avatar('type=full&width=60&height=60') ?></a>
  193. <?php endwhile; ?>
  194. <?php endif; ?>
  195.  
  196. </div><!--front-box-child ends-->
  197. </div><!--front-box ends-->
  198.  
  199. <div class="clear"></div>
  200.  
  201. <div class="front-box widget">
  202. <div class="front-box-title"><?php _e('Popular Members', 'OneCommunity'); ?></div>
  203. <div class="front-box-child">
  204.  
  205. <?php if ( bp_has_members( 'type=popular&max=8' ) ) : ?>
  206. <?php while ( bp_members() ) : bp_the_member(); ?>
  207. <a href="<?php bp_member_permalink() ?>" class="front-member-item" title="<?php bp_member_name(); ?>"><?php bp_member_avatar('type=full&width=60&height=60') ?></a>
  208. <?php endwhile; ?>
  209. <?php endif; ?>
  210.  
  211. </div><!--front-box-child ends-->
  212. </div><!--front-box ends-->
  213.  
  214. </div> <!-- frontpage-bottom-left -->
  215.  
  216. <?php if ( function_exists( 'bbp_has_topics' ) ) { ?>
  217. <div class="frontpage-bottom-right">
  218.  
  219. <div class="front-box">
  220. <div class="front-box-title"><?php _e('On the Forums', 'OneCommunity'); ?></div>
  221.  
  222. <div class="front-box-child">
  223.  
  224. <?php if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 5 ) ) ) : ?>
  225. <?php bbp_get_template_part( 'loop', 'mytopics' ); ?>
  226. <?php else : ?>
  227. <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
  228. <?php endif; ?>
  229.  
  230. </div>
  231. <div class="clear"></div>
  232. </div>
  233.  
  234. </div> <!-- frontpage-bottom-right -->
  235. <?php } ?>
  236.  
  237. <?php } ?>
  238.  
  239. </div><!-- .frontpage -->
  240. <div class="clear"> </div>
  241. </div><!-- #content -->
  242.  
  243.  
  244. <div id="sidebar">
  245. <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar-frontpage')) : ?><?php endif; ?>
  246. </div><!-- #sidebar -->
  247.  
  248. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement