/bp-themes/bp-default/groups/single/forum.php

  1. <?php 
  2.  
  3. do_action( 'bp_before_group_forum_content' ); 
  4.  
  5. if ( bp_is_group_forum_topic_edit() ) : 
  6. locate_template( array( 'groups/single/forum/edit.php' ), true ); 
  7.  
  8. elseif ( bp_is_group_forum_topic() ) : 
  9. locate_template( array( 'groups/single/forum/topic.php' ), true ); 
  10.  
  11. else : ?> 
  12.  
  13. <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> 
  14. <ul> 
  15.  
  16. <?php if ( is_user_logged_in() ) : ?> 
  17.  
  18. <li> 
  19. <a href="#post-new" class="show-hide-new"><?php _e( 'New Topic', 'buddypress' ); ?></a> 
  20. </li> 
  21.  
  22. <?php endif; ?> 
  23.  
  24. <?php if ( bp_forums_has_directory() ) : ?> 
  25.  
  26. <li> 
  27. <a href="<?php bp_forums_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress'); ?></a> 
  28. </li> 
  29.  
  30. <?php endif; ?> 
  31.  
  32. <?php do_action( 'bp_forums_directory_group_sub_types' ); ?> 
  33.  
  34. <li id="forums-order-select" class="last filter"> 
  35.  
  36. <label for="forums-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label> 
  37. <select id="forums-order-by"> 
  38. <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option> 
  39. <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option> 
  40. <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option> 
  41.  
  42. <?php do_action( 'bp_forums_directory_order_options' ); ?> 
  43.  
  44. </select> 
  45. </li> 
  46. </ul> 
  47. </div> 
  48.  
  49. <div class="forums single-forum" role="main"> 
  50.  
  51. <?php locate_template( array( 'forums/forums-loop.php' ), true ); ?> 
  52.  
  53. </div><!-- .forums.single-forum --> 
  54.  
  55. <?php endif; ?> 
  56.  
  57. <?php do_action( 'bp_after_group_forum_content' ); ?> 
  58.  
  59. <?php if ( !bp_is_group_forum_topic_edit() && !bp_is_group_forum_topic() ) : ?> 
  60.  
  61. <?php if ( !bp_group_is_user_banned() && ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) ) : ?> 
  62.  
  63. <form action="" method="post" id="forum-topic-form" class="standard-form"> 
  64. <div id="new-topic-post"> 
  65.  
  66. <?php do_action( 'bp_before_group_forum_post_new' ); ?> 
  67.  
  68. <?php if ( bp_groups_auto_join() && !bp_group_is_member() ) : ?> 
  69. <p><?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ); ?></p> 
  70. <?php endif; ?> 
  71.  
  72. <p id="post-new"></p> 
  73. <h4><?php _e( 'Post a New Topic:', 'buddypress' ); ?></h4> 
  74.  
  75. <label><?php _e( 'Title:', 'buddypress' ); ?></label> 
  76. <input type="text" name="topic_title" id="topic_title" value="" maxlength="100" /> 
  77.  
  78. <label><?php _e( 'Content:', 'buddypress' ); ?></label> 
  79. <textarea name="topic_text" id="topic_text"></textarea> 
  80.  
  81. <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label> 
  82. <input type="text" name="topic_tags" id="topic_tags" value="" /> 
  83.  
  84. <?php do_action( 'bp_after_group_forum_post_new' ); ?> 
  85.  
  86. <div class="submit"> 
  87. <input type="submit" name="submit_topic" id="submit" value="<?php esc_attr_e( 'Post Topic', 'buddypress' ); ?>" /> 
  88. </div> 
  89.  
  90. <?php wp_nonce_field( 'bp_forums_new_topic' ); ?> 
  91. </div><!-- #new-topic-post --> 
  92. </form><!-- #forum-topic-form --> 
  93.  
  94. <?php endif; ?> 
  95.  
  96. <?php endif; ?> 
.