示例#1
0
 public function _actionRead($context)
 {
     $toolbar = $this->getToolbar('category');
     $toolbar->addToolbarCommands();
     $this->getView()->set('toolbar', $toolbar);
     parent::_actionRead($context);
 }
示例#2
0
 /**
  * Read Service
  * 
  * @param KCommandContext $context
  */
 protected function _actionRead(KCommandContext $context)
 {
     $entity = parent::_actionRead($context);
     if ($this->scope) {
         $entity->tagables->scope($this->scope);
     }
     if ($this->sort == 'top') {
         $entity->tagables->sortTop();
     } else {
         $entity->tagables->sortRecent();
     }
     $entity->tagables->limit($this->limit, $this->start);
     //print str_replace('#_', 'jos', $entity->tagables->getQuery());
     return $entity;
 }
示例#3
0
 public function _actionRead($context)
 {
     $repos = $this->getService('repos://site/forums.thread');
     if ($thread = $this->getItem()) {
         $limit = $this->getRequest()->get('limit');
         $start = $this->getRequest()->get('start');
         $thread->posts->getQuery()->order('created_on')->limit($limit, $start);
         $thread->hit();
         $this->registerCallback('after.get', array($thread, 'markRead'));
         $this->registerCallback('after.get', array($thread->posts, 'markRead'));
     }
     $toolbar = $this->getToolbar('thread');
     $toolbar->addToolbarCommands();
     $this->getView()->set('toolbar', $toolbar);
     parent::_actionRead($context);
 }
示例#4
0
 public function _actionRead($context)
 {
     $layout = $this->getRequest()->get('layout');
     $post = $this->getItem();
     if ($this->parent) {
         $this->title = $this->parent->title;
     }
     if ($this->qid) {
         $quote = $this->getService('repos://site/forums.post')->getQuery()->where('id', '=', $this->qid)->fetch();
         $this->body = '[quote="' . $quote->author->username . '" post=' . $quote->id . ']' . $quote->body . "[/quote]\n\n";
     }
     if (!$layout) {
         $url = $post->parent->getURL();
         $this->getResponse()->setRedirect(JRoute::_($url) . '?reply=' . $post->id);
     }
     parent::_actionRead($context);
 }
示例#5
0
 /**
  * Read Service.
  *
  * @param KCommandContext $context
  */
 protected function _actionRead(KCommandContext $context)
 {
     $entity = parent::_actionRead($context);
     $pkg = $this->getIdentifier()->package;
     $this->getToolbar('menubar')->setTitle(sprintf(JText::_('COM-' . $pkg . '-HEADER'), $entity->name));
     if (!empty($entity->tagables)) {
         if ($this->scope) {
             $entity->tagables->scope($this->scope);
         }
         if ($this->sort == 'top') {
             $entity->tagables->sortTop();
         } else {
             $entity->tagables->sortRecent();
         }
         $entity->tagables->limit($this->limit, $this->start);
     }
     //print str_replace('#_', 'jos', $entity->tagables->getQuery());
     return $entity;
 }
示例#6
0
 /**
  * Read a package
  * 
  * @param KCommandContext $context
  * @return void
  */
 protected function _actionRead(KCommandContext $context)
 {
     $this->plugins = JPluginHelper::getPlugin('subscriptions');
     return parent::_actionRead($context);
 }