Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // top is part of the single.php file
- <?php $checkStaff = get_post_meta($post->ID, 'isStaff',true); ?>
- <?php if((in_category('Staff')) OR ($checkStaff==1) ) :
- if (groups_is_user_member($bp->loggedin_user->id, 16 )) : ?>
- // bottom: this is into /activity/index.php
- <?php global $bp;
- if (groups_is_user_member($bp->loggedin_user->id, 16 )) : // check group membership ?>
- <div class="activity">
- <?php echo 'This is staff'; ?>
- <?php locate_template( array( 'activity/activity-loop-staff.php' ), true ) ?>
- </div><!-- .activity -->
- <?php else: // non staff member ?>
- <div class="activity">
- <?php locate_template( array( 'activity/activity-loop.php' ), true ) ?>
- </div><!-- .activity -->
- <?php endif; ?>
- // this is the content of the 'default' activity-loop.php
- <?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_activity_loop() */ ?>
- <?php do_action( 'bp_before_activity_loop' ) ?>
- <?php $args = array (
- bp_ajax_querystring( 'activity' ),
- 'scope' => 'mentions',
- 'display_comments' => 'threaded',
- 'max' => 5); ?>
- <?php if ( bp_has_activities($args) ) : ?>
- <?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?>
- <noscript>
- <div class="pagination">
- <div class="pag-count"><?php bp_activity_pagination_count() ?></div>
- <div class="pagination-links"><?php bp_activity_pagination_links() ?></div>
- </div>
- </noscript>
- <?php if ( empty( $_POST['page'] ) ) : ?>
- <ul id="activity-stream" class="activity-list item-list">
- <?php endif; ?>
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
- <?php include( locate_template( array( 'activity/entry.php' ), true ) ) ?>
- <?php endwhile; ?>
- <?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?>
- <li class="load-more">
- <a href="#more"><?php _e( 'Load More', 'buddypress' ) ?></a> <span class="ajax-loader"></span>
- </li>
- <?php endif; ?>
- <?php if ( empty( $_POST['page'] ) ) : ?>
- </ul>
- <?php endif; ?>
- <?php else : ?>
- <div id="message" class="info">
- <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p>
- </div>
- <?php endif; ?>
- <?php do_action( 'bp_after_activity_loop' ) ?>
- <form action="" name="activity-loop-form" id="activity-loop-form" method="post">
- <?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ) ?>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement