Advertisement
Guest User

Activity/index.php

a guest
Aug 7th, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 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 get_header( 'buddypress' ) ?>
  13.  
  14. <div id="content">
  15. <div class="padder">
  16.  
  17. <?php if ( !is_user_logged_in() ) : ?>
  18.  
  19. <h3><?php _e( 'Site Activity', 'buddypress' ) ?></h3>
  20.  
  21. <?php endif; ?>
  22.  
  23. <?php do_action( 'bp_before_directory_activity_content' ) ?>
  24.  
  25. <?php if ( is_user_logged_in() ) : ?>
  26.  
  27. <?php locate_template( array( 'activity/post-form.php'), true ) ?>
  28.  
  29. <?php endif; ?>
  30.  
  31. <?php do_action( 'template_notices' ) ?>
  32.  
  33. <div class="item-list-tabs activity-type-tabs" role="navigation">
  34. <ul>
  35. <?php do_action( 'bp_before_activity_type_tab_all' ) ?>
  36.  
  37. <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>
  38.  
  39. <?php if ( is_user_logged_in() ) : ?>
  40.  
  41. <?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
  42.  
  43. <?php if ( bp_is_active( 'friends' ) ) : ?>
  44.  
  45. <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  46.  
  47. <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>
  48.  
  49. <?php endif; ?>
  50.  
  51. <?php endif; ?>
  52.  
  53. <?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
  54.  
  55. <?php if ( bp_is_active( 'groups' ) ) : ?>
  56.  
  57. <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  58.  
  59. <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>
  60.  
  61. <?php endif; ?>
  62.  
  63. <?php endif; ?>
  64.  
  65. <?php do_action( 'bp_before_activity_type_tab_favorites' ) ?>
  66.  
  67. <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
  68.  
  69. <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>
  70.  
  71. <?php endif; ?>
  72.  
  73. <?php do_action( 'bp_before_activity_type_tab_mentions' ) ?>
  74.  
  75. <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( 'Public 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>
  76.  
  77. <?php endif; ?>
  78.  
  79. <?php do_action( 'bp_activity_type_tabs' ) ?>
  80. </ul>
  81. </div><!-- .item-list-tabs -->
  82.  
  83. <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
  84. <ul>
  85. <li class="feed"><a href="<?php bp_sitewide_activity_feed_link() ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ) ?></a></li>
  86.  
  87. <?php do_action( 'bp_activity_syndication_options' ) ?>
  88.  
  89. <li id="activity-filter-select" class="last">
  90. <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
  91. <select id="activity-filter-by">
  92. <option value="-1"><?php _e( 'Everything', 'buddypress' ) ?></option>
  93. <option value="activity_update"><?php _e( 'Updates', 'buddypress' ) ?></option>
  94.  
  95. <?php if ( bp_is_active( 'blogs' ) ) : ?>
  96.  
  97. <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ) ?></option>
  98. <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ) ?></option>
  99.  
  100. <?php endif; ?>
  101.  
  102. <?php if ( bp_is_active( 'forums' ) ) : ?>
  103.  
  104. <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
  105. <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
  106.  
  107. <?php endif; ?>
  108.  
  109. <?php if ( bp_is_active( 'groups' ) ) : ?>
  110.  
  111. <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
  112. <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
  113.  
  114. <?php endif; ?>
  115.  
  116. <?php if ( bp_is_active( 'friends' ) ) : ?>
  117.  
  118. <option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
  119.  
  120. <?php endif; ?>
  121.  
  122. <option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
  123.  
  124. <?php do_action( 'bp_activity_filter_options' ); ?>
  125.  
  126. </select>
  127. </li>
  128. </ul>
  129. </div><!-- .item-list-tabs -->
  130.  
  131. <?php do_action( 'bp_before_directory_activity_list' ) ?>
  132.  
  133. <div class="activity" role="main">
  134.  
  135. <?php locate_template( array( 'activity/activity-loop.php' ), true ) ?>
  136.  
  137. </div><!-- .activity -->
  138.  
  139. <?php do_action( 'bp_directory_activity_content' ) ?>
  140.  
  141. <?php do_action( 'bp_after_directory_activity_content' ) ?>
  142.  
  143. </div><!-- .padder -->
  144. </div><!-- #content -->
  145.  
  146. <?php get_sidebar( 'buddypress' ) ?>
  147.  
  148. <?php get_footer( 'buddypress' ) ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement