<!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] [2474] trunk:
Fixing component dependencies within the default theme.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2474</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-01-29 13:44:11 +0000 (Fri, 29 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixing component dependencies within the default theme.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcorecatchuriphp">trunk/bp-core/bp-core-catchuri.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incoptionsphp">trunk/bp-themes/bp-default/_inc/options.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivityindexphp">trunk/bp-themes/bp-default/activity/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivitypostformphp">trunk/bp-themes/bp-default/activity/post-form.php</a></li>
<li><a href="#trunkbpthemesbpdefaultheaderphp">trunk/bp-themes/bp-default/header.php</a></li>
<li><a href="#trunkbpthemesbpdefaulthomephp">trunk/bp-themes/bp-default/home.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcorecatchuriphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-catchuri.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-catchuri.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-core/bp-core-catchuri.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="cx">         if ( !function_exists('xprofile_install') )
</span><del>-                bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'profile/index' ) );
</del><ins>+                bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-core/bp-core-templatetags.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -1388,6 +1388,15 @@
</span><span class="cx">
</span><span class="cx"> /* Template is_() functions to determine the current page */
</span><span class="cx">
</span><ins>+function bp_is_deactivated( $plugin_file ) {
+        global $bp_deactivated;
+
+        if ( isset( $bp_deactivated[$plugin_file] ) )
+                return true;
+
+        return false;
+}
+
</ins><span class="cx"> function bp_is_profile_component() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="lines">@@ -1490,7 +1499,7 @@
</span><span class="cx"> function bp_is_user_profile() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( BP_XPROFILE_SLUG == $bp->current_component )
</del><ins>+        if ( BP_XPROFILE_SLUG == $bp->current_component || $bp->core->profile->slug == $bp->current_component )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/options.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/options.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/_inc/options.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -34,7 +34,9 @@
</span><span class="cx">                                                         <th scope="row"><?php _e( 'On front page show:', 'buddypress' ) ?></th>
</span><span class="cx">                                                         <td>
</span><span class="cx">                                                                 <label><input id="bpdtheme_frontpage_blog" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'blog' || empty($bp_dtheme_options['show_on_frontpage']) ) echo 'checked="checked"'; ?> value="blog" /> <?php _e( 'Blog Posts', 'buddypress' ) ?></label><br />
</span><del>-                                                                <label><input id="bpdtheme_frontpage_activity" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'activity' ) echo 'checked="checked"'; ?> value="activity" /> <?php _e( 'Activity Stream', 'buddypress' ) ?></label>
</del><ins>+                                                                <?php if ( !bp_is_deactivated('bp-activity.php') ) : ?>
+                                                                        <label><input id="bpdtheme_frontpage_activity" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'activity' ) echo 'checked="checked"'; ?> value="activity" /> <?php _e( 'Activity Stream', 'buddypress' ) ?></label>
+                                                                <?php endif; ?>
</ins><span class="cx">                                                         </td>
</span><span class="cx">                                                 </tr>
</span><span class="cx">                                         </tbody>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/index.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/index.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/activity/index.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -21,12 +21,16 @@
</span><span class="cx">
</span><span class="cx">                                         <?php if ( is_user_logged_in() ) : ?>
</span><span class="cx">
</span><del>-                                                <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
-                                                        <li id="activity-friends"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#friends/' ) ?>" 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>
</del><ins>+                                                <?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?>
+                                                        <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
+                                                                <li id="activity-friends"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#friends/' ) ?>" 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>
+                                                        <?php endif; ?>
</ins><span class="cx">                                                 <?php endif; ?>
</span><span class="cx">
</span><del>-                                                <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
-                                                        <li id="activity-groups"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#groups/' ) ?>" 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>
</del><ins>+                                                <?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
+                                                        <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
+                                                                <li id="activity-groups"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#groups/' ) ?>" 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>
+                                                        <?php endif; ?>
</ins><span class="cx">                                                 <?php endif; ?>
</span><span class="cx">
</span><span class="cx">                                                 <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivitypostformphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/post-form.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/post-form.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/activity/post-form.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">                                 <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'buddypress' ) ?>" />
</span><span class="cx">                         </div>
</span><span class="cx">
</span><del>-                        <?php if ( !bp_is_my_profile() && !bp_is_group() ) : ?>
</del><ins>+                        <?php if ( function_exists('bp_has_groups') && !bp_is_my_profile() && !bp_is_group() ) : ?>
</ins><span class="cx">                                 <div id="whats-new-post-in-box">
</span><span class="cx">                                         <?php _e( 'Post in', 'buddypress' ) ?>:
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/header.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/header.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/header.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -48,14 +48,16 @@
</span><span class="cx">                                         <a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a>
</span><span class="cx">                                 </li>
</span><span class="cx">
</span><del>-                                <?php if ( 'blog' == bp_dtheme_show_on_frontpage() ) : ?>
-                                        <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 else : ?>
-                                        <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) || bp_is_blog_page() && !is_front_page() && !is_page() ) : ?> class="selected"<?php endif; ?>>
-                                                <a href="<?php echo site_url() ?>/<?php echo BP_HOME_BLOG_SLUG ?>/" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a>
-                                        </li>
</del><ins>+                                <?php if ( !bp_is_deactivated('bp-activity.php') ) : ?>
+                                        <?php if ( 'blog' == bp_dtheme_show_on_frontpage() ) : ?>
+                                                <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 else : ?>
+                                                <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) || bp_is_blog_page() && !is_front_page() && !is_page() ) : ?> class="selected"<?php endif; ?>>
+                                                        <a href="<?php echo site_url() ?>/<?php echo BP_HOME_BLOG_SLUG ?>/" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a>
+                                                </li>
+                                        <?php endif; ?>
</ins><span class="cx">                                 <?php endif; ?>
</span><span class="cx">
</span><span class="cx">                                 <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaulthomephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/home.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/home.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/home.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -3,9 +3,12 @@
</span><span class="cx">          * Should we show the blog on the front page, or the activity stream?
</span><span class="cx">          * This is set in wp-admin > Appearance > Theme Options
</span><span class="cx">          */
</span><del>-
-        if ( 'blog' == bp_dtheme_show_on_frontpage() )
</del><ins>+        if ( bp_is_deactivated('bp-activity.php') )
</ins><span class="cx">                 locate_template( array( 'index.php' ), true );
</span><del>-        else
-                locate_template( array( 'activity/index.php' ), true );
</del><ins>+        else {
+                if ( 'blog' == bp_dtheme_show_on_frontpage() )
+                        locate_template( array( 'index.php' ), true );
+                else
+                        locate_template( array( 'activity/index.php' ), true );
+        }
</ins><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>