Development Seed Blog

‘Tell a Friend’ Improvements Committed Back to forward.module on Drupal.org

'email this page' a la New York TimesSeveral months ago we built out a ‘Tell a Friend’ feature to plug into our websites. We wanted it to be more than just another ‘email this page’, and the existing functionality in the forward module built by Sean Robertson, was a solid foundation.

Back in November I wrote about some of the changes we made to the forward module, things like

  • Forward Tracking – shows which pages have been sent and which have generated click-throughs. This is currently fairly basic but I will be expanding it in the future.
  • HTML Emails – create a template that matches the design of your site, and include a...
  • Dynamic Block – so emails can include a list of the latest blog articles, users, or comments, or the most popular content.
  • Most Emailed Block – puts a block in your sidebar listing the most emailed pages on a particular day or week, of all time, or the most recent.

A few weeks ago Sean committed these into his module on Drupal.org (thanks Sean!). If you are using this module, I recommend upgrading since there was a security fix on 2/23/06.

About the same time as Sean added our additions to the forward module, I was in Vancouver for DrupalCon and had the chance to talk with Allie who worked on the ‘send’ and ‘mime mail’ modules.   The work Allie and others are doing to better integrate mail into Drupal is desperately needed. Their work on the send modules Involves a lot of the same work and features that have gone into the forward module with one important addition – send talks to CiviCRM.

They way we’re duplicating work right now, adding the same functionalities to different modules, is always a bad idea. I think it is only a matter of time before I port over functionality from forward and start benefiting from MIME mail api, and the send module's CiviCRM integration.  By pushing the tracking capabilities from forward into CviCRM, the contact relationship system that can be integrated into Drupal,  we'll be able to let our clients to track the real people that use their sites.  Instead of just seeing numbers of pages forward we'll be able to see who forwarded it, and what else that person has done with the organization.

For the time being we are going keep improving and deploying the forward module, but I'm already starting focusing more attention on the send module. I’ll post an update in a few weeks after I find some time to work on it.

Comments
Integrating with Send

As Mark describes, send 4.7 is a framework that sends 0 or more nodes to 1 or more targets. The "send to friend" functionality is there for reference, but I really built it to form a comprehensive view of how your content is being used and shared.

By implementing a _send hook, any module can reuse and customize send's functionality. I did this for news and guestpass, and would like to see invite, saved searches, upcoming events, postcards, subscriptions, etc. using it.

By reusing send's code to deliver and track all sent nodes, you can form and report on exactly which nodes are sent to whom and for what purpose.

Your tracking tools are very important and useful, but their reach is limited to "Send to friend". We're already using News for lage distribution lists, and are missing the ability to use the work you've done

The send hook allows modules to inject querystring variables and filter all text in a sent node. You could use this to add your tracking features to ALL sent nodes, and have a much larger impact

I would be happy to help on this front, and explain how use send this way. Please track me down if interested

Send.module

I like the part about integrating back into send.module. Send is designed to have sub-modules, and your forward-to-a-friend would make a great example of this.

On a personal note, I wrote a send_block module recently to mimic with your "most recent" block (http://drupal.org/node/57275). Competition makes us stronger!

I think the next big thing for send will be integration with views - as this could provide the "most recent" block and other interesting ways of looking at the data. Not a trivial task, but not a huge task either.

Mark, that's a great point

Mark, that's a great point about views module integration. I'm totally into views, and have been using them for everything - but I hadn't thought about it in the context of the blocks, etc in this module. Thanks for the great idea.

Great news!

Combining the features of these modules will provide a huge service to the community. I can't wait to see them!

next couple of weeks

Thanks Zack,

We hope in the next couple of weeks to find some time
to make this happen.  We will be posting
on Drupal.org and the blog about this.