예제 #1
0
 /**
  * The component to display a single thread
  */
 public function executeShowThread()
 {
     $this->thread = ThreadPeer::retrieveByPK($this->threadID);
     $this->post = PostPeer::getFirstForThreadId($this->threadID);
     //First are experts anserws ( firest best than other )
     //Than are other users answers ( first best than other )
     $this->expert_best_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), true, 1);
     $this->expert_others_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), true, 0);
     $this->other_best_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), false, 1);
     $this->other_others_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), false, 0);
 }
예제 #2
0
파일: _showForum.php 프로젝트: rayku/rayku
    }
    if (count($_StickieId) > 0 && count($_Non_StickieId) > 0) {
        $threads = array_merge($_StickieId, $_Non_StickieId);
    } else {
        if (count($_StickieId) > 0 && count($_Non_StickieId) == 0) {
            $threads = $_StickieId;
        } else {
            if (count($_StickieId) == 0 && count($_Non_StickieId) > 0) {
                $threads = $_Non_StickieId;
            }
        }
    }
    foreach ($threads as $thread) {
        $_class = '';
        $thread = ThreadPeer::retrieveByPK($thread);
        $post = PostPeer::getFirstForThreadId($thread->getId());
        $user = UserPeer::retrieveByPK($thread->getPosterId());
        if (!empty($_StickieId)) {
            if (in_array($thread->getId(), $_StickieId)) {
                $_class = "background-color:#E6F8FF";
            }
        }
        ?>
      <div class="entry" style="<?php 
        echo $_class;
        ?>
">
        <div class="information" >
          <?php 
        echo link_to($thread, '@view_thread?thread_id=' . $thread->getId(), array('class' => 'threadttle'));
        ?>