Ejemplo n.º 1
0
 private function feed_questions()
 {
     $rss_channel = new RssGenerator_channel();
     $rss_channel->title = $this->title;
     $rss_channel->link = $this->link;
     $rss_channel->description = $this->description;
     $rss_channel->language = 'en-us';
     $rss_channel->managingEditor = '*****@*****.**';
     $rss_channel->webMaster = '*****@*****.**';
     foreach ($this->data as $question) {
         $item = new RssGenerator_item();
         $item->title = $question->question_name;
         $item->description = $question->question_desc;
         $item->link = 'http://newsite.com';
         $item->pubDate = 'Tue, 07 Mar 2006 00:00:01 GMT';
         $rss_channel->items[] = $item;
     }
     $rss_feed = new RssGenerator_rss();
     $rss_feed->encoding = 'UTF-8';
     $rss_feed->version = '2.0';
     header('Content-Type: text/xml');
     echo $rss_feed->createFeed($rss_channel);
 }
Ejemplo n.º 2
0
 private function feed_events()
 {
     $rss_channel = new RssGenerator_channel();
     $rss_channel->title = $this->title;
     $rss_channel->link = $this->link;
     $rss_channel->description = $this->description;
     $rss_channel->language = 'en-us';
     $rss_channel->managingEditor = '*****@*****.**';
     $rss_channel->webMaster = '*****@*****.**';
     foreach ($this->data as $event) {
         $item = new RssGenerator_item();
         $item->title = $event->event_name;
         $item->description = htmlspecialchars($event->event_desc);
         $item->link = site_url('forums/queue/event/' . url_title($event->event_name));
         $item->pubDate = 'Tue, 07 Mar 2006 00:00:01 GMT';
         $rss_channel->items[] = $item;
     }
     $rss_feed = new RssGenerator_rss();
     $rss_feed->encoding = 'UTF-8';
     $rss_feed->version = '2.0';
     header('Content-Type: text/xml');
     echo $rss_feed->createFeed($rss_channel);
 }