<!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][3899] trunk/bp-themes/bp-default/groups/single: Add order-by sub-navigation to group forums.</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>3899</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-01-24 11:23:26 +0000 (Mon, 24 Jan 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add order-by sub-navigation to group forums. And code clean-up of forum.php and group-header.php.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefaultgroupssingleforumphp">trunk/bp-themes/bp-default/groups/single/forum.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssinglegroupheaderphp">trunk/bp-themes/bp-default/groups/single/group-header.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefaultgroupssingleforumphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/forum.php (3898 => 3899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/forum.php        2011-01-24 11:15:24 UTC (rev 3898)
+++ trunk/bp-themes/bp-default/groups/single/forum.php        2011-01-24 11:23:26 UTC (rev 3899)
</span><span class="lines">@@ -1,15 +1,40 @@
</span><del>-<?php do_action( 'bp_before_group_forum_content' ) ?>
</del><ins>+<?php
</ins><span class="cx">
</span><del>-<?php if ( bp_is_group_forum_topic_edit() ) : ?>
-        <?php locate_template( array( 'groups/single/forum/edit.php' ), true ) ?>
</del><ins>+do_action( 'bp_before_group_forum_content' );
</ins><span class="cx">
</span><del>-<?php elseif ( bp_is_group_forum_topic() ) : ?>
-        <?php locate_template( array( 'groups/single/forum/topic.php' ), true ) ?>
</del><ins>+if ( bp_is_group_forum_topic_edit() ) :
+        locate_template( array( 'groups/single/forum/edit.php' ), true );
</ins><span class="cx">
</span><del>-<?php else : ?>
</del><ins>+elseif ( bp_is_group_forum_topic() ) :
+        locate_template( array( 'groups/single/forum/topic.php' ), true );
</ins><span class="cx">
</span><ins>+else : ?>
+
+        <div class="item-list-tabs" id="subnav" role="navigation">
+                <ul>
+
+                        <?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
+
+                        <li id="forums-order-select" class="last filter">
+
+                                <?php _e( 'Order By:', 'buddypress' ); ?>
+
+                                <select>
+                                        <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
+                                        <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option>
+                                        <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
+
+                                        <?php do_action( 'bp_forums_directory_order_options' ); ?>
+
+                                </select>
+                        </li>
+                </ul>
+        </div>
+
</ins><span class="cx">         <div class="forums single-forum" role="main">
</span><ins>+
</ins><span class="cx">                 <?php locate_template( array( 'forums/forums-loop.php' ), true ) ?>
</span><ins>+
</ins><span class="cx">         </div><!-- .forums.single-forum -->
</span><span class="cx">
</span><span class="cx"> <?php endif; ?>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssinglegroupheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/group-header.php (3898 => 3899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/group-header.php        2011-01-24 11:15:24 UTC (rev 3898)
+++ trunk/bp-themes/bp-default/groups/single/group-header.php        2011-01-24 11:23:26 UTC (rev 3899)
</span><span class="lines">@@ -1,50 +1,64 @@
</span><del>-<?php do_action( 'bp_before_group_header' ) ?>
</del><ins>+<?php
</ins><span class="cx">
</span><ins>+do_action( 'bp_before_group_header' );
+
+?>
+
</ins><span class="cx"> <div id="item-actions">
</span><ins>+
</ins><span class="cx">         <?php if ( bp_group_is_visible() ) : ?>
</span><span class="cx">
</span><del>-                <h3><?php _e( 'Group Admins', 'buddypress' ) ?></h3>
-                <?php bp_group_list_admins() ?>
</del><ins>+                <h3><?php _e( 'Group Admins', 'buddypress' ); ?></h3>
</ins><span class="cx">
</span><del>-                <?php do_action( 'bp_after_group_menu_admins' ) ?>
</del><ins>+                <?php bp_group_list_admins();
</ins><span class="cx">
</span><del>-                <?php if ( bp_group_has_moderators() ) : ?>
-                        <?php do_action( 'bp_before_group_menu_mods' ) ?>
</del><ins>+                do_action( 'bp_after_group_menu_admins' );
</ins><span class="cx">
</span><ins>+                if ( bp_group_has_moderators() ) :
+                        do_action( 'bp_before_group_menu_mods' ); ?>
+
</ins><span class="cx">                         <h3><?php _e( 'Group Mods' , 'buddypress' ) ?></h3>
</span><del>-                        <?php bp_group_list_mods() ?>
</del><span class="cx">
</span><del>-                        <?php do_action( 'bp_after_group_menu_mods' ) ?>
-                <?php endif; ?>
</del><ins>+                        <?php bp_group_list_mods();
</ins><span class="cx">
</span><del>-        <?php endif; ?>
</del><ins>+                        do_action( 'bp_after_group_menu_mods' );
+
+                endif;
+
+        endif; ?>
+
</ins><span class="cx"> </div><!-- #item-actions -->
</span><span class="cx">
</span><span class="cx"> <div id="item-header-avatar">
</span><del>-        <a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>">
-                <?php bp_group_avatar() ?>
</del><ins>+        <a href="<?php bp_group_permalink(); ?>" title="<?php bp_group_name(); ?>">
+
+                <?php bp_group_avatar(); ?>
+
</ins><span class="cx">         </a>
</span><span class="cx"> </div><!-- #item-header-avatar -->
</span><span class="cx">
</span><span class="cx"> <div id="item-header-content">
</span><del>-        <h2><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></h2>
-        <span class="highlight"><?php bp_group_type() ?></span> <span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active() ) ?></span>
</del><ins>+        <h2><a href="<?php bp_group_permalink(); ?>" title="<?php bp_group_name(); ?>"><?php bp_group_name(); ?></a></h2>
+        <span class="highlight"><?php bp_group_type(); ?></span> <span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active() ); ?></span>
</ins><span class="cx">
</span><del>-        <?php do_action( 'bp_before_group_header_meta' ) ?>
</del><ins>+        <?php do_action( 'bp_before_group_header_meta' ); ?>
</ins><span class="cx">
</span><span class="cx">         <div id="item-meta">
</span><del>-                <?php bp_group_description() ?>
</del><span class="cx">
</span><ins>+                <?php bp_group_description(); ?>
+
</ins><span class="cx">                 <div id="item-buttons">
</span><span class="cx">
</span><span class="cx">                         <?php do_action( 'bp_group_header_actions' ); ?>
</span><span class="cx">
</span><span class="cx">                 </div><!-- #item-buttons -->
</span><span class="cx">
</span><del>-                <?php do_action( 'bp_group_header_meta' ) ?>
</del><ins>+                <?php do_action( 'bp_group_header_meta' ); ?>
+
</ins><span class="cx">         </div>
</span><span class="cx"> </div><!-- #item-header-content -->
</span><span class="cx">
</span><del>-<?php do_action( 'bp_after_group_header' ) ?>
-
-<?php do_action( 'template_notices' ) ?>
</del><span class="cx">\ No newline at end of file
</span><ins>+<?php
+do_action( 'bp_after_group_header' );
+do_action( 'template_notices' );
+?>
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>