View Full Version : RSS Feeds
Tyler
February 28th, 2005, 22:06
I recently launched a news system, and I want it to have RSS feeds for validation for each news category, and for all of them (one feed). But my partner (programmer) I haven't heard from in awhile! :cry: (hope hes okay), and I really don't want to wait that long! But doing something like this easy, medium or hard?
ethicaldesign
February 28th, 2005, 22:30
I made my first RSS feed for a site recently. It's pretty straightforward (or at least was for my purpose- a news feed of the type you're talking about).
Some links that you might find helpful (this is what I read when working out how to do mine):
http://searchenginewatch.com/sereport/article.php/2175271
http://www.high-search-engine-ranking.com/How_To_Get_Your_Web_Site_Content_Syndicated.htm
http://www.syndic8.com/documents.php?Section=HowTo
http://www.oreilly.com/catalog/consynrss/index.html
http://lowendmac.com/tech/php16.html
http://diveintomark.org/archives/2004/02/04/incompatible-rss
Good luck :)
Tyler
February 28th, 2005, 23:10
I'll give it a go, after I eat. :) Believe me, I'll have questions :lol:
And if it helps any it'll be for my new news:
http://news.cbttechs.com
Tyler
March 1st, 2005, 00:16
Just finished the world:
http://cbttechs.com/news/worldfeed.xml
It should have news stories from:
http://news.cbttechs.com/news/index.php?category_id=1
Shoudn't it? With all of the titles of the new stories etc. Or did I miss something, or forgetting something?
Sorry first time I've done this!
ethicaldesign
March 1st, 2005, 10:39
Your xml file looks ok to me at a glance. It's pretty much the same as I have myself, only I've included a date in like:
<pubDate>Tue, 09 Nov 2004 17:43:21 EST</pubDate>
for each of the items.
And I've got
<copyright>goes here</copyright>
<language>en-us</language>
in the chanel (above first item).
I don't think these things are strictly required though and your feed should work without them.
In the page where I've got the rss feed I've placed the following code at the top (not in the xml file itself but in your site itself on a page that points to the feed):
<link rel="alternate" type="application/rss+xml" title="Freshweave RSS Feed" href="RSS/myrssfile.xml" />
where RSS/myrssfile.xml is the path to your xml file.
I've done this aswell as a straight clickable link to the xml file for those with readers that work that way and so it displays a little rss icon in the status bar of firefox, and will allow livebookmarks to be created from it.
http://cbttechs.com/news/worldfeed.xml
It should have news stories from:
http://news.cbttechs.com/news/index.php?category_id=1
Shoudn't it? With all of the titles of the new stories etc. Or did I miss something, or forgetting something?
No, you'll need to have a php script pull out the top 15 news stories from your database and create the xml file on the server for you when the news is updated (that's how I'm doing it anyway - you can also make it dynamic and have the xml file generated automatically each time a user hits it but it didn't seem like the best solution to me, for my purposes anyway).
So rather than your feed only having one item pointing to your category:
<item>
<title>CbtTechs News - World</title>
<description>
CbtTechs News, allows users to post their own news. Also the
most-up-to minute news!
</description>
<link>
http://news.cbttechs.com/news/index.php?category_id=1
</link>
</item>
Your first item would look something like:
<item>
<title>London conference must bring return to roadmap</title>
<description>
he Palestinian President, Mahud Abbas, made clear in an interview
with British Newspapers his eagerness to move to negotiations on
a lasting settlement with Israel......
</description>
<link>
http://cbttechs.com/news/comments/index.php?news_id=68
</link>
</item>
You'd have a number of items like this, each item being one of your news stories (I think 15 is the maximum - though you'd need to check that because it's been a while since I did this).
That is if you actually want to have the news items listed rather than just links to each of your categories.
I notice that your link (in the news page itself) takes you to comments rather than the full news item (mine is structured differently with the articles in brief on my news page with a link to read the full article actually within the site).
If all of your articles are fairly brief and they're going to link out to other sites then you could do it that way though. Though it would mean that people reading the feeds would be directed to someone elses site in a lot of cases rather than to your own site to read the news then follow the link outwards.
If you're not sure how to do this, if you do a bit of searching for creating an rss news feed using MySQL and php on google (or I think there's a link I posted that'll explain that) you should find more help.
If you're in a hurry for this you might be better to find a programmer who can do it for you though, unless you know how to use php and MySQL yourself and understand how your news script works already.
Hope this is some help :)
vBulletin® v3.6.8, Copyright ©2000-2010, Jelsoft Enterprises Ltd.