<!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][4012] trunk: First pass at introducing forums directory, single forum, and single topic views.</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>4012</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-02-02 08:52:58 +0000 (Wed, 02 Feb 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>First pass at introducing forums directory, single forum, and single topic views. This is mostly copy/paste from groups component with some rough logic in place to display the proper screens. More to do here.</pre>

<h3>Modified Paths</h3>
<ul>
<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="#trunkbpgroupsbpgroupsscreensphp">trunk/bp-groups/bp-groups-screens.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/bp-themes/bp-default/forums/single/</li>
<li><a href="#trunkbpthemesbpdefaultforumssingleeditphp">trunk/bp-themes/bp-default/forums/single/edit.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumssingleforumheaderphp">trunk/bp-themes/bp-default/forums/single/forum-header.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumssingleforumphp">trunk/bp-themes/bp-default/forums/single/forum.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumssingletopicphp">trunk/bp-themes/bp-default/forums/single/topic.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpforumsbpforumsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-loader.php (4011 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-loader.php        2011-02-02 08:30:28 UTC (rev 4011)
+++ trunk/bp-forums/bp-forums-loader.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><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><del>-                        'screen_function' =&gt; 'bp_forums_screen_topics',
</del><ins>+                        'screen_function' =&gt; 'bp_member_forums_screen_topics',
</ins><span class="cx">                         'position'        =&gt; 20,
</span><span class="cx">                         'item_css_id'     =&gt; 'forums-friends'
</span><span class="cx">                 );
</span><span class="lines">@@ -139,7 +139,7 @@
</span><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_replies',
</del><ins>+                        'screen_function' =&gt; 'bp_member_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="lines">@@ -150,7 +150,7 @@
</span><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><del>-                        'screen_function' =&gt; 'bp_forums_screen_favorites',
</del><ins>+                        'screen_function' =&gt; 'bp_member_forums_screen_favorites',
</ins><span class="cx">                         'position'        =&gt; 60,
</span><span class="cx">                         'item_css_id'     =&gt; 'forums-favs'
</span><span class="cx">                 );
</span></span></pre></div>
<a id="trunkbpforumsbpforumsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-screens.php (4011 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-screens.php        2011-02-02 08:30:28 UTC (rev 4011)
+++ trunk/bp-forums/bp-forums-screens.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -60,32 +60,52 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_screens', 'bp_forums_directory_forums_setup' );
</span><span class="cx"> 
</span><del>-function bp_forums_screen_topics() {
</del><ins>+function bp_member_forums_screen_topics() {
</ins><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        do_action( 'bp_forums_screen_topics' );
</del><ins>+        do_action( 'bp_member_forums_screen_topics' );
</ins><span class="cx"> 
</span><span class="cx">         bp_core_load_template( apply_filters( 'bp_forums_screen_topics', 'members/single/home' ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function bp_forums_screen_replies() {
</del><ins>+function bp_member_forums_screen_replies() {
</ins><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( !bp_is_forums_component() || !bp_is_current_action( 'topic' ) || empty( $bp-&gt;action_variables[0] ) )
</del><ins>+        do_action( 'bp_member_forums_screen_replies' );
+
+        bp_core_load_template( apply_filters( 'bp_member_forums_screen_replies', 'members/single/home' ) );
+}
+
+function bp_member_forums_screen_favorites() {
+        global $bp;
+
+        do_action( 'bp_member_forums_screen_favorites' );
+
+        bp_core_load_template( apply_filters( 'bp_member_forums_screen_favorites', 'members/single/home' ) );
+}
+
+function bp_forums_screen_single_forum() {
+        global $bp;
+
+        if ( !bp_is_forums_component() || !bp_is_current_action( 'forum' ) || empty( $bp-&gt;action_variables[0] ) )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        do_action( 'bp_forums_screen_replies' );
</del><ins>+        do_action( 'bp_forums_screen_single_forum' );
</ins><span class="cx"> 
</span><del>-        bp_core_load_template( apply_filters( 'bp_forums_screen_replies', 'forums/single/topic' ) );
</del><ins>+        bp_core_load_template( apply_filters( 'bp_forums_screen_single_forum', 'forums/single/forum' ) );
</ins><span class="cx"> }
</span><del>-add_action( 'bp_screens', 'bp_forums_screen_replies' );
</del><ins>+add_action( 'bp_screens', 'bp_forums_screen_single_forum' );
</ins><span class="cx"> 
</span><del>-function bp_forums_screen_favorites() {
</del><ins>+function bp_forums_screen_single_topic() {
</ins><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        do_action( 'bp_forums_screen_favorites' );
</del><ins>+        if ( !bp_is_forums_component() || !bp_is_current_action( 'topic' ) || empty( $bp-&gt;action_variables[0] ) )
+                return false;
</ins><span class="cx"> 
</span><del>-        bp_core_load_template( apply_filters( 'bp_forums_screen_favorites', 'members/single/home' ) );
</del><ins>+        do_action( 'bp_forums_screen_single_topic' );
+
+        bp_core_load_template( apply_filters( 'bp_forums_screen_single_topic', 'forums/single/topic' ) );
</ins><span class="cx"> }
</span><ins>+add_action( 'bp_screens', 'bp_forums_screen_single_topic' );
</ins><span class="cx"> 
</span><span class="cx"> ?&gt;
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-template.php (4011 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-template.php        2011-02-02 08:30:28 UTC (rev 4011)
+++ trunk/bp-forums/bp-forums-template.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -448,10 +448,10 @@
</span><span class="cx">                 global $forum_template;
</span><span class="cx"> 
</span><span class="cx">                 $defaults = array(
</span><del>-                        'type' =&gt; 'thumb',
-                        'width' =&gt; false,
</del><ins>+                        'type'   =&gt; 'thumb',
+                        'width'  =&gt; false,
</ins><span class="cx">                         'height' =&gt; false,
</span><del>-                        'alt' =&gt; __( 'Profile picture of %s', 'buddypress' )
</del><ins>+                        'alt'    =&gt; __( 'Profile picture of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx"> 
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="lines">@@ -564,7 +564,7 @@
</span><span class="cx">                 else if ( bp_is_single_item() )
</span><span class="cx">                         $permalink = trailingslashit( bp_get_root_domain() . '/' . bp_get_forums_root_slug() . '/' . bp_current_item() );
</span><span class="cx">                 else
</span><del>-                        $permalink = trailingslashit( bp_get_root_domain() . '/' . bp_get_forums_root_slug() . '/' . $bp-&gt;current_action );
</del><ins>+                        $permalink = trailingslashit( bp_get_root_domain() . '/' . bp_get_forums_root_slug() );
</ins><span class="cx"> 
</span><span class="cx">                 return apply_filters( 'bp_get_the_topic_permalink', trailingslashit( $permalink . 'topic/' . $forum_template-&gt;topic-&gt;topic_slug ) );
</span><span class="cx">         }
</span><span class="lines">@@ -900,6 +900,8 @@
</span><span class="cx"> 
</span><span class="cx">         if ( empty( $topic_id ) &amp;&amp; bp_is_current_component( 'groups') &amp;&amp; bp_is_current_action( 'forum' ) &amp;&amp; 'topic' == $bp-&gt;action_variables[0] )
</span><span class="cx">                 $topic_id = bp_forums_get_topic_id_from_slug( $bp-&gt;action_variables[1] );
</span><ins>+        elseif ( empty( $topic_id ) &amp;&amp; bp_is_current_component( 'forums') &amp;&amp; bp_is_current_action( 'topic' ) &amp;&amp; !empty( $bp-&gt;action_variables[0] ) )
+                $topic_id = bp_forums_get_topic_id_from_slug( $bp-&gt;action_variables[0] );
</ins><span class="cx"> 
</span><span class="cx">         if ( is_numeric( $topic_id ) ) {
</span><span class="cx">                 $topic_template = new BP_Forums_Template_Topic( $topic_id, $per_page, $max, $order );
</span><span class="lines">@@ -1106,20 +1108,48 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function bp_forum_permalink() {
-        echo bp_get_forum_permalink();
</del><ins>+function bp_forum_permalink( $forum_id = 0 ) {
+        echo bp_get_forum_permalink( $forum_id );
</ins><span class="cx"> }
</span><del>-        function bp_get_forum_permalink() {
</del><ins>+        function bp_get_forum_permalink( $forum_id = 0 ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><del>-                if ( $bp-&gt;is_single_item )
-                        $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp-&gt;current_component . '/' . bp_current_item() );
-                else
-                        $permalink = trailingslashit( bp_get_root_domain() . $bp-&gt;current_component . '/' . $bp-&gt;current_action );
</del><ins>+                if ( bp_is_groups_component() ) {
+                        $permalink = trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . bp_current_item() . 'forum' );
+                } else {
+                        if ( empty( $forum_id ) ) {
+                                global $topic_template;
+                                if ( isset( $topic_template-&gt;forum_id ) )
+                                        $forum_id = $topic_template-&gt;forum_id;
+                        }
</ins><span class="cx"> 
</span><del>-                return apply_filters( 'bp_get_forum_permalink', trailingslashit( $permalink . 'forum' ) );
</del><ins>+                        if ( $forum = bp_forums_get_forum( $forum_id ) )
+                                $permalink = trailingslashit( bp_get_root_domain() . '/' . bp_get_forums_root_slug() . '/forum/' . $forum-&gt;forum_slug );
+                        else
+                                return false;
+                }
+
+                return apply_filters( 'bp_get_forum_permalink', trailingslashit( $permalink ) );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><ins>+function bp_forum_name( $forum_id = 0 ) {
+        echo bp_get_forum_name( $forum_id );
+}
+        function bp_get_forum_name( $forum_id = 0 ) {
+                global $bp;
+
+                if ( empty( $forum_id ) ) {
+                        global $topic_template;
+                        if ( isset( $topic_template-&gt;forum_id ) )
+                                $forum_id = $topic_template-&gt;forum_id;
+                }
+
+                if ( $forum = bp_forums_get_forum( $forum_id ) )
+                        return apply_filters( 'bp_get_forum_name', $forum-&gt;forum_name, $forum-&gt;forum_id );
+                else
+                        return false;
+        }
+
</ins><span class="cx"> function bp_forum_directory_permalink() {
</span><span class="cx">         echo bp_get_forum_directory_permalink();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-screens.php (4011 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-screens.php        2011-02-02 08:30:28 UTC (rev 4011)
+++ trunk/bp-groups/bp-groups-screens.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -415,7 +415,7 @@
</span><span class="cx"> function groups_screen_group_activity_permalink() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( !bp_is_current_component( 'groups' ) || !bp_is_current_action( $bp-&gt;activity-&gt;slug ) || empty( $bp-&gt;action_variables[0] ) )
</del><ins>+        if ( !bp_is_groups_component() || ( bp_is_active( 'activity' ) &amp;&amp; !bp_is_current_action( $bp-&gt;activity-&gt;slug ) ) || empty( $bp-&gt;action_variables[0] ) )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         $bp-&gt;is_single_item = true;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultforumssingleeditphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-default/forums/single/edit.php (0 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/single/edit.php                                (rev 0)
+++ trunk/bp-themes/bp-default/forums/single/edit.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+&lt;?php do_action( 'bp_before_group_forum_edit_form' ); ?&gt;
+
+&lt;?php if ( bp_has_forum_topic_posts() ) : ?&gt;
+
+        &lt;form action=&quot;&lt;?php bp_forum_topic_action(); ?&gt;&quot; method=&quot;post&quot; id=&quot;forum-topic-form&quot; class=&quot;standard-form&quot;&gt;
+
+                &lt;div class=&quot;item-list-tabs&quot; id=&quot;subnav&quot; role=&quot;navigation&quot;&gt;
+                        &lt;ul&gt;
+                                &lt;li&gt;
+                                        &lt;a href=&quot;#post-topic-reply&quot;&gt;&amp;darr; &lt;?php _e( 'Reply', 'buddypress' ); ?&gt;&lt;/a&gt;
+                                &lt;/li&gt;
+
+                                &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
+
+                                        &lt;li&gt;
+                                                &lt;a href=&quot;&lt;?php bp_forum_directory_permalink(); ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress'); ?&gt;&lt;/a&gt;
+                                        &lt;/li&gt;
+
+                                &lt;?php endif; ?&gt;
+
+                        &lt;/ul&gt;
+                &lt;/div&gt;
+
+                &lt;div id=&quot;topic-meta&quot;&gt;
+                        &lt;h3&gt;&lt;?php _e( 'Edit:', 'buddypress' ); ?&gt; &lt;?php bp_the_topic_title(); ?&gt; (&lt;?php bp_the_topic_total_post_count(); ?&gt;)&lt;/h3&gt;
+
+                        &lt;?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?&gt;
+
+                                &lt;div class=&quot;last admin-links&quot;&gt;
+
+                                        &lt;?php bp_the_topic_admin_links(); ?&gt;
+
+                                &lt;/div&gt;
+
+                        &lt;?php endif; ?&gt;
+
+                        &lt;?php do_action( 'bp_group_forum_topic_meta' ); ?&gt;
+
+                &lt;/div&gt;
+
+                &lt;?php if ( bp_group_is_member() ) : ?&gt;
+
+                        &lt;?php if ( bp_is_edit_topic() ) : ?&gt;
+
+                                &lt;div id=&quot;edit-topic&quot;&gt;
+
+                                        &lt;?php do_action( 'bp_group_before_edit_forum_topic' ); ?&gt;
+
+                                        &lt;label for=&quot;topic_title&quot;&gt;&lt;?php _e( 'Title:', 'buddypress' ); ?&gt;&lt;/label&gt;
+                                        &lt;input type=&quot;text&quot; name=&quot;topic_title&quot; id=&quot;topic_title&quot; value=&quot;&lt;?php bp_the_topic_title(); ?&gt;&quot; /&gt;
+
+                                        &lt;label for=&quot;topic_text&quot;&gt;&lt;?php _e( 'Content:', 'buddypress' ); ?&gt;&lt;/label&gt;
+                                        &lt;textarea name=&quot;topic_text&quot; id=&quot;topic_text&quot;&gt;&lt;?php bp_the_topic_text(); ?&gt;&lt;/textarea&gt;
+
+                                        &lt;?php do_action( 'bp_group_after_edit_forum_topic' ); ?&gt;
+
+                                        &lt;p class=&quot;submit&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;save_changes&quot; id=&quot;save_changes&quot; value=&quot;&lt;?php _e( 'Save Changes', 'buddypress' ); ?&gt;&quot; /&gt;&lt;/p&gt;
+
+                                        &lt;?php wp_nonce_field( 'bp_forums_edit_topic' ); ?&gt;
+
+                                &lt;/div&gt;
+
+                        &lt;?php else : ?&gt;
+
+                                &lt;div id=&quot;edit-post&quot;&gt;
+
+                                        &lt;?php do_action( 'bp_group_before_edit_forum_post' ); ?&gt;
+
+                                        &lt;textarea name=&quot;post_text&quot; id=&quot;post_text&quot;&gt;&lt;?php bp_the_topic_post_edit_text(); ?&gt;&lt;/textarea&gt;
+
+                                        &lt;?php do_action( 'bp_group_after_edit_forum_post' ) ?&gt;
+
+                                        &lt;p class=&quot;submit&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;save_changes&quot; id=&quot;save_changes&quot; value=&quot;&lt;?php _e( 'Save Changes', 'buddypress' ); ?&gt;&quot; /&gt;&lt;/p&gt;
+
+                                        &lt;?php wp_nonce_field( 'bp_forums_edit_post' ); ?&gt;
+
+                                &lt;/div&gt;
+
+                        &lt;?php endif; ?&gt;
+
+                &lt;?php endif; ?&gt;
+
+        &lt;/form&gt;&lt;!-- #forum-topic-form --&gt;
+
+&lt;?php else: ?&gt;
+
+        &lt;div id=&quot;message&quot; class=&quot;info&quot;&gt;
+                &lt;p&gt;&lt;?php _e( 'This topic does not exist.', 'buddypress' ); ?&gt;&lt;/p&gt;
+        &lt;/div&gt;
+
+&lt;?php endif;?&gt;
+
+&lt;?php do_action( 'bp_after_group_forum_edit_form' ); ?&gt;
</ins><span class="cx">Property changes on: trunk/bp-themes/bp-default/forums/single/edit.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="trunkbpthemesbpdefaultforumssingleforumheaderphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-default/forums/single/forum-header.php (0 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/single/forum-header.php                                (rev 0)
+++ trunk/bp-themes/bp-default/forums/single/forum-header.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+&lt;?php do_action( 'bp_before_forum_header' ); ?&gt;
+
+&lt;div id=&quot;item-header-avatar&quot;&gt;
+        &lt;a href=&quot;&lt;?php bp_forum_permalink(); ?&gt;&quot; title=&quot;&lt;?php bp_get_forum_name(); ?&gt;&quot;&gt;
+
+                &lt;?php //bp_forum_avatar(); ?&gt;
+
+        &lt;/a&gt;
+&lt;/div&gt;&lt;!-- #item-header-avatar --&gt;
+
+&lt;div id=&quot;item-header-content&quot;&gt;
+        &lt;h2&gt;&lt;a href=&quot;&lt;?php bp_forum_permalink(); ?&gt;&quot; title=&quot;&lt;?php bp_forum_name(); ?&gt;&quot;&gt;&lt;?php bp_forum_name(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
+        &lt;span class=&quot;highlight&quot;&gt;&lt;?php //bp_forum_type(); ?&gt;&lt;/span&gt; &lt;span class=&quot;activity&quot;&gt;&lt;?php printf( __( 'active %s ago', 'buddypress' ), '' ); //bp_get_forum_last_active() ); ?&gt;&lt;/span&gt;
+
+        &lt;?php do_action( 'bp_before_forum_header_meta' ); ?&gt;
+
+        &lt;div id=&quot;item-meta&quot;&gt;
+
+                &lt;?php //bp_forum_description(); ?&gt;
+
+                &lt;div id=&quot;item-buttons&quot;&gt;
+
+                        &lt;?php do_action( 'bp_forum_header_actions' ); ?&gt;
+
+                &lt;/div&gt;&lt;!-- #item-buttons --&gt;
+
+                &lt;?php do_action( 'bp_forum_header_meta' ); ?&gt;
+
+        &lt;/div&gt;
+&lt;/div&gt;&lt;!-- #item-header-content --&gt;
+
+&lt;?php
+do_action( 'bp_after_forum_header' );
+do_action( 'template_notices' );
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/bp-themes/bp-default/forums/single/forum-header.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="trunkbpthemesbpdefaultforumssingleforumphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-default/forums/single/forum.php (0 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/single/forum.php                                (rev 0)
+++ trunk/bp-themes/bp-default/forums/single/forum.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+&lt;?php get_header(); ?&gt;
+
+        &lt;div id=&quot;content&quot;&gt;
+                &lt;div class=&quot;padder&quot;&gt;
+
+                        &lt;?php do_action( 'bp_before_group_home_content' ) ?&gt;
+
+                                &lt;div id=&quot;item-header&quot; role=&quot;complementary&quot;&gt;
+
+                                        &lt;?php locate_template( array( 'forums/single/forum-header.php' ), true ); ?&gt;
+
+                                &lt;/div&gt;&lt;!-- #item-header --&gt;
+
+                                &lt;div id=&quot;item-nav&quot;&gt;
+                                        &lt;div class=&quot;item-list-tabs no-ajax&quot; id=&quot;subnav&quot; role=&quot;navigation&quot;&gt;
+                                                &lt;ul&gt;
+
+                                                        &lt;li&gt;
+                                                                &lt;a href=&quot;#post-new&quot; class=&quot;show-hide-new&quot;&gt;&amp;darr; &lt;?php _e( 'New Topic', 'buddypress' ) ?&gt;&lt;/a&gt;
+                                                        &lt;/li&gt;
+
+                                                        &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
+
+                                                                &lt;li&gt;
+                                                                        &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress') ?&gt;&lt;/a&gt;
+                                                                &lt;/li&gt;
+
+                                                        &lt;?php endif; ?&gt;
+
+                                                        &lt;?php do_action( 'bp_forums_directory_group_sub_types' ); ?&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;/div&gt;&lt;!-- #item-nav --&gt;
+
+                                &lt;div id=&quot;item-body&quot;&gt;
+
+                                        &lt;?php do_action( 'bp_before_directory_forums_list' ); ?&gt;
+
+                                        &lt;div id=&quot;forums-dir-list&quot; class=&quot;forums dir-list&quot; role=&quot;main&quot;&gt;
+
+                                                &lt;?php locate_template( array( 'forums/forums-loop.php' ), true ); ?&gt;
+
+                                        &lt;/div&gt;
+
+                                        &lt;?php do_action( 'bp_directory_forums_content' ); ?&gt;
+
+                                &lt;/div&gt;
+                        &lt;/div&gt;&lt;!-- #new-topic-post --&gt;
+                &lt;/div&gt;&lt;!-- .padder --&gt;
+
+        &lt;?php do_action( 'bp_after_directory_forums_content' ); ?&gt;
+
+&lt;?php get_sidebar(); ?&gt;
+&lt;?php get_footer(); ?&gt;
</ins><span class="cx">Property changes on: trunk/bp-themes/bp-default/forums/single/forum.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="trunkbpthemesbpdefaultforumssingletopicphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-default/forums/single/topic.php (0 => 4012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/single/topic.php                                (rev 0)
+++ trunk/bp-themes/bp-default/forums/single/topic.php        2011-02-02 08:52:58 UTC (rev 4012)
</span><span class="lines">@@ -0,0 +1,195 @@
</span><ins>+&lt;?php get_header(); ?&gt;
+
+        &lt;div id=&quot;content&quot;&gt;
+                &lt;div class=&quot;padder&quot;&gt;
+
+                        &lt;?php do_action( 'bp_before_group_home_content' ) ?&gt;
+
+                        &lt;?php if ( bp_has_forum_topic_posts() ) : ?&gt;
+
+                                &lt;div id=&quot;item-header&quot; role=&quot;complementary&quot;&gt;
+
+                                        &lt;?php locate_template( array( 'forums/single/forum-header.php' ), true ); ?&gt;
+
+                                &lt;/div&gt;&lt;!-- #item-header --&gt;
+
+                                &lt;div id=&quot;item-nav&quot;&gt;
+                                        &lt;div class=&quot;item-list-tabs no-ajax&quot; id=&quot;object-nav&quot; role=&quot;navigation&quot;&gt;
+                                                &lt;ul&gt;
+
+                                                        &lt;?php bp_get_options_nav(); ?&gt;
+
+                                                        &lt;?php do_action( 'bp_forum_options_nav' ); ?&gt;
+
+                                                &lt;/ul&gt;
+                                        &lt;/div&gt;
+                                &lt;/div&gt;&lt;!-- #item-nav --&gt;
+
+                                &lt;div id=&quot;item-body&quot;&gt;
+
+                                        &lt;?php do_action( 'bp_before_group_forum_topic' ); ?&gt;
+
+                                        &lt;form action=&quot;&lt;?php bp_forum_topic_action() ?&gt;&quot; method=&quot;post&quot; id=&quot;forum-topic-form&quot; class=&quot;standard-form&quot;&gt;
+
+                                                &lt;div class=&quot;item-list-tabs no-ajax&quot; id=&quot;subnav&quot; role=&quot;navigation&quot;&gt;
+                                                        &lt;ul&gt;
+                                                                &lt;li&gt;
+                                                                        &lt;a href=&quot;#post-topic-reply&quot; class=&quot;show-hide-new&quot;&gt;&amp;darr; &lt;?php _e( 'New Reply', 'buddypress' ) ?&gt;&lt;/a&gt;
+                                                                &lt;/li&gt;
+
+                                                                &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
+
+                                                                        &lt;li&gt;
+                                                                                &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress') ?&gt;&lt;/a&gt;
+                                                                        &lt;/li&gt;
+
+                                                                &lt;?php endif; ?&gt;
+
+                                                        &lt;/ul&gt;
+                                                &lt;/div&gt;
+
+                                                &lt;div id=&quot;topic-meta&quot;&gt;
+                                                        &lt;h3&gt;&lt;?php bp_the_topic_title() ?&gt; (&lt;?php bp_the_topic_total_post_count() ?&gt;)&lt;/h3&gt;
+
+                                                        &lt;?php if ( is_super_admin() || current_user_can( 'moderate' ) ) : ?&gt;
+
+                                                                &lt;div class=&quot;last admin-links&quot;&gt;
+
+                                                                        &lt;?php bp_the_topic_admin_links(); ?&gt;
+
+                                                                &lt;/div&gt;
+
+                                                        &lt;?php endif; ?&gt;
+
+                                                        &lt;?php do_action( 'bp_group_forum_topic_meta' ); ?&gt;
+
+                                                &lt;/div&gt;
+
+                                                &lt;div class=&quot;pagination no-ajax&quot;&gt;
+
+                                                        &lt;div id=&quot;post-count&quot; class=&quot;pag-count&quot;&gt;
+
+                                                                &lt;?php bp_the_topic_pagination_count() ?&gt;
+
+                                                        &lt;/div&gt;
+
+                                                        &lt;div class=&quot;pagination-links&quot; id=&quot;topic-pag&quot;&gt;
+
+                                                                &lt;?php bp_the_topic_pagination() ?&gt;
+
+                                                        &lt;/div&gt;
+
+                                                &lt;/div&gt;
+
+                                                &lt;?php do_action( 'bp_before_group_forum_topic_posts' ) ?&gt;
+
+                                                &lt;ul id=&quot;topic-post-list&quot; class=&quot;item-list&quot; role=&quot;main&quot;&gt;
+                                                        &lt;?php while ( bp_forum_topic_posts() ) : bp_the_forum_topic_post(); ?&gt;
+
+                                                                &lt;li id=&quot;post-&lt;?php bp_the_topic_post_id() ?&gt;&quot; class=&quot;&lt;?php bp_the_topic_post_css_class() ?&gt;&quot;&gt;
+                                                                        &lt;div class=&quot;poster-meta&quot;&gt;
+                                                                                &lt;a href=&quot;&lt;?php bp_the_topic_post_poster_link() ?&gt;&quot;&gt;
+
+                                                                                        &lt;?php bp_the_topic_post_poster_avatar( 'width=40&amp;height=40' ); ?&gt;
+
+                                                                                &lt;/a&gt;
+
+                                                                                &lt;?php echo sprintf( __( '%s said %s ago:', 'buddypress' ), bp_get_the_topic_post_poster_name(), bp_get_the_topic_post_time_since() ) ?&gt;
+
+                                                                        &lt;/div&gt;
+
+                                                                        &lt;div class=&quot;post-content&quot;&gt;
+
+                                                                                &lt;?php bp_the_topic_post_content() ?&gt;
+
+                                                                        &lt;/div&gt;
+
+                                                                        &lt;div class=&quot;admin-links&quot;&gt;
+
+                                                                                &lt;?php if ( is_super_admin() || current_user_can( 'moderate' ) ) : ?&gt;
+
+                                                                                        &lt;?php bp_the_topic_post_admin_links() ?&gt;
+
+                                                                                &lt;?php endif; ?&gt;
+
+                                                                                &lt;?php do_action( 'bp_group_forum_post_meta' ); ?&gt;
+
+                                                                                &lt;a href=&quot;#post-&lt;?php bp_the_topic_post_id() ?&gt;&quot; title=&quot;&lt;?php _e( 'Permanent link to this post', 'buddypress' ) ?&gt;&quot;&gt;#&lt;/a&gt;
+                                                                        &lt;/div&gt;
+                                                                &lt;/li&gt;
+
+                                                        &lt;?php endwhile; ?&gt;
+                                                &lt;/ul&gt;&lt;!-- #topic-post-list --&gt;
+
+                                                &lt;?php do_action( 'bp_after_group_forum_topic_posts' ) ?&gt;
+
+                                                &lt;div class=&quot;pagination no-ajax&quot;&gt;
+
+                                                        &lt;div id=&quot;post-count&quot; class=&quot;pag-count&quot;&gt;
+
+                                                                &lt;?php bp_the_topic_pagination_count() ?&gt;
+
+                                                        &lt;/div&gt;
+
+                                                        &lt;div class=&quot;pagination-links&quot; id=&quot;topic-pag&quot;&gt;
+
+                                                                &lt;?php bp_the_topic_pagination() ?&gt;
+
+                                                        &lt;/div&gt;
+
+                                                &lt;/div&gt;
+
+                                                &lt;?php if ( is_user_logged_in() ) : ?&gt;
+
+                                                        &lt;?php if ( bp_get_the_topic_is_last_page() ) : ?&gt;
+
+                                                                &lt;?php if ( bp_get_the_topic_is_topic_open() ) : ?&gt;
+
+                                                                        &lt;div id=&quot;post-topic-reply&quot;&gt;
+                                                                                &lt;p id=&quot;post-reply&quot;&gt;&lt;/p&gt;
+
+                                                                                &lt;?php do_action( 'groups_forum_new_reply_before' ) ?&gt;
+
+                                                                                &lt;h4&gt;&lt;?php _e( 'Add a reply:', 'buddypress' ) ?&gt;&lt;/h4&gt;
+
+                                                                                &lt;textarea name=&quot;reply_text&quot; id=&quot;reply_text&quot;&gt;&lt;/textarea&gt;
+
+                                                                                &lt;div class=&quot;submit&quot;&gt;
+                                                                                        &lt;input type=&quot;submit&quot; name=&quot;submit_reply&quot; id=&quot;submit&quot; value=&quot;&lt;?php _e( 'Post Reply', 'buddypress' ) ?&gt;&quot; /&gt;
+                                                                                &lt;/div&gt;
+
+                                                                                &lt;?php do_action( 'groups_forum_new_reply_after' ) ?&gt;
+
+                                                                                &lt;?php wp_nonce_field( 'bp_forums_new_reply' ) ?&gt;
+                                                                        &lt;/div&gt;
+
+                                                                &lt;?php else : ?&gt;
+
+                                                                        &lt;div id=&quot;message&quot; class=&quot;info&quot;&gt;
+                                                                                &lt;p&gt;&lt;?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ) ?&gt;&lt;/p&gt;
+                                                                        &lt;/div&gt;
+
+                                                                &lt;?php endif; ?&gt;
+
+                                                        &lt;?php endif; ?&gt;
+
+                                                &lt;?php endif; ?&gt;
+
+                                        &lt;/form&gt;&lt;!-- #forum-topic-form --&gt;
+                                &lt;/div&gt;
+
+                        &lt;?php else: ?&gt;
+
+                                &lt;div id=&quot;message&quot; class=&quot;info&quot;&gt;
+                                        &lt;p&gt;&lt;?php _e( 'There are no posts for this topic.', 'buddypress' ) ?&gt;&lt;/p&gt;
+                                &lt;/div&gt;
+
+                        &lt;?php endif;?&gt;
+
+                &lt;/div&gt;
+        &lt;/div&gt;
+
+&lt;?php do_action( 'bp_after_group_forum_topic' ) ?&gt;
+
+&lt;?php get_sidebar(); ?&gt;
+&lt;?php get_footer(); ?&gt;
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/bp-themes/bp-default/forums/single/topic.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>
</div>

</body>
</html>