Reply to comment

Views SavedSearches + Notifications = Swiss Army Knife

I've worked a few times with Views Savedsearches in the past, this is a tiny
module that offers to save all the user-configured values of the views
exposed filters and later the user can choose from the saved set of exposed
filters.

The field of use-cases are really huge, imagine a webshop and the
users can save a 'saved search' what filters mobile phones with touchscreen
and between $100 and 200$. After the user visits the search form, just click
on the saved search link and the actual items are visible what meets with the
criterias.
When I heard that this tiny, handy module needs new maintainer, I stepped up
and applied for maintainership. And the news is that this module already has
a new release! (http://drupal.org/node/663242)

I fixed a few issues and created notifications integration for this module.
Notification integration is especially useful if you imagine the previous
use-case again. Why should i visit the webshop again and again? Now, with
this integration, the user can simply subscribe to the 'saved search' and
when a touchscreen mobile becomes so cheap to sink in the price range, the
user is notified via email or via SMS or twitter or whatever else channel
Notification supports! It's nice enough, isn't it? :)

This is the user-side, non-technical viewpoint of the story. To achieve what's
described above, just use Views Savedsearches
(http://drupal.org/project/views_savedsearches) and Notifications
(http://drupal.org/project/notifications) modules together.

From the developers' and site builders viewpoint, it's quite exciting that
with this way, you can subscribe to any kind of object in Drupal as long as
it has Views integration. What's the trick? The change detection happens in
cron time, cause it's impossible to act on events on any kind of object in a
general case. So this works really well if the cron is configured to run
frequently enough. The main concept here was to loop through all the saved
searches, execute the view with the given filters and compare the object ids
with the stored object ids from the database.
For big sites, the garbage collection can be important from item id storage
table to avoid too much wasted space, this is definitely something i'd like
to implement in the future.

Any user or coder feedback are really welcomed!
http://drupal.org/project/issues/views_savedsearches

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.