Porting atom.module to Drupal 5

I personally use ATOM instead of RSS at my site. In Drupal, we have atom module which served me for a year perfectly. Anyway, it was not ported to Drupal 5 yet. Here is my first contribution.

Here we go! Porting atom is quite easy. The only big problem is module_exist() was renamed to module_exists(). Another minor change is node_invoke() which usually should alter body and teaser in $item. However, it doesn't format those data in appropriate format.

node_invoke($item, 'view', TRUE, FALSE);

I have to change to follow.

$item = node_invoke($item, 'view', TRUE, FALSE);

Thank god I'm not the first one get this problem so far. It has been reported for standard rss.xml in node module. Many thank to Drupal's strong community, it was so long discussion to get the best solution. As a result, a patch has been approved and committed. My patch is adapted from this patch.

Note that this problem also happened in rss.xml so if you are using Drupal 5.0 RC1, you may fix the problem early by the same way.

Tags: ,

Post new comment