Doug Stewart avatar Doug Stewart committed 3bd07f4

Adding bp-navigation.php to abstract BuddyPress-related nav features.

Comments (0)

Files changed (7)

 					<p>Looks like you managed to stumble across a link to a page that doesn't exist, but never fear, good citizen, for a wealth of options awaits you!</p>
 					<p>Perhaps you could search for what you were looking for:</p>
 
-					<?php if (smart404_loop()) : ?>
+					<?php 
+					echo get_search_form();
+					if(function_exists('smart404_loop')) :
+						if (smart404_loop()) : ?>
 					<p>Or, you could always try one of these posts:</p>
 					<?php while (have_posts()) : the_post(); ?>
 					<h4><a href="<?php the_permalink() ?>"
 					  <?php the_title(); ?></a></h4>
 					    <p><?php the_excerpt(); ?></p>
 					    <?php endwhile; ?>
-					<?php endif; ?>
+					<?php endif; //End smart404 loop 
+					endif; //End smart404 check
+					?>
+					
 				</div>
 			</div>
 		</div>

bp-navigation.php

+<ul id="lb-bp-nav">
+
+<?php
+//echo bp_get_loggedin_user_nav();
+//echo bp_get_userbar();
+//echo bp_get_optionsbar();
+
+	if ( 'activity' != bp_dtheme_page_on_front() && bp_is_active( 'activity' ) ) : ?>
+		<li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
+			<a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
+		</li>
+	<?php endif; ?>
+
+	<li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>
+		<a href="<?php echo site_url() ?>/<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a>
+	</li>
+
+	<?php if ( bp_is_active( 'groups' ) ) : ?>
+		<li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>
+			<a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a>
+		</li>
+
+		<?php if ( bp_is_active( 'forums' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>
+			<li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
+				<a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a>
+			</li>
+		<?php endif; ?>
+	<?php endif; ?>
+
+	<?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>
+		<li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
+			<a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a>
+		</li>
+	<?php endif; ?>
+
+	<?php wp_list_pages( 'title_li=&depth=1&exclude=' . bp_dtheme_page_on_front() ); ?>
+
+	<?php do_action( 'bp_nav_items' ); ?>
+/**/
+?>
+</ul><!-- #lb-bp-nav -->
+
+<div id="lb-bp-search-bar">
+	<div class="bp-padder">
+
+	<?php if ( bp_search_form_enabled() ) : ?>
+
+		<form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
+			<input type="text" id="search-terms" name="search-terms" value="" />
+			<?php echo bp_search_form_type_select() ?>
+
+			<input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
+			<?php wp_nonce_field( 'bp_search_form' ) ?>
+		</form><!-- #search-form -->
+
+	<?php endif; ?>
+
+	<?php do_action( 'bp_search_login_bar' ) ?>
+
+	</div><!-- .bp-padder -->
+</div><!-- #lb-bp-search-bar -->
 
 function lblg_credits(){
 	global $shortname, $options;
-	if($options[$shortname.'_footer_credit_text'] != ''){
-		$credits_text = $options[$shortname.'_footer_credit_text'];
+	$tmp_credits = get_option($shortname . '_footer_credit_text');
+	if($tmp_credits != ''){
+		$credits_text = $tmp_credits;
 	}else{
-		$credits_text = '<p>Powered by <a href="http://wordpress.org\>WordPress</a> ' . bloginfo('version');
-		if($options[$shortname.'_display_footer_credit_text'] == true){
-			$credits_text .= 'and <a href="http://literalbarrage.org/blog/code/elbee-elgee">Elbee Elgee</a></p>';
-		}else{
-			$credits_text .= '</p>';
-		}
+		$credits_text = '<p>Powered by <a href="http://wordpress.org\">WordPress</a> ' . get_bloginfo('version');
+		$credits_text .= ' and <a href="http://literalbarrage.org/blog/code/elbee-elgee">Elbee Elgee</a></p>';
 	}
 	echo $credits_text;
 }
 <div id="header">
 	<div id="blogtitle">
 		<?php lblg_print_title(); ?>
-		<p class="description"><span><?php bloginfo('description'); ?></span></p>
+		<p class="description"><span><?php bloginfo( 'description' ); ?></span></p>
 	</div>
+	<?php 
+	// If BuddyPress is active, let's display the BP menu
+	if(function_exists('bp_is_page')){
+		get_template_part( 'bp-navigation' );
+	}?>
 </div>
 <?php lblg_print_menu(); ?>

includes/parent-options.php

 				"blog_meta_info" => array(	"name" => "Blog Meta Info",
 						"type" => "subhead"),
 
-				"display_footer_credit_text" => array(	"name" => "Credit Links",
-						"desc" => "Check this box to display theme credit links in the footer.", 
-						"std" => "false",
-						"type" => "checkbox"),
-
-				"footer_credit_text" => array(	"name" => "Footer Credits",
-						"desc" => "Footer credit text defaults to: <b><p></p></b> Change it to fit your site. (I'd appreciate the link love, though, if you'd leave it in...)  HTML should work just fine, raw PHP not so much. ",
-						"std" => "",
-						"type" => "textarea",
-						"options" => array("rows" => "5",
-										   "cols" => "40") ),
-
 				"display_footer_copyright" => array(	"name" => "Display Copyright",
 						"desc" => "Check this box to display your copyright information in the footer.", 
 						"std" => "true",
 						"type" => "checkbox"),	
 
 				"footer_copyright" => array(	"name" => "Copyright Statement",
-						"desc" => "The following text will be displayed by default: <b><p>" . lblg_copyright() . "</p></b>",
+						"desc" => "The following text will be displayed by default: <b><p>" . get_bloginfo('name') . " " . lblg_copyright() . "</p></b>",
+						"std" => "",
+						"type" => "textarea",
+						"options" => array("rows" => "5",
+										   "cols" => "40") ),
+
+				"footer_credit_text" => array(	"name" => "Footer Credits",
+						"desc" => "Footer credit text defaults to: <b><p>Powered by <a href=\"http://wordpress.org\">WordPress</a> " . get_bloginfo('version') . " and <a href=\"http://literalbarrage.org/blog/code/elbee-elgee\">Elbee Elgee</a></p></b> Change it to fit your site. (I'd appreciate the link love, though, if you'd leave it in...)  HTML should work just fine, raw PHP not so much. ",
 						"std" => "",
 						"type" => "textarea",
 						"options" => array("rows" => "5",
 	<div id="lb-content">
 		<?php get_template_part( 'theloop' ); ?>
 		<?php comments_template(); ?>
-	</div>
-
+	</div> <!-- #lb-content -->
+</div> <!-- #wrapper -->
 <?php get_sidebar(); ?>
 
-</div>
+</div><!-- #allwrapper -->
 
 <?php get_footer(); ?>
 	<div id="lb-content">
 		<?php get_template_part( 'theloop' ); ?>
 		<?php comments_template(); ?>
-	</div>
-</div>
+	</div><!-- #lb-content -->
+</div><!-- #wrapper -->
 
 <?php get_sidebar(); ?>
 
-</div>
+</div><!-- #allwrapper -->
 
 <?php get_footer(); ?>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.