Commits

Doug Stewart committed c9aabaf

Massive (MASSIVE!) BuddyPress 1.5 sync-up.

  • Participants
  • Parent commits feb2194

Comments (0)

Files changed (63)

activity/activity-loop.php

-<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_activity_loop() */ ?>
+<?php
 
-<?php do_action( 'bp_before_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 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 include( locate_template( array( 'activity/entry.php' ), false ) ) ?>
+		<?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
 
 	<?php endwhile; ?>
 
-	<?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?>
+	<?php if ( bp_activity_has_more_items() ) : ?>
+
 		<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>
 		</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>

activity/comment.php

+<?php
+
+/**
+ * BuddyPress - Activity Stream Comment
+ *
+ * This template is used by bp_activity_comments() functions to show
+ * each activity.
+ *
+ * @package BuddyPress
+ * @subpackage bp-default
+ */
+
+?>
+
+<?php do_action( 'bp_before_activity_comment' ); ?>
+
+<li id="acomment-<?php bp_activity_comment_id(); ?>">
+	<div class="acomment-avatar">
+		<a href="<?php bp_activity_comment_user_link(); ?>">
+			<?php bp_activity_avatar( 'type=thumb&user_id=' . bp_get_activity_comment_user_id() ); ?>
+		</a>
+	</div>
+
+	<div class="acomment-meta">
+		<?php
+		/* translators: 1: user profile link, 2: user name, 3: activity permalink, 3: activity timestamp */
+		printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded() );
+		?>
+	</div>
+
+	<div class="acomment-content"><?php bp_activity_comment_content(); ?></div>
+
+	<div class="acomment-options">
+
+		<?php if ( is_user_logged_in() && bp_activity_can_comment_reply( bp_activity_current_comment() ) ) : ?>
+
+			<a href="#acomment-<?php bp_activity_comment_id(); ?>" class="acomment-reply bp-primary-action" id="acomment-reply-<?php bp_activity_id() ?>-from-<?php bp_activity_comment_id() ?>"><?php _e( 'Reply', 'buddypress' ); ?></a>
+
+		<?php endif; ?>
+
+		<?php if ( bp_activity_user_can_delete() ) : ?>
+
+			<a href="<?php bp_activity_comment_delete_link(); ?>" class="delete acomment-delete confirm bp-secondary-action" rel="nofollow"><?php _e( 'Delete', 'buddypress' ); ?></a>
+
+		<?php endif; ?>
+
+	</div>
+
+	<?php bp_activity_recurse_comments( bp_activity_current_comment() ); ?>
+</li>
+
+<?php do_action( 'bp_after_activity_comment' ); ?>

activity/entry.php

-<?php /* This template is used by activity-loop.php and AJAX functions to show each activity */ ?>
+<?php
 
-<?php do_action( 'bp_before_activity_entry' ) ?>
+/**
+ * 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
+ */
 
-<li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">
+?>
+
+<?php do_action( 'bp_before_activity_entry' ); ?>
+
+<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(); ?>
+
 		</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 if ( 'activity_comment' == bp_get_activity_type() ) : ?>
+
+			<div class="activity-inreplyto">
+				<strong><?php _e( 'In reply to: ', 'buddypress' ); ?></strong><?php bp_activity_parent_content(); ?> <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_activity_entry_content' ) ?>
+		<?php if ( bp_activity_has_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>
+			<div class="activity-inner">
+
+				<?php bp_activity_content_body(); ?>
+
+			</div>
+
+		<?php endif; ?>
+
+		<?php do_action( 'bp_activity_entry_content' ); ?>
+
+		<?php if ( is_user_logged_in() ) : ?>
+
+			<div class="activity-meta">
+
+				<?php if ( bp_activity_can_comment() ) : ?>
+
+					<a href="<?php bp_get_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment <span>%s</span>', 'buddypress' ), bp_activity_get_comment_count() ); ?></a>
+
+				<?php endif; ?>
+
+				<?php if ( bp_activity_can_favorite() ) : ?>
+
+					<?php if ( !bp_get_activity_is_favorite() ) : ?>
+
+						<a href="<?php bp_activity_favorite_link(); ?>" class="button fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'buddypress' ); ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a>
+
+					<?php else : ?>
+
+						<a href="<?php bp_activity_unfavorite_link(); ?>" class="button unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'buddypress' ); ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a>
+
+					<?php endif; ?>
+
+				<?php endif; ?>
+
+				<?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>
+
+				<?php do_action( 'bp_activity_entry_meta' ); ?>
+
+			</div>
+
+		<?php endif; ?>
+
+	</div>
+
+	<?php do_action( 'bp_before_activity_entry_comments' ); ?>
+
+	<?php if ( ( is_user_logged_in() && bp_activity_can_comment() ) || bp_activity_get_comment_count() ) : ?>
+
+		<div class="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>
+					<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>
+						</div>
+						<input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ); ?>" /> &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' ); ?>
+
+				</form>
+
 			<?php endif; ?>
 
-			<?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;?>
+		</div>
 
-			<?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>
-		</div>
 	<?php endif; ?>
 
-	<?php do_action( 'bp_before_activity_entry_comments' ) ?>
+	<?php do_action( 'bp_after_activity_entry_comments' ); ?>
 
-	<?php if ( bp_activity_can_comment() ) : ?>
-		<div class="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>
-				<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>
-					</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() ?>" />
-				</div>
-				<?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' ) ?>
 </li>
 
-<?php do_action( 'bp_after_activity_entry' ) ?>
-
+<?php do_action( 'bp_after_activity_entry' ); ?>

activity/index.php

-<?php get_header() ?>
+<?php
+
+/**
+ * Template Name: BuddyPress - Activity Directory
+ *
+ * @package BuddyPress
+ * @subpackage Theme
+ */
+
+?>
+
+<?php get_header( 'buddypress' ); ?>
+
+	<?php do_action( 'bp_before_directory_activity_page' ); ?>
 
 	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
+			<?php do_action( 'bp_before_directory_activity' ); ?>
+
 			<?php if ( !is_user_logged_in() ) : ?>
-				<h3><?php _e( 'Site Activity', 'buddypress' ) ?></h3>
+
+				<h3><?php _e( 'Site Activity', 'buddypress' ); ?></h3>
+
 			<?php endif; ?>
 
-			<?php do_action( 'bp_before_directory_activity_content' ) ?>
+			<?php do_action( 'bp_before_directory_activity_content' ); ?>
 
 			<?php if ( is_user_logged_in() ) : ?>
-				<?php locate_template( array( 'activity/post-form.php'), true ) ?>
+
+				<?php locate_template( array( 'activity/post-form.php'), true ); ?>
+
 			<?php endif; ?>
 
-			<?php do_action( 'template_notices' ) ?>
+			<?php do_action( 'template_notices' ); ?>
 
-			<div class="item-list-tabs activity-type-tabs">
+			<div class="item-list-tabs activity-type-tabs" role="navigation">
 				<ul>
-					<?php do_action( 'bp_before_activity_type_tab_all' ) ?>
+					<?php do_action( 'bp_before_activity_type_tab_all' ); ?>
 
-					<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>
+					<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>
 
 					<?php if ( is_user_logged_in() ) : ?>
 
 						<?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
 
-						<?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?>
+						<?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_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>
+
+								<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>
+
 							<?php endif; ?>
+
 						<?php endif; ?>
 
 						<?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
 
-						<?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
+						<?php if ( bp_is_active( 'groups' ) ) : ?>
+
 							<?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>
+
+								<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>
+
 							<?php endif; ?>
+
 						<?php endif; ?>
 
-						<?php do_action( 'bp_before_activity_type_tab_favorites' ) ?>
+						<?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_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>
+
+							<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' ) ?>
+						<?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>
+						<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>
 
 					<?php endif; ?>
 
-					<?php do_action( 'bp_activity_type_tabs' ) ?>
+					<?php do_action( 'bp_activity_type_tabs' ); ?>
 				</ul>
 			</div><!-- .item-list-tabs -->
 
-			<div class="item-list-tabs no-ajax" id="subnav">
+			<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>
+					<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' ) ?>
+					<?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>
+						<label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label> 
+						<select id="activity-filter-by">
+							<option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
+							<option value="activity_update"><?php _e( '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>
+
+								<option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
+								<option value="new_blog_comment"><?php _e( '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>
+
+								<option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
+								<option value="new_forum_post"><?php _e( '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>
+
+								<option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
+								<option value="joined_group"><?php _e( '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>
+
+								<option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
+
 							<?php endif; ?>
 
-							<option value="new_member"><?php _e( 'Show New Members', 'buddypress' ) ?></option>
+							<option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
 
-							<?php do_action( 'bp_activity_filter_options' ) ?>
+							<?php do_action( 'bp_activity_filter_options' ); ?>
+
 						</select>
 					</li>
 				</ul>
 			</div><!-- .item-list-tabs -->
 
-			<div class="activity">
-				<?php locate_template( array( 'activity/activity-loop.php' ), true ) ?>
+			<?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_after_directory_activity_content' ) ?>
+			<?php do_action( 'bp_after_directory_activity_list' ); ?>
 
-<?php get_template_part( 'bp-wrapper-footer' ); ?>
-<?php get_footer() ?>
+			<?php do_action( 'bp_directory_activity_content' ); ?>
+
+			<?php do_action( 'bp_after_directory_activity_content' ); ?>
+
+			<?php do_action( 'bp_after_directory_activity' ); ?>
+
+	<?php get_template_part( 'bp-wrapper-footer-top' ); ?>
+	
+	<?php do_action( 'bp_after_directory_activity_page' ); ?>
+
+	<?php get_template_part( 'bp-wrapper-footer-bottom' ); ?>

activity/post-form.php

-<form action="<?php bp_activity_post_form_action() ?>" method="post" id="whats-new-form" name="whats-new-form">
+<?php
 
-	<?php do_action( 'bp_before_activity_post_form' ) ?>
+/**
+ * BuddyPress - Activity Post Form
+ *
+ * @package BuddyPress
+ * @subpackage bp-default
+ */
 
-	<?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>
-		</div>
-	<?php endif; ?>
+?>
+
+<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' ); ?>
 
 	<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_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height() ); ?>
 		</a>
 	</div>
 
-	<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>
+	<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>
 
 	<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 ( function_exists('bp_has_groups') && !bp_is_my_profile() && !bp_is_group() ) : ?>
+			<?php if ( bp_is_active( '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 -->

blogs/blogs-loop.php

-<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?>
+<?php
 
-<?php do_action( 'bp_before_blogs_loop' ) ?>
+/**
+ * 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 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">
+	<ul id="blogs-list" class="item-list" role="main">
+
 	<?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 sites found.', 'buddypress' ); ?></p>
 	</div>
 
 <?php endif; ?>
 
-<?php do_action( 'bp_after_blogs_loop' ) ?>
+<?php do_action( 'bp_after_blogs_loop' ); ?>
-<?php get_header() ?>
+<?php
 
-	<?php do_action( 'bp_before_directory_blogs_content' ) ?>
+/**
+ * BuddyPress - Create Blog
+ *
+ * @package BuddyPress
+ * @subpackage bp-default
+ */
 
+?>
+
+<?php get_header( 'buddypress' ); ?>
+
+	<?php do_action( 'bp_before_directory_blogs_content' ); ?>
+
+	<!--div id="content"-->
+		<!--div class="padder" role="main"-->
+		
 	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
-		<?php do_action( 'template_notices' ) ?>
+		<?php do_action( 'template_notices' ); ?>
 
-		<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>
+			<h3><?php _e( 'Create a Site', 'buddypress' ); ?> &nbsp;<a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_blogs_root_slug() ) ?>"><?php _e( 'Site Directory', 'buddypress' ); ?></a></h3>
 
-		<?php do_action( 'bp_before_create_blog_content' ) ?>
+		<?php do_action( 'bp_before_create_blog_content' ); ?>
 
 		<?php if ( bp_blog_signup_enabled() ) : ?>
 
-			<?php bp_show_blog_signup_form() ?>
+			<?php bp_show_blog_signup_form(); ?>
 
 		<?php else: ?>
 
 			<div id="message" class="info">
-				<p><?php _e( 'Blog registration is currently disabled', 'buddypress' ); ?></p>
+				<p><?php _e( 'Site registration is currently disabled', 'buddypress' ); ?></p>
 			</div>
 
 		<?php endif; ?>
 
-		<?php do_action( 'bp_after_create_blog_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_template_part( 'bp-wrapper-footer-top' ); ?>
 
-<?php get_footer() ?>
+	<?php do_action( 'bp_after_directory_blogs_content' ); ?>
 
+	<?php get_template_part( 'bp-wrapper-footer-top' ); ?>
-<?php get_header() ?>
+<?php
+
+/**
+ * BuddyPress - Blogs Directory
+ *
+ * @package BuddyPress
+ * @subpackage bp-default
+ */
+
+?>
+
+<?php get_header( 'buddypress' ); ?>
+
+	<?php do_action( 'bp_before_directory_blogs_page' ); ?>
 
 	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
+		<?php do_action( 'bp_before_directory_blogs' ); ?>
+
 		<form action="" method="post" id="blogs-directory-form" class="dir-form">
 
-			<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>
+			<h3><?php _e( 'Site Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() && bp_blog_signup_enabled() ) : ?> &nbsp;<a class="button" href="<?php echo bp_get_root_domain() . '/' . bp_get_blogs_slug() . '/create/' ?>"><?php _e( 'Create a Site', 'buddypress' ); ?></a><?php endif; ?></h3>
 
-			<?php do_action( 'bp_before_directory_blogs_content' ) ?>
+			<?php do_action( 'bp_before_directory_blogs_content' ); ?>
 
-			<div id="blog-dir-search" class="dir-search">
-				<?php bp_directory_blogs_search_form() ?>
+			<div id="blog-dir-search" class="dir-search" role="search">
+
+				<?php bp_directory_blogs_search_form(); ?>
+
 			</div><!-- #blog-dir-search -->
 
-			<div class="item-list-tabs">
+			<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>
+					<li class="selected" id="blogs-all"><a href="<?php bp_root_domain(); ?>"><?php printf( __( 'All Sites <span>%s</span>', 'buddypress' ), bp_get_total_blog_count() ); ?></a></li>
 
 					<?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>
+
+						<li id="blogs-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_blogs_slug() . '/my-blogs/' ?>"><?php printf( __( 'My Sites <span>%s</span>', 'buddypress' ), bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
+
 					<?php endif; ?>
 
-					<?php do_action( 'bp_blogs_directory_blog_types' ) ?>
+					<?php do_action( 'bp_blogs_directory_blog_types' ); ?>
+
+				</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>
+						<label for="blogs-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
+						<select id="blogs-order-by">
+							<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' ) ?>
+							<?php do_action( 'bp_blogs_directory_order_options' ); ?>
+
 						</select>
 					</li>
 				</ul>
-			</div><!-- .item-list-tabs -->
+			</div>
 
 			<div id="blogs-dir-list" class="blogs dir-list">
-				<?php locate_template( array( 'blogs/blogs-loop.php' ), true ) ?>
+
+				<?php locate_template( array( 'blogs/blogs-loop.php' ), true ); ?>
+
 			</div><!-- #blogs-dir-list -->
 
-			<?php do_action( 'bp_after_directory_blogs_content' ) ?>
+			<?php do_action( 'bp_directory_blogs_content' ); ?>
 
-			<?php wp_nonce_field( 'directory_blogs', '_wpnonce-blogs-filter' ) ?>
+			<?php wp_nonce_field( 'directory_blogs', '_wpnonce-blogs-filter' ); ?>
+			
+			<?php do_action( 'bp_after_directory_blogs_content' ); ?>
 
 		</form><!-- #blogs-directory-form -->
 
-<?php get_template_part( 'bp-wrapper-footer' ); ?>
-<?php get_footer() ?>
+		<?php do_action( 'bp_after_directory_blogs' ); ?>
+
+	<?php get_template_part( 'bp-wrapper-footer-top' ); ?>
+	
+	<?php do_action( 'bp_after_directory_blogs_page' ); ?>
+
+	<?php get_template_part( 'bp-wrapper-footer-bottom' ); ?>

bp-wrapper-footer.php

-<?php
-/**
-* Simple wrapper template for the bottom of BuddyPress pages.
-*
-* @package 		Elbee-Elgee
-* @copyright	Copyright (c) 2011, Doug Stewart
-* @license		http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License, v2 (or newer)
-*
-* @since 		Elbee-Elgee 1.0
-*/
-?>
-			</div><!-- .padder -->
-		</div><!-- #lb-content -->
-	</div><!-- #wrapper -->
-	
-	<?php //get_sidebar( 'buddypress' ) ?>
-	<?php locate_template( array( 'sidebar.php' ), true ) ?>
-	
-</div><!-- #allwrapper -->

forums/forums-loop.php

-<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?>
+<?php
 
-<?php do_action( 'bp_before_forums_loop' ) ?>
+/**
+ * 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 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 zebra">
+	<table class="forum">
 		<thead>
 			<tr>
-				<th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th>
-				<th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th>
+				<th id="th-title"><?php _e( 'Topic', 'buddypress' ); ?></th>
+				<th id="th-postcount"><?php _e( 'Posts', 'buddypress' ); ?></th>
+				<th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ); ?></th>
 
-				<?php if ( !bp_is_group_forum() ) : ?>
-					<th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th>
-				<?php endif; ?>
-
-				<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>
+
+					<p class="topic-meta">
+						<span class="topic-by"><?php /* translators: "started by [poster] in [forum]" */ printf( __( 'Started by %1$s', 'buddypress' ), bp_get_the_topic_poster_avatar( 'height=20&width=20') . bp_get_the_topic_poster_name() ); ?></span>
+
+						<?php if ( !bp_is_group_forum() ) : ?>
+
+							<span class="topic-in">
+
+								<?php
+									$topic_in = '<a href="' . bp_get_the_topic_object_permalink() . '">' . bp_get_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) . '</a>' .
+													'<a href="' . bp_get_the_topic_object_permalink() . '" title="' . bp_get_the_topic_object_name() . '">' . bp_get_the_topic_object_name() .'</a>';
+
+									/* translators: "started by [poster] in [forum]" */
+									printf( __( 'in %1$s', 'buddypress' ), $topic_in );
+								?>
+
+							</span>
+
+						<?php endif; ?>
+
+					</p>
 				</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 class="td-postcount">
+					<?php bp_the_topic_total_posts(); ?>
+				</td>
+				<td class="td-freshness">
+					<span class="time-since"><?php bp_the_topic_time_since_last_post(); ?></span>
+					<p class="topic-meta">
+						<span class="freshness-author">
+							<a href="<?php bp_the_topic_permalink(); ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ); ?></a>
+							<?php bp_the_topic_last_poster_name(); ?>
+						</span>
+					</p>
 				</td>
 
-				<?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>
-					</td>
-				<?php endif; ?>
+				<?php do_action( 'bp_directory_forums_extra_cell' ); ?>
 
-				<td class="td-postcount">
-					<?php bp_the_topic_total_posts() ?>
-				</td>
-				<td class="td-freshness">
-					<?php bp_the_topic_time_since_last_post() ?>
-				</td>
-
-				<?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' ); ?>
-<?php get_header() ?>
+<?php
+
+/**
+ * BuddyPress - Forums Directory
+ *
+ * @package BuddyPress
+ * @subpackage bp-default
+ */
+
+?>
+
+<?php get_header( 'buddypress' ); ?>
+
+	<?php do_action( 'bp_before_directory_forums_page' ); ?>
 
 	<?php get_template_part( 'bp-wrapper-header' ); ?>
 
-		<form action="" method="post" id="forums-search-form" class="dir-form">
+			<?php do_action( 'bp_before_directory_forums' ); ?>
 
-			<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>
+			<form action="" method="post" id="forums-search-form" class="dir-form">
 
-			<?php do_action( 'bp_before_directory_forums_content' ) ?>
+				<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>
 
-			<div id="forums-dir-search" class="dir-search">
-				<?php bp_directory_forums_search_form() ?>
-			</div>
-		</form>
+				<?php do_action( 'bp_before_directory_forums_content' ); ?>
 
-		<div id="new-topic-post">
-			<?php if ( is_user_logged_in() ) : ?>
+				<div id="forums-dir-search" class="dir-search" role="search">
 
-				<?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
+					<?php bp_directory_forums_search_form(); ?>
 
-					<form action="" method="post" id="forum-topic-form" class="standard-form">
+				</div>
+			</form>
 
-						<?php do_action( 'groups_forum_new_topic_before' ) ?>
+			<?php do_action( 'bp_before_topics' ); ?>
 
-						<a name="post-new"></a>
-						<h5><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h5>
+			<form action="" method="post" id="forums-directory-form" class="dir-form">
 
-						<label><?php _e( 'Title:', 'buddypress' ) ?></label>
-						<input type="text" name="topic_title" id="topic_title" value="" />
+				<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 <span>%s</span>', 'buddypress' ), bp_get_forum_topic_count() ); ?></a></li>
 
-						<label><?php _e( 'Content:', 'buddypress' ) ?></label>
-						<textarea name="topic_text" id="topic_text"></textarea>
+						<?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>
 
-						<label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label>
-						<input type="text" name="topic_tags" id="topic_tags" value="" />
+							<li id="forums-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_forums_slug() . '/topics' ); ?>"><?php printf( __( 'My Topics <span>%s</span>', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
 
-						<label><?php _e( 'Post In Group Forum:', 'buddypress' ) ?></label>
-						<select id="topic_group_id" name="topic_group_id">
+						<?php endif; ?>
 
-							<option value="">----</option>
+						<?php do_action( 'bp_forums_directory_group_types' ); ?>
 
-							<?php while ( bp_groups() ) : bp_the_group(); ?>
+					</ul>
+				</div>
 
-								<?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) : ?>
+				<div class="item-list-tabs" id="subnav" role="navigation">
+					<ul>
 
-									<option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option>
+						<?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
 
-								<?php endif; ?>
+						<li id="forums-order-select" class="last filter">
 
-							<?php endwhile; ?>
+							<label for="forums-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
+							<select id="forums-order-by">
+								<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>
 
-						</select><!-- #topic_group_id -->
+								<?php do_action( 'bp_forums_directory_order_options' ); ?>
 
-						<?php do_action( 'groups_forum_new_topic_after' ) ?>
+							</select>
+						</li>
+					</ul>
+				</div>
 
-						<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 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' ); ?>
+
+				<?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?>
+
+			</form>
+
+			<?php do_action( 'bp_after_directory_forums' ); ?>
+
+			<?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=""><?php /* translators: no option picked in select box */ _e( '----', 'buddypress' ); ?></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 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>
+					<?php endif; ?>
 
 				<?php endif; ?>
+			</div><!-- #new-topic-post -->
 
-			<?php endif; ?>
-		</div><!-- #new-topic-post -->
+			<?php do_action( 'bp_after_new_topic_form' ); ?>
 
-		<form action="" method="post" id="forums-directory-form" class="dir-form">
+			<?php do_action( 'bp_after_directory_forums_content' ); ?>
 
-			<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>
+	<?php get_template_part( 'bp-wrapper-footer-top' ); ?>
+	
+	<?php do_action( 'bp_after_directory_forums_page' ); ?>
 
-					<?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_group_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 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 wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ) ?>
-
-			<?php do_action( 'bp_after_directory_forums_content' ) ?>
-
-		</form>
-
-<?php get_template_part( 'bp-wrapper-footer' ); ?>
-<?php get_footer() ?>
+	<?php get_template_part( 'bp-wrapper-footer-bottom' ); ?>

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_forums_has_directory() ) : ?>
+
+					<li>
+						<a href="<?php bp_forums_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' ); ?>

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', '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' );
+?>

forums/single/forum.php

+<?php get_header( 'buddypress' ); ?>
+
+	<?php get_template_part( 'bp-wrapper-header' ); ?>
+
+			<?php do_action( 'bp_before_directory_forums_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_forums_has_directory() ) : ?>
+
+								<li>
+									<a href="<?php bp_forums_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">
+
+								<label for="forums-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
+								<select id="forums-order-by">
+									<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 -->
+	<?php get_template_part( 'bp-wrapper-footer-top' ); ?>
+
+	<?php do_action( 'bp_after_directory_forums_content' ); ?>
+
+	<?php get_template_part( 'bp-wrapper-footer-bottom' ); ?>

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_forums_has_directory() ) : ?>
+
+									<li>
+										<a href="<?php bp_forums_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-top" class="pag-count">
+
+								<?php bp_the_topic_pagination_count() ?>
+
+							</div>
+
+							<div class="pagination-links" id="topic-pag-top">
+
+								<?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-bottom" class="pag-count">
+
+								<?php bp_the_topic_pagination_count() ?>
+
+							</div>
+
+							<div class="pagination-links" id="topic-pag-bottom">
+
+								<?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>
+
+<?php do_action( 'bp_after_group_forum_topic' ) ?>
+
+<?php get_sidebar( 'buddypress' ); ?>
+<?php get_footer( 'buddypress' ); ?>

groups/create.php

-<?php get_header() ?>
+<?php
+
+/**
+ * BuddyPress - Create Group
+ *
+ * @package BuddyPress
+ * @subpackage bp-default
+ */
+
+?>
+
+<?php get_header( 'buddypress' ); ?>
 
 	<?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>
+		<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( 'bp_before_create_group' ) ?>
+			<?php do_action( 'bp_before_create_group' ); ?>
 
-			<div class="item-list-tabs no-ajax" id="group-create-tabs">
+			<div class="item-list-tabs no-ajax" id="group-create-tabs" role="navigation">
 				<ul>
+
 					<?php bp_group_creation_tabs(); ?>
+
 				</ul>
 			</div>
 
-			<?php do_action( 'template_notices' ) ?>
+			<?php do_action( 'template_notices' ); ?>
 
 			<div class="item-body" id="group-create-body">
 
 
 					<?php do_action( 'bp_before_group_details_creation_step' ); ?>
 
-					<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() ?>" />
+					<label for="group-name"><?php _e( 'Group Name (required)', 'buddypress' ); ?></label>
+					<input type="text" name="group-name" id="group-name" aria-required="true" value="<?php bp_new_group_name(); ?>" />
 
-					<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>
+					<label for="group-desc"><?php _e( 'Group Description (required)', 'buddypress' ) ?></label>
+					<textarea name="group-desc" id="group-desc" aria-required="true"><?php bp_new_group_description(); ?></textarea>
 
-					<?php do_action( 'bp_after_group_details_creation_step' ); /* Deprecated -> */ do_action( 'groups_custom_group_fields_editable' ); ?>
+					<?php
+					do_action( 'bp_after_group_details_creation_step' );
+					do_action( 'groups_custom_group_fields_editable' ); // @Deprecated
 
-					<?php wp_nonce_field( 'groups_create_save_group-details' ) ?>
+					wp_nonce_field( 'groups_create_save_group-details' ); ?>
 
 				<?php endif; ?>
 
 
 					<?php do_action( 'bp_before_group_settings_creation_step' ); ?>
 
-					<?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; ?>
+					<?php if ( bp_is_active( 'forums' ) ) : ?>
+						<?php if ( bp_forums_is_installed_correctly() ) : ?>
 
-					<?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>
+								<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>
+									<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; ?>
 
 					<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>
+							<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>
+								<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>
+							<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>
+								<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>
+							<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>
+								<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>
 
+					<hr />
+
+					<h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
+
+					<p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ) ?></p>
+
+					<div class="radio">
+						<label>
+							<input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ) ?> />
+							<strong><?php _e( 'All group members', 'buddypress' ) ?></strong>
+						</label>
+
+						<label>
+							<input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ) ?> />
+							<strong><?php _e( 'Group admins and mods only', 'buddypress' ) ?></strong>
+						</label>
+
+						<label>
+							<input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ) ?> />
+							<strong><?php _e( 'Group admins only', 'buddypress' ) ?></strong>
+						</label>
+					</div>
+
+					<hr />
+
 					<?php do_action( 'bp_after_group_settings_creation_step' ); ?>
 
-					<?php wp_nonce_field( 'groups_create_save_group-settings' ) ?>
+					<?php wp_nonce_field( 'groups_create_save_group-settings' ); ?>
 
 				<?php endif; ?>
 
 
 					<?php do_action( 'bp_before_group_avatar_creation_step' ); ?>
 
-					<?php if ( !bp_get_avatar_admin_step() ) : ?>
+					<?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
 
 						<div class="left-menu">
-							<?php bp_new_group_avatar() ?>
+
+							<?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><?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="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>
+							<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>
+						<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' ) ?>" />
+						<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' ) ?>" />
+							<img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ); ?>" />
 						</div>
 
-						<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
+						<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ); ?>" />
 
-						<input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
+						<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" />
 
 					<?php do_action( 'bp_after_group_avatar_creation_step' ); ?>
 
-					<?php wp_nonce_field( 'groups_create_save_group-avatar' ) ?>
+					<?php wp_nonce_field( 'groups_create_save_group-avatar' ); ?>
 
 				<?php endif; ?>
 
 
 					<?php do_action( 'bp_before_group_invites_creation_step' ); ?>
 
-					<?php if ( function_exists( 'bp_get_total_friend_count' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
+					<?php if ( bp_is_active( 'friends' ) && bp_get_total_fr