<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [3458] trunk/bp-themes/bp-default:
  Adds widget sidebar to footer, and adds custom background support.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>3458</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2010-11-20 18:41:55 +0000 (Sat, 20 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Adds widget sidebar to footer, and adds custom background support.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefault_inccssdefaultcss">trunk/bp-themes/bp-default/_inc/css/default.css</a></li>
<li><a href="#trunkbpthemesbpdefaultfooterphp">trunk/bp-themes/bp-default/footer.php</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
<li><a href="#trunkbpthemesbpdefaultrtlcss">trunk/bp-themes/bp-default/rtl.css</a></li>
<li><a href="#trunkbpthemesbpdefaultstylecss">trunk/bp-themes/bp-default/style.css</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefaultsidebarfooterphp">trunk/bp-themes/bp-default/sidebar-footer.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefault_inccssdefaultcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/default.css (3457 => 3458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/default.css        2010-11-20 13:13:57 UTC (rev 3457)
+++ trunk/bp-themes/bp-default/_inc/css/default.css        2010-11-20 18:41:55 UTC (rev 3458)
</span><span class="lines">@@ -4,7 +4,10 @@
</span><span class="cx"> -------------------------------------------------------------- */
</span><span class="cx"> 
</span><span class="cx"> body {
</span><del>-        background: #eaeaea url( ../images/background.gif ) top left repeat-x;
</del><ins>+        background-color: #eaeaea;
+        background-image: url( ../images/background.gif );
+        background-repeat: repeat-x;
+        background-position: top left;
</ins><span class="cx">         font-size: 12px;
</span><span class="cx">         font-family: Arial, Tahoma, Verdana, sans-serif;
</span><span class="cx">         line-height: 170%;
</span><span class="lines">@@ -165,6 +168,7 @@
</span><span class="cx">         border-bottom: 1px solid #e0e0e0;
</span><span class="cx">         background: #fff;
</span><span class="cx">         overflow: hidden;
</span><ins>+        margin-bottom: 20px;
</ins><span class="cx"> }
</span><span class="cx">         body.activity-permalink div#container {
</span><span class="cx">                 background: none;
</span><span class="lines">@@ -204,6 +208,7 @@
</span><span class="cx">                         padding: 10px 15px;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area h3.widgettitle,
</ins><span class="cx">         div#sidebar h3.widgettitle {
</span><span class="cx">                 margin: 25px -20px 10px -19px;
</span><span class="cx">                 background: #eaeaea;
</span><span class="lines">@@ -212,35 +217,43 @@
</span><span class="cx">                 clear: left;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area .widget_search,
</ins><span class="cx">         div#sidebar .widget_search {
</span><span class="cx">                 margin-top: 20px;
</span><span class="cx">         }
</span><ins>+                #footer-widget-area .widget_search input[type=text],
</ins><span class="cx">                 div#sidebar .widget_search input[type=text] {
</span><span class="cx">                         width: 110px;
</span><span class="cx">                         padding: 2px;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area ul#recentcomments li, #footer-widget-area .widget_recent_entries ul li,
</ins><span class="cx">         div#sidebar ul#recentcomments li, div#sidebar .widget_recent_entries ul li {
</span><span class="cx">                 margin-bottom: 15px;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area ul.item-list img.avatar,
</ins><span class="cx">         div#sidebar ul.item-list img.avatar {
</span><span class="cx">                 width: 20px;
</span><span class="cx">                 height: 20px;
</span><span class="cx">                 margin-right: 10px;
</span><span class="cx">         }
</span><ins>+                #footer-widget-area div.item-avatar img,
</ins><span class="cx">                 div#sidebar div.item-avatar img {
</span><span class="cx">                         width: 40px;
</span><span class="cx">                         height: 40px;
</span><span class="cx">                         margin: 1px;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+                #footer-widget-area .avatar-block,
</ins><span class="cx">                 div#sidebar .avatar-block { overflow: hidden; }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area ul.item-list div.item-title,
</ins><span class="cx">         div#sidebar ul.item-list div.item-title {
</span><span class="cx">                 font-size: 12px;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area div.item-options,
</ins><span class="cx">         div#sidebar div.item-options {
</span><span class="cx">                 margin: -10px -20px 0 -19px;
</span><span class="cx">                 background: #f8f8f8;
</span><span class="lines">@@ -248,11 +261,13 @@
</span><span class="cx">                 font-size: 11px;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area div.item-meta, #footer-widget-area div.item-content,
</ins><span class="cx">         div#sidebar div.item-meta, div#sidebar div.item-content {
</span><span class="cx">                 margin-left: 38px;
</span><span class="cx">                 font-size: 11px;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area div.tags div#tag-text,
</ins><span class="cx">         div#sidebar div.tags div#tag-text {
</span><span class="cx">                 font-size: 1.4em;
</span><span class="cx">                 line-height: 140%;
</span><span class="lines">@@ -1760,15 +1775,46 @@
</span><span class="cx"> -------------------------------------------------------------- */
</span><span class="cx"> 
</span><span class="cx"> #footer {
</span><del>-        padding: 25px;
-        text-align: center;
-        color: #bbb;
-        text-shadow: #fafafa 1px 1px 0;
</del><ins>+        margin-bottom: 25px;
+        padding: 0 19px 19px 19px;
+        border-radius: 6px;
+        -moz-border-radius: 6px;
+        -webkit-border-radius: 6px;
+        border-right: 1px solid #e0e0e0;
+        border-bottom: 1px solid #e0e0e0;
+        background: #fff;
</ins><span class="cx"> }
</span><del>-        #footer a {
</del><ins>+        #site-generator {
+                text-align: center;
</ins><span class="cx">                 color: #bbb;
</span><ins>+                text-shadow: #fafafa 1px 1px 0;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area {
+                margin-bottom: 20px;
+                overflow: hidden;
+        }
+                #footer-widget-area div.widget-area &gt; ul {
+                        float: left;
+                        margin-right: 19px;
+                        width: 23%;
+                }
+
+                #footer-widget-area h3.widgettitle {
+                        margin-top: 19px;
+                        margin-left: 0;
+                        margin-right: 0;
+                }
+
+                #footer-widget-area div div.item-options {
+                        margin-left: 0;
+                        margin-right: 0;
+                }
+
+                #footer-widget-area ul.item-list li img.avatar {
+                        margin-left: 15px;  /* border is 4px */
+                }
+
</ins><span class="cx"> /* Menu
</span><span class="cx"> -------------------------------------------------------------- */
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfooterphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/footer.php (3457 => 3458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/footer.php        2010-11-20 13:13:57 UTC (rev 3457)
+++ trunk/bp-themes/bp-default/footer.php        2010-11-20 18:41:55 UTC (rev 3458)
</span><span class="lines">@@ -4,8 +4,12 @@
</span><span class="cx">                 &lt;?php do_action( 'bp_before_footer' ) ?&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;div id=&quot;footer&quot;&gt;
</span><del>-                    &lt;p&gt;&lt;?php printf( __( '%s is proudly powered by &lt;a href=&quot;http://wordpress.org&quot;&gt;WordPress&lt;/a&gt; and &lt;a href=&quot;http://buddypress.org&quot;&gt;BuddyPress&lt;/a&gt;', 'buddypress' ), get_bloginfo( 'name' ) ); ?&gt;&lt;/p&gt;
</del><ins>+                        &lt;?php get_sidebar( 'footer' ) ?&gt;
</ins><span class="cx"> 
</span><ins>+                        &lt;div id=&quot;site-generator&quot;&gt;
+                                &lt;p&gt;&lt;?php printf( __( '%s is proudly powered by &lt;a href=&quot;http://wordpress.org&quot;&gt;WordPress&lt;/a&gt; and &lt;a href=&quot;http://buddypress.org&quot;&gt;BuddyPress&lt;/a&gt;', 'buddypress' ), get_bloginfo( 'name' ) ); ?&gt;&lt;/p&gt;
+                        &lt;/div&gt;
+
</ins><span class="cx">                         &lt;?php do_action( 'bp_footer' ) ?&gt;
</span><span class="cx">                 &lt;/div&gt;&lt;!-- #footer --&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (3457 => 3458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2010-11-20 13:13:57 UTC (rev 3457)
+++ trunk/bp-themes/bp-default/functions.php        2010-11-20 18:41:55 UTC (rev 3458)
</span><span class="lines">@@ -5,17 +5,63 @@
</span><span class="cx"> 
</span><span class="cx"> add_theme_support( 'automatic-feed-links' );
</span><span class="cx"> 
</span><ins>+// This theme allows users to set a custom background
+add_custom_background();
+
</ins><span class="cx"> // Register the widget columns
</span><del>-register_sidebars( 1,
-        array(
-                'name'          =&gt; 'Sidebar',
-                'before_widget' =&gt; '&lt;div id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
-                'after_widget'  =&gt; '&lt;/div&gt;',
-                'before_title'  =&gt; '&lt;h3 class=&quot;widgettitle&quot;&gt;',
-                'after_title'   =&gt; '&lt;/h3&gt;'
-        )
-);
</del><ins>+// Area 1, located in the sidebar. Empty by default.
+register_sidebar( array(
+        'name'          =&gt; 'Sidebar',
+        'before_widget' =&gt; '&lt;div id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
+        'after_widget'  =&gt; '&lt;/div&gt;',
+        'before_title'  =&gt; '&lt;h3 class=&quot;widgettitle&quot;&gt;',
+        'after_title'   =&gt; '&lt;/h3&gt;'
+) );
</ins><span class="cx"> 
</span><ins>+// Area 2, located in the footer. Empty by default.
+register_sidebar( array(
+        'name' =&gt; __( 'First Footer Widget Area', 'buddypress' ),
+        'id' =&gt; 'first-footer-widget-area',
+        'description' =&gt; __( 'The first footer widget area', 'buddypress' ),
+        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
+        'after_widget' =&gt; '&lt;/li&gt;',
+        'before_title' =&gt; '&lt;h3 class=&quot;widgettitle&quot;&gt;',
+        'after_title' =&gt; '&lt;/h3&gt;',
+) );
+
+// Area 3, located in the footer. Empty by default.
+register_sidebar( array(
+        'name' =&gt; __( 'Second Footer Widget Area', 'buddypress' ),
+        'id' =&gt; 'second-footer-widget-area',
+        'description' =&gt; __( 'The second footer widget area', 'buddypress' ),
+        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
+        'after_widget' =&gt; '&lt;/li&gt;',
+        'before_title' =&gt; '&lt;h3 class=&quot;widgettitle&quot;&gt;',
+        'after_title' =&gt; '&lt;/h3&gt;',
+) );
+
+// Area 4, located in the footer. Empty by default.
+register_sidebar( array(
+        'name' =&gt; __( 'Third Footer Widget Area', 'buddypress' ),
+        'id' =&gt; 'third-footer-widget-area',
+        'description' =&gt; __( 'The third footer widget area', 'buddypress' ),
+        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
+        'after_widget' =&gt; '&lt;/li&gt;',
+        'before_title' =&gt; '&lt;h3 class=&quot;widgettitle&quot;&gt;',
+        'after_title' =&gt; '&lt;/h3&gt;',
+) );
+
+// Area 5, located in the footer. Empty by default.
+register_sidebar( array(
+        'name' =&gt; __( 'Fourth Footer Widget Area', 'buddypress' ),
+        'id' =&gt; 'fourth-footer-widget-area',
+        'description' =&gt; __( 'The fourth footer widget area', 'buddypress' ),
+        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
+        'after_widget' =&gt; '&lt;/li&gt;',
+        'before_title' =&gt; '&lt;h3 class=&quot;widgettitle&quot;&gt;',
+        'after_title' =&gt; '&lt;/h3&gt;',
+) );
+
</ins><span class="cx"> // Register navigation menu
</span><span class="cx"> register_nav_menus( array(
</span><span class="cx">         'primary' =&gt; __( 'Primary Navigation', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultrtlcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/rtl.css (3457 => 3458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/rtl.css        2010-11-20 13:13:57 UTC (rev 3457)
+++ trunk/bp-themes/bp-default/rtl.css        2010-11-20 18:41:55 UTC (rev 3458)
</span><span class="lines">@@ -94,20 +94,24 @@
</span><span class="cx">                 clear: right;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area h3.widgettitle,
</ins><span class="cx">         div#sidebar h3.widgettitle {
</span><span class="cx">                 margin: 25px -19px 10px -20px;
</span><span class="cx">                 clear: right;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area ul.item-list img.avatar,
</ins><span class="cx">         div#sidebar ul.item-list img.avatar {
</span><span class="cx">                 margin-left: 10px;
</span><span class="cx">                 margin-right: 0;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area div.item-options,
</ins><span class="cx">         div#sidebar div.item-options {
</span><span class="cx">                 margin: -10px -19px 0 -20px;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        #footer-widget-area div.item-meta, #footer-widget-area div.item-content,
</ins><span class="cx">         div#sidebar div.item-meta, div#sidebar div.item-content {
</span><span class="cx">                 margin-right: 38px;
</span><span class="cx">                 margin-left: 0;
</span><span class="lines">@@ -645,6 +649,19 @@
</span><span class="cx">                 float: left;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+/* &gt; Footer
+-------------------------------------------------------------- */
+#footer-widget-area div.widget-area &gt; ul {
+        float: right;
+        margin-left: 19px;
+        margin-right: 0;
+}
+
+#footer-widget-area ul.item-list li img.avatar {
+        margin-right: 15px;  /* border is 4px */
+        margin-left: 0;
+}
+
</ins><span class="cx"> /***
</span><span class="cx">  * The admin bar styles.
</span><span class="cx">  */
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultsidebarfooterphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-default/sidebar-footer.php (0 => 3458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/sidebar-footer.php                                (rev 0)
+++ trunk/bp-themes/bp-default/sidebar-footer.php        2010-11-20 18:41:55 UTC (rev 3458)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+&lt;?php
+        /* The footer widget area is triggered if any of the areas
+         * have widgets. So let's check that first.
+         *
+         * If none of the sidebars have widgets, then let's bail early.
+         */
+        if (   ! is_active_sidebar( 'first-footer-widget-area'  )
+                &amp;&amp; ! is_active_sidebar( 'second-footer-widget-area' )
+                &amp;&amp; ! is_active_sidebar( 'third-footer-widget-area'  )
+                &amp;&amp; ! is_active_sidebar( 'fourth-footer-widget-area' )
+        )
+                return;
+        // If we get this far, we have widgets. Let do this.
+?&gt;
+
+                        &lt;div id=&quot;footer-widget-area&quot; role=&quot;complementary&quot;&gt;
+
+&lt;?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?&gt;
+                                &lt;div id=&quot;first&quot; class=&quot;widget-area&quot;&gt;
+                                        &lt;ul class=&quot;xoxo&quot;&gt;
+                                                &lt;?php dynamic_sidebar( 'first-footer-widget-area' ); ?&gt;
+                                        &lt;/ul&gt;
+                                &lt;/div&gt;&lt;!-- #first .widget-area --&gt;
+&lt;?php endif; ?&gt;
+
+&lt;?php if ( is_active_sidebar( 'second-footer-widget-area' ) ) : ?&gt;
+                                &lt;div id=&quot;second&quot; class=&quot;widget-area&quot;&gt;
+                                        &lt;ul class=&quot;xoxo&quot;&gt;
+                                                &lt;?php dynamic_sidebar( 'second-footer-widget-area' ); ?&gt;
+                                        &lt;/ul&gt;
+                                &lt;/div&gt;&lt;!-- #second .widget-area --&gt;
+&lt;?php endif; ?&gt;
+
+&lt;?php if ( is_active_sidebar( 'third-footer-widget-area' ) ) : ?&gt;
+                                &lt;div id=&quot;third&quot; class=&quot;widget-area&quot;&gt;
+                                        &lt;ul class=&quot;xoxo&quot;&gt;
+                                                &lt;?php dynamic_sidebar( 'third-footer-widget-area' ); ?&gt;
+                                        &lt;/ul&gt;
+                                &lt;/div&gt;&lt;!-- #third .widget-area --&gt;
+&lt;?php endif; ?&gt;
+
+&lt;?php if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) : ?&gt;
+                                &lt;div id=&quot;fourth&quot; class=&quot;widget-area&quot;&gt;
+                                        &lt;ul class=&quot;xoxo&quot;&gt;
+                                                &lt;?php dynamic_sidebar( 'fourth-footer-widget-area' ); ?&gt;
+                                        &lt;/ul&gt;
+                                &lt;/div&gt;&lt;!-- #fourth .widget-area --&gt;
+&lt;?php endif; ?&gt;
+
+                        &lt;/div&gt;&lt;!-- #footer-widget-area --&gt;
</ins></span></pre></div>
<a id="trunkbpthemesbpdefaultstylecss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/style.css (3457 => 3458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/style.css        2010-11-20 13:13:57 UTC (rev 3457)
+++ trunk/bp-themes/bp-default/style.css        2010-11-20 18:41:55 UTC (rev 3458)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> Version: 1.3-bleeding
</span><span class="cx"> Author: BuddyPress.org
</span><span class="cx"> Author URI: http://buddypress.org
</span><del>-Tags: buddypress, two-columns, custom-header, white, blue, translation-ready
</del><ins>+Tags: buddypress, two-columns, custom-header, custom-background, threaded-comments, white, blue, translation-ready
</ins><span class="cx"> 
</span><span class="cx"> ** IMPORTANT - DO NOT COPY THIS THEME **
</span><span class="cx"> If you want to make a custom theme based on this theme, DO NOT copy and edit it. By
</span></span></pre>
</div>
</div>

</body>
</html>