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

  1. <?php do_action( 'bp_before_group_forum_edit_form' ); ?> 
  2.  
  3. <?php if ( bp_has_forum_topic_posts() ) : ?> 
  4.  
  5. <form action="<?php bp_forum_topic_action(); ?>" method="post" id="forum-topic-form" class="standard-form"> 
  6.  
  7. <div class="item-list-tabs" id="subnav" role="navigation"> 
  8. <ul> 
  9. <li> 
  10. <a href="#post-topic-reply"><?php _e( 'Reply', 'buddypress' ); ?></a> 
  11. </li> 
  12.  
  13. <?php if ( bp_forums_has_directory() ) : ?> 
  14.  
  15. <li> 
  16. <a href="<?php bp_forums_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress'); ?></a> 
  17. </li> 
  18.  
  19. <?php endif; ?> 
  20.  
  21. </ul> 
  22. </div> 
  23.  
  24. <div id="topic-meta"> 
  25. <h3><?php _e( 'Edit:', 'buddypress' ); ?> <?php bp_the_topic_title(); ?> (<?php bp_the_topic_total_post_count(); ?>)</h3> 
  26.  
  27. <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?> 
  28.  
  29. <div class="last admin-links"> 
  30.  
  31. <?php bp_the_topic_admin_links(); ?> 
  32.  
  33. </div> 
  34.  
  35. <?php endif; ?> 
  36.  
  37. <?php do_action( 'bp_group_forum_topic_meta' ); ?> 
  38.  
  39. </div> 
  40.  
  41. <?php if ( bp_is_edit_topic() ) : ?> 
  42.  
  43. <div id="edit-topic"> 
  44.  
  45. <?php do_action( 'bp_group_before_edit_forum_topic' ); ?> 
  46.  
  47. <label for="topic_title"><?php _e( 'Title:', 'buddypress' ); ?></label> 
  48. <input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title(); ?>" maxlength="100" /> 
  49.  
  50. <label for="topic_text"><?php _e( 'Content:', 'buddypress' ); ?></label> 
  51. <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text(); ?></textarea> 
  52.  
  53. <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label> 
  54. <input type="text" name="topic_tags" id="topic_tags" value="<?php bp_forum_topic_tag_list(); ?>" /> 
  55.  
  56. <?php do_action( 'bp_group_after_edit_forum_topic' ); ?> 
  57.  
  58. <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?>" /></p> 
  59.  
  60. <?php wp_nonce_field( 'bp_forums_edit_topic' ); ?> 
  61.  
  62. </div> 
  63.  
  64. <?php else : ?> 
  65.  
  66. <div id="edit-post"> 
  67.  
  68. <?php do_action( 'bp_group_before_edit_forum_post' ); ?> 
  69.  
  70. <textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text(); ?></textarea> 
  71.  
  72. <?php do_action( 'bp_group_after_edit_forum_post' ); ?> 
  73.  
  74. <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?>" /></p> 
  75.  
  76. <?php wp_nonce_field( 'bp_forums_edit_post' ); ?> 
  77.  
  78. </div> 
  79.  
  80. <?php endif; ?> 
  81.  
  82. </form><!-- #forum-topic-form --> 
  83.  
  84. <?php else: ?> 
  85.  
  86. <div id="message" class="info"> 
  87. <p><?php _e( 'This topic does not exist.', 'buddypress' ); ?></p> 
  88. </div> 
  89.  
  90. <?php endif;?> 
  91.  
  92. <?php do_action( 'bp_after_group_forum_edit_form' ); ?> 
.