1. <?php //get theme options
  2. global $con_front, $con_layout, $con_feed, $con_reviews, $con_ads, $con_misc;
  3. $con_front = get_option( 'con_front', $con_front );
  4. $con_layout = get_option( 'con_layout', $con_layout );
  5. $con_feed = get_option( 'con_feed', $con_feed );
  6. $con_reviews = get_option( 'con_reviews', $con_reviews );
  7. $con_ads = get_option( 'con_ads', $con_ads );
  8. $con_misc = get_option( 'con_misc', $con_misc ); ?>
  9.  
  10. <?php //set theme options
  11. $con_page_latest_show = $con_layout['page_latest_show'];
  12. $con_page_feed_show = $con_layout['page_feed_show'];
  13. $con_page_unique_sidebar = $con_layout['page_unique_sidebar'];
  14. $con_breadcrumb_show = $con_layout['page_breadcrumb_show'];
  15. $con_featuredimage_size = $con_layout['featuredimage_size'];
  16. $con_page_ad_post_show = $con_ads['page_ad_post_show'];
  17. $con_page_ad_feed_show = $con_ads['page_ad_feed_show'];
  18. $con_page_ad_post = $con_ads['page_ad_post'];
  19. $con_page_ad_feed = $con_ads['page_ad_feed'];
  20. ?>
  21. <?php // use variables from page custom fields instead of continuum options page (if they exist)
  22. $override = get_post_meta($post->ID, "Show Latest Panel", $single = true);
  23. if($override!="") {
  24. $con_page_latest_show=$override;
  25. if($con_page_latest_show=="false") {
  26. $con_page_latest_show=false;
  27. } else {
  28. $con_page_latest_show=true;
  29. }
  30. }
  31. $override = get_post_meta($post->ID, "Show Feed", $single = true);
  32. if($override!="") {
  33. $con_page_feed_show=$override;
  34. if($con_page_feed_show=="false") {
  35. $con_page_feed_show=false;
  36. } else {
  37. $con_page_feed_show=true;
  38. }
  39. }
  40. $override = get_post_meta($post->ID, "Featured Image Size", $single = true);
  41. if($override!="") $con_featuredimage_size=$override;
  42. $override = get_post_meta($post->ID, "Show Ad Below Post", $single = true);
  43. if($override!="") {
  44. $con_page_ad_post_show=$override;
  45. if($con_page_ad_post_show=="false") {
  46. $con_page_ad_post_show=false;
  47. } else {
  48. $con_page_ad_post_show=true;
  49. }
  50. }
  51. $override = get_post_meta($post->ID, "Show Ad Below Feed", $single = true);
  52. if($override!="") {
  53. $con_page_ad_feed_show=$override;
  54. if($con_page_ad_feed_show=="false") {
  55. $con_page_ad_feed_show=false;
  56. } else {
  57. $con_page_ad_feed_show=true;
  58. }
  59. }
  60. ?>
  61. <?php
  62. $sidebar="Sidebar Default";
  63. if($con_page_unique_sidebar) $sidebar="Sidebar Page"; ?>
  64. <?php get_header(); // show header ?>
  65. <div id="page-content">
  66. <div class="left-panel">
  67. <div class="content">
  68. <h2 class="title adelle"><?php _e( 'Groups Directory', 'buddypress' ); ?></h2>
  69. <div class="post-content">
  70.  
  71. <?php do_action( 'bp_before_directory_groups' ); ?>
  72.  
  73. <form action="" method="post" id="groups-directory-form" class="dir-form">
  74.  
  75. <h3><?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?> &nbsp;<a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create' ); ?>"><?php _e( 'Create a Group', 'buddypress' ); ?></a><?php endif; ?></h3>
  76.  
  77. <?php do_action( 'bp_before_directory_groups_content' ); ?>
  78.  
  79. <div id="group-dir-search" class="dir-search" role="search">
  80.  
  81. <?php bp_directory_groups_search_form(); ?>
  82.  
  83. </div><!-- #group-dir-search -->
  84.  
  85. <?php do_action( 'template_notices' ); ?>
  86.  
  87. <div class="item-list-tabs" role="navigation">
  88. <ul>
  89. <li class="selected" id="groups-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ); ?>"><?php printf( __( 'All Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count() ); ?></a></li>
  90.  
  91. <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  92.  
  93. <li id="groups-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
  94.  
  95. <?php endif; ?>
  96.  
  97. <?php do_action( 'bp_groups_directory_group_filter' ); ?>
  98.  
  99. </ul>
  100. </div><!-- .item-list-tabs -->
  101.  
  102. <div class="item-list-tabs" id="subnav" role="navigation">
  103. <ul>
  104.  
  105. <?php do_action( 'bp_groups_directory_group_types' ); ?>
  106.  
  107. <li id="groups-order-select" class="last filter">
  108.  
  109. <label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
  110. <select id="groups-order-by">
  111. <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
  112. <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
  113. <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
  114. <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
  115.  
  116. <?php do_action( 'bp_groups_directory_order_options' ); ?>
  117.  
  118. </select>
  119. </li>
  120. </ul>
  121. </div>
  122.  
  123. <div id="groups-dir-list" class="groups dir-list">
  124.  
  125. <?php locate_template( array( 'groups/groups-loop.php' ), true ); ?>
  126.  
  127. </div><!-- #groups-dir-list -->
  128.  
  129. <?php do_action( 'bp_directory_groups_content' ); ?>
  130.  
  131. <?php wp_nonce_field( 'directory_groups', '_wpnonce-groups-filter' ); ?>
  132.  
  133. <?php do_action( 'bp_after_directory_groups_content' ); ?>
  134.  
  135. </form><!-- #groups-directory-form -->
  136.  
  137. <?php do_action( 'bp_after_directory_groups' ); ?>
  138.  
  139. </div>
  140. <br class="clearer" />
  141. </div>
  142. </div>
  143. <div class="right-panel sidebar">
  144. <div class="inner">
  145. <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar($sidebar) ) : else : ?>
  146. <div id="tabbed-posts">
  147. <ul class="tabnav">
  148. <li><a href="#tabs-popular">Popular</a></li>
  149. <li><a href="#tabs-recent">Recent</a></li>
  150. <li><a href="#tabs-comments">Comments</a></li>
  151. <li><a href="#tabs-tags">Tags</a></li>
  152. </ul>
  153. <div class="tabdiv-wrapper">
  154. <div id="tabs-popular" class="tabdiv">
  155. <ul>
  156. <?php // create popular query
  157. $postcount=0;
  158. $args='order=DESC&orderby=comment_count&posts_per_page=10';
  159. $pop_loop = new WP_Query($args);
  160. if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
  161. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  162. <?php endwhile;
  163. endif; ?>
  164. <li class="last gentesque tooltip" title="View all articles sorted by comment count"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('comment_count') ?>">More</a></li>
  165. </ul>
  166. </div>
  167. <div id="tabs-recent" class="tabdiv">
  168. <ul>
  169. <?php // create recent query
  170. $postcount=0;
  171. $args='order=DESC&orderby=date&posts_per_page=10';
  172. $pop_loop = new WP_Query($args);
  173. if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
  174. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  175. <?php endwhile;
  176. endif; ?>
  177. <li class="last gentesque tooltip" title="View all articles sorted by date"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('date') ?>">More</a></li>
  178. </ul>
  179. </div>
  180. <div id="tabs-comments" class="tabdiv">
  181. <ul>
  182. <?php //get recent comments
  183. $args = array(
  184. 'status' => 'approve',
  185. 'number' => 10
  186. );
  187. $comments = get_comments($args);
  188. foreach($comments as $comment) :
  189. $commentcontent = strip_tags($comment->comment_content);
  190. if (strlen($commentcontent)>110) {
  191. $commentcontent = substr($commentcontent, 0, 107) . "...";
  192. }
  193. $commentauthor = $comment->comment_author;
  194. if (strlen($commentauthor)>50) {
  195. $commentauthor = substr($commentauthor, 0, 47) . "...";
  196. }
  197. $commentid = $comment->comment_ID;
  198. $commenturl = get_comment_link($commentid); ?>
  199. <li><a href="<?php echo $commenturl; ?>">"<?php echo $commentcontent; ?>"<span> -&nbsp;<?php echo $commentauthor; ?></span></a></li>
  200. <?php endforeach; ?>
  201. </ul>
  202. </div>
  203. <div id="tabs-tags" class="tabdiv">
  204. <?php wp_tag_cloud('smallest=8&largest=22&number=20&orderby=name'); ?>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="widget">
  209. <div class="header-left">&nbsp;</div>
  210. <div class="header-middle">
  211. <h2 class="gentesque"><?php _e(' About Continuum ', 'continuum' ); ?></h2>
  212. </div>
  213. <div class="header-right">&nbsp;</div>
  214. <br class="clearer" />
  215. <div class="content-wrapper">
  216. <div class="content">
  217. <p>
  218. <?php _e( "This is a custom sidebar. Continuum gives you lots of custom sidebar possibilities. You can use the Continuum Theme Options page to specify which pages have a unique sidebar. Or, you can use the same sidebar for all of your pages using the Sidebar Default widget panel. If you do specify that you want a unique sidebar for an area of your site, such as the Search page, you can use the corresponding built-in Sidebar Search widget panel.", 'continuum' ); ?>
  219. </p>
  220. <p>
  221. <?php _e( "In fact, Continuum comes standard with 19 unique sidebars. Wow, we're starting to sound like a car commercial, so we'll add that you don't have to use all of them if you don't want. Continuum harnesses the power of absolute customization while at the same time having a quality of meekness: you can forget about all the settings and get yourself up and running in no time flat.", 'continuum' ); ?>
  222. </p>
  223. </div>
  224. </div>
  225. </div>
  226. <?php endif; ?>
  227. </div>
  228. </div>
  229. <br class="clearer" />
  230. </div>
  231. <?php if($con_page_ad_post_show) { ?>
  232. <div class="full-width-ad">
  233. <?php echo $con_page_ad_post; // ad ?>
  234. </div>
  235. <?php } ?>
  236. <?php if($con_page_feed_show) { // show Feed ?>
  237. <?php con_get_feed(); ?>
  238. <?php } ?>
  239. <?php if($con_page_ad_feed_show) { ?>
  240. <div class="full-width-ad">
  241. <?php echo $con_page_ad_feed; // ad ?>
  242. </div>
  243. <?php } ?>
  244. <?php if($con_page_latest_show) { // show The Latest panel ?>
  245. <?php con_get_latest(); ?>
  246. <?php } ?>
  247. <?php get_footer(); // show footer ?>