Advertisement
Guest User

Indy Owls new page

a guest
Mar 15th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.83 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Template Name: BuddyPress - Activity Directory
  5. *
  6. * @package BuddyPress
  7. * @subpackage Theme
  8. */
  9.  
  10. ?>
  11.  
  12. <?php
  13. /* Header call. */
  14. get_header();
  15. /* Define global variables. */
  16. global $options, $post, $themeslug;
  17. $size = get_post_meta($post->ID, 'page_slider_size' , true);
  18. $nivosize = get_post_meta($post->ID, 'page_nivoslider_size' , true);
  19. $page_section_order = get_post_meta($post->ID, 'page_section_order' , true);
  20. if(!$page_section_order) {
  21. $page_section_order = 'breadcrumbs,page_section';
  22. }
  23. /* Set slider hook based on page option */
  24. if (preg_match("/page_slider/", $page_section_order ) && $size == "1" ) {
  25. remove_action ('synapse_page_slider', 'synapse_slider_content' );
  26. add_action ('synapse_page_content_slider', 'synapse_slider_content' );
  27. }
  28. if (preg_match("/page_nivoslider/", $page_section_order ) && $nivosize == "1" ) {
  29. remove_action ('synapse_page_nivoslider', 'synapse_nivoslider_content' );
  30. add_action ('synapse_page_content_slider', 'synapse_nivoslider_content' );
  31. }
  32. ?>
  33.  
  34. <div class="container">
  35. <div class="row">
  36.  
  37. <?php
  38. add_action('synapse_page_section', 'synapse_page_section_content' );
  39. function synapse_page_section_content() {
  40. global $options, $themeslug, $post, $sidebar, $content_grid;
  41. synapse_sidebar_init();
  42. $hidetitle = get_post_meta($post->ID, 'hide_page_title' , true);
  43. ?>
  44. <div class="row">
  45. <?php synapse_before_content_sidebar(); ?>
  46. <div id="content" class="<?php echo $content_grid; ?>">
  47. <?php synapse_page_content_slider(); ?>
  48. <div class="post_container">
  49. <div class="post" id="post-<?php the_ID(); ?>">
  50. <div class="entry">
  51. <?php do_action( 'bp_before_directory_activity' ); ?>
  52.  
  53. <?php if ( !is_user_logged_in() ) : ?>
  54.  
  55. <h3><?php _e( 'Site Activity', 'buddypress' ); ?></h3>
  56.  
  57. <?php endif; ?>
  58.  
  59. <?php do_action( 'bp_before_directory_activity_content' ); ?>
  60.  
  61. <?php if ( is_user_logged_in() ) : ?>
  62.  
  63. <?php locate_template( array( 'activity/post-form.php'), true ); ?>
  64.  
  65. <?php endif; ?>
  66.  
  67. <?php do_action( 'template_notices' ); ?>
  68.  
  69. <div class="item-list-tabs activity-type-tabs" role="navigation">
  70. <ul>
  71. <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
  72.  
  73. <li class="selected" id="activity-all"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/'; ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_site_member_count() ); ?></a></li>
  74.  
  75. <?php if ( is_user_logged_in() ) : ?>
  76.  
  77. <?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
  78.  
  79. <?php if ( bp_is_active( 'friends' ) ) : ?>
  80.  
  81. <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  82.  
  83. <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
  84.  
  85. <?php endif; ?>
  86.  
  87. <?php endif; ?>
  88.  
  89. <?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
  90.  
  91. <?php if ( bp_is_active( 'groups' ) ) : ?>
  92.  
  93. <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  94.  
  95. <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
  96.  
  97. <?php endif; ?>
  98.  
  99. <?php endif; ?>
  100.  
  101. <?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
  102.  
  103. <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
  104.  
  105. <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
  106.  
  107. <?php endif; ?>
  108.  
  109. <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
  110.  
  111. <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '<span>%s new</span>', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></strong><?php endif; ?></a></li>
  112.  
  113. <?php endif; ?>
  114.  
  115. <?php do_action( 'bp_activity_type_tabs' ); ?>
  116. </ul>
  117. </div><!-- .item-list-tabs -->
  118.  
  119. <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
  120. <ul>
  121. <li class="feed"><a href="<?php bp_sitewide_activity_feed_link() ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
  122.  
  123. <?php do_action( 'bp_activity_syndication_options' ); ?>
  124.  
  125. <li id="activity-filter-select" class="last">
  126. <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
  127. <select id="activity-filter-by">
  128. <option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
  129. <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
  130.  
  131. <?php if ( bp_is_active( 'blogs' ) ) : ?>
  132.  
  133. <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
  134. <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
  135.  
  136. <?php endif; ?>
  137.  
  138. <?php if ( bp_is_active( 'forums' ) ) : ?>
  139.  
  140. <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
  141. <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
  142.  
  143. <?php endif; ?>
  144.  
  145. <?php if ( bp_is_active( 'groups' ) ) : ?>
  146.  
  147. <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
  148. <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
  149.  
  150. <?php endif; ?>
  151.  
  152. <?php if ( bp_is_active( 'friends' ) ) : ?>
  153.  
  154. <option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
  155.  
  156. <?php endif; ?>
  157.  
  158. <option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
  159.  
  160. <?php do_action( 'bp_activity_filter_options' ); ?>
  161.  
  162. </select>
  163. </li>
  164. </ul>
  165. </div><!-- .item-list-tabs -->
  166.  
  167. <?php do_action( 'bp_before_directory_activity_list' ); ?>
  168.  
  169. <div class="activity" role="main">
  170.  
  171. <?php locate_template( array( 'activity/activity-loop.php' ), true ); ?>
  172.  
  173. </div><!-- .activity -->
  174.  
  175. <?php do_action( 'bp_after_directory_activity_list' ); ?>
  176.  
  177. <?php do_action( 'bp_directory_activity_content' ); ?>
  178.  
  179. <?php do_action( 'bp_after_directory_activity_content' ); ?>
  180.  
  181. <?php do_action( 'bp_after_directory_activity' ); ?>
  182.  
  183. </div><!--end entry-->
  184. <div style=clear:both;></div>
  185. </div><!--end post-->
  186. </div><!--end post_container-->
  187. </div><!--end content_left-->
  188. <?php synapse_after_content_sidebar(); ?>
  189. </div>
  190. <?php } ?>
  191. .</div><!--end row-->
  192. </div><!--end container-->
  193. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement