Commits

Doug Stewart committed 9e13374

Syncing BuddyPress code with BP Template Pack 1.1.3.

  • Participants
  • Parent commits 4cd0211

Comments (0)

Files changed (57)

File activity/activity-loop.php

-<?php
+<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_activity_loop() */ ?>
 
-/**
- * BuddyPress - Activity Loop
- *
- * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
-
-?>
-
-<?php do_action( 'bp_before_activity_loop' ); ?>
+<?php do_action( 'bp_before_activity_loop' ) ?>
 
 <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
 
 	<?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 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 locate_template( array( 'activity/entry.php' ), true, false ); ?>
+		<?php include( locate_template( array( 'activity/entry.php' ), false ) ) ?>
 
 	<?php endwhile; ?>
 
-	<?php if ( bp_activity_has_more_items() ) : ?>
-
+	<?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?>
 		<li class="load-more">
-			<a href="#more"><?php _e( 'Load More', 'buddypress' ); ?></a> &nbsp; <span class="ajax-loader"></span>
+			<a href="#more"><?php _e( 'Load More', 'buddypress' ) ?></a> &nbsp; <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>
+		<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' ); ?>
+<?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' ); ?>
-
+	<?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ) ?>
 </form>

File activity/entry.php

-<?php
+<?php /* This template is used by activity-loop.php and AJAX functions to show each activity */ ?>
 
-/**
- * BuddyPress - Activity Stream (Single Item)
- *
- * This template is used by activity-loop.php and AJAX functions to show
- * each activity.
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
+<?php do_action( 'bp_before_activity_entry' ) ?>
 
-?>
-
-<?php do_action( 'bp_before_activity_entry' ); ?>
-
-<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
+<li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">
 	<div class="activity-avatar">
-		<a href="<?php bp_activity_user_link(); ?>">
-
-			<?php bp_activity_avatar( 'type=full&width=100&height=100' ); ?>
-
+		<a href="<?php bp_activity_user_link() ?>">
+			<?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>
 		</a>
 	</div>
 
 	<div class="activity-content">
 
 		<div class="activity-header">
-
-			<?php bp_activity_action(); ?>
-
+			<?php bp_activity_action() ?>
 		</div>
 
 		<?php if ( bp_activity_has_content() ) : ?>
-
 			<div class="activity-inner">
-
-				<?php bp_activity_content_body(); ?>
-
+				<?php bp_activity_content_body() ?>
 			</div>
-
 		<?php endif; ?>
 
-		<?php do_action( 'bp_activity_entry_content' ); ?>
+		<?php do_action( 'bp_activity_entry_content' ) ?>
 
 		<div class="activity-meta">
-
 			<?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?>
-
-				<a href="<?php bp_activity_comment_link(); ?>" class="acomment-reply" id="acomment-comment-<?php bp_activity_id(); ?>"><?php _e( 'Reply', 'buddypress' ); ?> (<span><?php bp_activity_comment_count(); ?></span>)</a>
-
+				<a href="<?php bp_activity_comment_link() ?>" class="acomment-reply" id="acomment-comment-<?php bp_activity_id() ?>"><?php _e( 'Reply', 'buddypress' ) ?> (<span><?php bp_activity_comment_count() ?></span>)</a>
 			<?php endif; ?>
 
-			<?php if ( is_user_logged_in() && bp_activity_can_favorite() ) :
-				if ( !bp_get_activity_is_favorite() ) : ?>
+			<?php if ( is_user_logged_in() ) : ?>
+				<?php if ( !bp_get_activity_is_favorite() ) : ?>
+					<a href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a>
+				<?php else : ?>
+					<a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a>
+				<?php endif; ?>
+			<?php endif;?>
 
-					<a href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a>
-
-				<?php else : ?>
-
-					<a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a>
-
-				<?php endif;
-			endif; ?>
-
-			<?php do_action( 'bp_activity_entry_meta' ); ?>
+			<?php do_action( 'bp_activity_entry_meta' ) ?>
 		</div>
 	</div>
 
 	<?php if ( 'activity_comment' == bp_get_activity_type() ) : ?>
-
 		<div class="activity-inreplyto">
-			<strong><?php _e( 'In reply to', 'buddypress' ); ?></strong> - <?php bp_activity_parent_content(); ?> &middot;
-			<a href="<?php bp_activity_thread_permalink(); ?>" class="view" title="<?php _e( 'View Thread / Permalink', 'buddypress' ); ?>"><?php _e( 'View', 'buddypress' ); ?></a>
+			<strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> - <?php bp_activity_parent_content() ?> &middot;
+			<a href="<?php bp_activity_thread_permalink() ?>" class="view" title="<?php _e( 'View Thread / Permalink', 'buddypress' ) ?>"><?php _e( 'View', 'buddypress' ) ?></a>
 		</div>
-
 	<?php endif; ?>
 
-	<?php do_action( 'bp_before_activity_entry_comments' ); ?>
+	<?php do_action( 'bp_before_activity_entry_comments' ) ?>
 
 	<?php if ( bp_activity_can_comment() ) : ?>
 		<div class="activity-comments">
-
-			<?php bp_activity_comments(); ?>
+			<?php bp_activity_comments() ?>
 
 			<?php if ( is_user_logged_in() ) : ?>
-
-			<form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>>
-				<div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div>
+			<form action="<?php bp_activity_comment_form_action() ?>" method="post" id="ac-form-<?php bp_activity_id() ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display() ?>>
+				<div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ) ?></div>
 				<div class="ac-reply-content">
 					<div class="ac-textarea">
-						<textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input" name="ac_input_<?php bp_activity_id(); ?>"></textarea>
+						<textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac_input_<?php bp_activity_id() ?>"></textarea>
 					</div>
-					<input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ); ?> &rarr;" /> &nbsp; <?php _e( 'or press esc to cancel.', 'buddypress' ); ?>
-					<input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" />
+					<input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ) ?> &rarr;" /> &nbsp; <?php _e( 'or press esc to cancel.', 'buddypress' ) ?>
+					<input type="hidden" name="comment_form_id" value="<?php bp_activity_id() ?>" />
 				</div>
-
-				<?php do_action( 'bp_activity_entry_comments' ); ?>
-				<?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?>
-
+				<?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?>
 			</form>
-
 			<?php endif; ?>
-
 		</div>
-
 	<?php endif; ?>
 
-	<?php do_action( 'bp_after_activity_entry_comments' ); ?>
-
+	<?php do_action( 'bp_after_activity_entry_comments' ) ?>
 </li>
 
-<?php do_action( 'bp_after_activity_entry' ); ?>
+<?php do_action( 'bp_after_activity_entry' ) ?>
+

File activity/index.php

-<?php
+<?php get_header() ?>
 
-/**
- * Template Name: BuddyPress - Activity Directory
- *
- * @package BuddyPress
- * @subpackage Theme
- */
+	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
-?>
+			<?php if ( !is_user_logged_in() ) : ?>
+				<h3><?php _e( 'Site Activity', 'buddypress' ) ?></h3>
+			<?php endif; ?>
 
-<?php get_header( 'buddypress' ) ?>
+			<?php do_action( 'bp_before_directory_activity_content' ) ?>
 
-<?php get_template_part( 'bp-wrapper-header' ); ?>
-				<?php if ( !is_user_logged_in() ) : ?>
+			<?php if ( is_user_logged_in() ) : ?>
+				<?php locate_template( array( 'activity/post-form.php'), true ) ?>
+			<?php endif; ?>
 
-					<h3><?php _e( 'Site Activity', 'buddypress' ) ?></h3>
+			<?php do_action( 'template_notices' ) ?>
 
-				<?php endif; ?>
+			<div class="item-list-tabs activity-type-tabs">
+				<ul>
+					<?php do_action( 'bp_before_activity_type_tab_all' ) ?>
 
-				<?php do_action( 'bp_before_directory_activity_content' ) ?>
+					<li class="selected" id="activity-all"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ) ?>"><?php printf( __( 'All Members (%s)', 'buddypress' ), bp_get_total_site_member_count() ) ?></a></li>
 
-				<?php if ( is_user_logged_in() ) : ?>
+					<?php if ( is_user_logged_in() ) : ?>
 
-					<?php locate_template( array( 'activity/post-form.php'), true ) ?>
+						<?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
 
-				<?php endif; ?>
+						<?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?>
+							<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
+								<li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/' ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
+							<?php endif; ?>
+						<?php endif; ?>
 
-				<?php do_action( 'template_notices' ) ?>
+						<?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
 
-				<div class="item-list-tabs activity-type-tabs" role="navigation">
-					<ul>
-						<?php do_action( 'bp_before_activity_type_tab_all' ) ?>
+						<?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
+							<?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
+								<li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
+							<?php endif; ?>
+						<?php endif; ?>
 
-						<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 (%s)', 'buddypress' ), bp_get_total_site_member_count() ) ?></a></li>
+						<?php do_action( 'bp_before_activity_type_tab_favorites' ) ?>
 
-						<?php if ( is_user_logged_in() ) : ?>
+						<?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
+							<li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . BP_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>
+						<?php endif; ?>
 
-							<?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
+						<?php do_action( 'bp_before_activity_type_tab_mentions' ) ?>
+
+						<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/mentions/' ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ) ?>"><?php printf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() ) ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '(%s new)', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) ?></strong><?php endif; ?></a></li>
+
+					<?php endif; ?>
+
+					<?php do_action( 'bp_activity_type_tabs' ) ?>
+				</ul>
+			</div><!-- .item-list-tabs -->
+
+			<div class="item-list-tabs no-ajax" id="subnav">
+				<ul>
+					<li class="feed"><a href="<?php bp_sitewide_activity_feed_link() ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ) ?></a></li>
+
+					<?php do_action( 'bp_activity_syndication_options' ) ?>
+
+					<li id="activity-filter-select" class="last">
+						<select>
+							<option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
+							<option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
+
+							<?php if ( bp_is_active( 'blogs' ) ) : ?>
+								<option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
+								<option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
+							<?php endif; ?>
+
+							<?php if ( bp_is_active( 'forums' ) ) : ?>
+								<option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
+								<option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
+							<?php endif; ?>
+
+							<?php if ( bp_is_active( 'groups' ) ) : ?>
+								<option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option>
+								<option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option>
+							<?php endif; ?>
 
 							<?php if ( bp_is_active( 'friends' ) ) : ?>
-
-								<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
-
-									<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 (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
-
-								<?php endif; ?>
-
+								<option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option>
 							<?php endif; ?>
 
-							<?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
+							<option value="new_member"><?php _e( 'Show New Members', 'buddypress' ) ?></option>
 
-							<?php if ( bp_is_active( 'groups' ) ) : ?>
+							<?php do_action( 'bp_activity_filter_options' ) ?>
+						</select>
+					</li>
+				</ul>
+			</div><!-- .item-list-tabs -->
 
-								<?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
+			<div class="activity">
+				<?php locate_template( array( 'activity/activity-loop.php' ), true ) ?>
+			</div><!-- .activity -->
 
-									<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 (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
-
-								<?php endif; ?>
-
-							<?php endif; ?>
-
-							<?php do_action( 'bp_before_activity_type_tab_favorites' ) ?>
-
-							<?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
-
-								<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>
-
-							<?php endif; ?>
-
-							<?php do_action( 'bp_before_activity_type_tab_mentions' ) ?>
-
-							<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 printf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() ) ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '(%s new)', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) ?></strong><?php endif; ?></a></li>
-
-						<?php endif; ?>
-
-						<?php do_action( 'bp_activity_type_tabs' ) ?>
-					</ul>
-				</div><!-- .item-list-tabs -->
-
-				<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
-					<ul>
-						<li class="feed"><a href="<?php bp_sitewide_activity_feed_link() ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ) ?></a></li>
-
-						<?php do_action( 'bp_activity_syndication_options' ) ?>
-
-						<li id="activity-filter-select" class="last">
-							<select>
-								<option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
-								<option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
-
-								<?php if ( bp_is_active( 'blogs' ) ) : ?>
-
-									<option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
-									<option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
-
-								<?php endif; ?>
-
-								<?php if ( bp_is_active( 'forums' ) ) : ?>
-
-									<option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ); ?></option>
-									<option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ); ?></option>
-
-								<?php endif; ?>
-
-								<?php if ( bp_is_active( 'groups' ) ) : ?>
-
-									<option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ); ?></option>
-									<option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ); ?></option>
-
-								<?php endif; ?>
-
-								<?php if ( bp_is_active( 'friends' ) ) : ?>
-
-									<option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ); ?></option>
-
-								<?php endif; ?>
-
-								<option value="new_member"><?php _e( 'Show New Members', 'buddypress' ); ?></option>
-
-								<?php do_action( 'bp_activity_filter_options' ); ?>
-
-							</select>
-						</li>
-					</ul>
-				</div><!-- .item-list-tabs -->
-
-				<?php do_action( 'bp_before_directory_activity_list' ) ?>
-
-				<div class="activity" role="main">
-
-					<?php locate_template( array( 'activity/activity-loop.php' ), true ) ?>
-
-				</div><!-- .activity -->
-
-				<?php do_action( 'bp_directory_activity_content' ) ?>
-
-				<?php do_action( 'bp_after_directory_activity_content' ) ?>
+			<?php do_action( 'bp_after_directory_activity_content' ) ?>
 
 <?php get_template_part( 'bp-wrapper-footer' ); ?>
- 
-<?php get_footer( 'buddypress' ) ?>
+<?php get_footer() ?>

File activity/post-form.php

-<?php
+<form action="<?php bp_activity_post_form_action() ?>" method="post" id="whats-new-form" name="whats-new-form">
 
-/**
- * BuddyPress - Activity Post Form
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
-
-?>
-
-<form action="<?php bp_activity_post_form_action(); ?>" method="post" id="whats-new-form" name="whats-new-form" role="complementary">
-
-	<?php do_action( 'bp_before_activity_post_form' ); ?>
+	<?php do_action( 'bp_before_activity_post_form' ) ?>
 
 	<?php if ( isset( $_GET['r'] ) ) : ?>
 		<div id="message" class="info">
-			<p><?php printf( __( 'You are mentioning %s in a new update, this user will be sent a notification of your message.', 'buddypress' ), bp_get_mentioned_user_display_name( $_GET['r'] ) ); ?></p>
+			<p><?php printf( __( 'You are mentioning %s in a new update, this user will be sent a notification of your message.', 'buddypress' ), bp_get_mentioned_user_display_name( $_GET['r'] ) ) ?></p>
 		</div>
 	<?php endif; ?>
 
 	<div id="whats-new-avatar">
-		<a href="<?php echo bp_loggedin_user_domain(); ?>">
-			<?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?>
+		<a href="<?php echo bp_loggedin_user_domain() ?>">
+			<?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ) ?>
 		</a>
 	</div>
 
-	<h5><?php if ( bp_is_group() )
-			printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname() );
-		else
-			printf( __( "What's new, %s?", 'buddypress' ), bp_get_user_firstname() );
-	?></h5>
+	<h5>
+		<?php if ( bp_is_group() ) : ?>
+			<?php printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname() ) ?>
+		<?php else : ?>
+			<?php printf( __( "What's new %s?", 'buddypress' ), bp_get_user_firstname() ) ?>
+		<?php endif; ?>
+	</h5>
 
 	<div id="whats-new-content">
 		<div id="whats-new-textarea">
-			<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_attr( $_GET['r'] ); ?> <?php endif; ?></textarea>
+			<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_attr( $_GET['r'] ) ?> <?php endif; ?></textarea>
 		</div>
 
 		<div id="whats-new-options">
 			<div id="whats-new-submit">
 				<span class="ajax-loader"></span> &nbsp;
-				<input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'buddypress' ); ?>" />
+				<input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'buddypress' ) ?>" />
 			</div>
 
-			<?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() ) : ?>
-
+			<?php if ( function_exists('bp_has_groups') && !bp_is_my_profile() && !bp_is_group() ) : ?>
 				<div id="whats-new-post-in-box">
-
 					<?php _e( 'Post in', 'buddypress' ) ?>:
 
 					<select id="whats-new-post-in" name="whats-new-post-in">
-						<option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ); ?></option>
+						<option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ) ?></option>
 
-						<?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0' ) ) :
-							while ( bp_groups() ) : bp_the_group(); ?>
-
-								<option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option>
-
-							<?php endwhile;
-						endif; ?>
-
+						<?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0' ) ) : while ( bp_groups() ) : bp_the_group(); ?>
+							<option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option>
+						<?php endwhile; endif; ?>
 					</select>
 				</div>
 				<input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
-
 			<?php elseif ( bp_is_group_home() ) : ?>
-
 				<input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
-				<input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id(); ?>" />
-
+				<input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id() ?>" />
 			<?php endif; ?>
 
-			<?php do_action( 'bp_activity_post_form_options' ); ?>
+			<?php do_action( 'bp_activity_post_form_options' ) ?>
 
 		</div><!-- #whats-new-options -->
 	</div><!-- #whats-new-content -->
 
 	<?php wp_nonce_field( 'post_update', '_wpnonce_post_update' ); ?>
-	<?php do_action( 'bp_after_activity_post_form' ); ?>
+	<?php do_action( 'bp_after_activity_post_form' ) ?>
 
 </form><!-- #whats-new-form -->

File blogs/blogs-loop.php

-<?php
+<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?>
 
-/**
- * BuddyPress - Blogs Loop
- *
- * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
-
-?>
-
-<?php do_action( 'bp_before_blogs_loop' ); ?>
+<?php do_action( 'bp_before_blogs_loop' ) ?>
 
 <?php if ( bp_has_blogs( bp_ajax_querystring( 'blogs' ) ) ) : ?>
 
 	<div id="pag-top" class="pagination">
 
 		<div class="pag-count" id="blog-dir-count-top">
-			<?php bp_blogs_pagination_count(); ?>
+			<?php bp_blogs_pagination_count() ?>
 		</div>
 
 		<div class="pagination-links" id="blog-dir-pag-top">
-			<?php bp_blogs_pagination_links(); ?>
+			<?php bp_blogs_pagination_links() ?>
 		</div>
 
 	</div>
 
-	<?php do_action( 'bp_before_directory_blogs_list' ); ?>
+	<?php do_action( 'bp_before_directory_blogs_list' ) ?>
 
-	<ul id="blogs-list" class="item-list" role="main">
-
+	<ul id="blogs-list" class="item-list">
 	<?php while ( bp_blogs() ) : bp_the_blog(); ?>
 
 		<li>
 			<div class="item-avatar">
-				<a href="<?php bp_blog_permalink(); ?>"><?php bp_blog_avatar( 'type=thumb' ); ?></a>
+				<a href="<?php bp_blog_permalink() ?>"><?php bp_blog_avatar('type=thumb') ?></a>
 			</div>
 
 			<div class="item">
-				<div class="item-title"><a href="<?php bp_blog_permalink(); ?>"><?php bp_blog_name(); ?></a></div>
-				<div class="item-meta"><span class="activity"><?php bp_blog_last_active(); ?></span></div>
+				<div class="item-title"><a href="<?php bp_blog_permalink() ?>"><?php bp_blog_name() ?></a></div>
+				<div class="item-meta"><span class="activity"><?php bp_blog_last_active() ?></span></div>
 
-				<?php do_action( 'bp_directory_blogs_item' ); ?>
+				<?php do_action( 'bp_directory_blogs_item' ) ?>
 			</div>
 
 			<div class="action">
 
-				<?php do_action( 'bp_directory_blogs_actions' ); ?>
+				<?php do_action( 'bp_directory_blogs_actions' ) ?>
 
 				<div class="meta">
-
-					<?php bp_blog_latest_post(); ?>
-
+					<?php bp_blog_latest_post() ?>
 				</div>
 
 			</div>
 		</li>
 
 	<?php endwhile; ?>
-
 	</ul>
 
-	<?php do_action( 'bp_after_directory_blogs_list' ); ?>
+	<?php do_action( 'bp_after_directory_blogs_list' ) ?>
 
-	<?php bp_blog_hidden_fields(); ?>
+	<?php bp_blog_hidden_fields() ?>
 
 	<div id="pag-bottom" class="pagination">
 
 		<div class="pag-count" id="blog-dir-count-bottom">
-
-			<?php bp_blogs_pagination_count(); ?>
-
+			<?php bp_blogs_pagination_count() ?>
 		</div>
 
 		<div class="pagination-links" id="blog-dir-pag-bottom">
-
-			<?php bp_blogs_pagination_links(); ?>
-
+			<?php bp_blogs_pagination_links() ?>
 		</div>
 
 	</div>
 <?php else: ?>
 
 	<div id="message" class="info">
-		<p><?php _e( 'Sorry, there were no blogs found.', 'buddypress' ); ?></p>
+		<p><?php _e( 'Sorry, there were no blogs found.', 'buddypress' ) ?></p>
 	</div>
 
 <?php endif; ?>
 
-<?php do_action( 'bp_after_blogs_loop' ); ?>
+<?php do_action( 'bp_after_blogs_loop' ) ?>

File blogs/create.php

-<?php
+<?php get_header() ?>
 
-/**
- * BuddyPress - Create Blog
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
+	<?php do_action( 'bp_before_directory_blogs_content' ) ?>
 
-?>
+	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
-<?php get_header( 'buddypress' ); ?>
+		<?php do_action( 'template_notices' ) ?>
 
-	<?php do_action( 'bp_before_directory_blogs_content' ); ?>
+		<h3><?php _e( 'Create a Blog', 'buddypress' ) ?> &nbsp;<a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_BLOGS_SLUG . '/' ?>"><?php _e( 'Blogs Directory', 'buddypress' ) ?></a></h3>
 
-<?php get_template_part( 'bp-wrapper-header' ); ?>
+		<?php do_action( 'bp_before_create_blog_content' ) ?>
 
-			<?php do_action( 'template_notices' ); ?>
+		<?php if ( bp_blog_signup_enabled() ) : ?>
 
-				<h3><?php _e( 'Create a Blog', 'buddypress' ); ?> &nbsp;<a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_blogs_root_slug() ) ?>"><?php _e( 'Blogs Directory', 'buddypress' ); ?></a></h3>
+			<?php bp_show_blog_signup_form() ?>
 
-			<?php do_action( 'bp_before_create_blog_content' ); ?>
+		<?php else: ?>
 
-			<?php if ( bp_blog_signup_enabled() ) : ?>
+			<div id="message" class="info">
+				<p><?php _e( 'Blog registration is currently disabled', 'buddypress' ); ?></p>
+			</div>
 
-				<?php bp_show_blog_signup_form(); ?>
+		<?php endif; ?>
 
-			<?php else: ?>
-
-				<div id="message" class="info">
-					<p><?php _e( 'Blog registration is currently disabled', 'buddypress' ); ?></p>
-				</div>
-
-			<?php endif; ?>
-
-			<?php do_action( 'bp_after_create_blog_content' ); ?>
-
-	<?php do_action( 'bp_after_directory_blogs_content' ); ?>
+		<?php do_action( 'bp_after_create_blog_content' ) ?>
 
 <?php get_template_part( 'bp-wrapper-footer' ); ?>
+	<?php do_action( 'bp_after_directory_blogs_content' ) ?>
 
-<?php get_footer( 'buddypress' ); ?>
+<?php get_footer() ?>
 

File blogs/index.php

-<?php
+<?php get_header() ?>
 
-/**
- * BuddyPress - Blogs Directory
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
+	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
-?>
+		<form action="" method="post" id="blogs-directory-form" class="dir-form">
 
-<?php get_header( 'buddypress' ); ?>
+			<h3><?php _e( 'Blogs Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() && bp_blog_signup_enabled() ) : ?> &nbsp;<a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_BLOGS_SLUG . '/create/' ?>"><?php _e( 'Create a Blog', 'buddypress' ) ?></a><?php endif; ?></h3>
 
-	<?php do_action( 'bp_before_directory_blogs_content' ); ?>
+			<?php do_action( 'bp_before_directory_blogs_content' ) ?>
 
-<?php get_template_part( 'bp-wrapper-header' ); ?>
+			<div id="blog-dir-search" class="dir-search">
+				<?php bp_directory_blogs_search_form() ?>
+			</div><!-- #blog-dir-search -->
 
-			<form action="" method="post" id="blogs-directory-form" class="dir-form">
+			<div class="item-list-tabs">
+				<ul>
+					<li class="selected" id="blogs-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Blogs (%s)', 'buddypress' ), bp_get_total_blog_count() ) ?></a></li>
 
-				<h3><?php _e( 'Blogs Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() && bp_blog_signup_enabled() ) : ?> &nbsp;<a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_BLOGS_SLUG . '/create/' ?>"><?php _e( 'Create a Blog', 'buddypress' ); ?></a><?php endif; ?></h3>
+					<?php if ( is_user_logged_in() && bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ) : ?>
+						<li id="blogs-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_BLOGS_SLUG . '/my-blogs/' ?>"><?php printf( __( 'My Blogs (%s)', 'buddypress' ), bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
+					<?php endif; ?>
 
-				<div id="blog-dir-search" class="dir-search" role="search">
+					<?php do_action( 'bp_blogs_directory_blog_types' ) ?>
 
-					<?php bp_directory_blogs_search_form(); ?>
+					<li id="blogs-order-select" class="last filter">
 
-				</div><!-- #blog-dir-search -->
+						<?php _e( 'Order By:', 'buddypress' ) ?>
+						<select>
+							<option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
+							<option value="newest"><?php _e( 'Newest', 'buddypress' ) ?></option>
+							<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option>
 
-				<div class="item-list-tabs" role="navigation">
-					<ul>
-						<li class="selected" id="blogs-all"><a href="<?php bp_root_domain(); ?>"><?php printf( __( 'All Blogs (%s)', 'buddypress' ), bp_get_total_blog_count() ); ?></a></li>
+							<?php do_action( 'bp_blogs_directory_order_options' ) ?>
+						</select>
+					</li>
+				</ul>
+			</div><!-- .item-list-tabs -->
 
-						<?php if ( is_user_logged_in() && bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ) : ?>
+			<div id="blogs-dir-list" class="blogs dir-list">
+				<?php locate_template( array( 'blogs/blogs-loop.php' ), true ) ?>
+			</div><!-- #blogs-dir-list -->
 
-							<li id="blogs-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_BLOGS_SLUG . '/my-blogs/' ?>"><?php printf( __( 'My Blogs (%s)', 'buddypress' ), bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
+			<?php do_action( 'bp_after_directory_blogs_content' ) ?>
 
-						<?php endif; ?>
+			<?php wp_nonce_field( 'directory_blogs', '_wpnonce-blogs-filter' ) ?>
 
-						<?php do_action( 'bp_blogs_directory_blog_types' ); ?>
+		</form><!-- #blogs-directory-form -->
 
-					</ul>
-				</div><!-- .item-list-tabs -->
-
-				<div class="item-list-tabs" id="subnav" role="navigation">
-					<ul>
-
-						<?php do_action( 'bp_blogs_directory_blog_sub_types' ); ?>
-
-						<li id="blogs-order-select" class="last filter">
-
-							<?php _e( 'Order By:', 'buddypress' ); ?>
-
-							<select>
-								<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-								<option value="newest"><?php _e( 'Newest', 'buddypress' ); ?></option>
-								<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
-
-								<?php do_action( 'bp_blogs_directory_order_options' ); ?>
-
-							</select>
-						</li>
-					</ul>
-				</div>
-
-				<div id="blogs-dir-list" class="blogs dir-list">
-
-					<?php locate_template( array( 'blogs/blogs-loop.php' ), true ); ?>
-
-				</div><!-- #blogs-dir-list -->
-
-				<?php do_action( 'bp_directory_blogs_content' ); ?>
-
-				<?php wp_nonce_field( 'directory_blogs', '_wpnonce-blogs-filter' ); ?>
-
-			</form><!-- #blogs-directory-form -->
-
-	<?php do_action( 'bp_after_directory_blogs_content' ); ?>
-	
 <?php get_template_part( 'bp-wrapper-footer' ); ?>
-
-<?php get_footer( 'buddypress' ); ?>
+<?php get_footer() ?>

File forums/forums-loop.php

-<?php
+<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?>
 
-/**
- * BuddyPress - Forums Loop
- *
- * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
-
-?>
-
-<?php do_action( 'bp_before_forums_loop' ); ?>
+<?php do_action( 'bp_before_forums_loop' ) ?>
 
 <?php if ( bp_has_forum_topics( bp_ajax_querystring( 'forums' ) ) ) : ?>
 
 	<div id="pag-top" class="pagination">
 
 		<div class="pag-count" id="topic-count-top">
-
-			<?php bp_forum_pagination_count(); ?>
-
+			<?php bp_forum_pagination_count() ?>
 		</div>
 
 		<div class="pagination-links" id="topic-pag-top">
-
-			<?php bp_forum_pagination(); ?>
-
+			<?php bp_forum_pagination() ?>
 		</div>
 
 	</div>
 
-	<?php do_action( 'bp_before_directory_forums_list' ); ?>
+	<?php do_action( 'bp_before_directory_forums_list' ) ?>
 
-	<table class="forum">
+	<table class="forum zebra">
 		<thead>
 			<tr>
-				<th id="th-title"><?php _e( 'Topic Title', 'buddypress' ); ?></th>
+				<th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th>
+				<th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th>
 
-				<?php if ( bp_is_directory() || bp_is_user_forums() ) : ?>
-
-					<th id="th-group"><?php _e( 'Forum', 'buddypress' ); ?></th>
-
+				<?php if ( !bp_is_group_forum() ) : ?>
+					<th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th>
 				<?php endif; ?>
 
-				<th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ); ?></th>
-				<th id="th-postcount"><?php _e( 'Posts', 'buddypress' ); ?></th>
-				<th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ); ?></th>
+				<th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th>
+				<th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ) ?></th>
 
-				<?php do_action( 'bp_directory_forums_extra_cell_head' ); ?>
+				<?php do_action( 'bp_directory_forums_extra_cell_head' ) ?>
 
 			</tr>
 		</thead>
 
 			<?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>
 
-			<tr class="<?php bp_the_topic_css_class(); ?>">
+			<tr class="<?php bp_the_topic_css_class() ?>">
 				<td class="td-title">
-					<a class="topic-title" href="<?php bp_the_topic_permalink(); ?>" title="<?php bp_the_topic_title(); ?> - <?php _e( 'Permalink', 'buddypress' ); ?>">
-
-						<?php bp_the_topic_title(); ?>
-
+					<a class="topic-title" href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>">
+						<?php bp_the_topic_title() ?>
 					</a>
 				</td>
+				<td class="td-poster">
+					<a href="<?php bp_the_topic_permalink() ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ) ?></a>
+					<div class="poster-name"><?php bp_the_topic_last_poster_name() ?></div>
+				</td>
 
-				<?php if ( bp_is_directory() || bp_is_user_forums() ) : ?>
-
+				<?php if ( !bp_is_group_forum() ) : ?>
 					<td class="td-group">
-						<a href="<?php bp_the_topic_object_permalink(); ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ); ?></a>
-						<div class="object-name"><a href="<?php bp_the_topic_object_permalink(); ?>" title="<?php bp_the_topic_object_name(); ?>"><?php bp_the_topic_object_name(); ?></a></div>
+						<a href="<?php bp_the_topic_object_permalink() ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) ?></a>
+						<div class="object-name"><a href="<?php bp_the_topic_object_permalink() ?>" title="<?php bp_the_topic_object_name() ?>"><?php bp_the_topic_object_name() ?></a></div>
 					</td>
-
 				<?php endif; ?>
 
-				<td class="td-poster">
-					<a href="<?php bp_the_topic_permalink(); ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ); ?></a>
-					<div class="poster-name"><?php bp_the_topic_last_poster_name(); ?></div>
-				</td>
 				<td class="td-postcount">
-
-					<?php bp_the_topic_total_posts(); ?>
-
+					<?php bp_the_topic_total_posts() ?>
 				</td>
 				<td class="td-freshness">
-					<?php bp_the_topic_time_since_last_post(); ?>
+					<?php bp_the_topic_time_since_last_post() ?>
 				</td>
 
-				<?php do_action( 'bp_directory_forums_extra_cell' ); ?>
-
+				<?php do_action( 'bp_directory_forums_extra_cell' ) ?>
 			</tr>
 
-			<?php do_action( 'bp_directory_forums_extra_row' ); ?>
+			<?php do_action( 'bp_directory_forums_extra_row' ) ?>
 
 			<?php endwhile; ?>
 
 		</tbody>
 	</table>
 
-	<?php do_action( 'bp_after_directory_forums_list' ); ?>
+	<?php do_action( 'bp_after_directory_forums_list' ) ?>
 
 	<div id="pag-bottom" class="pagination">
 
 		<div class="pag-count" id="topic-count-bottom">
-			<?php bp_forum_pagination_count(); ?>
+			<?php bp_forum_pagination_count() ?>
 		</div>
 
 		<div class="pagination-links" id="topic-pag-bottom">
-			<?php bp_forum_pagination(); ?>
+			<?php bp_forum_pagination() ?>
 		</div>
 
 	</div>
 <?php else: ?>
 
 	<div id="message" class="info">
-		<p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ); ?></p>
+		<p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ) ?></p>
 	</div>
 
-<?php endif; ?>
+<?php endif;?>
 
-<?php do_action( 'bp_after_forums_loop' ); ?>
+<?php do_action( 'bp_after_forums_loop' ) ?>

File forums/index.php

-<?php
+<?php get_header() ?>
 
-/**
- * BuddyPress - Forums Directory
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
+	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
-?>
+		<form action="" method="post" id="forums-search-form" class="dir-form">
 
-<?php get_header( 'buddypress' ); ?>
+			<h3><?php _e( 'Group Forums Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() ) : ?> &nbsp;<a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ) ?></a><?php endif; ?></h3>
 
-	<?php do_action( 'bp_before_directory_forums_content' ); ?>
+			<?php do_action( 'bp_before_directory_forums_content' ) ?>
 
+			<div id="forums-dir-search" class="dir-search">
+				<?php bp_directory_forums_search_form() ?>
+			</div>
+		</form>
 
-<?php get_template_part( 'bp-wrapper-header' ); ?>
+		<div id="new-topic-post">
+			<?php if ( is_user_logged_in() ) : ?>
 
-				<?php do_action( 'bp_before_directory_forums' ); ?>
+				<?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
 
-				<form action="" method="post" id="forums-search-form" class="dir-form">
+					<form action="" method="post" id="forum-topic-form" class="standard-form">
 
-					<h3><?php _e( 'Forums Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() ) : ?> &nbsp;<a class="button show-hide-new" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ); ?></a><?php endif; ?></h3>
+						<?php do_action( 'groups_forum_new_topic_before' ) ?>
 
-					<div id="forums-dir-search" class="dir-search" role="search">
+						<a name="post-new"></a>
+						<h5><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h5>
 
-						<?php bp_directory_forums_search_form(); ?>
+						<label><?php _e( 'Title:', 'buddypress' ) ?></label>
+						<input type="text" name="topic_title" id="topic_title" value="" />
 
-					</div>
-				</form>
+						<label><?php _e( 'Content:', 'buddypress' ) ?></label>
+						<textarea name="topic_text" id="topic_text"></textarea>
 
-				<?php do_action( 'bp_before_topics' ); ?>
+						<label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label>
+						<input type="text" name="topic_tags" id="topic_tags" value="" />
 
-				<form action="" method="post" id="forums-directory-form" class="dir-form">
+						<label><?php _e( 'Post In Group Forum:', 'buddypress' ) ?></label>
+						<select id="topic_group_id" name="topic_group_id">
 
-					<div class="item-list-tabs" role="navigation">
-						<ul>
-							<li class="selected" id="forums-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_forums_root_slug() ); ?>"><?php printf( __( 'All Topics (%s)', 'buddypress' ), bp_get_forum_topic_count() ); ?></a></li>
+							<option value="">----</option>
 
-							<?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>
+							<?php while ( bp_groups() ) : bp_the_group(); ?>
 
-								<li id="forums-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_forums_slug() . '/topics' ); ?>"><?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
+								<?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) : ?>
 
-							<?php endif; ?>
+									<option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option>
 
-							<?php do_action( 'bp_forums_directory_group_types' ); ?>
+								<?php endif; ?>
 
-						</ul>
+							<?php endwhile; ?>
+
+						</select><!-- #topic_group_id -->
+
+						<?php do_action( 'groups_forum_new_topic_after' ) ?>
+
+						<div class="submit">
+							<input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" />
+							<input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ) ?>" />
+						</div>
+
+						<?php wp_nonce_field( 'bp_forums_new_topic' ) ?>
+
+					</form><!-- #forum-topic-form -->
+
+				<?php else : ?>
+
+					<div id="message" class="info">
+						<p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( BP_GROUPS_SLUG . '/create/' ) ) ?></p>
 					</div>
 
-					<div class="item-list-tabs" id="subnav" role="navigation">
-						<ul>
+				<?php endif; ?>
 
-							<?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
+			<?php endif; ?>
+		</div><!-- #new-topic-post -->
 
-							<li id="forums-order-select" class="last filter">
+		<form action="" method="post" id="forums-directory-form" class="dir-form">
 
-								<?php _e( 'Order By:', 'buddypress' ); ?>
+			<div class="item-list-tabs">
+				<ul>
+					<li class="selected" id="forums-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Topics (%s)', 'buddypress' ), bp_get_forum_topic_count() ) ?></a></li>
 
-								<select>
-									<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-									<option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option>
-									<option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
+					<?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>
+						<li id="forums-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_GROUPS_SLUG . '/' ?>"><?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
+					<?php endif; ?>
 
-									<?php do_action( 'bp_forums_directory_order_options' ); ?>
+					<?php do_action( 'bp_forums_directory_group_types' ) ?>
 
-								</select>
-							</li>
-						</ul>
-					</div>
+					<li id="forums-order-select" class="last filter">
 
-					<div id="forums-dir-list" class="forums dir-list" role="main">
+						<?php _e( 'Order By:', 'buddypress' ) ?>
+						<select>
+							<option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
+							<option value="popular"><?php _e( 'Most Posts', 'buddypress' ) ?></option>
+							<option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ) ?></option>
 
-						<?php locate_template( array( 'forums/forums-loop.php' ), true ); ?>
+							<?php do_action( 'bp_forums_directory_order_options' ) ?>
+						</select>
+					</li>
+				</ul>
+			</div>
 
-					</div>
+			<div id="forums-dir-list" class="forums dir-list">
+				<?php locate_template( array( 'forums/forums-loop.php' ), true ) ?>
+			</div>
 
-					<?php do_action( 'bp_directory_forums_content' ); ?>
+			<?php do_action( 'bp_directory_forums_content' ) ?>
 
-					<?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?>
+			<?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ) ?>
 
-				</form>
+			<?php do_action( 'bp_after_directory_forums_content' ) ?>
 
-				<?php do_action( 'bp_after_directory_forums' ); ?>
+		</form>
 
-				<?php do_action( 'bp_before_new_topic_form' ); ?>
-
-				<div id="new-topic-post">
-
-					<?php if ( is_user_logged_in() ) : ?>
-
-						<?php if ( bp_is_active( 'groups' ) && bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
-
-							<form action="" method="post" id="forum-topic-form" class="standard-form">
-
-								<?php do_action( 'groups_forum_new_topic_before' ) ?>
-
-								<a name="post-new"></a>
-								<h5><?php _e( 'Create New Topic:', 'buddypress' ); ?></h5>
-
-								<?php do_action( 'template_notices' ); ?>
-
-								<label><?php _e( 'Title:', 'buddypress' ); ?></label>
-								<input type="text" name="topic_title" id="topic_title" value="" />
-
-								<label><?php _e( 'Content:', 'buddypress' ); ?></label>
-								<textarea name="topic_text" id="topic_text"></textarea>
-
-								<label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label>
-								<input type="text" name="topic_tags" id="topic_tags" value="" />
-
-								<label><?php _e( 'Post In Group Forum:', 'buddypress' ); ?></label>
-								<select id="topic_group_id" name="topic_group_id">
-
-									<option value="">----</option>
-
-									<?php while ( bp_groups() ) : bp_the_group(); ?>
-
-										<?php if ( bp_group_is_forum_enabled() && ( is_super_admin() || 'public' == bp_get_group_status() || bp_group_is_member() ) ) : ?>
-
-											<option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option>
-
-										<?php endif; ?>
-
-									<?php endwhile; ?>
-
-								</select><!-- #topic_group_id -->
-
-								<?php do_action( 'groups_forum_new_topic_after' ); ?>
-
-								<div class="submit">
-									<input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ); ?>" />
-									<input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ); ?>" />
-								</div>
-
-								<?php wp_nonce_field( 'bp_forums_new_topic' ); ?>
-
-							</form><!-- #forum-topic-form -->
-
-						<?php elseif ( bp_is_active( 'groups' ) ) : ?>
-
-							<div id="message" class="info">
-
-								<p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( bp_get_groups_root_slug() . '/create/' ) ) ?></p>
-
-							</div>
-
-						<?php endif; ?>
-
-					<?php endif; ?>
-				</div><!-- #new-topic-post -->
-	<?php do_action( 'bp_after_directory_forums_content' ); ?>
 <?php get_template_part( 'bp-wrapper-footer' ); ?>
-
-<?php get_footer( 'buddypress' ); ?>
+<?php get_footer() ?>

File forums/single/edit.php

-<?php do_action( 'bp_before_group_forum_edit_form' ); ?>
-
-<?php if ( bp_has_forum_topic_posts() ) : ?>
-
-	<form action="<?php bp_forum_topic_action(); ?>" method="post" id="forum-topic-form" class="standard-form">
-
-		<div class="item-list-tabs" id="subnav" role="navigation">
-			<ul>
-				<li>
-					<a href="#post-topic-reply"><?php _e( 'Reply', 'buddypress' ); ?></a>
-				</li>
-
-				<?php if ( !bp_forum_directory_is_disabled() ) : ?>
-
-					<li>
-						<a href="<?php bp_forum_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress'); ?></a>
-					</li>
-
-				<?php endif; ?>
-
-			</ul>
-		</div>
-
-		<div id="topic-meta">
-			<h3><?php _e( 'Edit:', 'buddypress' ); ?> <?php bp_the_topic_title(); ?> (<?php bp_the_topic_total_post_count(); ?>)</h3>
-
-			<?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?>
-
-				<div class="last admin-links">
-
-					<?php bp_the_topic_admin_links(); ?>
-
-				</div>
-
-			<?php endif; ?>
-
-			<?php do_action( 'bp_group_forum_topic_meta' ); ?>
-
-		</div>
-
-		<?php if ( bp_group_is_member() ) : ?>
-
-			<?php if ( bp_is_edit_topic() ) : ?>
-
-				<div id="edit-topic">
-
-					<?php do_action( 'bp_group_before_edit_forum_topic' ); ?>
-
-					<label for="topic_title"><?php _e( 'Title:', 'buddypress' ); ?></label>
-					<input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title(); ?>" />
-
-					<label for="topic_text"><?php _e( 'Content:', 'buddypress' ); ?></label>
-					<textarea name="topic_text" id="topic_text"><?php bp_the_topic_text(); ?></textarea>
-
-					<?php do_action( 'bp_group_after_edit_forum_topic' ); ?>
-
-					<p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" /></p>
-
-					<?php wp_nonce_field( 'bp_forums_edit_topic' ); ?>
-
-				</div>
-
-			<?php else : ?>
-
-				<div id="edit-post">
-
-					<?php do_action( 'bp_group_before_edit_forum_post' ); ?>
-
-					<textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text(); ?></textarea>
-
-					<?php do_action( 'bp_group_after_edit_forum_post' ) ?>
-
-					<p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" /></p>
-
-					<?php wp_nonce_field( 'bp_forums_edit_post' ); ?>
-
-				</div>
-
-			<?php endif; ?>
-
-		<?php endif; ?>
-
-	</form><!-- #forum-topic-form -->
-
-<?php else: ?>
-
-	<div id="message" class="info">
-		<p><?php _e( 'This topic does not exist.', 'buddypress' ); ?></p>
-	</div>
-
-<?php endif;?>
-
-<?php do_action( 'bp_after_group_forum_edit_form' ); ?>

File forums/single/forum-header.php

-<?php do_action( 'bp_before_forum_header' ); ?>
-
-<div id="item-header-avatar">
-	<a href="<?php bp_forum_permalink(); ?>" title="<?php bp_get_forum_name(); ?>">
-
-		<?php //bp_forum_avatar(); ?>
-
-	</a>
-</div><!-- #item-header-avatar -->
-
-<div id="item-header-content">
-	<h2><a href="<?php bp_forum_permalink(); ?>" title="<?php bp_forum_name(); ?>"><?php bp_forum_name(); ?></a></h2>
-	<span class="highlight"><?php //bp_forum_type(); ?></span> <span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), '' ); //bp_get_forum_last_active() ); ?></span>
-
-	<?php do_action( 'bp_before_forum_header_meta' ); ?>
-
-	<div id="item-meta">
-
-		<?php //bp_forum_description(); ?>
-
-		<div id="item-buttons">
-
-			<?php do_action( 'bp_forum_header_actions' ); ?>
-
-		</div><!-- #item-buttons -->
-
-		<?php do_action( 'bp_forum_header_meta' ); ?>
-
-	</div>
-</div><!-- #item-header-content -->
-
-<?php
-do_action( 'bp_after_forum_header' );
-do_action( 'template_notices' );
-?>

File forums/single/forum.php

-<?php get_header( 'buddypress' ); ?>
-
-<?php get_template_part( 'bp-wrapper-header' ); ?>
-
-				<?php do_action( 'bp_before_group_home_content' ) ?>
-
-					<div id="item-header" role="complementary">
-
-						<?php locate_template( array( 'forums/single/forum-header.php' ), true ); ?>
-
-					</div><!-- #item-header -->
-
-					<div id="item-nav">
-						<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
-							<ul>
-
-								<li>
-									<a href="#post-new" class="show-hide-new"><?php _e( 'New Topic', 'buddypress' ) ?></a>
-								</li>
-
-								<?php if ( !bp_forum_directory_is_disabled() ) : ?>
-
-									<li>
-										<a href="<?php bp_forum_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a>
-									</li>
-
-								<?php endif; ?>
-
-								<?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
-
-								<li id="forums-order-select" class="last filter">
-
-									<?php _e( 'Order By:', 'buddypress' ); ?>
-
-									<select>
-										<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-										<option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option>
-										<option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
-
-										<?php do_action( 'bp_forums_directory_order_options' ); ?>
-
-									</select>
-								</li>
-							</ul>
-						</div>
-					</div><!-- #item-nav -->
-
-					<div id="item-body">
-
-						<div id="forums-dir-list" class="forums dir-list" role="main">
-
-							<?php locate_template( array( 'forums/forums-loop.php' ), true ); ?>
-
-						</div>
-
-						<?php do_action( 'bp_directory_forums_content' ); ?>
-
-					</div>
-				</div><!-- #new-topic-post -->
-			</div><!-- .padder -->
-	</div><!-- #wrapper -->
-</div><!-- #allwrapper -->
-	<?php do_action( 'bp_after_directory_forums_content' ); ?>
-
-<?php get_sidebar( 'buddypress' ); ?>
-<?php get_footer( 'buddypress' ); ?>

File forums/single/topic.php

-<?php get_header( 'buddypress' ); ?>
-
-<?php get_template_part( 'bp-wrapper-header' ); ?>
-
-				<?php do_action( 'bp_before_group_home_content' ) ?>
-
-				<?php if ( bp_has_forum_topic_posts() ) : ?>
-
-					<div id="item-header" role="complementary">
-
-						<?php locate_template( array( 'forums/single/forum-header.php' ), true ); ?>
-
-					</div><!-- #item-header -->
-
-					<div id="item-nav">
-						<div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
-							<ul>
-
-								<?php bp_get_options_nav(); ?>
-
-								<?php do_action( 'bp_forum_options_nav' ); ?>
-
-							</ul>
-						</div>
-					</div><!-- #item-nav -->
-
-					<div id="item-body">
-
-						<?php do_action( 'bp_before_group_forum_topic' ); ?>
-
-						<form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form">
-
-							<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
-								<ul>
-									<li>
-										<a href="#post-topic-reply" class="show-hide-new"><?php _e( 'New Reply', 'buddypress' ) ?></a>
-									</li>
-
-									<?php if ( !bp_forum_directory_is_disabled() ) : ?>
-
-										<li>
-											<a href="<?php bp_forum_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a>
-										</li>
-
-									<?php endif; ?>
-
-								</ul>
-							</div>
-
-							<div id="topic-meta">
-								<h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3>
-
-								<?php if ( is_super_admin() || current_user_can( 'moderate' ) ) : ?>
-
-									<div class="last admin-links">
-
-										<?php bp_the_topic_admin_links(); ?>
-
-									</div>
-
-								<?php endif; ?>
-
-								<?php do_action( 'bp_group_forum_topic_meta' ); ?>
-
-							</div>
-
-							<div class="pagination no-ajax">
-
-								<div id="post-count" class="pag-count">
-
-									<?php bp_the_topic_pagination_count() ?>
-
-								</div>
-
-								<div class="pagination-links" id="topic-pag">
-
-									<?php bp_the_topic_pagination() ?>
-
-								</div>
-
-							</div>
-
-							<?php do_action( 'bp_before_group_forum_topic_posts' ) ?>
-
-							<ul id="topic-post-list" class="item-list" role="main">
-								<?php while ( bp_forum_topic_posts() ) : bp_the_forum_topic_post(); ?>
-
-									<li id="post-<?php bp_the_topic_post_id() ?>" class="<?php bp_the_topic_post_css_class() ?>">
-										<div class="poster-meta">
-											<a href="<?php bp_the_topic_post_poster_link() ?>">
-
-												<?php bp_the_topic_post_poster_avatar( 'width=40&height=40' ); ?>
-
-											</a>
-
-											<?php echo sprintf( __( '%s said %s ago:', 'buddypress' ), bp_get_the_topic_post_poster_name(), bp_get_the_topic_post_time_since() ) ?>
-
-										</div>
-
-										<div class="post-content">
-
-											<?php bp_the_topic_post_content() ?>
-
-										</div>
-
-										<div class="admin-links">
-
-											<?php if ( is_super_admin() || current_user_can( 'moderate' ) ) : ?>
-
-												<?php bp_the_topic_post_admin_links() ?>
-
-											<?php endif; ?>
-
-											<?php do_action( 'bp_group_forum_post_meta' ); ?>
-
-											<a href="#post-<?php bp_the_topic_post_id() ?>" title="<?php _e( 'Permanent link to this post', 'buddypress' ) ?>">#</a>
-										</div>
-									</li>
-
-								<?php endwhile; ?>
-							</ul><!-- #topic-post-list -->
-
-							<?php do_action( 'bp_after_group_forum_topic_posts' ) ?>
-
-							<div class="pagination no-ajax">
-
-								<div id="post-count" class="pag-count">
-
-									<?php bp_the_topic_pagination_count() ?>
-
-								</div>
-
-								<div class="pagination-links" id="topic-pag">
-
-									<?php bp_the_topic_pagination() ?>
-
-								</div>
-
-							</div>
-
-							<?php if ( is_user_logged_in() ) : ?>
-
-								<?php if ( bp_get_the_topic_is_last_page() ) : ?>
-
-									<?php if ( bp_get_the_topic_is_topic_open() ) : ?>
-
-										<div id="post-topic-reply">
-											<p id="post-reply"></p>
-
-											<?php do_action( 'groups_forum_new_reply_before' ) ?>
-
-											<h4><?php _e( 'Add a reply:', 'buddypress' ) ?></h4>
-
-											<textarea name="reply_text" id="reply_text"></textarea>
-
-											<div class="submit">
-												<input type="submit" name="submit_reply" id="submit" value="<?php _e( 'Post Reply', 'buddypress' ) ?>" />
-											</div>
-
-											<?php do_action( 'groups_forum_new_reply_after' ) ?>
-
-											<?php wp_nonce_field( 'bp_forums_new_reply' ) ?>
-										</div>
-
-									<?php else : ?>
-
-										<div id="message" class="info">
-											<p><?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ) ?></p>
-										</div>
-
-									<?php endif; ?>
-
-								<?php endif; ?>
-
-							<?php endif; ?>
-
-						</form><!-- #forum-topic-form -->
-					</div>
-
-				<?php else: ?>
-
-					<div id="message" class="info">
-						<p><?php _e( 'There are no posts for this topic.', 'buddypress' ) ?></p>
-					</div>
-
-				<?php endif;?>
-
-			</div>
-		</div>
-	</div><!-- #wrapper -->
-</div><!-- #allwrapper -->
-<?php do_action( 'bp_after_group_forum_topic' ) ?>
-
-<?php get_sidebar( 'buddypress' ); ?>
-<?php get_footer( 'buddypress' ); ?>

File functions.php

 require_once( LBLG_FUNCTIONS_DIR . 'supports.php' );
 
 // Only load the BuddyPress-related code if BP is active
+//function lblg_bp_loader(){	
+//	echo "Loader!";
 if( function_exists( 'bp_init' ))
 	require_once( LBLG_FUNCTIONS_DIR . 'buddypress.php' );
+//}
+//add_action( 'bp_include', 'lblg_bp_loader' );
 ?>

File groups/create.php

-<?php
+<?php get_header() ?>
 
-/**
- * BuddyPress - Create Group
- *
- * @package BuddyPress
- * @subpackage bp-default
- */
+	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
-?>
+		<form action="<?php bp_group_creation_form_action() ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data">
+			<h3><?php _e( 'Create a Group', 'buddypress' ) ?> &nbsp;<a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/' ?>"><?php _e( 'Groups Directory', 'buddypress' ) ?></a></h3>
 
-<?php get_header( 'buddypress' ); ?>
+			<?php do_action( 'bp_before_create_group' ) ?>
 
-<?php get_template_part( 'bp-wrapper-header' ); ?>
+			<div class="item-list-tabs no-ajax" id="group-create-tabs">
+				<ul>
+					<?php bp_group_creation_tabs(); ?>
+				</ul>
+			</div>
 
-			<form action="<?php bp_group_creation_form_action(); ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data">
-				<h3><?php _e( 'Create a Group', 'buddypress' ); ?> &nbsp;<a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ); ?>"><?php _e( 'Groups Directory', 'buddypress' ); ?></a></h3>
+			<?php do_action( 'template_notices' ) ?>
 
-				<?php do_action( 'bp_before_create_group' ); ?>
+			<div class="item-body" id="group-create-body">
 
-				<div class="item-list-tabs no-ajax" id="group-create-tabs" role="navigation">
-					<ul>
+				<?php /* Group creation step 1: Basic group details */ ?>
+				<?php if ( bp_is_group_creation_step( 'group-details' ) ) : ?>
 
-						<?php bp_group_creation_tabs(); ?>
+					<?php do_action( 'bp_before_group_details_creation_step' ); ?>
 
-					</ul>
-				</div>
+					<label for="group-name"><?php _e('* Group Name', 'buddypress') ?> <?php _e( '(required)', 'buddypress' )?></label>
+					<input type="text" name="group-name" id="group-name" value="<?php bp_new_group_name() ?>" />
 
-				<?php do_action( 'template_notices' ); ?>
+					<label for="group-desc"><?php _e('* Group Description', 'buddypress') ?> <?php _e( '(required)', 'buddypress' )?></label>
+					<textarea name="group-desc" id="group-desc"><?php bp_new_group_description() ?></textarea>
 
-				<div class="item-body" id="group-create-body">
+					<?php do_action( 'bp_after_group_details_creation_step' ); /* Deprecated -> */ do_action( 'groups_custom_group_fields_editable' ); ?>
 
-					<?php /* Group creation step 1: Basic group details */ ?>
-					<?php if ( bp_is_group_creation_step( 'group-details' ) ) : ?>
+					<?php wp_nonce_field( 'groups_create_save_group-details' ) ?>
 
-						<?php do_action( 'bp_before_group_details_creation_step' ); ?>
+				<?php endif; ?>
 
-						<label for="group-name"><?php _e('* Group Name', 'buddypress'); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
-						<input type="text" name="group-name" id="group-name" value="<?php bp_new_group_name(); ?>" />
+				<?php /* Group creation step 2: Group settings */ ?>
+				<?php if ( bp_is_group_creation_step( 'group-settings' ) ) : ?>
 
-						<label for="group-desc"><?php _e('* Group Description', 'buddypress') ?> <?php _e( '(required)', 'buddypress' ); ?></label>
-						<textarea name="group-desc" id="group-desc"><?php bp_new_group_description(); ?></textarea>
+					<?php do_action( 'bp_before_group_settings_creation_step' ); ?>
 
-						<?php
-						do_action( 'bp_after_group_details_creation_step' );
-						do_action( 'groups_custom_group_fields_editable' ); // @Deprecated
+					<?php if ( function_exists('bp_wire_install') ) : ?>
+					<div class="checkbox">
+						<label><input type="checkbox" name="group-show-wire" id="group-show-wire" value="1"<?php if ( bp_get_new_group_enable_wire() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable comment wire', 'buddypress') ?></label>
+					</div>
+					<?php endif; ?>
 
-						wp_nonce_field( 'groups_create_save_group-details' ); ?>
+					<?php if ( function_exists('bp_forums_is_installed_correctly') ) : ?>
+						<?php if ( bp_forums_is_installed_correctly() ) : ?>
+							<div class="checkbox">
+								<label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php if ( bp_get_new_group_enable_forum() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable discussion forum', 'buddypress') ?></label>
+							</div>
+						<?php else : ?>
+							<?php if ( is_super_admin() ) : ?>
+								<div class="checkbox">
+									<label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ) ?></label>
+								</div>
+							<?php endif; ?>
+						<?php endif; ?>
+					<?php endif; ?>
+
+					<hr />
+
+					<h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4>
+
+					<div class="radio">
+						<label><input type="radio" name="group-status" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
+							<strong><?php _e( 'This is a public group', 'buddypress' ) ?></strong>
+							<ul>
+								<li><?php _e( 'Any site member can join this group.', 'buddypress' ) ?></li>
+								<li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li>
+								<li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ) ?></li>
+							</ul>
+						</label>
+
+						<label><input type="radio" name="group-status" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
+							<strong><?php _e( 'This is a private group', 'buddypress' ) ?></strong>
+							<ul>
+								<li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ) ?></li>
+								<li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li>
+								<li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li>
+							</ul>
+						</label>
+
+						<label><input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
+							<strong><?php _e('This is a hidden group', 'buddypress') ?></strong>
+							<ul>
+								<li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ) ?></li>
+								<li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ) ?></li>
+								<li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li>
+							</ul>
+						</label>
+					</div>
+
+					<?php do_action( 'bp_after_group_settings_creation_step' ); ?>
+
+					<?php wp_nonce_field( 'groups_create_save_group-settings' ) ?>
+
+				<?php endif; ?>
+
+				<?php /* Group creation step 3: Avatar Uploads */ ?>
+				<?php if ( bp_is_group_creation_step( 'group-avatar' ) ) : ?>
+
+					<?php do_action( 'bp_before_group_avatar_creation_step' ); ?>
+
+					<?php if ( !bp_get_avatar_admin_step() ) : ?>
+
+						<div class="left-menu">
+							<?php bp_new_group_avatar() ?>
+						</div><!-- .left-menu -->
+
+						<div class="main-column">
+							<p><?php _e("Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.", 'buddypress') ?></p>
+
+							<p>
+								<input type="file" name="file" id="file" />
+								<input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
+								<input type="hidden" name="action" id="action" value="bp_avatar_upload" />
+							</p>
+
+							<p><?php _e( 'To skip the avatar upload process, hit the "Next Step" button.', 'buddypress' ) ?></p>
+						</div><!-- .main-column -->
 
 					<?php endif; ?>
 
-					<?php /* Group creation step 2: Group settings */ ?>
-					<?php if ( bp_is_group_creation_step( 'group-settings' ) ) : ?>
+					<?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
 
-						<?php do_action( 'bp_before_group_settings_creation_step' ); ?>
+						<h3><?php _e( 'Crop Group Avatar', 'buddypress' ) ?></h3>
 
-						<?php if ( bp_is_active( 'forums' ) ) : ?>
-							<?php if ( bp_forums_is_installed_correctly() ) : ?>
+						<img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
 
-								<div class="checkbox">
-									<label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php checked( bp_get_new_group_enable_forum(), true, true ); ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ); ?></label>
-								</div>
-
-							<?php else : ?>
-								<?php if ( is_super_admin() ) : ?>
-
-									<div class="checkbox">
-										<label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __( '<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ); ?></label>
-									</div>
-
-								<?php endif; ?>
-							<?php endif; ?>
-						<?php endif; ?>
-
-						<hr />
-
-						<h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4>
-
-						<div class="radio">
-							<label><input type="radio" name="group-status" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
-								<strong><?php _e( 'This is a public group', 'buddypress' ); ?></strong>
-								<ul>
-									<li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
-									<li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
-									<li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
-								</ul>
-							</label>
-
-							<label><input type="radio" name="group-status" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
-								<strong><?php _e( 'This is a private group', 'buddypress' ); ?></strong>
-								<ul>
-									<li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
-									<li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
-									<li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
-								</ul>
-							</label>
-
-							<label><input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
-								<strong><?php _e('This is a hidden group', 'buddypress'); ?></strong>
-								<ul>
-									<li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
-									<li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
-									<li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
-								</ul>
-							</label>
+						<div id="avatar-crop-pane">
+							<img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
 						</div>
 
-						<?php do_action( 'bp_after_group_settings_creation_step' ); ?>
+						<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
 
-						<?php wp_nonce_field( 'groups_create_save_group-settings' ); ?>
+						<input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
+						<input type="hidden" name="upload" id="upload" />
+						<input type="hidden" id="x" name="x" />
+						<input type="hidden" id="y" name="y" />
+						<input type="hidden" id="w" name="w" />
+						<input type="hidden" id="h" name="h" />
 
 					<?php endif; ?>
 
-					<?php /* Group creation step 3: Avatar Uploads */ ?>
-					<?php if ( bp_is_group_creation_step( 'group-avatar' ) ) : ?>
+					<?php do_action( 'bp_after_group_avatar_creation_step' ); ?>
 
-						<?php do_action( 'bp_before_group_avatar_creation_step' ); ?>
+					<?php wp_nonce_field( 'groups_create_save_group-avatar' ) ?>
 
-						<?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
+				<?php endif; ?>
 
-							<div class="left-menu">
+				<?php /* Group creation step 4: Invite friends to group */ ?>
+				<?php if ( bp_is_group_creation_step( 'group-invites' ) ) : ?>
 
-								<?php bp_new_group_avatar(); ?>
+					<?php do_action( 'bp_before_group_invites_creation_step' ); ?>
 
-							</div><!-- .left-menu -->
+					<?php if ( function_exists( 'bp_get_total_friend_count' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
+						<div class="left-menu">
 
-							<div class="main-column">
-								<p><?php _e( "Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.", 'buddypress' ); ?></p>
+							<div id="invite-list">
+								<ul>
+									<?php bp_new_group_invite_friend_list() ?>
+								</ul>
 
-								<p>
-									<input type="file" name="file" id="file" />
-									<input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ); ?>" />
-									<input type="hidden" name="action" id="action" value="bp_avatar_upload" />
-								</p>
-
-								<p><?php _e( 'To skip the avatar upload process, hit the "Next Step" button.', 'buddypress' ); ?></p>
-							</div><!-- .main-column -->
-
-						<?php endif; ?>
-
-						<?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
-
-							<h3><?php _e( 'Crop Group Avatar', 'buddypress' ); ?></h3>
-
-							<img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ); ?>" />
-
-							<div id="avatar-crop-pane">
-								<img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ); ?>" />
+								<?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ) ?>
 							</div>
 
-							<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ); ?>" />
+						</div><!-- .left-menu -->
 
-							<input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" />
-							<input type="hidden" name="upload" id="upload" />
-							<input type="hidden" id="x" name="x" />
-							<input type="hidden" id="y" name="y" />
-							<input type="hidden" id="w" name="w" />
-							<input type="hidden" id="h" name="h" />
+						<div class="main-column">
 
-						<?php endif; ?>
+							<div id="message" class="info">
+								<p><?php _e('Select people to invite from your friends list.', 'buddypress'); ?></p>
+							</div>
 
-						<?php do_action( 'bp_after_group_avatar_creation_step' ); ?>
+							<?php /* The ID 'friend-list' is important for AJAX support. */ ?>
+							<ul id="friend-list" class="item-list">
+							<?php if ( bp_group_has_invites() ) : ?>
 
-						<?php wp_nonce_field( 'groups_create_save_group-avatar' ); ?>
+								<?php while ( bp_group_invites() ) : bp_group_the_invite(); ?>
+
+									<li id="<?php bp_group_invite_item_id() ?>">
+										<?php bp_group_invite_user_avatar() ?>
+
+										<h4><?php bp_group_invite_user_link() ?></h4>
+										<span class="activity"><?php bp_group_invite_user_last_active() ?></span>
+
+										<div class="action">
+											<a class="remove" href="<?php bp_group_invite_user_remove_invite_url() ?>" id="<?php bp_group_invite_item_id() ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a>
+										</div>
+									</li>
+
+								<?php endwhile; ?>
+
+								<?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ) ?>
+							<?php endif; ?>
+							</ul>
+
+						</div><!-- .main-column -->
+
+					<?php else : ?>
+
+						<div id="message" class="info">
+							<p><?php _e( 'Once you have built up friend connections you will be able to invite others to your group. You can send invites any time in the future by selecting the "Send Invites" option when viewing your new group.', 'buddypress' ); ?></p>
+						</div>
 
 					<?php endif; ?>
 
-					<?php /* Group creation step 4: Invite friends to group */ ?>
-					<?php if ( bp_is_group_creation_step( 'group-invites' ) ) : ?>
+					<?php wp_nonce_field( 'groups_create_save_group-invites' ) ?>
+					<?php do_action( 'bp_after_group_invites_creation_step' ); ?>
 
-						<?php do_action( 'bp_before_group_invites_creation_step' ); ?>
+				<?php endif; ?>
 
-						<?php if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
+				<?php do_action( 'groups_custom_create_steps' ) // Allow plugins to add custom group creation steps ?>
 
-							<div class="left-menu">
+				<?php do_action( 'bp_before_group_creation_step_buttons' ); ?>
 <