Skip to main content

Build a rss reader with Drupal

Published on 2013-06-15

Build your own Google Reader with Drupal Feeds module

 

Drupal is a versitale framework for building almost any type of website. Now Google Reader will stop in July 2013 you need a replacement. Why not build it yourself?

 

This article will tell you how to do it. With amateur Drupal experience you should get this done too.

 

Prerequisitions

A Drupal 7 installation.

Checkout Acquia Dev Desktop for a local development environment. (http://www.acquia.com/products-services/dev-desktop )

Download this module:

  • Feeds 7.x-2.0+ (manage and download your rss subscriptions) (https://drupal.org/project/feeds‎)

 

Install Drupal 7 with Feeds

Install Drupal 7 with the normal installation profile.

Goto /admin/modules and enable these modules:

  • Feeds News (A news aggregator built with feeds, creates nodes from imported feed items. With OPML import. )

  • Search (Enables site-wide keyword searching. )

 

Click “Save configuration” button.
Click “Continue” when asked “Some required modules must be enabled”.
This will also install dependancy modules

 

Setup Rss Reader Configuration

Ok, we are almost there.

Check the configuration

content-types (/admin/structure/types)

You should see 2 Content Types: “Feed” and “Feed item”.

Add url field to feed_item

Click operations “manage fields” for Content Type “Feed item”

Label “URL Field”, Type “Text”, click “Save”.

 

Check feed settings

goto /admin/structure/feeds

You should see 2 Feeds Importers: “OPML Import” and “Feed”

Test Bundle settings

! While I was doing this the bundle settings where not set properly during installation.

Click operations “Edit” for Feeds importer “Feed”

Goto Node processor: settings (/admin/structure/feeds/feed/settings/FeedsNodeProcessor)

Bundle must be “Feed Item”. Do that and click “Save”

 

Adjust feed mapping for url field

Goto Node processor: Mapping (/admin/structure/feeds/feed/mapping)

Now we add the “URL Field”

“- Select a source -” dropdown choose “Item URL (link)”

“- Select a target -” dropdown choose “URL field”

Click “Save”

 

Import your Google Reader subscriptions

First goto google.com/getout and download your subscriptions in xml format. This file contains all your Google Reader RSS subscribtions and we start importing them right now.

 

Goto /import/feed

upload your xml file.

 

At this point Drupal saves the rss urls that will be crawled every 30 minutes.

 

Goto /admin/content and filter “type = feed”

you should see all your rss subscriptions now.

 

Let test if the subscriptions get downloaded!

Click one of your subscriptions, you will see a tabbed bar like this:

 

The tabs to watch are “View Items” and “Import”.

Let's open import and click 'Import'. You see a message how many feed-items are downloaded.

Under “View Items” you see the results.

 

! Things to watch

Some rss-feeds contains html, this is filtered out by default with drupal. You can change this beheviour at Text Formats (admin/config/content/formats) and by changing the post author in your feeds configuration (/admin/structure/feeds/feed/settings/FeedsNodeProcessor).

 

what happened?

For every rss subscription a new drupal node of type 'feed' has been created. This is done by the feeds module when you imported the google reader xml file. This node itself is also a 'feed' managed by the feeds module, though it creates new nodes of type 'feed-item'. This feed crawls the actual rss subscription. By default it will run every 30 minutes. The crawls are triggered by cron.

 

Enhancy and Refine

Setup access for anonymous users.

Select a fancy theme

For this demo I choose a theme called “Simple Corporate”. (https://drupal.org/project/corporate )

Download and enable (admin/appearance)

In this theme settings disable “Show slideshow ” (admin/appearance/settings/corporate)

 

Enable Search

goto modules and enable drupal core search (/admin/structure/modules)

add your searchblock to the theme header (/admin/structure/block)

 

Improve Experience with Views and Display Suite.

 

 

Do it in one shot with this feature:

 

 

Hope you enjoyed!