[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-forums/bbpress/ -> topic.php (source)

   1  <?php
   2  require_once ('./bb-load.php');
   3  $topic_id = 0;
   4  
   5  $view_deleted = false;
   6  if ( bb_current_user_can('browse_deleted') && 'all' == @$_GET['view'] ) {
   7      add_filter('get_topic_where', 'bb_no_where');
   8      $view_deleted = true;
   9  }
  10  
  11  bb_repermalink();
  12  
  13  if ( !$topic )
  14      bb_die(__('Topic not found.'));
  15  
  16  if ( $view_deleted ) {
  17      add_filter('get_thread_where', create_function('', 'return "p.topic_id = ' . $topic_id . '";'));
  18      add_filter('get_thread_post_ids', create_function('', 'return "p.topic_id = ' . $topic_id . '";'));
  19      add_filter('post_edit_uri', 'bb_make_link_view_all');
  20  }
  21  
  22  $bb_db_override = false;
  23  do_action( 'bb_topic.php_pre_db', $topic_id );
  24  
  25  if ( !$bb_db_override ) :
  26      $posts = get_thread( $topic_id, $page );
  27      $forum = bb_get_forum ( $topic->forum_id );
  28  
  29      $tags  = bb_get_topic_tags ( $topic_id );
  30      if ( $tags && $bb_current_id = bb_get_current_user_info( 'id' ) ) {
  31          $user_tags  = bb_get_user_tags   ( $topic_id, $bb_current_id );
  32          $other_tags = bb_get_other_tags  ( $topic_id, $bb_current_id );
  33          $public_tags = bb_get_public_tags( $topic_id );
  34      } elseif ( is_array($tags) ) {
  35          $user_tags  = false;
  36          $other_tags = bb_get_public_tags( $topic_id );
  37          $public_tags =& $other_tags;
  38      } else {
  39          $user_tags = $other_tags = $public_tags = false;
  40      }
  41  
  42      $list_start = ($page - 1) * bb_get_option('page_topics') + 1;
  43  
  44      bb_post_author_cache($posts);
  45  endif;
  46  
  47  bb_load_template( 'topic.php', array('bb_db_override', 'user_tags', 'other_tags', 'list_start'), $topic_id );
  48  
  49  ?>


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