Playing with FeedAPI and Notifications

A More Efficient Way of Keeping People Posted

As we have these two powerful frameworks, FeedAPI and the new Notifications framework I talked about  in my last post, I was thinking it would be cool to have them work together. Users already had the option to stay subscribed (i.e. to all nodes created of a given type), but this didn't seem like a very efficient way of getting notifications for all updated feed items. 

So I’ve implemented this new notifications plug-in that allows you to subscribe to a feed and then get lists of new/updated items. To see it working please take a look at the notifications_feed.module in the notifications package.

The resulting email notification looks like this:


This simple module takes advantage of the existing Notifications and Messaging frameworks to implement - with just a few lines of code - a new event type (Feed update) and a new subscription type (Subscribe to feed) with all the features, such as configurable sending methods, queueing, and custom message templates.

The idea, in short, is that we can now easily create any custom plug-in to keep users posted about anything with just a few lines of code, while having all the gory details like message templating and delivery, user subscriptions,  notifications queueing for large sites, etc. automatically handled by these modules. 

And you don't need to create any new table or field for managing all this data!

The notifications_feed.module is already part of the Notifications Framework.

Jose Reyero
Jan 31 2008
0 tweets link to this blog post. Start a conversation with @developmentseed on Twitter.

Search

No results found.
About
Projects
Team
Blog