<!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] [1859] trunk/bp-themes/bp-sn-parent:
  Adding global group forum directory to theme</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>1859</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-12 00:01:44 +0000 (Sat, 12 Sep 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Adding global group forum directory to theme</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpsnparentgroupssingleforumindexphp">trunk/bp-themes/bp-sn-parent/groups/single/forum/index.php</a></li>
<li><a href="#trunkbpthemesbpsnparentgroupssingleforumtopicphp">trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php</a></li>
<li><a href="#trunkbpthemesbpsnparentheaderphp">trunk/bp-themes/bp-sn-parent/header.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/bp-themes/bp-sn-parent/directories/forums/</li>
<li><a href="#trunkbpthemesbpsnparentdirectoriesforumsforumsloopphp">trunk/bp-themes/bp-sn-parent/directories/forums/forums-loop.php</a></li>
<li><a href="#trunkbpthemesbpsnparentdirectoriesforumsindexphp">trunk/bp-themes/bp-sn-parent/directories/forums/index.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpsnparentdirectoriesforumsforumsloopphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-sn-parent/directories/forums/forums-loop.php (0 => 1859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/directories/forums/forums-loop.php                                (rev 0)
+++ trunk/bp-themes/bp-sn-parent/directories/forums/forums-loop.php        2009-09-12 00:01:44 UTC (rev 1859)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+&lt;?php if ( bp_has_forum_topics( 'type=' . bp_get_forum_topic_type() . '&amp;per_page=25&amp;max=250' ) ) : ?&gt;        
+                
+        &lt;div class=&quot;pagination&quot;&gt;
+        
+                &lt;div id=&quot;post-count&quot; class=&quot;pag-count&quot;&gt;
+                        &lt;?php bp_forum_pagination_count() ?&gt;
+                &lt;/div&gt;
+
+                &lt;div class=&quot;pagination-links&quot; id=&quot;topic-pag&quot;&gt;
+                        &lt;?php bp_forum_pagination() ?&gt;
+                &lt;/div&gt;
+        
+        &lt;/div&gt;
+        
+        &lt;table id=&quot;global-forum-topic-list&quot;&gt;
+                
+                &lt;tr&gt;
+                        &lt;th id=&quot;th-title&quot;&gt;&lt;?php _e( 'Topic Title', 'buddypress' ) ?&gt;&lt;/th&gt;
+                        &lt;th id=&quot;th-poster&quot;&gt;&lt;?php _e( 'Last Poster', 'buddypress' ) ?&gt;&lt;/th&gt;
+                        &lt;th id=&quot;th-group&quot;&gt;&lt;?php _e( 'Posted In', 'buddypress' ) ?&gt;&lt;/th&gt;
+                        &lt;th id=&quot;th-postcount&quot;&gt;&lt;?php _e( 'Posts', 'buddypress' ) ?&gt;&lt;/th&gt;
+                        &lt;th id=&quot;th-freshness&quot;&gt;&lt;?php _e( 'Freshness', 'buddypress' ) ?&gt;&lt;/th&gt;
+                &lt;/tr&gt;
+                
+                &lt;?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?&gt;
+                        
+                &lt;tr class=&quot;&lt;?php bp_the_topic_css_class() ?&gt;&quot;&gt;
+                        &lt;td class=&quot;td-title&quot;&gt;
+                                &lt;a class=&quot;topic-title&quot; href=&quot;&lt;?php bp_the_topic_permalink() ?&gt;&quot; title=&quot;&lt;?php bp_the_topic_title() ?&gt; - &lt;?php _e( 'Permalink', 'buddypress' ) ?&gt;&quot;&gt;
+                                        &lt;?php bp_the_topic_title() ?&gt;
+                                &lt;/a&gt;
+                        &lt;/td&gt;
+                        &lt;td class=&quot;td-poster&quot;&gt;
+                                &lt;a href=&quot;&lt;?php bp_the_topic_permalink() ?&gt;&quot;&gt;
+                                        &lt;?php bp_the_topic_last_poster_avatar( 'type=thumb&amp;width=20&amp;height=20' ) ?&gt;
+                                &lt;/a&gt; 
+                                &lt;?php bp_the_topic_poster_name() ?&gt;
+                        &lt;/td&gt;
+                        &lt;td class=&quot;td-group&quot;&gt;
+                                &lt;a href=&quot;&lt;?php bp_the_topic_object_permalink() ?&gt;forum/&quot;&gt;&lt;?php bp_the_topic_object_avatar( 'type=thumb&amp;width=20&amp;height=20' ) ?&gt;&lt;/a&gt; 
+                                &lt;a href=&quot;&lt;?php bp_the_topic_object_permalink() ?&gt;forum/&quot; title=&quot;&lt;?php bp_the_topic_object_name() ?&gt;&quot;&gt;&lt;?php bp_the_topic_object_name() ?&gt;&lt;/a&gt;
+                        &lt;/td&gt;
+                        &lt;td class=&quot;td-postcount&quot;&gt;
+                                &lt;?php bp_the_topic_total_posts() ?&gt;
+                        &lt;/td&gt;
+                        &lt;td class=&quot;td-freshness&quot;&gt;
+                                &lt;?php bp_the_topic_time_since_last_post() ?&gt;
+                        &lt;/td&gt;
+                &lt;/tr&gt;
+                
+                &lt;?php endwhile; ?&gt;
+                
+        &lt;/table&gt;
+        
+&lt;?php else: ?&gt;
+
+        &lt;div id=&quot;message&quot; class=&quot;info&quot;&gt;
+                &lt;p&gt;&lt;?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ) ?&gt;&lt;/p&gt;
+        &lt;/div&gt;
+
+&lt;?php endif;?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentdirectoriesforumsindexphp"></a>
<div class="addfile"><h4>Added: trunk/bp-themes/bp-sn-parent/directories/forums/index.php (0 => 1859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/directories/forums/index.php                                (rev 0)
+++ trunk/bp-themes/bp-sn-parent/directories/forums/index.php        2009-09-12 00:01:44 UTC (rev 1859)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+&lt;?php get_header() ?&gt;
+
+        &lt;?php do_action( 'bp_before_directory_forums_content' ) ?&gt;                
+
+        &lt;div id=&quot;content&quot;&gt;
+        
+                &lt;div class=&quot;page&quot; id=&quot;forums-directory-page&quot;&gt;
+        
+                        &lt;form action=&quot;&lt;?php echo site_url() . '/' ?&gt;&quot; method=&quot;post&quot; id=&quot;forums-directory-form&quot;&gt;
+
+                                &lt;div id=&quot;forums-directory-listing&quot; class=&quot;directory-listing&quot;&gt;
+                                        &lt;h3&gt;&lt;?php _e( 'Latest Forum Topics', 'buddypress' ) ?&gt;&lt;/h3&gt;
+                                        
+                                        &lt;div id=&quot;forum-dir-list&quot;&gt;
+                                                
+                                                &lt;?php do_action( 'bp_before_directory_forums_topic_filters' ) ?&gt;
+                                                
+                                                &lt;div id=&quot;global-forum-topic-filters&quot;&gt;
+                                                        &lt;ul&gt;
+                                                                &lt;li&lt;?php if ( '' == bp_current_action() &amp;&amp; !isset( $_GET['s'] ) ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt; id=&quot;forums-newest&quot;&gt;&lt;a href=&quot;&lt;?php bp_newest_forum_topics_link() ?&gt;&quot; title=&quot;&lt;?php _e( 'Newest Topics', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Newest Topics', 'buddypress') ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                                                &lt;li&lt;?php if ( 'popular' == bp_current_action() ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt; id=&quot;forums-popular&quot;&gt;&lt;a href=&quot;&lt;?php bp_popular_forum_topics_link() ?&gt;&quot; title=&quot;&lt;?php _e( 'Most Popular Topics', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Most Popular Topics', 'buddypress') ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                                                &lt;li&lt;?php if ( 'unreplied' == bp_current_action() ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt; id=&quot;forums-unreplied&quot;&gt;&lt;a href=&quot;&lt;?php bp_unreplied_forum_topics_link() ?&gt;&quot; title=&quot;&lt;?php _e( 'Unreplied Topics', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Unreplied Topics', 'buddypress') ?&gt;&lt;/a&gt;&lt;/li&gt;
+                
+                                                                &lt;?php if ( is_user_logged_in() ) : ?&gt;
+                                                                        &lt;li&lt;?php if ( 'personal' == bp_current_action() ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt; id=&quot;forums-personal&quot;&gt;&lt;a href=&quot;&lt;?php bp_my_forum_topics_link() ?&gt;&quot; title=&quot;&lt;?php _e( 'Topics I have started or replied to', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'My Topics', 'buddypress') ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                                                &lt;?php endif; ?&gt;
+                                                                
+                                                                &lt;?php if ( 'tag' == bp_current_action() ) : ?&gt;
+                                                                        &lt;li class=&quot;selected&quot; id=&quot;forums-tag&quot;&gt;&lt;a href=&quot;&lt;?php bp_newest_forum_topics_link() ?&gt;&quot; title=&quot;&lt;?php _e( 'Tag', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'Tagged: %s', 'buddypress' ), bp_get_forums_tag_name() ) ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                                                &lt;?php endif; ?&gt;
+                                                                
+                                                                &lt;?php if ( isset( $_GET['s'] ) ) : ?&gt;
+                                                                        &lt;li class=&quot;selected&quot; id=&quot;forums-search&quot;&gt;&lt;a href=&quot;&lt;?php bp_newest_forum_topics_link() ?&gt;&quot; title=&quot;&lt;?php _e( 'Search', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'Matching: %s', 'buddypress' ), attribute_escape( $_GET['s'] ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                                                &lt;?php endif; ?&gt;
+                                                                
+                                                                &lt;?php do_action( 'bp_directory_forums_topic_filters' ) ?&gt;
+                                                        &lt;/ul&gt;                                                                
+                                                &lt;/div&gt;
+                                                
+                                                &lt;?php do_action( 'bp_after_directory_forums_topic_filters' ) ?&gt;
+
+                                                &lt;?php locate_template( array( 'directories/forums/forums-loop.php' ), true ) ?&gt;
+                                        &lt;/div&gt;
+
+                                &lt;/div&gt;
+                        
+                                &lt;?php do_action( 'bp_directory_forums_content' ) ?&gt;
+
+                        &lt;/form&gt;
+        
+                &lt;/div&gt;
+        
+        &lt;/div&gt;
+
+        &lt;?php do_action( 'bp_after_directory_forums_content' ) ?&gt;                
+        &lt;?php do_action( 'bp_before_directory_forums_sidebar' ) ?&gt;                
+
+        &lt;div id=&quot;sidebar&quot; class=&quot;directory-sidebar&quot;&gt;
+
+                &lt;?php do_action( 'bp_before_directory_forums_search' ) ?&gt;        
+
+                &lt;div id=&quot;forums-directory-search&quot; class=&quot;directory-widget&quot;&gt;
+                        
+                        &lt;h3&gt;&lt;?php _e( 'Forum Topic Search', 'buddypress' ) ?&gt;&lt;/h3&gt;
+
+                        &lt;?php bp_directory_forums_search_form() ?&gt;
+
+                        &lt;?php do_action( 'bp_directory_forums_search' ) ?&gt;
+                                
+                &lt;/div&gt;
+
+                &lt;?php do_action( 'bp_after_directory_forums_search' ) ?&gt;
+                &lt;?php do_action( 'bp_before_directory_forums_tags' ) ?&gt;        
+
+                &lt;div id=&quot;forums-directory-tags&quot; class=&quot;directory-widget&quot;&gt;
+                        
+                        &lt;h3&gt;&lt;?php _e( 'Forum Topic Tags', 'buddypress' ) ?&gt;&lt;/h3&gt;
+
+                        &lt;?php bp_forums_tag_heat_map(); ?&gt;
+
+                        &lt;?php do_action( 'bp_directory_forums_search' ) ?&gt;
+                                
+                &lt;/div&gt;
+
+                &lt;?php do_action( 'bp_after_directory_forums_search' ) ?&gt;        
+
+        &lt;/div&gt;
+        
+        &lt;?php do_action( 'bp_after_directory_forums_sidebar' ) ?&gt; 
+
+&lt;?php get_footer() ?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentgroupssingleforumindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/groups/single/forum/index.php (1858 => 1859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/groups/single/forum/index.php        2009-09-11 23:59:16 UTC (rev 1858)
+++ trunk/bp-themes/bp-sn-parent/groups/single/forum/index.php        2009-09-12 00:01:44 UTC (rev 1859)
</span><span class="lines">@@ -62,11 +62,15 @@
</span><span class="cx"> 
</span><span class="cx">                                         &lt;?php endif;?&gt;
</span><span class="cx">                                         
</span><del>-                                        &lt;?php if ( bp_group_is_member() ) : ?&gt;
</del><ins>+                                        &lt;?php if ( ( is_user_logged_in() &amp;&amp; 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?&gt;
</ins><span class="cx">                                 
</span><span class="cx">                                                 &lt;div id=&quot;post-new-topic&quot;&gt;
</span><span class="cx"> 
</span><span class="cx">                                                         &lt;?php do_action( 'groups_forum_new_topic_before' ) ?&gt;
</span><ins>+                                                        
+                                                        &lt;?php if ( !bp_group_is_member() ) : ?&gt;
+                                                                &lt;p&gt;&lt;?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ) ?&gt;&lt;/p&gt;
+                                                        &lt;?php endif; ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                                         &lt;a name=&quot;post-new&quot;&gt;&lt;/a&gt;
</span><span class="cx">                                                         &lt;p&gt;&lt;strong&gt;&lt;?php _e( 'Post a New Topic:', 'buddypress' ) ?&gt;&lt;/strong&gt;&lt;/p&gt;
</span><span class="lines">@@ -77,7 +81,7 @@
</span><span class="cx">                                                         &lt;label&gt;&lt;?php _e( 'Content:', 'buddypress' ) ?&gt;&lt;/label&gt;
</span><span class="cx">                                                         &lt;textarea name=&quot;topic_text&quot; id=&quot;topic_text&quot;&gt;&lt;/textarea&gt;
</span><span class="cx">                                         
</span><del>-                                                        &lt;label&gt;&lt;?php _e( 'Tags:', 'buddypress' ) ?&gt;&lt;/label&gt;
</del><ins>+                                                        &lt;label&gt;&lt;?php _e( 'Tags (comma seperated):', 'buddypress' ) ?&gt;&lt;/label&gt;
</ins><span class="cx">                                                         &lt;input type=&quot;text&quot; name=&quot;topic_tags&quot; id=&quot;topic_tags&quot; value=&quot;&quot; /&gt;
</span><span class="cx"> 
</span><span class="cx">                                                         &lt;?php do_action( 'groups_forum_new_topic_after' ) ?&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentgroupssingleforumtopicphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php (1858 => 1859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php        2009-09-11 23:59:16 UTC (rev 1858)
+++ trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php        2009-09-12 00:01:44 UTC (rev 1859)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">                                         
</span><span class="cx">                                         &lt;ul id=&quot;topic-post-list&quot; class=&quot;item-list&quot;&gt;
</span><span class="cx">                                                 &lt;li id=&quot;topic-meta&quot;&gt;
</span><del>-                                                        &lt;span class=&quot;small&quot;&gt;&lt;a href=&quot;&lt;?php bp_forum_permalink() ?&gt;&quot;&gt;&amp;larr;&lt;?php _e( 'Back to Forum', 'buddypress') ?&gt;&lt;/a&gt;&lt;/span&gt;
</del><ins>+                                                        &lt;span class=&quot;small&quot;&gt;&lt;a href=&quot;&lt;?php bp_forum_permalink() ?&gt;&quot;&gt;&amp;larr; &lt;?php _e( 'Group Forum', 'buddypress' ) ?&gt;&lt;/a&gt; | &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Topic Directory', 'buddypress') ?&gt;&lt;/a&gt;&lt;/span&gt;
</ins><span class="cx">                                                         &lt;h3&gt;&lt;?php bp_the_topic_title() ?&gt; (&lt;?php bp_the_topic_total_post_count() ?&gt;)&lt;/h3&gt;
</span><span class="cx">                                                         
</span><span class="cx">                                                         &lt;?php if ( bp_group_is_admin() || bp_group_is_mod() ) : ?&gt;
</span><span class="lines">@@ -70,16 +70,21 @@
</span><span class="cx">                                         
</span><span class="cx">                                         &lt;/ul&gt;
</span><span class="cx">                                         
</span><del>-                                        &lt;?php if ( bp_group_is_member() ) : ?&gt;
</del><ins>+                                        &lt;?php if ( ( is_user_logged_in() &amp;&amp; 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?&gt;
</ins><span class="cx">                                                                                         
</span><span class="cx">                                                 &lt;?php if ( bp_get_the_topic_is_topic_open() ) : ?&gt;
</span><span class="cx">                                                         
</span><span class="cx">                                                         &lt;div id=&quot;post-topic-reply&quot;&gt;        
</span><span class="cx">                                                                 &lt;a name=&quot;post-reply&quot;&gt;&lt;/a&gt;
</span><span class="cx"> 
</span><ins>+                                                                &lt;?php if ( !bp_group_is_member() ) : ?&gt;
+                                                                        &lt;p&gt;&lt;?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ) ?&gt;&lt;/p&gt;
+                                                                &lt;?php endif; ?&gt;
+                                                        
</ins><span class="cx">                                                                 &lt;?php do_action( 'groups_forum_new_reply_before' ) ?&gt;
</span><span class="cx">                                                 
</span><del>-                                                                &lt;p&gt;&lt;?php _e( 'Add a reply:', 'buddypress' ) ?&gt;&lt;/p&gt;
</del><ins>+                                                                &lt;p&gt;&lt;strong&gt;&lt;?php _e( 'Add a reply:', 'buddypress' ) ?&gt;&lt;/strong&gt;&lt;/p&gt;
+                                                                                                                                
</ins><span class="cx">                                                                 &lt;textarea name=&quot;reply_text&quot; id=&quot;reply_text&quot;&gt;&lt;/textarea&gt;
</span><span class="cx">                                         
</span><span class="cx">                                                                 &lt;p 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;/p&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/header.php (1858 => 1859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/header.php        2009-09-11 23:59:16 UTC (rev 1858)
+++ trunk/bp-themes/bp-sn-parent/header.php        2009-09-12 00:01:44 UTC (rev 1859)
</span><span class="lines">@@ -86,6 +86,10 @@
</span><span class="cx">                                         &lt;li&lt;?php if ( bp_is_page( BP_GROUPS_SLUG ) ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo get_option('home') ?&gt;/&lt;?php echo BP_GROUPS_SLUG ?&gt;&quot; title=&quot;&lt;?php _e( 'Groups', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Groups', 'buddypress' ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</span><span class="cx">                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><ins>+                                &lt;?php if ( function_exists( 'bp_forums_setup' ) ) : ?&gt;
+                                        &lt;li&lt;?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo get_option('home') ?&gt;/&lt;?php echo BP_FORUMS_SLUG ?&gt;&quot; title=&quot;&lt;?php _e( 'Forums', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Forums', 'buddypress' ) ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                &lt;?php endif; ?&gt;
+                                
</ins><span class="cx">                                 &lt;?php if ( function_exists( 'bp_blogs_install' ) ) : ?&gt;
</span><span class="cx">                                         &lt;li&lt;?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo get_option('home') ?&gt;/&lt;?php echo BP_BLOGS_SLUG ?&gt;&quot; title=&quot;&lt;?php _e( 'Blogs', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Blogs', 'buddypress' ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</span><span class="cx">                                 &lt;?php endif; ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>