mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Added W3C recommendations for a more compatible feed. (May also be more compatible with twitterfeed)
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/rss.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/rss.php,v $
|
||||||
| $Revision: 1.11 $
|
| $Revision: 1.12 $
|
||||||
| $Date: 2009-05-04 09:24:36 $
|
| $Date: 2009-06-29 06:30:05 $
|
||||||
| $Author: e107steved $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -460,32 +460,38 @@ class rssCreate {
|
|||||||
|
|
||||||
echo "<language>".CORE_LC.(defined("CORE_LC2") ? "-".CORE_LC2 : "")."</language>
|
echo "<language>".CORE_LC.(defined("CORE_LC2") ? "-".CORE_LC2 : "")."</language>
|
||||||
<copyright>".preg_replace("#\<br \/\>|\n|\r#si", "", SITEDISCLAIMER)."</copyright>
|
<copyright>".preg_replace("#\<br \/\>|\n|\r#si", "", SITEDISCLAIMER)."</copyright>
|
||||||
<managingEditor>".$pref['siteadmin']." - ".$this->nospam($pref['siteadminemail'])."</managingEditor>
|
<managingEditor>".$this->nospam($pref['siteadminemail'])." (".$pref['siteadmin'].")</managingEditor>
|
||||||
<webMaster>".$this->nospam($pref['siteadminemail'])."</webMaster>
|
<webMaster>".$this->nospam($pref['siteadminemail'])." (".$pref['siteadmin'].")</webMaster>
|
||||||
<pubDate>".date("r",($time + $this -> offset))."</pubDate>
|
<pubDate>".date("r",($time + $this -> offset))."</pubDate>
|
||||||
<lastBuildDate>".date("r",($time + $this -> offset))."</lastBuildDate>
|
<lastBuildDate>".date("r",($time + $this -> offset))."</lastBuildDate>
|
||||||
<docs>http://backend.userland.com/rss</docs>
|
<docs>http://backend.userland.com/rss</docs>
|
||||||
<generator>e107 (http://e107.org)</generator>
|
<generator>e107 (http://e107.org)</generator>
|
||||||
<ttl>60</ttl>";
|
<ttl>60</ttl>";
|
||||||
|
|
||||||
if (trim(SITEBUTTON))
|
if (trim(SITEBUTTON))
|
||||||
{
|
{
|
||||||
echo "
|
echo "
|
||||||
<image>
|
<image>
|
||||||
<title>".$tp->toRss($rss_title)."</title>
|
<title>".$tp->toRss($rss_title)."</title>
|
||||||
<url>".(strstr(SITEBUTTON, "http:") ? SITEBUTTON : SITEURL.str_replace("../", "", e_IMAGE).SITEBUTTON)."</url>
|
<url>".(strstr(SITEBUTTON, "http:") ? SITEBUTTON : SITEURL.str_replace("../", "", e_IMAGE).SITEBUTTON)."</url>
|
||||||
<link>".$pref['siteurl']."</link>
|
<link>".$pref['siteurl']."</link>
|
||||||
<width>88</width>
|
<width>88</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
<description>".$tp->toRss($pref['sitedescription'])."</description>
|
<description>".$tp->toRss($pref['sitedescription'])."</description>
|
||||||
</image>";
|
</image>";
|
||||||
}
|
}
|
||||||
echo "
|
|
||||||
|
// Generally Ignored by 99% of readers.
|
||||||
|
/*
|
||||||
|
echo "
|
||||||
<textInput>
|
<textInput>
|
||||||
<title>Search</title>
|
<title>Search</title>
|
||||||
<description>Search ".$tp->toRss($pref['sitename'])."</description>
|
<description>Search ".$tp->toRss($pref['sitename'])."</description>
|
||||||
<name>query</name>
|
<name>query</name>
|
||||||
<link>".SITEURL.(substr(SITEURL, -1) == "/" ? "" : "/")."search.php</link>
|
<link>".SITEURL.(substr(SITEURL, -1) == "/" ? "" : "/")."search.php</link>
|
||||||
</textInput>";
|
</textInput>";
|
||||||
|
*/
|
||||||
|
|
||||||
foreach($this -> rssItems as $value)
|
foreach($this -> rssItems as $value)
|
||||||
{
|
{
|
||||||
// Multi-language rss links.
|
// Multi-language rss links.
|
||||||
@@ -512,7 +518,7 @@ class rssCreate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($value['author']){
|
if($value['author']){
|
||||||
echo "<author>".$value['author']."<".$this->nospam($value['author_email'])."></author>\n";
|
echo "<author>".$this->nospam($value['author_email'])." (".$value['author'].")</author>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// enclosure support for podcasting etc.
|
// enclosure support for podcasting etc.
|
||||||
@@ -528,6 +534,7 @@ class rssCreate {
|
|||||||
|
|
||||||
echo "</item>";
|
echo "</item>";
|
||||||
}
|
}
|
||||||
|
// echo "<atom:link href=\"".e_SELF."?".($this -> contentType).".4.".$this -> topicId ."\" rel=\"self\" type=\"application/rss+xml\" />";
|
||||||
echo "
|
echo "
|
||||||
</channel>
|
</channel>
|
||||||
</rss>";
|
</rss>";
|
||||||
|
Reference in New Issue
Block a user