Guest User

Untitled

a guest
Aug 26th, 2014
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Frontpage 1
  4. */
  5. ?>
  6.  
  7. <?php get_header() ?>
  8.  
  9. <div class="welcome-message">
  10. <div class="welcome-message-map">
  11. <div class="welcome-text">
  12. <img src="<?php echo of_get_option('welcome-text_path', 'http://www.demo2.diaboliquedesign.com/1/welcome-text.png' ); ?>" alt="A Social Network" />
  13. </div>
  14. </div>
  15. </div>
  16.  
  17. <div class="frontpage-info">
  18. <div class="wrapper">
  19. <div class="frontpage-info-left">
  20. <?php _e('BuddyPress lets users sign-up and start creating profiles, posting messages, making connections, creating groups, and much more. <span class="colored">A social network in a box</span>, BuddyPress lets you easily build a community for your company, school, sports team, or other niche community.', 'CommunityJunction'); ?>
  21. </div><!-- frontpage-info-left -->
  22.  
  23. <?php if ( function_exists( 'bp_is_active' ) ) { ?>
  24.  
  25. <div class="front-circle"></div>
  26. <?php if ( !is_user_logged_in() ) { ?>
  27. <a href="<?php echo home_url(); ?>/register" class="join-button"></a>
  28. <?php } else { ?>
  29. <a href="<?php echo bp_loggedin_user_domain(); ?>" class="my-account-button"></a>
  30. <?php } ?>
  31.  
  32. <?php } ?>
  33.  
  34. </div><!-- wrapper -->
  35. </div>
  36.  
  37. <div class="front-spacer-1"></div>
  38.  
  39.  
  40. <div class="clear"> </div>
  41.  
  42.  
  43. <div class="wrapper front-block-1">
  44.  
  45. <?php if ( function_exists( 'bp_is_active' ) ) { ?>
  46.  
  47. <div id="front-groups">
  48. <div class="front-groups-title">
  49. <?php _e('Popular Groups', 'CommunityJunction'); ?>
  50. <a class="small-button browse-all" href="<?php echo home_url(); ?>/groups"><?php _e('Browse All', 'CommunityJunction'); ?></a>
  51. </div>
  52.  
  53. <div class="list-wrap">
  54.  
  55. <!-- NEWEST GROUPS LOOP POPULAR -->
  56. <?php if ( bp_has_groups( 'type=popular&max=20' ) ) : ?>
  57.  
  58. <ul id="popular">
  59. <?php while ( bp_groups() ) : bp_the_group(); ?>
  60. <li <?php bp_group_class(); ?>>
  61. <div class="group-box">
  62. <div class="group-box-image-container">
  63. <a class="group-box-image" href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=thumb&width=100&height=100' ) ?></a>
  64. </div>
  65. <div class="group-box-bottom">
  66. <div class="group-box-title"><a href="<?php bp_group_permalink() ?>"><?php $grouptitle = bp_get_group_name(); $getlength = strlen($grouptitle); $thelength = 12; echo mb_substr($grouptitle, 0, $thelength, 'UTF-8'); if ($getlength > $thelength) echo "..."; ?></a></div>
  67. <div class="group-box-details">
  68. <div class="group-box-details-1"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></div>
  69. <div class="group-box-details-2"><?php bp_group_member_count(); ?></div>
  70. </div>
  71. </div>
  72. </div><!--group-box ends-->
  73. </li>
  74. <?php endwhile; ?>
  75. </ul>
  76.  
  77. <div class="clear"></div>
  78. <?php do_action( 'bp_after_groups_loop' ) ?>
  79.  
  80. <?php else: ?>
  81.  
  82. <ul id="popular">
  83. <div id="message" class="info">
  84. <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
  85. </div>
  86. <br />
  87. </ul>
  88.  
  89. <?php endif; ?>
  90. <!-- POPULAR GROUPS LOOP END -->
  91.  
  92.  
  93.  
  94. </div> <!-- List Wrap -->
  95. </div> <!-- front-groups -->
  96.  
  97.  
  98.  
  99. <?php if ( function_exists( 'bbp_has_topics' ) ) { ?>
  100. <div class="front-posts">
  101.  
  102. <div class="front-box">
  103. <div class="front-box-title">
  104. <?php _e('On the Forums', 'CommunityJunction'); ?>
  105. <a class="small-button browse-all" href="<?php echo home_url(); ?>/forums"><?php _e('All Forums', 'CommunityJunction'); ?></a>
  106. </div>
  107.  
  108. <div class="front-box-child">
  109.  
  110. <?php if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 4 ) ) ) : ?>
  111. <?php bbp_get_template_part( 'loop', 'mytopics' ); ?>
  112. <?php else : ?>
  113. <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
  114. <?php endif; ?>
  115.  
  116. </div>
  117. <div class="clear"></div>
  118. </div>
  119.  
  120. </div> <!-- front-posts -->
  121. <?php } ?>
  122.  
  123. <?php } ?>
  124.  
  125. </div><!-- .wrapper -->
  126. <div class="clear"></div>
  127.  
  128. <?php if ( function_exists( 'bp_is_active' ) ) { ?>
  129. <div class="front-h-spacer"></div>
  130.  
  131. <div class="frontpage-members">
  132. <div class="wrapper">
  133. <div class="clear"></div>
  134. <div class="frontpage-members-title"><?php echo of_get_option('mn', '36.000' ); ?> <?php _e('members and counting ...', 'CommunityJunction'); ?></div>
  135.  
  136. <div class="frontpage-members-loop">
  137. <?php if ( bp_has_members( 'type=active&max=36&per_page=36' ) ) : ?>
  138. <?php while ( bp_members() ) : bp_the_member(); ?>
  139. <a href="<?php bp_member_permalink() ?>" class="bwWrapper" title="<?php bp_member_name(); ?> (<?php bp_member_last_active(); ?>)">
  140. <?php bp_member_avatar('type=full&width=100&height=100') ?>
  141. <span class="member-popup">
  142. <span class="member-popup-name"><?php bp_member_name(); ?></span> (<?php bp_member_last_active(); ?>)<br />
  143. <b>Age:</b> <?php echo bp_member_profile_data( 'field=Age' ); ?><br />
  144. <b>Height:</b> <?php echo bp_member_profile_data( 'field=Height' ); ?><br />
  145. <b>Sign of the zodiac:</b> <?php echo bp_member_profile_data( 'field=Sign of the zodiac' ); ?><br />
  146. <b>Hobby:</b> <?php echo bp_member_profile_data( 'field=Hobby' ); ?><br />
  147. <b>Marital Status:</b> <?php echo bp_member_profile_data( 'field=Marital Status' ); ?><br />
  148. <b>Hair Colour:</b> <?php echo bp_member_profile_data( 'field=Hair Colour' ); ?><br />
  149. <span class="member-popup-motto"><b>Motto:</b> <i>"<?php echo bp_member_profile_data( 'field=Motto' ); ?>"</i></span>
  150. </span>
  151. </a>
  152. <?php endwhile; ?>
  153. <?php endif; ?>
  154. </div>
  155.  
  156. </div>
  157. </div>
  158. <?php } ?>
  159. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment