Advertisement
kristopherlouie

Activity Index

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