<!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] [2194] trunk: Fixing forum filtering and added "My Topics"
tab to the forums directory.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2194</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-12-17 12:24:10 +0000 (Thu, 17 Dec 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixing forum filtering and added "My Topics" tab to the forums directory.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpforumsbpforumstemplatetagsphp">trunk/bp-forums/bp-forums-templatetags.php</a></li>
<li><a href="#trunkbpforumsphp">trunk/bp-forums.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incajaxphp">trunk/bp-themes/bp-default/_inc/ajax.php</a></li>
<li><a href="#trunkbpthemesbpdefault_inccssdefaultcss">trunk/bp-themes/bp-default/_inc/css/default.css</a></li>
<li><a href="#trunkbpthemesbpdefaultforumsindexphp">trunk/bp-themes/bp-default/forums/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumstopicsloopphp">trunk/bp-themes/bp-default/forums/topics-loop.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpforumsbpforumstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-templatetags.php (2193 => 2194)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-templatetags.php        2009-12-17 01:46:10 UTC (rev 2193)
+++ trunk/bp-forums/bp-forums-templatetags.php        2009-12-17 12:24:10 UTC (rev 2194)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">         var $sort_by;
</span><span class="cx">         var $order;
</span><span class="cx">
</span><del>-        function BP_Forums_Template_Forum( $type, $forum_id, $page, $per_page, $max, $no_stickies, $filter ) {
</del><ins>+        function BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, $no_stickies, $search_terms ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx">
</span><span class="cx">                 $this->pag_page = isset( $_REQUEST['p'] ) ? intval( $_REQUEST['p'] ) : $page;
</span><span class="lines">@@ -30,23 +30,19 @@
</span><span class="cx">
</span><span class="cx">                 switch ( $type ) {
</span><span class="cx">                         case 'newest': default:
</span><del>-                                $this->topics = bp_forums_get_forum_topics( array( 'forum_id' => $forum_id, 'filter' => $filter, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</del><ins>+                                $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'forum_id' => $forum_id, 'filter' => $search_terms, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</ins><span class="cx">                                 break;
</span><span class="cx">
</span><span class="cx">                         case 'popular':
</span><del>-                                $this->topics = bp_forums_get_forum_topics( array( 'type' => 'popular', 'filter' => $filter, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</del><ins>+                                $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'popular', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</ins><span class="cx">                                 break;
</span><span class="cx">
</span><span class="cx">                         case 'unreplied':
</span><del>-                                $this->topics = bp_forums_get_forum_topics( array( 'type' => 'unreplied', 'filter' => $filter, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</del><ins>+                                $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'unreplied', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</ins><span class="cx">                                 break;
</span><span class="cx">
</span><del>-                        case 'personal':
-                                $this->topics = bp_forums_get_forum_topics( array( 'type' => 'personal', 'filter' => $filter, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
-                                break;
-
</del><span class="cx">                         case 'tag':
</span><del>-                                $this->topics = bp_forums_get_forum_topics( array( 'type' => 'tag', 'filter' => $filter, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</del><ins>+                                $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'tag', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $show_stickies ) );
</ins><span class="cx">                                 break;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -157,11 +153,12 @@
</span><span class="cx">         $defaults = array(
</span><span class="cx">                 'type' => 'newest',
</span><span class="cx">                 'forum_id' => false,
</span><ins>+                'user_id' => false,
</ins><span class="cx">                 'page' => 1,
</span><span class="cx">                 'per_page' => 15,
</span><span class="cx">                 'max' => false,
</span><span class="cx">                 'no_stickies' => false,
</span><del>-                'filter' => false
</del><ins>+                'search_terms' => false
</ins><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><span class="lines">@@ -169,22 +166,22 @@
</span><span class="cx">
</span><span class="cx">         /* If we're in a single group, set this group's forum_id */
</span><span class="cx">         if ( !$forum_id && $bp->groups->current_group ) {
</span><del>-                $forum_id = groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' );
</del><ins>+                $bp->groups->current_group->forum_id = groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' );
</ins><span class="cx">
</span><span class="cx">                 /* If it turns out there is no forum for this group, return false so we don't fetch all global topics */
</span><del>-                if ( !$forum_id )
</del><ins>+                if ( !$bp->groups->current_group->forum_id )
</ins><span class="cx">                         return false;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* If we're viewing a tag in the directory, let's auto set the filter to the tag name */
</span><span class="cx">         if ( $bp->is_directory && 'tag' == $type && !empty( $bp->action_variables[0] ) )
</span><del>-                $filter = $bp->action_variables[0];
</del><ins>+                $search_terms = $bp->action_variables[0];
</ins><span class="cx">
</span><del>-        /* If $_GET['s'] is set, let's auto populate the filter var */
</del><ins>+        /* If $_GET['fs'] is set, let's auto populate the search_terms var */
</ins><span class="cx">         if ( $bp->is_directory && !empty( $_GET['fs'] ) )
</span><del>-                $filter = $_GET['fs'];
</del><ins>+                $search_terms = $_GET['fs'];
</ins><span class="cx">
</span><del>-        $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $page, $per_page, $max, $no_stickies, $filter );
</del><ins>+        $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, $no_stickies, $search_terms );
</ins><span class="cx">
</span><span class="cx">         return apply_filters( 'bp_has_topics', $forum_template->has_topics(), &$forum_template );
</span><span class="cx"> }
</span><span class="lines">@@ -934,14 +931,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_directory_forums_search_form() {
</span><del>-        global $bp; ?>
-        <form action="<?php echo $bp->root_domain . '/' . $bp->forums->slug . '/'; ?>" method="get" id="search-forums-form">
-                <label><input type="text" name="fs" id="forums_search" value="<?php if ( isset( $_GET['fs'] ) ) { echo attribute_escape( $_GET['fs'] ); } else { _e( 'Search anything...', 'buddypress' ); } ?>" onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>
-                <input type="submit" id="forums_search_submit" name="submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
</del><ins>+        global $bp;
+
+        $search_value = __( 'Search anything...', 'buddypress' );
+        if ( !empty( $_REQUEST['fs'] ) )
+                 $search_value = $_REQUEST['fs'];
+
+        else if ( !empty( $_COOKIE['bp-forums-search-terms'] ) && 'false' != $_COOKIE['bp-forums-search-terms'] )
+                 $search_value = $_COOKIE['bp-forums-search-terms'];
+
+?>
+        <form action="" method="get" id="search-forums-form">
+                <label><input type="text" name="s" id="forums_search" value="<?php echo attribute_escape($search_value) ?>" onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>
+                <input type="submit" id="forums_search_submit" name="forums_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
</ins><span class="cx">         </form>
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><del>-
</del><span class="cx"> function bp_forum_permalink() {
</span><span class="cx">         echo bp_get_forum_permalink();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpforumsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums.php (2193 => 2194)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums.php        2009-12-17 01:46:10 UTC (rev 2193)
+++ trunk/bp-forums.php        2009-12-17 12:24:10 UTC (rev 2194)
</span><span class="lines">@@ -127,15 +127,6 @@
</span><span class="cx">         return bb_new_forum( array( 'forum_name' => stripslashes( $forum_name ), 'forum_desc' => stripslashes( $forum_desc ), 'forum_parent' => $forum_parent_id, 'forum_order' => $forum_order, 'forum_is_category' => $forum_is_category ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>-function bp_forums_get_forum_topicpost_count( $forum_id ) {
-        global $wpdb, $bbdb;
-
-        do_action( 'bbpress_init' );
-
-        /* Need to find a bbPress function that does this */
-        return $wpdb->get_results( $wpdb->prepare( "SELECT topics, posts from {$bbdb->forums} WHERE forum_id = %d", $forum_id ) );
-}
-
</del><span class="cx"> /* Topic Functions */
</span><span class="cx">
</span><span class="cx"> function bp_forums_get_forum_topics( $args = '' ) {
</span><span class="lines">@@ -146,6 +137,7 @@
</span><span class="cx">         $defaults = array(
</span><span class="cx">                 'type' => 'newest',
</span><span class="cx">                 'forum_id' => false,
</span><ins>+                'user_id' => false,
</ins><span class="cx">                 'page' => 1,
</span><span class="cx">                 'per_page' => 15,
</span><span class="cx">                 'exclude' => false,
</span><span class="lines">@@ -158,27 +150,22 @@
</span><span class="cx">
</span><span class="cx">         switch ( $type ) {
</span><span class="cx">                 case 'newest':
</span><del>-                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'per_page' => $per_page, 'page' => $page, 'number' => $per_page, 'exclude' => $exclude, 'topic_title' => $filter, 'sticky' => $show_stickies ), 'get_latest_topics' );
-                        $topics = $query->results;
</del><ins>+                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'topic_author_id' => $user_id, 'per_page' => $per_page, 'page' => $page, 'number' => $per_page, 'exclude' => $exclude, 'topic_title' => $filter, 'sticky' => $show_stickies ), 'get_latest_topics' );
+                        $topics =& $query->results;
</ins><span class="cx">                 break;
</span><span class="cx">
</span><span class="cx">                 case 'popular':
</span><del>-                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'per_page' => $per_page, 'page' => $page, 'order_by' => 't.topic_posts', 'topic_title' => $filter, 'sticky' => $show_stickies ) );
</del><ins>+                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'topic_author_id' => $user_id, 'per_page' => $per_page, 'page' => $page, 'order_by' => 't.topic_posts', 'topic_title' => $filter, 'sticky' => $show_stickies ) );
</ins><span class="cx">                         $topics =& $query->results;
</span><span class="cx">                 break;
</span><span class="cx">
</span><span class="cx">                 case 'unreplied':
</span><del>-                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'post_count' => 1, 'per_page' => $per_page, 'page' => $page, 'order_by' => 't.topic_time', 'topic_title' => $filter, 'sticky' => $show_stickies ) );
</del><ins>+                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'topic_author_id' => $user_id, 'post_count' => 1, 'per_page' => $per_page, 'page' => $page, 'order_by' => 't.topic_time', 'topic_title' => $filter, 'sticky' => $show_stickies ) );
</ins><span class="cx">                         $topics =& $query->results;
</span><span class="cx">                 break;
</span><span class="cx">
</span><del>-                case 'personal':
-                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'per_page' => $per_page, 'page' => $page, 'topic_author_id' => $bp->loggedin_user->id, 'order_by' => 't.topic_time', 'topic_title' => $filter, 'sticky' => $show_stickies ), 'get_recent_user_threads' );
-                        $topics =& $query->results;
-                break;
-
</del><span class="cx">                 case 'tag':
</span><del>-                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'tag' => $filter, 'per_page' => $per_page, 'page' => $page, 'order_by' => 't.topic_time', 'sticky' => $show_stickies ) );
</del><ins>+                        $query = new BB_Query( 'topic', array( 'forum_id' => $forum_id, 'topic_author_id' => $user_id, 'tag' => $filter, 'per_page' => $per_page, 'page' => $page, 'order_by' => 't.topic_time', 'sticky' => $show_stickies ) );
</ins><span class="cx">                         $topics =& $query->results;
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -318,6 +305,25 @@
</span><span class="cx">         return bb_delete_topic( $topic_id, 1 );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function bp_forums_total_topic_count() {
+        do_action( 'bbpress_init' );
+
+        $query = new BB_Query( 'topic', array( 'page' => 1, 'per_page' => false, 'count' => true ) );
+        return $query->count;
+}
+
+function bp_forums_total_topic_count_for_user( $user_id = false ) {
+        global $bp;
+
+        do_action( 'bbpress_init' );
+
+        if ( !$user_id )
+                $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;
+
+        $query = new BB_Query( 'topic', array( 'topic_author_id' => $user_id, 'page' => 1, 'per_page' => false, 'count' => true ) );
+        return $query->count;
+}
+
</ins><span class="cx"> /* Post Functions */
</span><span class="cx">
</span><span class="cx"> function bp_forums_get_topic_posts( $args = '' ) {
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/ajax.php (2193 => 2194)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/ajax.php        2009-12-17 01:46:10 UTC (rev 2193)
+++ trunk/bp-themes/bp-default/_inc/ajax.php        2009-12-17 12:24:10 UTC (rev 2194)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx">         /* Build the querystring */
</span><span class="cx">
</span><span class="cx">         /* Sort out type ordering */
</span><del>-        if ( 'active' != $filter && 'newest' != $filter && 'alphabetical' != $filter )
</del><ins>+        if ( 'active' != $filter && 'popular' != $filter && 'unreplied' != $filter )
</ins><span class="cx">                 $type = 'active';
</span><span class="cx">
</span><span class="cx">         $bp->ajax_querystring = 'type=' . $filter . '&page=' . $page;
</span><span class="lines">@@ -145,13 +145,13 @@
</span><span class="cx">         if ( $search_terms )
</span><span class="cx">                 $bp->ajax_querystring .= '&search_terms=' . $search_terms;
</span><span class="cx">
</span><del>-        if ( !$type || ( 'all' != $type && 'myblogs' != $type ) )
</del><ins>+        if ( !$type || ( 'all' != $type && 'mytopics' != $type ) )
</ins><span class="cx">                 $type = 'all';
</span><span class="cx">
</span><del>-        if ( ( 'myblogs' == $type ) && !is_user_logged_in() )
</del><ins>+        if ( ( 'mytopics' == $type ) && !is_user_logged_in() )
</ins><span class="cx">                 $type = 'all';
</span><span class="cx">
</span><del>-        if ( 'my' == $type || $bp->displayed_user->id ) {
</del><ins>+        if ( 'mytopics' == $type || $bp->displayed_user->id ) {
</ins><span class="cx">                 $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;
</span><span class="cx">                 $bp->ajax_querystring .= '&user_id=' . $user_id;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_inccssdefaultcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/default.css (2193 => 2194)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/default.css        2009-12-17 01:46:10 UTC (rev 2193)
+++ trunk/bp-themes/bp-default/_inc/css/default.css        2009-12-17 12:24:10 UTC (rev 2194)
</span><span class="lines">@@ -197,7 +197,11 @@
</span><span class="cx">         float: left;
</span><span class="cx">         width: 224px;
</span><span class="cx">         margin-left: -226px;
</span><ins>+        margin-top: 1px;
</ins><span class="cx">         border-left: 1px solid #e4e4e4;
</span><ins>+        -moz-border-radius-topright: 3px;
+        -webkit-border-top-right-radius: 3px;
+        background: url( ../images/sidebar_back.gif ) top left repeat-x;
</ins><span class="cx"> }
</span><span class="cx">         div#sidebar div#sidebar-me img.avatar {
</span><span class="cx">                 float: left;
</span><span class="lines">@@ -479,9 +483,10 @@
</span><span class="cx">         div.item-list-tabs#user-subnav,
</span><span class="cx">         div.item-list-tabs#group-subnav {
</span><span class="cx">                 background: #fff;
</span><del>-                margin: 0 -15px 20px -15px;
</del><ins>+                margin: 0 -15px 0 -15px;
</ins><span class="cx">                 border-bottom: 1px solid #eaeaea;
</span><span class="cx">                 min-height: 35px;
</span><ins>+                overflow: hidden;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> /* > Item Body
</span><span class="lines">@@ -518,7 +523,6 @@
</span><span class="cx">         .mygroups div.pagination, .myblogs div.pagination {
</span><span class="cx">                 background: #f8f8f8;
</span><span class="cx">                 border: none;
</span><del>-                margin-top: -20px;
</del><span class="cx">                 padding: 8px 15px;
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultforumsindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/forums/index.php (2193 => 2194)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/index.php        2009-12-17 01:46:10 UTC (rev 2193)
+++ trunk/bp-themes/bp-default/forums/index.php        2009-12-17 12:24:10 UTC (rev 2194)
</span><span class="lines">@@ -9,14 +9,14 @@
</span><span class="cx">                         <h2><?php _e( 'Group Forums Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() ) : ?> &nbsp;<a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ) ?></a><?php endif; ?></h2>
</span><span class="cx">
</span><span class="cx">                         <div id="forums-dir-search" class="dir-search">
</span><del>-                                <?php bp_directory_groups_search_form() ?>
</del><ins>+                                <?php bp_directory_forums_search_form() ?>
</ins><span class="cx">                         </div>
</span><span class="cx">                 </form>
</span><span class="cx">
</span><span class="cx">                         <div id="new-topic-post">
</span><span class="cx">                                 <?php if ( is_user_logged_in() ) : ?>
</span><span class="cx">
</span><del>-                                        <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=20&per_page=20' ) ) : ?>
</del><ins>+                                        <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
</ins><span class="cx">
</span><span class="cx">                                                 <form action="" method="post" id="forum-topic-form" class="standard-form">
</span><span class="cx">
</span><span class="lines">@@ -69,8 +69,12 @@
</span><span class="cx">
</span><span class="cx">                         <div class="item-list-tabs">
</span><span class="cx">                                 <ul>
</span><del>-                                        <li class="selected" id="forums-all"><a href="<?php bp_root_domain() ?>"><?php _e( 'All Group Forums', 'buddypress' ) ?></a></li>
</del><ins>+                                        <li class="selected" id="forums-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Topics (%d)', 'buddypress' ), bp_forums_total_topic_count() ) ?></a></li>
</ins><span class="cx">
</span><ins>+                                        <?php if ( is_user_logged_in() && bp_forums_total_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>
+                                                <li id="forums-mytopics"><a href="<?php echo bp_loggedin_user_domain() . BP_GROUPS_SLUG . '/' ?>"><?php printf( __( 'My Topics (%d)', 'buddypress' ), bp_forums_total_topic_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
+                                        <?php endif; ?>
+
</ins><span class="cx">                                         <?php do_action( 'bp_members_directory_group_types' ) ?>
</span><span class="cx">
</span><span class="cx">                                         <li id="forums-order-select" class="last filter">
</span><span class="lines">@@ -79,7 +83,7 @@
</span><span class="cx">                                                 <select>
</span><span class="cx">                                                         <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
</span><span class="cx">                                                         <option value="popular"><?php _e( 'Most Posts', 'buddypress' ) ?></option>
</span><del>-                                                        <option value="newest"><?php _e( 'Unreplied', 'buddypress' ) ?></option>
</del><ins>+                                                        <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ) ?></option>
</ins><span class="cx">
</span><span class="cx">                                                         <?php do_action( 'bp_groups_directory_order_options' ) ?>
</span><span class="cx">                                                 </select>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultforumstopicsloopphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/forums/topics-loop.php (2193 => 2194)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/topics-loop.php        2009-12-17 01:46:10 UTC (rev 2193)
+++ trunk/bp-themes/bp-default/forums/topics-loop.php        2009-12-17 12:24:10 UTC (rev 2194)
</span><span class="lines">@@ -22,10 +22,10 @@
</span><span class="cx">
</span><span class="cx">                 <tr>
</span><span class="cx">                         <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th>
</span><del>-                        <th id="th-poster"><?php _e( 'Last Poster', 'buddypress' ) ?></th>
</del><ins>+                        <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th>
</ins><span class="cx">
</span><span class="cx">                         <?php if ( !bp_is_group_forum() ) : ?>
</span><del>-                                <th id="th-group"><?php _e( 'Posted In', 'buddypress' ) ?></th>
</del><ins>+                                <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th>
</ins><span class="cx">                         <?php endif; ?>
</span><span class="cx">
</span><span class="cx">                         <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th>
</span></span></pre>
</div>
</div>
</body>
</html>