Zeile 41 | Zeile 41 |
---|
/** * Set the type of feed to be used. *
|
/** * Set the type of feed to be used. *
|
* @param string The feed type.
| * @param string $feed_format The feed type.
|
*/ function set_feed_format($feed_format) {
| */ function set_feed_format($feed_format) {
|
Zeile 58 | Zeile 58 |
---|
/** * Sets the channel information for the RSS feed. *
|
/** * Sets the channel information for the RSS feed. *
|
* @param array The channel information
| * @param array $channel The channel information
|
*/ function set_channel($channel) {
| */ function set_channel($channel) {
|
Zeile 68 | Zeile 68 |
---|
/** * Adds an item to the RSS feed. *
|
/** * Adds an item to the RSS feed. *
|
* @param array The item.
| * @param array $item The item.
|
*/ function add_item($item) {
| */ function add_item($item) {
|
Zeile 97 | Zeile 97 |
---|
$this->xml .= "\t<id>{$this->channel['link']}</id>\n"; $this->xml .= "\t<link rel=\"alternate\" type=\"text/html\" href=\"{$this->channel['link']}\"/>\n"; $this->xml .= "\t<updated>{$this->channel['date']}</updated>\n";
|
$this->xml .= "\t<id>{$this->channel['link']}</id>\n"; $this->xml .= "\t<link rel=\"alternate\" type=\"text/html\" href=\"{$this->channel['link']}\"/>\n"; $this->xml .= "\t<updated>{$this->channel['date']}</updated>\n";
|
$this->xml .= "\t<generator uri=\"http://www.mybb.com\">MyBB</generator>\n";
| $this->xml .= "\t<generator uri=\"https://mybb.com\">MyBB</generator>\n";
|
break; // The default is the RSS 2.0 format. default:
| break; // The default is the RSS 2.0 format. default:
|
Zeile 143 | Zeile 143 |
---|
$this->xml .= "\t\t<updated>{$item['updated']}</updated>\n"; $this->xml .= "\t\t<link rel=\"alternate\" type=\"text/html\" href=\"{$item['link']}\" />\n"; $this->xml .= "\t\t<id>{$item['link']}</id>\n";
|
$this->xml .= "\t\t<updated>{$item['updated']}</updated>\n"; $this->xml .= "\t\t<link rel=\"alternate\" type=\"text/html\" href=\"{$item['link']}\" />\n"; $this->xml .= "\t\t<id>{$item['link']}</id>\n";
|
$this->xml .= "\t\t<title type=\"html\" xml:space=\"preserve\"><![CDATA[".$this->sanitize_content($item['title'])."]]></title>\n";
| $this->xml .= "\t\t<title xml:space=\"preserve\"><![CDATA[".$this->sanitize_content($item['title'])."]]></title>\n";
|
$this->xml .= "\t\t<content type=\"html\" xml:space=\"preserve\" xml:base=\"{$item['link']}\"><![CDATA[".$this->sanitize_content($item['description'])."]]></content>\n"; $this->xml .= "\t\t<draft xmlns=\"http://purl.org/atom-blog/ns#\">false</draft>\n"; $this->xml .= "\t</entry>\n";
| $this->xml .= "\t\t<content type=\"html\" xml:space=\"preserve\" xml:base=\"{$item['link']}\"><![CDATA[".$this->sanitize_content($item['description'])."]]></content>\n"; $this->xml .= "\t\t<draft xmlns=\"http://purl.org/atom-blog/ns#\">false</draft>\n"; $this->xml .= "\t</entry>\n";
|
Zeile 183 | Zeile 183 |
---|
/** * Sanitize content suitable for RSS feeds. *
|
/** * Sanitize content suitable for RSS feeds. *
|
* @param string The string we wish to sanitize.
| * @param string $string The string we wish to sanitize.
|
* @return string The cleaned string. */ function sanitize_content($content)
| * @return string The cleaned string. */ function sanitize_content($content)
|