Exemplo n.º 1
0
 /**
  * Display RSS Feed
  */
 function rss()
 {
     // Cache
     $cache_id = $this->profile['nickname'] . '|rss';
     $this->tpl->caching = 1;
     if (!$this->tpl->isCached('rss.tpl', $cache_id)) {
         $fp = $this->log->get($this->minifeed_limit * 5, 0, $this->profile['users_id']);
         if ($fp) {
             $rss = new suxRSS();
             $title = "{$this->r->title} | {$this->profile['nickname']}";
             $url = suxFunct::makeUrl('/user/profile/' . $this->profile['nickname'], null, true);
             $rss->outputRSS($title, $url, null);
             foreach ($fp as $item) {
                 $url2 = $url . '#' . strtotime($item['ts']);
                 $rss->addOutputItem($item['ts'], $url2, $item['body_html']);
             }
             $this->tpl->assign('xml', $rss->saveXML());
         }
     }
     // Template
     header('Content-type: text/xml; charset=utf-8');
     $this->tpl->display('rss.tpl', $cache_id);
 }
Exemplo n.º 2
0
 /**
  * Display RSS Feed
  */
 function rss()
 {
     // Cache
     $cache_id = 'rss';
     $this->tpl->caching = 1;
     if (!$this->tpl->isCached('rss.tpl', $cache_id)) {
         $fp = $this->bm->get($this->pager->limit);
         if ($fp) {
             $rss = new suxRSS();
             $title = "{$this->r->title} | {$this->r->gtext['bookmarks']}";
             $url = suxFunct::makeUrl('/bookmarks', null, true);
             $rss->outputRSS($title, $url, null);
             foreach ($fp as $item) {
                 $rss->addOutputItem($item['title'], $item['url'], $item['body_html']);
             }
             $this->tpl->assign('xml', $rss->saveXML());
         }
     }
     // Template
     header('Content-type: text/xml; charset=utf-8');
     $this->tpl->display('rss.tpl', $cache_id);
 }