PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/themes/bp-adviser/activity/index.php

https://github.com/nunomorgadinho/AMMPro
PHP | 158 lines | 121 code | 31 blank | 6 comment | 8 complexity | 248659f8f386a70c2dfc5a36dc96292e MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Template Name: BuddyPress - Activity Directory
  4. *
  5. * @package BuddyPress
  6. * @subpackage Theme
  7. */
  8. ?>
  9. <?php get_header( 'buddypress' ); ?>
  10. <?php do_action( 'bp_before_directory_activity_page' ); ?>
  11. <div id="content">
  12. <h1>All <?php the_title(); ?></h1>
  13. <div class="buddybox">
  14. <?php do_action( 'bp_before_directory_activity' ); ?>
  15. <?php if ( !is_user_logged_in() ) : ?>
  16. <h3><?php _e( 'Site Activity', 'buddypress' ); ?></h3>
  17. <?php endif; ?>
  18. <?php do_action( 'bp_before_directory_activity_content' ); ?>
  19. <?php if ( is_user_logged_in() ) : ?>
  20. <?php locate_template( array( 'activity/post-form.php'), true ); ?>
  21. <?php endif; ?>
  22. <?php do_action( 'template_notices' ); ?>
  23. <aside class="bbaside">
  24. <?php get_sidebar('bbcontrols'); ?>
  25. <div class="item-list-tabs activity-type-tabs" role="navigation">
  26. <ul>
  27. <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
  28. <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>
  29. <?php if ( is_user_logged_in() ) : ?>
  30. <?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
  31. <?php if ( bp_is_active( 'friends' ) ) : ?>
  32. <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  33. <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>
  34. <?php endif; ?>
  35. <?php endif; ?>
  36. <?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
  37. <?php if ( bp_is_active( 'groups' ) ) : ?>
  38. <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  39. <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>
  40. <?php endif; ?>
  41. <?php endif; ?>
  42. <?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
  43. <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
  44. <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>
  45. <?php endif; ?>
  46. <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
  47. <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>
  48. <?php endif; ?>
  49. <?php do_action( 'bp_activity_type_tabs' ); ?>
  50. </ul>
  51. </div><!-- .item-list-tabs -->
  52. <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
  53. <ul>
  54. <!--<li class="feed"><a href="< ?php bp_sitewide_activity_feed_link() ?>" title="< ?php _e( 'RSS Feed', 'buddypress' ); ?>">< ?php _e( 'RSS', 'buddypress' ); ?></a></li>-->
  55. <?php do_action( 'bp_activity_syndication_options' ); ?>
  56. <li id="activity-filter-select" class="last">
  57. <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
  58. <select id="activity-filter-by">
  59. <option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
  60. <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
  61. <?php if ( bp_is_active( 'blogs' ) ) : ?>
  62. <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
  63. <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
  64. <?php endif; ?>
  65. <?php if ( bp_is_active( 'forums' ) ) : ?>
  66. <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
  67. <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
  68. <?php endif; ?>
  69. <?php if ( bp_is_active( 'groups' ) ) : ?>
  70. <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
  71. <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
  72. <?php endif; ?>
  73. <?php if ( bp_is_active( 'friends' ) ) : ?>
  74. <option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
  75. <?php endif; ?>
  76. <option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
  77. <?php do_action( 'bp_activity_filter_options' ); ?>
  78. </select>
  79. </li>
  80. </ul>
  81. </div><!-- .item-list-tabs -->
  82. <?php do_action( 'bp_before_directory_activity_list' ); ?>
  83. </aside>
  84. <div class="activity" id="bbactive" role="main">
  85. <?php locate_template( array( 'activity/activity-loop.php' ), true ); ?>
  86. </div><!-- .activity -->
  87. <?php do_action( 'bp_after_directory_activity_list' ); ?>
  88. <?php do_action( 'bp_directory_activity_content' ); ?>
  89. <?php do_action( 'bp_after_directory_activity_content' ); ?>
  90. <?php do_action( 'bp_after_directory_activity' ); ?>
  91. </div><!-- .padder -->
  92. </div><!-- #content -->
  93. <?php do_action( 'bp_after_directory_activity_page' ); ?>
  94. <?php get_footer( 'buddypress' ); ?>