/bp-themes/bp-default/activity/index.php

  1. <?php 
  2.  
  3. /** 
  4. * Template Name: BuddyPress - Activity Directory 
  5. * 
  6. * @package BuddyPress 
  7. * @subpackage Theme 
  8. */ 
  9.  
  10. get_header( 'buddypress' ); ?> 
  11.  
  12. <?php do_action( 'bp_before_directory_activity_page' ); ?> 
  13.  
  14. <div id="content"> 
  15. <div class="padder"> 
  16.  
  17. <?php do_action( 'bp_before_directory_activity' ); ?> 
  18.  
  19. <?php if ( !is_user_logged_in() ) : ?> 
  20.  
  21. <h3><?php _e( 'Site Activity', 'buddypress' ); ?></h3> 
  22.  
  23. <?php endif; ?> 
  24.  
  25. <?php do_action( 'bp_before_directory_activity_content' ); ?> 
  26.  
  27. <?php if ( is_user_logged_in() ) : ?> 
  28.  
  29. <?php locate_template( array( 'activity/post-form.php'), true ); ?> 
  30.  
  31. <?php endif; ?> 
  32.  
  33. <?php do_action( 'template_notices' ); ?> 
  34.  
  35. <div class="item-list-tabs activity-type-tabs" role="navigation"> 
  36. <ul> 
  37. <?php do_action( 'bp_before_activity_type_tab_all' ); ?> 
  38.  
  39. <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_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> 
  40.  
  41. <?php if ( is_user_logged_in() ) : ?> 
  42.  
  43. <?php do_action( 'bp_before_activity_type_tab_friends' ); ?> 
  44.  
  45. <?php if ( bp_is_active( 'friends' ) ) : ?> 
  46.  
  47. <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> 
  48.  
  49. <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php esc_attr_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> 
  50.  
  51. <?php endif; ?> 
  52.  
  53. <?php endif; ?> 
  54.  
  55. <?php do_action( 'bp_before_activity_type_tab_groups' ); ?> 
  56.  
  57. <?php if ( bp_is_active( 'groups' ) ) : ?> 
  58.  
  59. <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?> 
  60.  
  61. <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php esc_attr_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> 
  62.  
  63. <?php endif; ?> 
  64.  
  65. <?php endif; ?> 
  66.  
  67. <?php do_action( 'bp_before_activity_type_tab_favorites' ); ?> 
  68.  
  69. <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?> 
  70.  
  71. <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php esc_attr_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> 
  72.  
  73. <?php endif; ?> 
  74.  
  75. <?php if ( bp_activity_do_mentions() ) : ?> 
  76.  
  77. <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?> 
  78.  
  79. <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php esc_attr_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><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li> 
  80.  
  81. <?php endif; ?> 
  82.  
  83. <?php endif; ?> 
  84.  
  85. <?php do_action( 'bp_activity_type_tabs' ); ?> 
  86. </ul> 
  87. </div><!-- .item-list-tabs --> 
  88.  
  89. <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> 
  90. <ul> 
  91. <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li> 
  92.  
  93. <?php do_action( 'bp_activity_syndication_options' ); ?> 
  94.  
  95. <li id="activity-filter-select" class="last"> 
  96. <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label> 
  97. <select id="activity-filter-by"> 
  98. <option value="-1"><?php _e( '— Everything —', 'buddypress' ); ?></option> 
  99. <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option> 
  100.  
  101. <?php if ( bp_is_active( 'blogs' ) ) : ?> 
  102.  
  103. <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option> 
  104. <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option> 
  105.  
  106. <?php endif; ?> 
  107.  
  108. <?php if ( bp_is_active( 'forums' ) ) : ?> 
  109.  
  110. <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option> 
  111. <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option> 
  112.  
  113. <?php endif; ?> 
  114.  
  115. <?php if ( bp_is_active( 'groups' ) ) : ?> 
  116.  
  117. <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option> 
  118. <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option> 
  119.  
  120. <?php endif; ?> 
  121.  
  122. <?php if ( bp_is_active( 'friends' ) ) : ?> 
  123.  
  124. <option value="friendship_accepted, friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option> 
  125.  
  126. <?php endif; ?> 
  127.  
  128. <option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option> 
  129.  
  130. <?php do_action( 'bp_activity_filter_options' ); ?> 
  131.  
  132. </select> 
  133. </li> 
  134. </ul> 
  135. </div><!-- .item-list-tabs --> 
  136.  
  137. <?php do_action( 'bp_before_directory_activity_list' ); ?> 
  138.  
  139. <div class="activity" role="main"> 
  140.  
  141. <?php locate_template( array( 'activity/activity-loop.php' ), true ); ?> 
  142.  
  143. </div><!-- .activity --> 
  144.  
  145. <?php do_action( 'bp_after_directory_activity_list' ); ?> 
  146.  
  147. <?php do_action( 'bp_directory_activity_content' ); ?> 
  148.  
  149. <?php do_action( 'bp_after_directory_activity_content' ); ?> 
  150.  
  151. <?php do_action( 'bp_after_directory_activity' ); ?> 
  152.  
  153. </div><!-- .padder --> 
  154. </div><!-- #content --> 
  155.  
  156. <?php do_action( 'bp_after_directory_activity_page' ); ?> 
  157.  
  158. <?php get_sidebar( 'buddypress' ); ?> 
  159. <?php get_footer( 'buddypress' ); ?> 
.