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.
August 5th, 2006 at 11:41 pm
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.
August 5th, 2006 at 11:43 pm
[…] Update: I should have mentioned that the template I provided is targeted at PHP5. If you’re running PHP4, try this patch. […]
August 10th, 2006 at 10:56 am
[…] 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: […]
December 2nd, 2006 at 4:41 pm
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)?
December 2nd, 2006 at 4:43 pm
Damn smileys, I meant ‘Y-m-d\TH:i: s’ (without the space before the ’s’)
January 18th, 2007 at 9:53 pm
[…] 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 […]
March 11th, 2007 at 4:05 pm
Great, nice and thanks for the patch.
TrixX from http://www.swirt.be
March 13th, 2007 at 11:27 am
www.e-fanyi.net翻译公司
www.e-fanyi.net/index02.htm北京翻译公司
March 19th, 2007 at 4:07 pm
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).
March 19th, 2007 at 4:13 pm
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).
March 19th, 2007 at 4:55 pm
We should merge it all together and put somewhere :)
March 23rd, 2007 at 3:56 pm
I agree with you , your done a great job~
May 10th, 2007 at 9:30 am
Ааану-ка ребятки голосуем!!!
Признавайтиесь проказники и владельцы сайта nlindblad.org ))))
ЧТвы будете дебасть этим летоом?!
July 26th, 2007 at 9:25 am
This day I find some files of free porn video download.
July 31st, 2007 at 9:56 am
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
August 26th, 2007 at 1:48 am
Verstoppen d’Lëtzebuerger op vun, um gin haut d’Welt ugedon. cost health insurance lo
November 20th, 2007 at 6:30 am
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
November 29th, 2007 at 9:11 pm
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.
December 11th, 2007 at 9:17 pm
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
January 27th, 2008 at 7:57 pm
Good site
http://www.google.com - xamasapa
February 6th, 2008 at 11:56 pm
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
February 7th, 2008 at 4:04 am
Nice site keep it up!
————————————–
http://www.dasofte.com