Ticket #1623: 1623.diff
File 1623.diff, 5.1 KB (added by , 15 years ago) |
---|
-
bp-themes/bp-default/groups/single/forum.php
8 8 9 9 <?php else : ?> 10 10 11 <div class="forums single-forum"> 12 <?php 13 // The loop will be loaded here via AJAX on page load to retain selected settings and not waste cycles. 14 // If you're concerned about no-script functionality, uncomment the following line. 11 <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?> 15 12 16 // locate_template( array( 'forums/forums-loop.php' ), true ); 17 ?> 18 </div><!-- .forums --> 13 <form action="" method="post" id="forum-topic-form" class="standard-form"> 14 <div id="new-topic-post"> 19 15 20 <?php do_action( 'bp_after_group_forum_content' ) ?>16 <?php do_action( 'bp_before_group_forum_post_new' ) ?> 21 17 22 <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?> 18 <?php if ( !bp_group_is_member() ) : ?> 19 <p><?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ) ?></p> 20 <?php endif; ?> 23 21 24 <form action="" method="post" id="forum-topic-form" class="standard-form"> 25 <div id="post-new-topic"> 22 <h3><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h3> 26 23 27 <?php do_action( 'bp_before_group_forum_post_new' ) ?> 24 <label><?php _e( 'Title:', 'buddypress' ) ?></label> 25 <input type="text" name="topic_title" id="topic_title" value="" /> 28 26 29 <?php if ( !bp_group_is_member() ) : ?> 30 <p><?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ) ?></p> 31 <?php endif; ?> 27 <label><?php _e( 'Content:', 'buddypress' ) ?></label> 28 <textarea name="topic_text" id="topic_text"></textarea> 32 29 33 <a name="post-new"></a>34 <h3><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h3>30 <label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label> 31 <input type="text" name="topic_tags" id="topic_tags" value="" /> 35 32 36 <label><?php _e( 'Title:', 'buddypress' ) ?></label> 37 <input type="text" name="topic_title" id="topic_title" value="" /> 33 <?php do_action( 'bp_after_group_forum_post_new' ) ?> 38 34 39 <label><?php _e( 'Content:', 'buddypress' ) ?></label> 40 <textarea name="topic_text" id="topic_text"></textarea> 35 <div class="submit"> 36 <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" /> 37 <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ) ?>" /> 38 </div> 41 39 42 <label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label> 43 <input type="text" name="topic_tags" id="topic_tags" value="" /> 40 <?php wp_nonce_field( 'bp_forums_new_topic' ) ?> 41 </div><!-- #post-new-topic --> 42 </form> 44 43 45 <?php do_action( 'bp_after_group_forum_post_new' )?>44 <?php endif; ?> 46 45 47 <div class="submit"> 48 <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" /> 49 </div> 46 <div class="forums single-forum"> 47 <?php 48 // The loop will be loaded here via AJAX on page load to retain selected settings and not waste cycles. 49 // If you're concerned about no-script functionality, uncomment the following line. 50 50 51 <?php wp_nonce_field( 'bp_forums_new_topic' ) ?>52 </div><!-- #post-new-topic -->53 </form>51 // locate_template( array( 'forums/forums-loop.php' ), true ); 52 ?> 53 </div><!-- .forums --> 54 54 55 <?php endif;?>55 <?php do_action( 'bp_after_group_forum_content' ) ?> 56 56 57 57 <?php endif; ?> 58 58 -
bp-themes/bp-default/_inc/global.js
647 647 648 648 /**** New Forum Directory Post **************************************/ 649 649 650 j('a#new-topic-button'). click( function(){650 j('a#new-topic-button').live('click', function(){ 651 651 if ( !j('div#new-topic-post').length ) 652 652 return false; 653 653 654 if ( j('div#new-topic-post').is( ":visible") )654 if ( j('div#new-topic-post').is(':visible') ) 655 655 j('div#new-topic-post').slideUp(200); 656 656 else 657 657 j('div#new-topic-post').slideDown(200); … … 659 659 return false; 660 660 }); 661 661 662 j('input#submit_topic_cancel'). click( function(){662 j('input#submit_topic_cancel').live('click', function(){ 663 663 if ( !j('div#new-topic-post').length ) 664 664 return false; 665 665 -
bp-themes/bp-default/forums/forums-loop.php
4 4 5 5 <div id="post-count" class="pag-count"> 6 6 <?php if ( bp_is_group_forum() && is_user_logged_in() ) : ?> 7 <a href="#post-new" class="button"><?php _e( 'New Topic', 'buddypress' ) ?></a> 7 <a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ) ?></a> 8 8 <?php endif; ?> 9 9 10 10 <?php bp_forum_pagination_count() ?>