<!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][3924] trunk/bp-themes/bp-default/forums/index.php: Move New Topic creation form to bottom of forums directory to match UX in group forum.</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>3924</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-01-25 22:28:27 +0000 (Tue, 25 Jan 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move New Topic creation form to bottom of forums directory to match UX in group forum. (This may not make it for final release, but worth testing.)</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefaultforumsindexphp">trunk/bp-themes/bp-default/forums/index.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefaultforumsindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/forums/index.php (3923 => 3924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/index.php        2011-01-25 22:23:05 UTC (rev 3923)
+++ trunk/bp-themes/bp-default/forums/index.php        2011-01-25 22:28:27 UTC (rev 3924)
</span><span class="lines">@@ -16,140 +16,139 @@
</span><span class="cx">         <div id="content">
</span><span class="cx">                 <div class="padder">
</span><span class="cx">
</span><del>-                <?php do_action( 'bp_before_directory_forums' ); ?>
</del><ins>+                        <?php do_action( 'bp_before_directory_forums' ); ?>
</ins><span class="cx">
</span><del>-                <form action="" method="post" id="forums-search-form" class="dir-form">
</del><ins>+                        <form action="" method="post" id="forums-search-form" class="dir-form">
</ins><span class="cx">
</span><del>-                        <h3><?php _e( 'Group Forums Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() ) : ?> &nbsp;<a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ); ?></a><?php endif; ?></h3>
</del><ins>+                                <h3><?php _e( 'Group Forums Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() ) : ?> &nbsp;<a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ); ?></a><?php endif; ?></h3>
</ins><span class="cx">
</span><del>-                        <div id="forums-dir-search" class="dir-search" role="search">
</del><ins>+                                <div id="forums-dir-search" class="dir-search" role="search">
</ins><span class="cx">
</span><del>-                                <?php bp_directory_forums_search_form(); ?>
</del><ins>+                                        <?php bp_directory_forums_search_form(); ?>
</ins><span class="cx">
</span><del>-                        </div>
-                </form>
</del><ins>+                                </div>
+                        </form>
</ins><span class="cx">
</span><del>-                <?php do_action( 'bp_before_new_topic_form' ); ?>
</del><ins>+                        <?php do_action( 'bp_before_topics' ); ?>
</ins><span class="cx">
</span><del>-                <div id="new-topic-post" style="display: none;">
</del><ins>+                        <form action="" method="post" id="forums-directory-form" class="dir-form">
</ins><span class="cx">
</span><del>-                        <?php if ( is_user_logged_in() ) : ?>
</del><ins>+                                <div class="item-list-tabs" role="navigation">
+                                        <ul>
+                                                <li class="selected" id="forums-all"><a href="<?php bp_root_domain(); ?>"><?php printf( __( 'All Topics (%s)', 'buddypress' ), bp_get_forum_topic_count() ); ?></a></li>
</ins><span class="cx">
</span><del>-                                <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
</del><ins>+                                                <?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>
</ins><span class="cx">
</span><del>-                                        <form action="" method="post" id="forum-topic-form" class="standard-form">
</del><ins>+                                                        <li id="forums-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ); ?>"><?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
</ins><span class="cx">
</span><del>-                                                <?php do_action( 'groups_forum_new_topic_before' ) ?>
</del><ins>+                                                <?php endif; ?>
</ins><span class="cx">
</span><del>-                                                <a name="post-new"></a>
-                                                <h5><?php _e( 'Post a New Topic:', 'buddypress' ); ?></h5>
</del><ins>+                                                <?php do_action( 'bp_forums_directory_group_types' ); ?>
</ins><span class="cx">
</span><del>-                                                <label><?php _e( 'Title:', 'buddypress' ); ?></label>
-                                                <input type="text" name="topic_title" id="topic_title" value="" />
</del><ins>+                                        </ul>
+                                </div>
</ins><span class="cx">
</span><del>-                                                <label><?php _e( 'Content:', 'buddypress' ); ?></label>
-                                                <textarea name="topic_text" id="topic_text"></textarea>
</del><ins>+                                <div class="item-list-tabs" id="subnav" role="navigation">
+                                        <ul>
</ins><span class="cx">
</span><del>-                                                <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label>
-                                                <input type="text" name="topic_tags" id="topic_tags" value="" />
</del><ins>+                                                <?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
</ins><span class="cx">
</span><del>-                                                <label><?php _e( 'Post In Group Forum:', 'buddypress' ); ?></label>
-                                                <select id="topic_group_id" name="topic_group_id">
</del><ins>+                                                <li id="forums-order-select" class="last filter">
</ins><span class="cx">
</span><del>-                                                        <option value="">----</option>
</del><ins>+                                                        <?php _e( 'Order By:', 'buddypress' ); ?>
</ins><span class="cx">
</span><del>-                                                        <?php while ( bp_groups() ) : bp_the_group(); ?>
</del><ins>+                                                        <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>
</ins><span class="cx">
</span><del>-                                                                <?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) : ?>
</del><ins>+                                                                <?php do_action( 'bp_forums_directory_order_options' ); ?>
</ins><span class="cx">
</span><del>-                                                                        <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option>
</del><ins>+                                                        </select>
+                                                </li>
+                                        </ul>
+                                </div>
</ins><span class="cx">
</span><del>-                                                                <?php endif; ?>
</del><ins>+                                <?php do_action( 'bp_before_directory_forums_list' ); ?>
</ins><span class="cx">
</span><del>-                                                        <?php endwhile; ?>
</del><ins>+                                <div id="forums-dir-list" class="forums dir-list" role="main">
</ins><span class="cx">
</span><del>-                                                </select><!-- #topic_group_id -->
</del><ins>+                                        <?php locate_template( array( 'forums/forums-loop.php' ), true ); ?>
</ins><span class="cx">
</span><del>-                                                <?php do_action( 'groups_forum_new_topic_after' ); ?>
</del><ins>+                                </div>
</ins><span class="cx">
</span><del>-                                                <div class="submit">
-                                                        <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ); ?>" />
-                                                        <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ); ?>" />
-                                                </div>
</del><ins>+                                <?php do_action( 'bp_directory_forums_content' ); ?>
</ins><span class="cx">
</span><del>-                                                <?php wp_nonce_field( 'bp_forums_new_topic' ); ?>
</del><ins>+                                <?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?>
</ins><span class="cx">
</span><del>-                                        </form><!-- #forum-topic-form -->
</del><ins>+                        </form>
</ins><span class="cx">
</span><del>-                                <?php else : ?>
</del><ins>+                        <?php do_action( 'bp_after_directory_forums' ); ?>
</ins><span class="cx">
</span><del>-                                        <div id="message" class="info">
</del><ins>+                        <?php do_action( 'bp_before_new_topic_form' ); ?>
</ins><span class="cx">
</span><del>-                                                <p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( BP_GROUPS_SLUG . '/create/' ) ) ?></p>
</del><ins>+                        <div id="new-topic-post" style="display: none;">
</ins><span class="cx">
</span><del>-                                        </div>
</del><ins>+                                <?php if ( is_user_logged_in() ) : ?>
</ins><span class="cx">
</span><del>-                                <?php endif; ?>
</del><ins>+                                        <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
</ins><span class="cx">
</span><del>-                        <?php endif; ?>
-                </div><!-- #new-topic-post -->
</del><ins>+                                                <form action="" method="post" id="forum-topic-form" class="standard-form">
</ins><span class="cx">
</span><del>-                <?php do_action( 'bp_before_topics' ); ?>
</del><ins>+                                                        <?php do_action( 'groups_forum_new_topic_before' ) ?>
</ins><span class="cx">
</span><del>-                <form action="" method="post" id="forums-directory-form" class="dir-form">
</del><ins>+                                                        <a name="post-new"></a>
+                                                        <h5><?php _e( 'Post a New Topic:', 'buddypress' ); ?></h5>
</ins><span class="cx">
</span><del>-                        <div class="item-list-tabs" role="navigation">
-                                <ul>
-                                        <li class="selected" id="forums-all"><a href="<?php bp_root_domain(); ?>"><?php printf( __( 'All Topics (%s)', 'buddypress' ), bp_get_forum_topic_count() ); ?></a></li>
</del><ins>+                                                        <label><?php _e( 'Title:', 'buddypress' ); ?></label>
+                                                        <input type="text" name="topic_title" id="topic_title" value="" />
</ins><span class="cx">
</span><del>-                                        <?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>
</del><ins>+                                                        <label><?php _e( 'Content:', 'buddypress' ); ?></label>
+                                                        <textarea name="topic_text" id="topic_text"></textarea>
</ins><span class="cx">
</span><del>-                                                <li id="forums-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ); ?>"><?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
</del><ins>+                                                        <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label>
+                                                        <input type="text" name="topic_tags" id="topic_tags" value="" />
</ins><span class="cx">
</span><del>-                                        <?php endif; ?>
</del><ins>+                                                        <label><?php _e( 'Post In Group Forum:', 'buddypress' ); ?></label>
+                                                        <select id="topic_group_id" name="topic_group_id">
</ins><span class="cx">
</span><del>-                                        <?php do_action( 'bp_forums_directory_group_types' ); ?>
</del><ins>+                                                                <option value="">----</option>
</ins><span class="cx">
</span><del>-                                </ul>
-                        </div>
</del><ins>+                                                                <?php while ( bp_groups() ) : bp_the_group(); ?>
</ins><span class="cx">
</span><del>-                        <div class="item-list-tabs" id="subnav" role="navigation">
-                                <ul>
</del><ins>+                                                                        <?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) : ?>
</ins><span class="cx">
</span><del>-                                        <?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
</del><ins>+                                                                                <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option>
</ins><span class="cx">
</span><del>-                                        <li id="forums-order-select" class="last filter">
</del><ins>+                                                                        <?php endif; ?>
</ins><span class="cx">
</span><del>-                                                <?php _e( 'Order By:', 'buddypress' ); ?>
</del><ins>+                                                                <?php endwhile; ?>
</ins><span class="cx">
</span><del>-                                                <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>
</del><ins>+                                                        </select><!-- #topic_group_id -->
</ins><span class="cx">
</span><del>-                                                        <?php do_action( 'bp_forums_directory_order_options' ); ?>
</del><ins>+                                                        <?php do_action( 'groups_forum_new_topic_after' ); ?>
</ins><span class="cx">
</span><del>-                                                </select>
-                                        </li>
-                                </ul>
-                        </div>
</del><ins>+                                                        <div class="submit">
+                                                                <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ); ?>" />
+                                                                <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ); ?>" />
+                                                        </div>
</ins><span class="cx">
</span><del>-                        <?php do_action( 'bp_before_directory_forums_list' ); ?>
</del><ins>+                                                        <?php wp_nonce_field( 'bp_forums_new_topic' ); ?>
</ins><span class="cx">
</span><del>-                        <div id="forums-dir-list" class="forums dir-list" role="main">
</del><ins>+                                                </form><!-- #forum-topic-form -->
</ins><span class="cx">
</span><del>-                                <?php locate_template( array( 'forums/forums-loop.php' ), true ); ?>
</del><ins>+                                        <?php else : ?>
</ins><span class="cx">
</span><del>-                        </div>
</del><ins>+                                                <div id="message" class="info">
</ins><span class="cx">
</span><del>-                        <?php do_action( 'bp_directory_forums_content' ); ?>
</del><ins>+                                                        <p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( BP_GROUPS_SLUG . '/create/' ) ) ?></p>
</ins><span class="cx">
</span><del>-                        <?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?>
</del><ins>+                                                </div>
</ins><span class="cx">
</span><del>-                </form>
</del><ins>+                                        <?php endif; ?>
</ins><span class="cx">
</span><del>-                <?php do_action( 'bp_after_directory_forums' ); ?>
-
</del><ins>+                                <?php endif; ?>
+                        </div><!-- #new-topic-post -->
</ins><span class="cx">                 </div><!-- .padder -->
</span><span class="cx">         </div><!-- #content -->
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>