News Module
Do you want to put the latest news/blogs from all over the world on your site? On a sidebar? On a search page? On any other page?
I have written a very basic (starter) drupal module that gets you news from all over the world using the Daylife News APIs. You can download the drupal module here: http://develop.daylife.com/demos/samples/download/daylife_drupal_module.zip
http://www.daylife.com is an online news aggregator that collects and analyzes news from all over the world and has a set of open APIs (http://developer.daylfie.com) for anyone to get news content regarding any topic.
In order to use this news module, you need to sign up for an accesskey and shared secret at http://developer.daylife.com.
This news module gives you 2 things:
a. A news block that shows headlines about any topic. Once you have installed and enabled the module, you can add an iphone news block with the following PHP code:
<?
$block = daylife_block('view',0, "iphone");
$content = $block['content'];
echo $content;
?>b. A news search page accessible at /search/daylife/. For e.g. at /search/daylife/iphone for iphone news.
This is my first drupal module. Any bugs/suggestions are gladly welcome.
-- Vineet Gupta
vkgupta@gmail.com

Hi The syntax you are using
Hi
The syntax you are using above isn't documented anywhere in the API, I guess it's specific to this module. Could you explain each parameter please?
I'd like to explore the possibilities of daylife, it appears we can even show pictures assigned to the articles and select specific categories of content. I would be glad to learn how to do that with your module if it's already implemented.
Also, how can I show all the latest news for all categories in one request? That would be useful for a general news page.
Thanks.
block API syntax and the daylife APIs
Alexandros,
the daylife_block function accepts 3 parameters (similar to http://api.drupal.org/api/function/hook_block/6):
a. an operation --- currently only 'list' and 'view' are supported
b. delta -- unusable parameter
c. key -- this is the query that is sent to the Daylife APIs and this is what the headlines in the block will show up about.
We return 2 types of images in the API:
a. Image that was published by the original source along with the article. If you send an include_image=1 parameter in the API call (not supported in this module right now but easy to change), you get an image along with the article if there was one published.
b. get images about any topic in the world using Daylife's search_getRelatedImages API. However, these images are licensed images that you can use only if you have contracts with Getty, AP and/or Reuters. To use this call, you need a special parameter value from us which is called the source_filter_id.
I am very new to drupal and this module was written in a haste. I am looking for experienced drupal developers to write a fully functional daylife module that confirms to all drupal 5 API and coding standards.
-- Vineet
vineet@daylife.com