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