Commits

Doug Stewart committed 8fac1a2

bbPress options finally all-in.

Comments (0)

Files changed (8)

 #### bbPress version 2.0 (aka "The Plugin") Support ####
 *Based on the bbp_twentyten parent theme provided as a part of the default bbPress plugin install*
 
-Elbee Elgee has preliminary support for the "plugin-ized" version 2.0 of [bbPress](http://bbpress.org) (the WordPress-based forum solution). Templating functionality should not change between bbPress 2.0 beta 3 (the most recent version of bbP as of this writing) and the final release of bbPress version 2.0, so forums should continue to work during that transition period.
-
-**Note:** BuddyPress and the plugin version of bbPress do not currently play well together. The combination of the two is not tested under this theme and is in no way recommended, nor will I support it until BuddyPress and bbPress come to an understanding regarding mutual support. *I.e., if you're thinking of running BuddyPress 1.2.x and bbPress 2.0, DON'T.*
+Elbee Elgee features support for the "plugin-ized" version 2.0 of [bbPress](http://bbpress.org) (the WordPress-based forum solution). If an active bbPress installation is detected, Elbee Elgee will populate the theme admin page with bbPress-appropriate options.
 
 #### Multiple Layouts ####
 The HTML markup, combined with different CSS layout files, offers Elbee Elgee around 30 possible layout configurations right out of the gate. You can choose between 1, 2 and 3 column layouts, each of which offers static width, percentage-based and fluid width variants.
 		* Support for BuddyPress 1.5
 		* Support for final bbPress 2.0
 		* Tabbed admin support
+		* CSS-only drop-down menu support for primary menu area
+		* Partial PHPDoc documentation for included theme files
 * Version 1.2.2
 	* **Issues Fixed**
 		* Proper support for BuddyPress 1.2.9 permalinks

bbp-wrapper-header.php

 *
 * @since 		Elbee-Elgee 1.0
 */
+
+global $lblg_options;
 ?>
 <div id="allwrapper">
 	<div id="wrapper">
-		<div id="lb-content" role="main">
+		<?php 
+		if( 1 == $lblg_options['bbp_force_1_column'] ) $column_class = 'class="bp-full-width" ';
+		echo "<div id=\"lb-content\" $column_class role=\"main\">";

bbpress/css/bbpress.css

 
 #lb-content table tbody tr.even td {
 	background-color: #fff;
+	padding-left: 15px;
 }
 #lb-content table tbody tr.odd td {
 	background-color: #f3f3f3;
+	padding-left: 15px
 }
 
 #lb-content table tbody tr.status-trash.even td,
 table.bbp-topic th, table.bbp-replies th {
 	background-color: #ccc;
 	font-weight: bold;
+	padding-left: 20px;
 }
 table.bbp-forums th span, table.bbp-topics th span,
 table.bbp-topic th span, table.bbp-replies th span {
 ?>
 <div id="footer">
 	<div id="footerwrapper">
-	<div id="footerleft">
-		<ul>
-		<?php if ( !dynamic_sidebar('Bottom Left') ) : ?>
-		<?php if( current_user_can('edit_theme_options') ){ ?>
-			<li><h4>Bottom-Left Sidebar</h4>
-				This is the bottom-left sidebar. You may add widgets to it via the Appearance -&gt; Widgets administration screen.
-			</li>
-		<?php } ?>
-		<?php endif; ?>
-		</ul>
-	</div>
-	<div id="footerright">
-		<ul>
-		<?php if ( !dynamic_sidebar('Bottom Right') ) : ?>
-		<?php if( current_user_can('edit_theme_options') ){ ?>
-			<li><h4>Bottom-Right Sidebar</h4>
-				This is the bottom-right sidebar. You may add widgets to it via the Appearance -&gt; Widgets administration screen.
-			</li>
-		<?php } ?>
-		<?php endif; ?>
-		</ul>
-	</div>
+	<?php if( 1 != $lblg_options['bbp_disable_footer'] ) : ?>
+		<div id="footerleft">
+			<ul>
+			<?php if ( !dynamic_sidebar('Bottom Left') ) : ?>
+			<?php if( current_user_can('edit_theme_options') ){ ?>
+				<li><h4>Bottom-Left Sidebar</h4>
+					This is the bottom-left sidebar. You may add widgets to it via the Appearance -&gt; Widgets administration screen.
+				</li>
+			<?php } ?>
+			<?php endif; ?>
+			</ul>
+		</div>
+		<div id="footerright">
+			<ul>
+			<?php if ( !dynamic_sidebar('Bottom Right') ) : ?>
+			<?php if( current_user_can('edit_theme_options') ){ ?>
+				<li><h4>Bottom-Right Sidebar</h4>
+					This is the bottom-right sidebar. You may add widgets to it via the Appearance -&gt; Widgets administration screen.
+				</li>
+			<?php } ?>
+			<?php endif; ?>
+			</ul>
+		</div>
+	<?php endif; ?>
 	<div id="footercredits">
 	<?php 
 		if( $lblg_options['display_footer_copyright'] ) {

includes/functions/options.php

  */
 function lblg_options_init(){
 	global $lblg_shortname, $lblg_themename, $lblg_version, $lblg_options, $lblg_default_options, $lblg_defaults;
-	/* 
-	*  If Elbee Elgee (or a child theme) has already been installed,
-	*  this should return an array() with keys 'shortname', 'themename',
-	*  and 'version'.
-	*/
 	
+	// Grab theme metadata from parent/child style.css files.
 	$parent_bootstrap = get_theme_data( trailingslashit( TEMPLATEPATH ) . 'style.css' );
 	$child_bootstrap = get_theme_data( trailingslashit( STYLESHEETPATH ) . 'style.css' );
 	
 	$tabbed = ( !empty( $input['tab']) ? true : false );
 		
 	if( $reset ){
-		$valid_input = lblg_get_options_from_defaults( $lblg_default_options );
+		$valid_input = $lblg_defaults;
 	} elseif ( $submit ){
 		// Check to see whether our options have actually been initialized
 		// and exist in the database (they should!)
 		}
 
 		if( !isset( $lblg_default_options['tabs'] ) ){
+			// Admin is one screen, no tabs, so all the options are displayed at once.
 			foreach( $valid_input as $key => $value ){
 				$tmp_type = $lblg_default_options[$key]['type'];
 			
 				}
 			}
 		} else {
-			foreach( $lblg_default_options['tabs'] as $tab ) {
+				$tab = $input['tab'];
 				foreach( $valid_input as $key => $value ){
 					$tmp_type = $lblg_default_options[$tab]['contents'][$key]['type'];
 
 						break;
 					}
 				}
-			}
 		}
 	}
 

includes/parent-options.php

 		"contents"	=> array(
 			"bbp_subhead" => array( "name" => "bbPress-specific Options",
 									"type" => "subhead"),
-			"bbp_force_1_column_layout" => array( "name" => "Force 1 Column Layout",
-												  "desc" => "Force all bbPress forum/topic screens to use 1 column layouts (can increase readability/functionality of bbPress forums, depending upon your chosen layout).",
+			"bbp_force_1_column" => array( "name" => "Disable Sidebar Widget Areas",
+												  "desc" => "Disable the sidebar widget areas, essentially orcing all bbPress forum/topic screens to use 1 column layouts. <br /> (Can increase readability/functionality of bbPress forums, depending upon your chosen layout).",
+												  "type" => "checkbox",
+												  "std" => "0" ),
+			"bbp_disable_footer" => array( "name" => "Disable Footer Widget Areas",
+												  "desc" => "Disable the footer widget areas when viewing bbPress forums/topics.",
 												  "type" => "checkbox",
 												  "std" => "0" ),
 		),
 <?php
+global $lblg_options;
 lblg_sidebar_header(); 
 ?>
+<?php if( 1 != $lblg_options['bbp_force_1_column'] ) { ?>
 <div id="primarysb">
 	<ul>
 		<?php if ( !dynamic_sidebar('Primary') ) : ?>
 	</ul>
 </div> <!-- #secondarysb -->
 <?php
+} //endif
 lblg_sidebar_footer();
 ?>
  * Author URI: http://literalbarrage.org/blog/
  * License: GPL v2
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
- * Version: 1.3-beta1
+ * Version: 1.3
  * Tags: buddypress, two-columns, three-columns, one-column, left-sidebar, right-sidebar, white, blue, fixed-width, flexible-width, custom-header, custom-menu, featured-images, sticky-post, theme-options
  *
  * Elbee Elgee WordPress Theme, Copyright (C) 2011 Doug Stewart
 
 .accessibly-hidden{
 	display: none;
-}
+}
+
+#lb-content.bp-full-width{
+	margin: 0 auto;
+	width: 95%;
+	padding: 0 20px;
+} 
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.