[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/groups/single/ -> forum.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Groups Single Forum
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   */
   8  
   9  /**
  10   * Fires before the display of a group's forum content.
  11   *
  12   * @since 1.2.0
  13   */
  14  do_action( 'bp_before_group_forum_content' );
  15  
  16  if ( bp_is_group_forum_topic_edit() ) :
  17      bp_get_template_part( 'groups/single/forum/edit' );
  18  
  19  elseif ( bp_is_group_forum_topic() ) :
  20      bp_get_template_part( 'groups/single/forum/topic' );
  21  
  22  else : ?>
  23  
  24      <div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Group secondary navigation', 'buddypress' ); ?>" role="navigation">
  25          <ul>
  26  
  27              <?php if ( is_user_logged_in() ) : ?>
  28  
  29                  <li>
  30                      <a href="#post-new" class="show-hide-new"><?php _e( 'New Topic', 'buddypress' ); ?></a>
  31                  </li>
  32  
  33              <?php endif; ?>
  34  
  35              <?php if ( bp_forums_has_directory() ) : ?>
  36  
  37                  <li>
  38                      <a href="<?php bp_forums_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress' ); ?></a>
  39                  </li>
  40  
  41              <?php endif; ?>
  42  
  43              <?php
  44  
  45              /** This filter is documented in bp-templates/bp-legacy/buddypress/forums/index.php. */
  46              do_action( 'bp_forums_directory_group_sub_types' ); ?>
  47  
  48              <li id="forums-order-select" class="last filter">
  49  
  50                  <label for="forums-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
  51                  <select id="forums-order-by">
  52                      <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
  53                      <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option>
  54                      <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
  55  
  56                      <?php
  57  
  58                      /** This filter is documented in bp-templates/bp-legacy/buddypress/forums/index.php. */
  59                      do_action( 'bp_forums_directory_order_options' ); ?>
  60  
  61                  </select>
  62              </li>
  63          </ul>
  64      </div>
  65  
  66      <div class="forums single-forum">
  67  
  68          <?php bp_get_template_part( 'forums/forums-loop' ) ?>
  69  
  70      </div><!-- .forums.single-forum -->
  71  
  72  <?php endif; ?>
  73  
  74  <?php
  75  
  76  /**
  77   * Fires after the display of a group's forum content.
  78   *
  79   * @since 1.2.0
  80   */
  81  do_action( 'bp_after_group_forum_content' ); ?>
  82  
  83  <?php if ( !bp_is_group_forum_topic_edit() && !bp_is_group_forum_topic() ) : ?>
  84  
  85      <?php if ( !bp_group_is_user_banned() && ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) ) : ?>
  86  
  87          <form action="" method="post" id="forum-topic-form" class="standard-form">
  88              <div id="new-topic-post">
  89  
  90                  <?php
  91  
  92                  /**
  93                   * Fires before the display of a group forum new post form.
  94                   *
  95                   * @since 1.2.0
  96                   */
  97                  do_action( 'bp_before_group_forum_post_new' ); ?>
  98  
  99                  <?php if ( bp_groups_auto_join() && !bp_group_is_member() ) : ?>
 100                      <p><?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ); ?></p>
 101                  <?php endif; ?>
 102  
 103                  <p id="post-new"></p>
 104                  <h4><?php _e( 'Post a New Topic:', 'buddypress' ); ?></h4>
 105  
 106                  <label for="topic_title"><?php _e( 'Title:', 'buddypress' ); ?></label>
 107                  <input type="text" name="topic_title" id="topic_title" value="" maxlength="100" />
 108  
 109                  <label for="topic_text"><?php _e( 'Content:', 'buddypress' ); ?></label>
 110                  <textarea name="topic_text" id="topic_text"></textarea>
 111  
 112                  <label for="topic_tags"><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label>
 113                  <input type="text" name="topic_tags" id="topic_tags" value="" />
 114  
 115                  <?php
 116  
 117                  /**
 118                   * Fires after the display of a group forum new post form.
 119                   *
 120                   * @since 1.2.0
 121                   */
 122                  do_action( 'bp_after_group_forum_post_new' ); ?>
 123  
 124                  <div class="submit">
 125                      <input type="submit" name="submit_topic" id="submit" value="<?php esc_attr_e( 'Post Topic', 'buddypress' ); ?>" />
 126                  </div>
 127  
 128                  <?php wp_nonce_field( 'bp_forums_new_topic' ); ?>
 129              </div><!-- #new-topic-post -->
 130          </form><!-- #forum-topic-form -->
 131  
 132      <?php endif; ?>
 133  
 134  <?php endif;


Generated: Thu Dec 7 01:01:35 2017 Cross-referenced by PHPXref 0.7.1