Advertisement
Guest User

Untitled

a guest
Sep 24th, 2012
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.13 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Template Name: BuddyPress - Activity Directory
  5. *
  6. * @package BuddyPress
  7. * @subpackage Theme
  8. */
  9.  
  10. <?php get_template_part( 'header', 'page' ); // this makes $content_title available ?>
  11. <div id="content">
  12. <div id="content-inner"<?php if ( risen_sidebar_enabled( 'primary' ) ) : ?> class="has-sidebar"<?php endif; ?>>
  13. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  14. <div class="post-content">
  15.  
  16. <?php do_action( 'bp_before_directory_activity' ); ?>
  17.  
  18. <?php if ( !is_user_logged_in() ) : ?>
  19.  
  20. <h3><?php _e( 'Site Activity', 'buddypress' ); ?></h3>
  21.  
  22. <?php endif; ?>
  23.  
  24. <?php do_action( 'bp_before_directory_activity_content' ); ?>
  25.  
  26. <?php if ( is_user_logged_in() ) : ?>
  27.  
  28. <?php locate_template( array( 'activity/post-form.php'), true ); ?>
  29.  
  30. <?php endif; ?>
  31.  
  32. <?php do_action( 'template_notices' ); ?>
  33.  
  34. <div class="item-list-tabs activity-type-tabs" role="navigation">
  35. <ul>
  36. <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
  37.  
  38. <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
  39.  
  40. <?php if ( is_user_logged_in() ) : ?>
  41.  
  42. <?php do_action( 'bp_before_activity_type_tab_friends' ); ?>
  43.  
  44. <?php if ( bp_is_active( 'friends' ) ) : ?>
  45.  
  46. <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  47.  
  48. <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>
  49.  
  50. <?php endif; ?>
  51.  
  52. <?php endif; ?>
  53.  
  54. <?php do_action( 'bp_before_activity_type_tab_groups' ); ?>
  55.  
  56. <?php if ( bp_is_active( 'groups' ) ) : ?>
  57.  
  58. <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  59.  
  60. <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>
  61.  
  62. <?php endif; ?>
  63.  
  64. <?php endif; ?>
  65.  
  66. <?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
  67.  
  68. <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
  69.  
  70. <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>
  71.  
  72. <?php endif; ?>
  73.  
  74. <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
  75.  
  76. <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>
  77.  
  78. <?php endif; ?>
  79.  
  80. <?php do_action( 'bp_activity_type_tabs' ); ?>
  81. </ul>
  82. </div><!-- .item-list-tabs -->
  83.  
  84. <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
  85. <ul>
  86. <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
  87.  
  88. <?php do_action( 'bp_activity_syndication_options' ); ?>
  89.  
  90. <li id="activity-filter-select" class="last">
  91. <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
  92. <select id="activity-filter-by">
  93. <option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
  94. <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
  95.  
  96. <?php if ( bp_is_active( 'blogs' ) ) : ?>
  97.  
  98. <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
  99. <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
  100.  
  101. <?php endif; ?>
  102.  
  103. <?php if ( bp_is_active( 'forums' ) ) : ?>
  104.  
  105. <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
  106. <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
  107.  
  108. <?php endif; ?>
  109.  
  110. <?php if ( bp_is_active( 'groups' ) ) : ?>
  111.  
  112. <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
  113. <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
  114.  
  115. <?php endif; ?>
  116.  
  117. <?php if ( bp_is_active( 'friends' ) ) : ?>
  118.  
  119. <option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
  120.  
  121. <?php endif; ?>
  122.  
  123. <option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
  124.  
  125. <?php do_action( 'bp_activity_filter_options' ); ?>
  126.  
  127. </select>
  128. </li>
  129. </ul>
  130. </div><!-- .item-list-tabs -->
  131.  
  132. <?php do_action( 'bp_before_directory_activity_list' ); ?>
  133.  
  134. <div class="activity" role="main">
  135.  
  136. <?php locate_template( array( 'activity/activity-loop.php' ), true ); ?>
  137.  
  138. </div><!-- .activity -->
  139.  
  140. <?php do_action( 'bp_after_directory_activity_list' ); ?>
  141.  
  142. <?php do_action( 'bp_directory_activity_content' ); ?>
  143.  
  144. <?php do_action( 'bp_after_directory_activity_content' ); ?>
  145.  
  146. <?php do_action( 'bp_after_directory_activity' ); ?>
  147.  
  148. </div></article>
  149. </div></div>
  150. <?php risen_show_sidebar( 'primary' ); ?>
  151. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement