1. Doug Stewart
  2. elbee-elgee

Commits

Doug Stewart  committed f8bc92c

BuddyPress, BuddyPress, BuddyPress and a check on options versioning, allowing for updating in DB.

  • Participants
  • Parent commits 2641d8c
  • Branches default

Comments (0)

Files changed (6)

File includes/css/bp.css

View file
+/* Load the default admin bar styles */
+@import url( ../../../../plugins/buddypress/bp-themes/bp-default/_inc/css/adminbar.css );
+
+/**
+ * The following are basic CSS styles to give BuddyPress pages their absolute basic formatting.
+ * You should extend/override these styles in your standard theme CSS to match your theme.
+ */
+
+/***
+ * Navigation tabs
+ */
+div.item-list-tabs {
+	margin: 15px 0;
+	padding: 5px 0;
+	border-bottom: 1px solid #ddd;
+	overflow: hidden;
+	clear: both;
+}
+
+div.item-list-tabs ul {
+	list-style: none;
+	margin: 0;
+	padding: 0;
+	line-height: 200%;
+}
+	div.item-list-tabs ul li {
+		float: left;
+		margin-right: 5px;
+	}
+		div.item-list-tabs#subnav ul li a {
+			border: none;
+			padding: 0;
+		}
+
+	div.item-list-tabs ul li.last { float: right; }
+
+/***
+ * Object Lists (groups/members/forums/blogs)
+ */
+
+ul.item-list {
+	margin: 20px 0;
+	padding: 0;
+	list-style: none;
+}
+	ul.item-list li { position: relative; }
+	ul.item-list div.item-avatar {
+		float: left;
+	}
+
+	ul.item-list div.item {
+		margin-left: 65px;
+	}
+
+	ul.item-list div.action {
+		position: absolute;
+		top: 0;
+		right: 15px;
+		text-align: right;
+	}
+
+
+/***
+ * Content Object Headers
+ */
+
+div#item-header {
+	padding-bottom: 15px;
+	overflow: hidden;
+}
+	div#item-header div#item-header-avatar {
+		float: left;
+		margin-right: 15px;
+	}
+
+	div#item-header div#item-header-content {
+		float: left;
+	}
+
+/***
+ * Activity Stream Post Form
+ */
+
+form#whats-new-form {
+	overflow: hidden;
+	padding-bottom: 20px;
+}
+	form#whats-new-form #whats-new-avatar {
+		float: left;
+	}
+
+	form#whats-new-form h5 {
+		clear: none;
+		margin-left: 76px;
+	}
+
+	form#whats-new-form #whats-new-content {
+		margin-left: 54px;
+		padding-left: 22px;
+	}
+
+	form#whats-new-form #whats-new-textarea {
+		padding: 8px;
+		border: 1px inset #ccc;
+		margin-bottom: 10px;
+	}
+	form#whats-new-form textarea {
+		width: 100%;
+		height: 60px;
+		font-size: 14px;
+		font-family: inherit;
+		color: #555;
+		border: none;
+		margin: 0;
+		padding: 0;
+	}
+
+	form#whats-new-form #whats-new-submit {
+		float: right;
+		margin: 0;
+	}
+
+/***
+ * Activity Stream Post Form
+ */
+
+ul.activity-list {
+	margin: 0;
+	padding: 0;
+}
+
+ul.activity-list li {
+	overflow: hidden;
+	padding: 20px 0;
+}
+	ul.activity-list li img.avatar {
+		float: left;
+		width: 60px;
+		height: 60px;
+	}
+
+	ul.activity-list li div.activity-content {
+		margin-left: 75px;
+	}
+
+	ul.activity-list li div.activity-comments {
+		margin: 15px 0 0 38px;
+	}
+		ul.activity-list li div.activity-comments ul li {
+			padding: 5px 0;
+		}
+
+		ul.activity-list li div.activity-comments img.avatar {
+			width: 25px;
+			height: 25px;
+		}
+
+		ul.activity-list li div.acomment-content, ul.activity-list li div.acomment-meta {
+			margin-left: 35px;
+		}
+
+	ul.activity-list li div.activity-inreplyto {
+		margin: 15px 0 0 75px;
+		font-size: 11px;
+	}
+
+/***
+ * Input Forms
+ */
+
+/* Activity comment forms */
+
+form.ac-form { display: none; } /* JS will show this */
+
+div.activity-comments form {
+	display: none;
+	margin: 10px 0 10px 33px;
+	padding: 8px;
+}
+
+	div.activity-comments div#message {
+		margin-top: 15px;
+		margin-bottom: 0;
+	}
+
+	div.activity-comments form.loading {
+		background-image: url( ../images/ajax-loader.gif );
+		background-position: 2% 95%;
+		background-repeat: no-repeat;
+	}
+
+	div.activity-comments form .ac-textarea {
+		padding: 8px;
+		border: 1px inset #ccc;
+		margin-bottom: 10px;
+	}
+		div.activity-comments form textarea {
+			width: 100%;
+			height: 60px;
+			border: none;
+			padding: 0;
+		}
+			div.activity-comments form input {
+				margin-top: 5px;
+			}
+
+	div.activity-comments form div.ac-reply-avatar {
+		float: left;
+	}
+
+	div.activity-comments form div.ac-reply-content {
+		margin-left: 25px;
+		padding-left: 15px;
+	}
+
+/* Standard Input Forms */
+
+form.standard-form label, form.standard-form span.label {
+	display: block;
+	margin: 15px 0 5px 0;
+}
+	form.standard-form div.checkbox label,
+	form.standard-form div.radio label {
+		font-weight: normal;
+		margin: 5px 0 0 0;
+	}
+
+	form.standard-form textarea {
+		width: 75%;
+		height: 120px;
+	}
+
+/* Send Invites Form */
+form#send-invite-form {
+	margin-top: 20px;
+}
+	div#invite-list {
+		height: 400px;
+		overflow: scroll;
+		padding: 5px;
+		width: 160px;
+		margin: 10px 0;
+	}
+
+/* Directory search forms */
+
+form.dir-form div.dir-search {
+	float: right;
+	width: 45%;
+	margin: 0 0 25px 0;
+}

File includes/functions/admin.php

View file
  */
 function lblg_options_walker(){
 	global $lblg_options, $lblg_default_options, $lblg_shortname;
+	
+	//$lblg_num_values = array_count_values($lblg_default_options);
+	
 	$section = '';
 	$lblg_options_group = $lblg_shortname . '_lblg_options';
 	$options = $lblg_options;

File includes/functions/hooks.php

View file
 }
 
 /*
+*  BuddyPress support code, taken from the BuddyPress Template Pack
+*
+*/
+function lblg_bp_init(){
+	global $lblg_shortname, $lblg_options;
+	
+	/* Load the default BuddyPress AJAX functions */
+	if ( 'false' == $lblg_options['disable_bp_js'] ) {
+		require_once( BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php' );
+
+		/* Load the default BuddyPress javascript */
+		wp_enqueue_script( 'lblg-bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) );
+	}
+	
+	/* Add the wireframe BP page styles */
+	if ( 'false' == $lblg_options['disable_bp_css'] )
+		wp_enqueue_style( 'lblg-bp-css', get_template_directory_uri() . '/includes/css/bp.css' );
+}
+
+
+/*
 *  Utility hooks for use inside <head> and admin <head>,
 *  via wp_head() and admin_head(). Just in case.
 */
 if( function_exists( 'bp_get_loggedin_user_nav' ) ){
 	add_action( 'widgets_init', 'lblg_add_default_buddypress_menu' );
 	add_action( 'lblg_print_bp_menu', 'lblg_bp_menu' );
+	add_action( 'bp_init', 'lblg_bp_init' );
 }
 
 // Only load custom header code if the option is checked

File includes/functions/options.php

View file
 		$lblg_themename = $temp_opts['themename'];
 		$lblg_version = $temp_opts['version'];
 		$lblg_options = lblg_get_options_from_defaults();
+	} elseif( version_compare( $temp_opts['version'], $bootstrap_tmp['version'], '>' )) {
+		// New version of the options have been detected. Let's reload.
+		$lblg_shortname = $temp_opts['shortname'];
+		$lblg_themename = $temp_opts['themename'];
+		$lblg_version = $temp_opts['version'];
+		$tmp_options = get_option( $lblg_shortname . '_lblg_options' );
+		$lblg_options = $tmp_options + $lblg_default_options;
 	} else {
+		// Nothing to see here. Move along. Move along.
 		$lblg_shortname = $bootstrap_tmp['shortname'];
 		$lblg_themename = $bootstrap_tmp['themename'];
 		$lblg_version = $bootstrap_tmp['version'];

File includes/parent-options.php

View file
 <?php
 $parent_theme_array[ 'parent_themename' ] = "Elbee Elgee";
 $parent_theme_array[ 'parent_shortname' ] = "lblg";
-$parent_theme_array[ 'parent_version' ] = '1.0';
+$parent_theme_array[ 'parent_version' ] = '1.1';
 
 // Look for layout CSS files to auto-load
 $layout_path = TEMPLATEPATH . '/layouts/'; 
 										   "cols" => "40") ),
 		  );
 
+	if( function_exists('bp_get_loggedin_user_nav') ) {
+		$parent_options_array['bp_subhead'] = array( "name" => "BuddyPress-specific Options",
+											"type" => "subhead" );
+		
+		$parent_options_array['disable_bp_js'] = array( "name" => "Disable BuddyPress JavaScript/AJAX",
+												"desc" => "Elbee Elgee automatically integrates the BuddyPress default theme javascript and AJAX functionality. You may switch this off, though the experience will degrade somewhat.",
+												"std" => "false",
+												"type" => "checkbox" );
+		
+		$parent_options_array['disable_bp_css'] = array( "name" => "Disable BuddyPress CSS",
+												"desc" => "Elbee Elgee comes with basic CSS styles that give BuddyPress pages a standard look and feel. You can extend upon these styles in your child theme's CSS or simply disable them and construct your own.",
+												"std" => "false",
+												"type" => "checkbox" );
+	}
+
 $parent_theme_array[ 'options' ] = $parent_options_array;
 
 return $parent_theme_array;

File styles/ng.css

View file
 /* @end */
 
 div#container {
-	border: 1px solid #d3cccc;
+	border: 1px solid #333;
 }
 
 /* @group Header Elements */
 div#header {
 	height: 200px;
+	overflow: hidden;
 }
 
 div#titledesc {
 	font-size: 3.5em;
 	font-weight: bold;
 	font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
-	padding-top: 0.5em;
+	margin-top: 2em;
 }
 
 #header h1 a:link, #header h1 a:visited, #header p.blogtitle a:link, #header p.blogtitle a:visited {
-	/*color: #02af97;*/
 	color: #fff;
 	text-decoration: none;
 	vertical-align: baseline;
 /* @group BuddyPress Menu Elements */
 
 #lb-bp-nav {
-	width: 49%;
+	width: 50%;
 	height: 100%;
 	float: right;
 	text-align: right;
 
 #lb-bp-nav ul.menu {
 	width: 100%;
+	margin-top:28%;
+	height: 4em;
 }
 
 #lb-bp-nav ul.menu > li {
 	display: inline-block;
+	background: #000;
+	margin-right: 5px;
+	padding-top: 5px;
+	font-weight: bold;
+	height: 100%;
+	overflow: hidden;
+	border-radius: 4px 4px 0 0;
+	-moz-border-radius: 4px 4px 0 0;
+	-webkit-border-radius: 4px 4px 0 0;
 }
 
+#lb-bp-nav ul.menu > li a:link, #lb-bp-nav ul.menu > li a:visited {
+	padding: 1em;
+	text-decoration: none;
+}
+
+#lb-bp-nav ul.menu > li a:hover, #lb-bp-nav ul.menu > li a:active {
+	padding: 1em;
+	background: #fff;
+}
+
+#lb-bp-search-bar {
+	margin-top: 20px;
+	margin-right: 10px;
+}
 /* @end */
 
 
 /* @group Menu Elements */
 div#menu, div.menu {
-	/*border-color: #d3cccc;
+	border-color: #000;
 	border-style: solid;
-	border-width: 1px 1px 0 1px; */
+	border-width: 1px 0 1px 0;
 	background-color: #3c3c3c;
 	width: 100%;
 	margin: 0 auto;
 
 }
 
-#menu li.current_page_item {
+#menu li.current_page_item, #lb-bp-nav ul.menu > li.current-menu-item {
 	background: #fff;
 }
 
-#menu li.current_page_item a:link, #menu li.current_page_item a:visited {
+#menu li.current_page_item a:link, #menu li.current_page_item a:visited,
+#lb-bp-nav ul.menu > li.current-menu-item a:link, #lb-bp-nav ul.menu > li.current-menu-item a:visited {
 	color: #000;
 }
 
 
 /* @end */
 
+/* @group BuddyPress Elements */
+#item-actions {
+	float: right;
+	text-align: right;
+}
+
+#lb-content div.item-list-tabs {
+	border-bottom: 1px solid #ddd;
+	padding-bottom: 0;
+}
+
+#lb-content div.item-list-tabs > ul {
+}
+div.item-list-tabs#subnav ul li.feed {
+	background: #fff url(../images/feed.png) left no-repeat;
+	padding-left: 20px;	
+	border: 0;
+}
+
+#lb-content div.item-list-tabs ul > li:first-child {
+	margin-left: 20px;
+}
+
+#lb-content div.item-list-tabs ul > li {
+	display: block;
+	border-width: 1px 1px 0 1px;
+	border-style: solid;
+	border-color: #ddd;
+	border-radius: 4px 4px 0 0;
+	-moz-border-radius: 4px 4px 0 0;
+	-webkit-border-radius: 4px 4px 0 0;
+	padding: 5px 5px 0 5px;
+	line-height: 21px;
+	background: #FAFAFA;
+	background: -webkit-gradient(linear,0 0,0 100%,from(white),to(#111));
+	background: -webkit-linear-gradient(white,#ddd);
+	background: -moz-linear-gradient(top,whiteSmoke);
+}
+
+#lb-content div.item-list-tabs ul > li.current,#lb-content div.item-list-tabs ul > li.selected {
+	background: #fff;
+	border-bottom: 1px solid #fff;
+	margin-bottom: -1px;
+}
+
+#lb-content div.item-list-tabs ul > li.current a,#lb-content div.item-list-tabs ul > li.selected a{
+	font-weight: bold;
+}
+
+#lb-content div.item-list-tabs ul > li a{
+
+}
+
+#lb-content ul.item-list li {
+	border-bottom: 1px solid #ddd;
+}
+/* @end */
+
 /* @group Footer Elements */
 div#footer {
 	background: #333;