/** * Return the formatted start of a feed. * * This will start the xml and create header information about the feed * itself. */ protected function _feedHeader() { $xml = parent::_feedHeader() . '<rdf:RDF' . $this->_injectNamespaces() . '>' . self::LB . '<channel rdf:about="' . $this->feedlogo . '">' . self::LB . '<title>' . $this->_safeXML($this->title) . '</title>' . self::LB . '<link>' . $this->_safeXML($this->sitelink, false) . '</link>' . self::LB . '<description>' . $this->_safeXML($this->description) . '</description>' . self::LB . '<dc:language>' . $this->lang . '</dc:language>' . self::LB; if (strlen($this->feedlogo) > 0) { $xml .= '<image rdf:resource="' . $this->_safeXML($this->feedlogo) . '"/>' . self::LB; } if (strlen($this->sitecontact) > 0) { $xml .= '<dc:creator>' . $this->sitecontact . '</dc:creator>' . self::LB; } $xml .= '<items>' . self::LB . '<rdf:Seq/>' . self::LB . '</items>' . self::LB; if (strlen($this->feedlogo) > 0) { $xml .= '<image rdf:about="' . $this->feedlogo . '">' . self::LB . '<url>' . $this->_safeXML($this->feedlogo, false) . '</url>' . self::LB . '<title>' . $this->_safeXML($this->title) . '</title>' . self::LB . '<link>' . $this->_safeXML($this->sitelink, false) . '</link>' . self::LB . '</image>' . self::LB; } $xml .= $this->_injectExtendingTags() . '</channel>' . self::LB; return $xml; }
/** * Return the formatted start of a feed. * * This will start the xml and create header information about the feed * itself. */ protected function _feedHeader() { $xml = parent::_feedHeader() . '<feed' . $this->_injectNamespaces() . '>' . self::LB . '<title type="text">' . $this->_safeXML($this->title) . '</title>' . self::LB . '<subtitle type="text">' . $this->_safeXML($this->description) . '</subtitle>' . self::LB . '<link rel="self" href="' . $this->_safeXML($this->url, false) . '"/>' . self::LB . '<link rel="alternate" type="text/html" href="' . $this->_safeXML($this->sitelink, false) . '/"/>' . self::LB; if ($this->feedlogo != '') { $xml .= '<logo>' . $this->_safeXML($this->feedlogo) . '</logo>' . self::LB; } $xml .= '<id>' . $this->_safeXML($this->sitelink, false) . '/</id>' . self::LB . '<updated>' . $this->_RFC3339Date() . '</updated>' . self::LB . '<author>' . self::LB . '<name>' . $this->_safeXML($this->title) . '</name>' . self::LB . '<email>' . $this->_safeXML($this->sitecontact) . '</email>' . self::LB . '</author>' . self::LB . $this->_injectExtendingTags(); return $xml; }
/** * Return the formatted start of a feed. * This will start the xml and create header information about the feed * itself. * * @return string */ protected function _feedHeader() { global $_CONF; $xml = parent::_feedHeader() . '<rss version="2.0"' . $this->_injectNamespaces() . '>' . self::LB . '<channel>' . self::LB . '<title>' . $this->_safeXML($this->title) . '</title>' . self::LB . '<link>' . $this->_safeXML($this->sitelink, false) . '</link>' . self::LB; if (strlen($this->description) > 0) { $xml .= '<description>' . $this->_safeXML($this->description) . '</description>' . self::LB; } if (strlen($this->sitecontact) > 0) { $xml .= '<managingEditor>' . $this->_safeXML($this->sitecontact) . ' (' . $_CONF['site_name'] . ')' . '</managingEditor>' . self::LB . '<webMaster>' . $this->_safeXML($this->sitecontact) . ' (' . $_CONF['site_name'] . ')' . '</webMaster>' . self::LB; } if (strlen($this->copyright) > 0) { $xml .= '<copyright>' . $this->_safeXML($this->copyright) . '</copyright>' . self::LB; } if (strlen($this->system) > 0) { $xml .= '<generator>' . $this->_safeXML($this->system) . '</generator>' . self::LB; } $xml .= '<pubDate>' . $this->_RFC822DateFormat() . '</pubDate>' . self::LB . '<language>' . $this->lang . '</language>' . self::LB; if (strlen($this->feedlogo) > 0) { $xml .= '<image>' . self::LB . '<url>' . $this->_safeXML($this->feedlogo, false) . '</url>' . self::LB . '<title>' . $this->_safeXML($this->title) . '</title>' . self::LB . '<link>' . $this->_safeXML($this->sitelink, false) . '</link>' . self::LB . '</image>' . self::LB; } $xml .= $this->_injectExtendingTags(); return $xml; }