PDA

View Full Version : RSS?


Piercey
12-14-2004, 03:09 AM
What exactly does this do? I see it on everyone's site so now I'm curious...

-Mike

pixelpunk
12-14-2004, 07:50 AM
RSS is the next big thing :)

I have an RSS-reader, which is a software on my computer that polls all the RSS-feeds that I include in it. My software alerts me when a feed is updated (in this context when a photoblogger has posted a new image) and I can click to get to the image directly, and often I also get a preview in the feed.

It's truly an awesome way to keep yourself up to date with a large number of websites, and every siteowner should provide an RSS-feed to their content. If they're not providing a feed - they are missing out on a lot of visitors because many people will just ignore the site because it's to time-consuming not having it in your rss-reader.

Here's an post on the blog.photoblogs.org page for reading (read the comments):
http://blog.photoblogs.org/2004/11/newsfeeds_worth.html

It all comes down to this: provide a feed or many people will not visit (bookmark) you.

// punk

pixelpunk
12-14-2004, 07:56 AM
Just a note: pixelpost provides an RSS 2.0 feed, as well as an Atom-feed.
I have not told anyone there's an atom feed in there because I frankly have no idea if it's solid or not working etc.

View it at the pixelpost url index.php?x=atom
(rss 2.0 at index.php?x=rss)

// punk

Piercey
12-15-2004, 04:02 AM
I'm having problems getting firefox to understand the feed. Is there there something I have to do to the index.php file?

my site is www.mpierce.com/Lglass

pixelpunk
12-15-2004, 07:10 AM
Can Firefox read rss-files?

And what part is it that Firefox don't understand?

// punk

Piercey
12-15-2004, 06:07 PM
Yeah Firefox can understand RSS fees. A little icon shows up on the bottom right corner of the browser when a site has RSS. Most of the photoblogs I went to last night work just fine. Mine doesn't for some reason. And I really don't know what part its having a problem with...

Any help would be awesome.

Anonymous
12-15-2004, 09:27 PM
<link rel="alternate" type="application/rss+xml" title="george's webspace" href="index.php?x=rss" />

This is the code I have to enable firefox live bookmarks. Adapt to suit your own site :)

Anonymous
12-15-2004, 09:30 PM
BTW pixelpost throws all of your pictures into the RSS feed. I hacked up index.php to include only the last four entries using a simple counter.

pixelpunk
12-15-2004, 10:04 PM
Yeah I know pixelpost throws all in there, let's put that down as a mistake :)

You could just limit the sql query (append and add "limit 0,10" for example) instead of doing a counterthing, result will probably be the same but more efficient.

Find out where the rss is output and look for a liine that says something with "header("Content-type: xml/rss") or similar. I can't check it right now.
Remove it all together or change it to
header("Content-type: text/plain");
and the issue is probably resolved.

// punk

Piercey
12-16-2004, 12:05 AM
<link rel="alternate" type="application/rss+xml" title="george's webspace" href="index.php?x=rss" />

This is the code I have to enable firefox live bookmarks. Adapt to suit your own site :)

where might I put this bit of code?

Piercey
12-16-2004, 12:07 AM
Find out where the rss is output and look for a liine that says something with "header("Content-type: xml/rss") or similar. I can't check it right now.
Remove it all together or change it to
header("Content-type: text/plain");
and the issue is probably resolved.

// punk

I found the line header("Content-type:application/rss+xml");

almost the same as you listed. I played around with that line changing the rss+xml to different text/plain combos but nothing has worked...

Anonymous
12-16-2004, 06:06 AM
<link rel="alternate" type="application/rss+xml" title="george's webspace" href="index.php?x=rss" />

This is the code I have to enable firefox live bookmarks. Adapt to suit your own site :)

where might I put this bit of code?

Put it in your image image_template.html file in the <head> section.

pixelpunk
12-16-2004, 09:46 AM
almost the same as you listed. I played around with that line changing the rss+xml to different text/plain combos but nothing has worked...

Hmm, the feed should validate alright so that leaves me with no clue, I doubt Firefox implementation is wrong but maybe there's a bug somewhere.

I have to check this up.

// punk

Anonymous
12-16-2004, 01:42 PM
almost the same as you listed. I played around with that line changing the rss+xml to different text/plain combos but nothing has worked...

Hmm, the feed should validate alright so that leaves me with no clue, I doubt Firefox implementation is wrong but maybe there's a bug somewhere.

I have to check this up.

// punk

Mine validates just fine in firefox. http://www.elitedudz.com/~george.

Anonymous
12-16-2004, 01:42 PM
almost the same as you listed. I played around with that line changing the rss+xml to different text/plain combos but nothing has worked...

Hmm, the feed should validate alright so that leaves me with no clue, I doubt Firefox implementation is wrong but maybe there's a bug somewhere.

I have to check this up.

// punk

Mine validates just fine in firefox. http://www.elitedudz.com/~george.

Make that http://www.elitedudz.com/~george without the .

Piercey
12-16-2004, 08:48 PM
BTW pixelpost throws all of your pictures into the RSS feed. I hacked up index.php to include only the last four entries using a simple counter.

thanks for the help george. the above code in the header did the trick and now it works great.

could i trouble you for that bit of code that limits how many entries show up?

Anonymous
12-17-2004, 02:12 PM
Find the RSS generator in index.php. Just search for "rss" and then find the line that starts with $query = mysql_query and replace it with this;


$query = mysql_query("select id,datetime,headline,body,image from ".$pixelpo
st_db_prefix."pixelpost where (datetime<='$cdate') order by datetime desc limit
0,5");


Change the 5 to increase the number of days. Do the same for atom if you provide an atom feed.