Ejemplo n.º 1
0
 public function rssAction()
 {
     $this->noViewRenderer(true);
     $request = $this->getRequest();
     $threads = Model_Forum::getRss();
     $limit = JO_Registry::get('front_limit');
     $this->view->url = array();
     if ($threads) {
         foreach ($threads as $k => $thread) {
             $this->view->url[$k] = array('id' => 'tag:' . $request->getBaseUrl() . ',' . $thread['datetime'] . ':' . $this->translate('Forum') . '::' . $this->translate('Message') . '/' . $thread['id'], 'published' => $thread['datetime']);
             $last_page = ceil($thread['cnt'] / $limit);
             $this->view->url[$k]['link'] = WM_Router::create($request->getBaseUrl() . '?controller=forum&action=topic/' . $thread['thread_id'] . '/' . WM_Router::clearName($thread['thread_name']) . ($last_page > 1 ? '/page/' . $last_page : ''));
             $this->view->url[$k]['comment'] = $thread['comment'];
             $this->view->url[$k]['author'] = $thread['username'];
         }
     }
     echo $this->renderScript('sitemap');
 }