예제 #1
0
파일: rss.php 프로젝트: pyp22/aurweb
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
include_once "aur.inc.php";
include_once "pkgfuncs.inc.php";
include_once "feedcreator.class.php";
#detect prefix
$protocol = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' ? "https" : "http";
$host = $_SERVER['HTTP_HOST'];
$feed_key = 'pkg-feed-' . $protocol;
$bool = false;
$ret = get_cache_value($feed_key, $bool);
if ($bool) {
    echo $ret;
    exit;
}
$rss = new RSSCreator20();
$rss->cssStyleSheet = false;
$rss->xslStyleSheet = false;
# Use UTF-8 (fixes FS#10706).
$rss->encoding = "UTF-8";
#All the general RSS setup
$rss->title = "AUR Newest Packages";
$rss->description = "The latest and greatest packages in the AUR";
$rss->link = "{$protocol}://{$host}";
$rss->syndicationURL = "{$protocol}://{$host}" . get_uri('/rss/');
$image = new FeedImage();
$image->title = "AUR";
$image->url = "{$protocol}://{$host}/images/AUR-logo-80.png";
$image->link = $rss->link;
$image->description = "AUR Newest Packages Feed";
$rss->image = $image;
예제 #2
0
 function createFeed()
 {
     $this->additionalMarkup .= $this->podcast->getMarkup();
     $this->podcast->getElements($this->additionalElements);
     foreach ($this->items as $k => $item) {
         $this->items[$k]->podcast->getElements($this->items[$k]->additionalElements);
         $this->items[$k]->additionalMarkup .= $this->items[$k]->podcast->getMarkup();
     }
     return parent::createFeed();
 }
예제 #3
0
 function PodcastCreator()
 {
     parent::_setRSSVersion("2.0");
     parent::_setXMLNS("itunes=\"http://www.itunes.com/DTDs/Podcast-1.0.dtd\"");
 }