public function __construct() { $this->feed = new XMLight('feed'); $this->feed->registerNamespaces(['http://www.w3.org/2005/Atom']); /* Add generic atom head with feed logo */ $this->feed->importArray(array('title' => getSetting('website_doctitle', true), 'subtitle' => getSetting('website_description', true), 'updated' => Atom::formatDate(time()), 'logo' => get_system_image_url(getSetting('favicon_image')), 'id' => 'tag:' . $_SERVER['SERVER_NAME'] . ',2005:' . G\url_to_relative(G\get_current_url()), 'generator' => 'Chevereto Feeds::Atom v' . Atom::getVersion() . '(with XMLight v' . XMLight::getVersion() . ')')); /* Add self atom link */ $this->feed->appendNode('link', '', array('href' => G\get_current_url(), 'rel' => 'self')); $this->feed->appendNode('link', '', array('href' => G\get_base_url())); }
public function __construct() { $this->feed = new XMLight('rss', array('version' => '2.0')); $this->feed->registerNamespaces(['atom' => 'http://www.w3.org/2005/Atom', 'media' => 'http://search.yahoo.com/mrss/']); $this->channel = $this->feed->appendNode('channel'); $now = Rss::formatDate(time()); $website_description = getSetting('website_description', true); $website_doctitle = getSetting('website_doctitle', true); $website_url = G\get_base_url(); $website_logo = get_system_image_url(getSetting('favicon_image')); /* Add generic RSS 2.0 channel head with feed logo */ $this->channel->importArray(array('title' => $website_doctitle, 'link' => $website_url, 'description' => $website_description, 'pubDate' => $now, 'lastBuildDate' => $now, 'generator' => 'Chevereto Feeds::MRSS v' . Rss::getVersion() . '(with XMLight v' . XMLight::getVersion() . ')', 'ttl' => 60, 'image' => array('url' => $website_logo, 'title' => $website_doctitle, 'link' => $website_url))); /* Add self atom link */ $this->channel->appendNode('link', '', array('href' => G\get_current_url(), 'rel' => 'self', 'type' => 'application/rss+xml'), 'atom'); }
public function __construct() { $this->feed = new XMLight('chevereto'); /* By xml standard namespace must be url, although not necessary an existing one. */ $this->feed->registerNamespaces(['http://dev.swrn.net/chv/xapi']); /* Add generic head */ $this->feed->importArray(array('website' => array('title' => getSetting('website_doctitle', true), 'description' => getSetting('website_description', true), 'logo' => get_system_image_url(getSetting('favicon_image')), 'url' => G\get_base_url(), 'id' => 'hash:md5:' . md5(G\get_current_url()), 'feed' => array('url' => G\get_current_url(), 'updated' => Xapi::formatDate(time()), 'generator' => 'Chevereto Feeds::XAPI v' . Xapi::getVersion() . '(with XMLight v' . XMLight::getVersion() . ')')))); }