コード例 #1
0
ファイル: html.php プロジェクト: ravenlife/Ninjaboard
 public function display()
 {
     $model = KFactory::get($this->getModel());
     $this->forums = $model->getList();
     $this->total = $model->getTotal();
     $this->state = $model->getState();
     $this->forum = $model->getItem();
     $this->i = 0;
     parent::display();
 }
コード例 #2
0
ファイル: html.php プロジェクト: ravenlife/Ninjaboard
 public function display()
 {
     $this->assign('params', KFactory::get('site::mod.ninjaboard_latest_posts.settings')->getParams());
     $this->direction = @$params->get('order_by');
     $this->limit = @$params->get('num_posts');
     if (@$params->get('which_posts') == 1) {
         $this->sort = 'first_post.created_time';
     } elseif (@$params->get('which_posts') == 2) {
         $this->sort = 'last_post.created_time';
     } else {
         $this->sort = 'created_time';
     }
     $model = KFactory::get($this->getModel())->limit($this->limit)->sort($this->sort())->direction($this->direction());
     $this->topics = $model->getList();
     $this->total = $model->getTotal();
     parent::display();
 }