<!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" />
<title>[BuddyPress][3933] trunk: Introduce Forums tab to user account area, to show topics the user has started, topics the user has replied to, and favorite forum topics.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>3933</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-01-26 15:28:35 +0000 (Wed, 26 Jan 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Introduce Forums tab to user account area, to show topics the user has started, topics the user has replied to, and favorite forum topics. This includes additional template files in bp-default to support new functionality, and edits to the forum_sql filter functions.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoretemplatephp">trunk/bp-core/bp-core-template.php</a></li>
<li><a href="#trunkbpforumsbpforumsloaderphp">trunk/bp-forums/bp-forums-loader.php</a></li>
<li><a href="#trunkbpforumsbpforumsscreensphp">trunk/bp-forums/bp-forums-screens.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatephp">trunk/bp-forums/bp-forums-template.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsactivityphp">trunk/bp-groups/bp-groups-activity.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsfiltersphp">trunk/bp-groups/bp-groups-filters.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumsindexphp">trunk/bp-themes/bp-default/forums/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssinglehomephp">trunk/bp-themes/bp-default/members/single/home.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/bp-themes/bp-default/members/single/forums/</li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleforumstopicsphp">trunk/bp-themes/bp-default/members/single/forums/topics.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleforumsphp">trunk/bp-themes/bp-default/members/single/forums.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoretemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-template.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-template.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-core/bp-core-template.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -987,6 +987,15 @@
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function bp_is_user_forums() {
+        global $bp;
+
+        if ( bp_is_current_component( 'forums' ) )
+                return true;
+
+        return false;
+}
+
</ins><span class="cx"> function bp_is_user_groups() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpforumsbpforumsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-loader.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-loader.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-forums/bp-forums-loader.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx"> 
</span><span class="cx">                 // Additional menu if friends is active
</span><span class="cx">                 $sub_nav[] = array(
</span><del>-                        'name'            =&gt; __( 'Topics Started', 'buddypress' ),
</del><ins>+                        'name'            =&gt; __( 'Started', 'buddypress' ),
</ins><span class="cx">                         'slug'            =&gt; 'topics',
</span><span class="cx">                         'parent_url'      =&gt; $forums_link,
</span><span class="cx">                         'parent_slug'     =&gt; $this-&gt;slug,
</span><span class="lines">@@ -135,18 +135,18 @@
</span><span class="cx"> 
</span><span class="cx">                 // Additional menu if friends is active
</span><span class="cx">                 $sub_nav[] = array(
</span><del>-                        'name'            =&gt; __( 'Replies', 'buddypress' ),
</del><ins>+                        'name'            =&gt; __( 'Replied To', 'buddypress' ),
</ins><span class="cx">                         'slug'            =&gt; 'replies',
</span><span class="cx">                         'parent_url'      =&gt; $forums_link,
</span><span class="cx">                         'parent_slug'     =&gt; $this-&gt;slug,
</span><del>-                        'screen_function' =&gt; 'bp_forums_screen_topics',
</del><ins>+                        'screen_function' =&gt; 'bp_forums_screen_replies',
</ins><span class="cx">                         'position'        =&gt; 40,
</span><span class="cx">                         'item_css_id'     =&gt; 'forums-friends'
</span><span class="cx">                 );
</span><span class="cx"> 
</span><span class="cx">                 // Favorite forums items
</span><span class="cx">                 $sub_nav[] = array(
</span><del>-                        'name'            =&gt; __( 'Favorite Topics', 'buddypress' ),
</del><ins>+                        'name'            =&gt; __( 'Favorites', 'buddypress' ),
</ins><span class="cx">                         'slug'            =&gt; 'favorites',
</span><span class="cx">                         'parent_url'      =&gt; $forums_link,
</span><span class="cx">                         'parent_slug'     =&gt; $this-&gt;slug,
</span></span></pre></div>
<a id="trunkbpforumsbpforumsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-screens.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-screens.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-forums/bp-forums-screens.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> function bp_forums_directory_forums_setup() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( bp_is_current_component( 'forums' ) ) {
</del><ins>+        if ( bp_is_groups_component() &amp;&amp; !bp_current_action() &amp;&amp; !bp_current_item() ) {
</ins><span class="cx">                 if ( bp_forum_directory_is_disabled() || !bp_is_active( 'groups' ) )
</span><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -60,4 +60,28 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_screens', 'bp_forums_directory_forums_setup' );
</span><span class="cx"> 
</span><ins>+function bp_forums_screen_topics() {
+        global $bp;
+
+        do_action( 'bp_forums_screen_topics' );
+
+        bp_core_load_template( apply_filters( 'bp_forums_screen_topics', 'members/single/home' ) );
+}
+
+function bp_forums_screen_replies() {
+        global $bp;
+
+        do_action( 'bp_forums_screen_replies' );
+
+        bp_core_load_template( apply_filters( 'bp_forums_screen_replies', 'members/single/home' ) );
+}
+
+function bp_forums_screen_favorites() {
+        global $bp;
+
+        do_action( 'bp_forums_screen_favorites' );
+
+        bp_core_load_template( apply_filters( 'bp_forums_screen_favorites', 'members/single/home' ) );
+}
+
</ins><span class="cx"> ?&gt;
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-template.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-template.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-forums/bp-forums-template.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -101,10 +101,10 @@
</span><span class="cx">                         $this-&gt;topic_count       = 0;
</span><span class="cx">                         $this-&gt;total_topic_count = 0;
</span><span class="cx">                 } else {
</span><del>-                        if ( $forum_id ) {
</del><ins>+                        if ( !empty( $forum_id ) ) {
</ins><span class="cx">                                 $topic_count = bp_forums_get_forum( $forum_id );
</span><span class="cx">                                 $topic_count = (int)$topic_count-&gt;topics;
</span><del>-                        } else if ( function_exists( 'groups_total_public_forum_topic_count' ) ) {
</del><ins>+                        } else if ( !empty( $bp-&gt;groups-&gt;current_group ) ) {
</ins><span class="cx">                                 $topic_count = (int)groups_total_public_forum_topic_count( $type );
</span><span class="cx">                         } else {
</span><span class="cx">                                 $topic_count = count( $this-&gt;topics );
</span><span class="lines">@@ -216,11 +216,11 @@
</span><span class="cx">          * if arguments are directly passed into the loop. Custom plugins should always
</span><span class="cx">          * pass their parameters directly to the loop.
</span><span class="cx">          */
</span><del>-        $type = 'newest';
-        $user_id = 0;
-        $forum_id = false;
</del><ins>+        $type         = 'newest';
+        $user_id      = 0;
+        $forum_id     = false;
</ins><span class="cx">         $search_terms = false;
</span><del>-        $no_stickies = 'all';
</del><ins>+        $no_stickies  = 'all';
</ins><span class="cx"> 
</span><span class="cx">         // User filtering
</span><span class="cx">         if ( !empty( $bp-&gt;displayed_user-&gt;id ) )
</span><span class="lines">@@ -731,12 +731,12 @@
</span><span class="cx">         function bp_get_forum_pagination_count() {
</span><span class="cx">                 global $bp, $forum_template;
</span><span class="cx"> 
</span><del>-                $start_num = intval( ( $forum_template-&gt;pag_page - 1 ) * $forum_template-&gt;pag_num ) + 1;
-                $from_num = bp_core_number_format( $start_num );
-                $to_num = bp_core_number_format( ( $start_num + ( $forum_template-&gt;pag_num - 1  ) &gt; $forum_template-&gt;total_topic_count ) ? $forum_template-&gt;total_topic_count : $start_num + ( $forum_template-&gt;pag_num - 1 ) );
-                $total = bp_core_number_format( $forum_template-&gt;total_topic_count );
</del><ins>+                $start_num  = intval( ( $forum_template-&gt;pag_page - 1 ) * $forum_template-&gt;pag_num ) + 1;
+                $from_num   = bp_core_number_format( $start_num );
+                $to_num     = bp_core_number_format( ( $start_num + ( $forum_template-&gt;pag_num - 1  ) &gt; $forum_template-&gt;total_topic_count ) ? $forum_template-&gt;total_topic_count : $start_num + ( $forum_template-&gt;pag_num - 1 ) );
+                $total      = bp_core_number_format( $forum_template-&gt;total_topic_count );
+                $pag_filter = false;
</ins><span class="cx"> 
</span><del>-                $pag_filter = false;
</del><span class="cx">                 if ( 'tags' == $forum_template-&gt;type &amp;&amp; !empty( $forum_template-&gt;search_terms ) )
</span><span class="cx">                         $pag_filter = sprintf( __( ' matching tag &quot;%s&quot;', 'buddypress' ), $forum_template-&gt;search_terms );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-activity.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-activity.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-groups/bp-groups-activity.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         // If the group is not public, hide the activity sitewide.
</span><del>-        if ( 'public' == $bp-&gt;groups-&gt;current_group-&gt;status )
</del><ins>+        if ( isset( $bp-&gt;groups-&gt;current_group-&gt;status ) &amp;&amp; 'public' == $bp-&gt;groups-&gt;current_group-&gt;status )
</ins><span class="cx">                 $hide_sitewide = false;
</span><span class="cx">         else
</span><span class="cx">                 $hide_sitewide = true;
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-filters.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-filters.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-groups/bp-groups-filters.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -65,15 +65,9 @@
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="cx">         // Only filter the forum SQL on group pages or on the forums directory
</span><del>-        if ( bp_is_forums_component() ||
-                        ( !empty( $bp-&gt;groups-&gt;current_group ) &amp;&amp;
-                                ( 'public' == $bp-&gt;groups-&gt;current_group-&gt;status ) ||
-                                        ( !empty( $bp-&gt;groups-&gt;current_group-&gt;is_member ) ) ) ) {
-
-                add_filter( 'get_topics_fields',     'groups_add_forum_fields_sql' );
-                add_filter( 'get_topics_index_hint', 'groups_add_forum_tables_sql' );
-                add_filter( 'get_topics_where',      'groups_add_forum_where_sql'  );
-        }
</del><ins>+        add_filter( 'get_topics_fields',     'groups_add_forum_fields_sql' );
+        add_filter( 'get_topics_index_hint', 'groups_add_forum_tables_sql' );
+        add_filter( 'get_topics_where',      'groups_add_forum_where_sql'  );
</ins><span class="cx"> }
</span><span class="cx"> add_filter( 'bbpress_init', 'groups_add_forum_privacy_sql' );
</span><span class="cx"> 
</span><span class="lines">@@ -89,14 +83,41 @@
</span><span class="cx"> function groups_add_forum_where_sql( $sql ) {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( !is_super_admin() || ( bp_is_single_item() &amp;&amp; !bp_group_is_member( $bp-&gt;groups-&gt;current_group-&gt;id ) ) )
-                $must_be_public = &quot;AND g.status = 'public'&quot;;
-        else
-                $must_be_public = '';
</del><ins>+        // Set this for groups
+        $parts['groups'] = &quot;(gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id)&quot;;
</ins><span class="cx"> 
</span><del>-        $bp-&gt;groups-&gt;filter_sql = $must_be_public . ' AND ' . $sql;
</del><ins>+        // Restrict to public...
+        $parts['private'] = &quot;g.status = 'public'&quot;;
</ins><span class="cx"> 
</span><del>-        return &quot;(gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) {$must_be_public} AND {$sql}&quot;;
</del><ins>+        /**
+         * ...but do some checks to possibly remove public restriction.
+         *
+         * Decide if private are visible
+         */
+        // Are we in our own profile?
+        if ( bp_is_my_profile() )
+                unset( $parts['private'] );
+
+        // Are we a super admin?
+        elseif ( is_super_admin() )
+                unset( $parts['private'] );
+
+        // Are we a member of this group
+        elseif ( bp_is_single_item() &amp;&amp; bp_group_is_member( $bp-&gt;groups-&gt;current_group-&gt;id ) )
+                unset( $parts['private'] );
+
+        // Check the SQL filter that was passed
+        if ( !empty( $sql ) )
+                $parts['passed'] = $sql;
+
+        // Assemble Voltron
+        $parts_string = implode( ' AND ', $parts );
+
+        // Set it to the global filter
+        $bp-&gt;groups-&gt;filter_sql = $parts_string;
+
+        // Return the global filter
+        return $bp-&gt;groups-&gt;filter_sql;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function groups_filter_bbpress_caps( $value, $cap, $args ) {
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultforumsindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/forums/index.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/index.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-themes/bp-default/forums/index.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;?php if ( is_user_logged_in() &amp;&amp; bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?&gt;
</span><span class="cx"> 
</span><del>-                                                        &lt;li id=&quot;forums-personal&quot;&gt;&lt;a href=&quot;&lt;?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ); ?&gt;&quot;&gt;&lt;?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                                                        &lt;li id=&quot;forums-personal&quot;&gt;&lt;a href=&quot;&lt;?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_forums_slug() . '/topics' ); ?&gt;&quot;&gt;&lt;?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</ins><span class="cx"> 
</span><span class="cx">                                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleforumstopicsphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-default/members/single/forums/topics.php (0 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/forums/topics.php                                (rev 0)
+++ trunk/bp-themes/bp-default/members/single/forums/topics.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+&lt;?php
+/* 
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+?&gt;
</ins><span class="cx">Property changes on: trunk/bp-themes/bp-default/members/single/forums/topics.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkbpthemesbpdefaultmemberssingleforumsphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-default/members/single/forums.php (0 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/forums.php                                (rev 0)
+++ trunk/bp-themes/bp-default/members/single/forums.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+&lt;?php
+
+/**
+ * BuddyPress - Users Forums
+ *
+ * @package BuddyPress
+ * @subpackage bp-default
+ */
+
+?&gt;
+
+&lt;div class=&quot;item-list-tabs no-ajax&quot; id=&quot;subnav&quot; role=&quot;navigation&quot;&gt;
+        &lt;ul&gt;
+                &lt;?php if ( bp_is_my_profile() ) bp_get_options_nav(); ?&gt;
+
+                &lt;li id=&quot;forums-order-select&quot; class=&quot;last filter&quot;&gt;
+
+                        &lt;?php _e( 'Order By:', 'buddypress' ); ?&gt;
+
+                        &lt;select&gt;
+                                &lt;option value=&quot;active&quot;&gt;&lt;?php _e( 'Last Active', 'buddypress' ); ?&gt;&lt;/option&gt;
+                                &lt;option value=&quot;popular&quot;&gt;&lt;?php _e( 'Most Posts', 'buddypress' ); ?&gt;&lt;/option&gt;
+                                &lt;option value=&quot;unreplied&quot;&gt;&lt;?php _e( 'Unreplied', 'buddypress' ); ?&gt;&lt;/option&gt;
+
+                                &lt;?php do_action( 'bp_forums_directory_order_options' ); ?&gt;
+
+                        &lt;/select&gt;
+                &lt;/li&gt;
+        &lt;/ul&gt;
+&lt;/div&gt;&lt;!-- .item-list-tabs --&gt;
+
+&lt;?php
+
+if ( bp_is_current_action( 'favorites' ) ) :
+        locate_template( array( 'members/single/forums/topics.php' ), true );
+
+else :
+        do_action( 'bp_before_member_forums_content' ); ?&gt;
+
+        &lt;div class=&quot;groups mygroups&quot;&gt;
+
+                &lt;?php locate_template( array( 'forums/forums-loop.php' ), true ); ?&gt;
+
+        &lt;/div&gt;
+
+        &lt;?php do_action( 'bp_after_member_forums_content' ); ?&gt;
+
+&lt;?php endif; ?&gt;
</ins><span class="cx">Property changes on: trunk/bp-themes/bp-default/members/single/forums.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkbpthemesbpdefaultmemberssinglehomephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/home.php (3932 => 3933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/home.php        2011-01-25 23:30:26 UTC (rev 3932)
+++ trunk/bp-themes/bp-default/members/single/home.php        2011-01-26 15:28:35 UTC (rev 3933)
</span><span class="lines">@@ -56,6 +56,9 @@
</span><span class="cx">                                 elseif ( bp_is_user_profile() ) :
</span><span class="cx">                                         locate_template( array( 'members/single/profile.php'  ), true );
</span><span class="cx"> 
</span><ins>+                                elseif ( bp_is_user_forums() ) :
+                                        locate_template( array( 'members/single/forums.php'  ), true );
+
</ins><span class="cx">                                 // If nothing sticks, load a generic template
</span><span class="cx">                                 else :
</span><span class="cx">                                         locate_template( array( 'members/single/front.php'    ), true );
</span></span></pre>
</div>
</div>

</body>
</html>