Wordpress Atom 1.0 Support Revisited

Something that has bothered me ever since I started using Wordpress is that this awesome piece of blogging software does not support the newer version(s) of the Atom syndication format. Currently version 0.3 is being used, a version that most feed validators have chose to declare as deprecated these days.

Apperantly “whump is looking for volunteers to work on Atom support for wordpress.” according to the Wordcamp 2006 Wiki.

There has been a fix for this however, but there were some flaws I found while trying it out:

It used the ISO 8601 time format which PHP 4 does not support using the ‘c’ key to the date function (the_time(’c'); doesn’t work) The self link (the link pointing back at the feed) was set to wp-atom.php, it should be http://blogURL/feed/atom

After resolving the above issues everything works flawless and the feed is valid Atom 1.0.

Since the author of the fix did not seem to have picked a license for the fix and I don’t dare assuming it falls under the same license as Wordpress I will only publish the patch that made it all work for me. Download the fix and patch the file wp-atom.php using the patch command (UNIX).

If enough people would try this out and gave feedback to the author of the fix or me (preferably him, I did nothing) we wouldn’t be far from our small goal regarding good Atom 1.0 support in Wordpress.

22 Responses to “Wordpress Atom 1.0 Support Revisited”

James Snell Says:

Thanks for the patch. I should have mentioned that the template was targeted at PHP5. The wp-atom.php think in the self link is a preference. I’ve made some changes in my wordpress install that made the /feed/atom thing not work. Rather than make the changes, I’ll just link over to this entry.

snellspace.com » Blog Archive » Enabling Atom 1.0 on Wordpress Says:

[…] Update: I should have mentioned that the template I provided is targeted at PHP5. If you’re running PHP4, try this patch. […]

_ck_ says… » Wordpress 2.0 & 2.1a is *still* using Atom 0.3 Says:

[…] Although it was slated for WP 1.6, Wordpress still is using the deprecated Atom 0.3 output. Time to update atom xml to 1.0 ! Find the fix instructions here: […]

christian schorn Says:

Hi,
maybe I’m wrong, but shouldn’t the time format be ‘Y-m-d\TH:i:s\Z’ (’H’ for 24h format instead of ‘h’ for 12h)?

christian schorn Says:

Damn smileys, I meant ‘Y-m-d\TH:i: s’ (without the space before the ’s’)

…time is what you make of it… » Archivio del blog » Wordpress feed Atom 1.0 Says:

[…] I file si trovano qui e vanno inseriti nella directory principale di Wordpress, ma, come fa notare l’autore, funzionano solo se il server php è aggiornato alla versione 5.*. Per chi, come me, ha ancora PHP4, entra in gioco la patch di nlindblad, che risolve il problema. Potete scaricarla da qui e se avete un accesso shell al server vi basterà eseguire il comando […]

TrixX Says:

Great, nice and thanks for the patch.

TrixX from http://www.swirt.be

xytsun Says:

www.e-fanyi.net翻译公å¸
www.e-fanyi.net/index02.htm北京翻译公å¸

Teole Says:

For some unknown reason, the following lines

keep displaying the time of the post, I’m getting something like:
9:41 AM
9:41 AM

This makes the Atom 1.0 feed invalid. I changed the lines as follows:
post_modified_gmt); ?>
post_date_gmt); ?>

This works better for me at least (PHP 4.3.10, MySQL 4.0.24).

Teole Says:

oops, forgot the escaping… Trying Again.

For some unknown reason, the following lines:
<updated><?php the_time(’Y-m-d\Th:i:s\Z’); ?></updated>
<published><?php the_time(’Y-m-d\Th:i:s\Z’); ?></published>

keep displaying the time of the post, I’m getting something like:
<updated>9:41 AM</updated>
<published>9:41 AM</published>

This makes the Atom 1.0 feed invalid. I changed the lines as follows:

<updated><?php echo mysql2date(’Y-m-d\TH:i:s\Z’, $post>post_modified_gmt); ?></updated>
<published><?php echo mysql2date(’Y-m-d\TH:i:s\Z’, $post>post_date_gmt); ?></published>

This works better for me at least (PHP 4.3.10, MySQL 4.0.24, Wordpress 2.1.2).

nlindblad Says:

We should merge it all together and put somewhere :)

RRRunescapeSS Says:

I agree with you , your done a great job~

LolitochkaBC Says:

Ðаану-ка ребÑтки голоÑуем!!!

ПризнавайтиеÑÑŒ проказники и владельцы Ñайта nlindblad.org ))))

ЧТвы будете дебаÑть Ñтим летоом?!

TannyLocker Says:

This day I find some files of free porn video download.

PabHearaDexia Says:

nlindblad.org - the most necessary site!

Good day

Thank for your help for us!
Thank you, I will add it to my bookmarks

best regards

Mark

viagelon Says:

Verstoppen d’Lëtzebuerger op vun, um gin haut d’Welt ugedon. cost health insurance lo

herackcars Says:

Hello,

Can you explain me how to use saerch on this site? Also i don`t know how to find bad car credit loan oklahoma

Good Bay

TitaBiobiahob Says:

This will help to ensure that you are getting the nutrients that you need while at the same time preventing you from consuming the excess calories that large amounts of dietary fats contain.

idodoHelm Says:

He was right! Modern day technologies such as PET scanning and MRI’s have allowed scientists to actually watch this happen in the brain. maxwell house vintage coffee pot

incignDab Says:

Good site
http://www.google.com - xamasapa

Jim Mirkalami Says:

I have been a frequent visitor of this blog for some time now, so I thought it would be a good idea to leave you with my thanks.

Regards,
Jim Mirkalami

Syncchiffef Says:

Nice site keep it up!

————————————–
http://www.dasofte.com

Leave a Reply



You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser