Page 1 of 1

Things you should know about when working with RSS

Posted: Sun 18. Jan 2009, 22:51
by Jensensen
[mode: your site's delivering rss feeds]

Let's assume that you --> ONLY have the source code in the --> header of the page like the following:

Code: Select all

<link rel="alternate" type="application/rss+xml" title="COMPANY main RSS feed" href="content/rss/RSS2.0-default_feed.xml" />
In that case you get a big problem: Because even if you publish many new articles a day, the RSS XML file(s) won't be updated automatically!

Solution:
A)
Run the RSS-update-script once you've edited articles --> www. SERVER.tld/feeds.php?feed=all

B) Add source code to your template(s):
B.1) --> [RSS all]RSS-Feed[/RSS] or
B.2) --> <a href="feeds.php?feed=all" target="_blank" class="phpwcmsRSSLink">RSS-Feed</a>

Keep in mind when no site visitors clicking the link by day, the crawlers, spiders, robots do it by night. :wink:
(by which the xmls are updated)

Read more about RSS replacement tags: http://www.phpwcms-docu.de/system_tags.phtml

Re: Things you should know about when working with RSS

Posted: Sun 18. Jan 2009, 23:41
by update
for compatibility issues you should add a second line:

Code: Select all

<link rel="alternate" type="application/rss+xml" title="Our daily newsfeed" href="feeds.php?feed=news" />
<link rel="alternate" type="text/xml" title="Our daily newsfeed" href="feeds.php?feed=news" />
See the other difference? It's the href="feeds.php?feed=news". This is working too if you name your RSS feed properly within the template (otherwise the default mentioned by you will take place ;).

Re: Things you should know about when working with RSS

Posted: Mon 19. Jan 2009, 00:17
by Jensensen
:oops: Oops, yes, right you are! Good to know, nice to have, also. Thank you.

But I'm wondering because when using the method you mentioned above, the XML file will be renewed with every page call!?¿ :roll: :shock: This could run into some rather time related issues, isn't it?

claus wrote:for compatibility issues ...
What do you mean by that?

Re: Things you should know about when working with RSS

Posted: Mon 19. Jan 2009, 00:48
by update
If this is really the case then I'll switch to your solution

Re: Things you should know about when working with RSS

Posted: Mon 19. Jan 2009, 08:45
by Oliver Georgi
phpwcms is using build-in caching. And you always have to link against feeds.php.

The RSS cache timeout is defined in seconds in feeds.ini.php: "cacheTTL = 3600" (1 hour by default).

Oliver