[development] Two new core modules

Sammy Spets sammys-drupal at synerger.com
Sat May 5 12:50:34 UTC 2007

Including token.inc in core will allow me to migrate the mail template
stuff I implemented in ecommerce to core as well for D6. For those that
don't know anything about the mail templating in ecommerce, read on.

We saw a need in ecommerce for a mail templating API/module making it
possible to centralise the mail template storage, editing, token
substitution and sending. I'll give you an example.

In core now you have a welcome email that is sent to a user once their
registration is complete. The system stores the subject and body of the
mail in variables (a la variable_get/set() ). The changes I made means
the variable table now only stores the mail template ID meaning a large
downsize in variable loading and fantastic reusability when sending
those mails from other modules.

As this is about another topic i'll leave it there. Was a good time for
me to introduce this to the list so people know my intent and to perhaps 
get some comments going in the forum post:



Sammy Spets
Synerger Pty Ltd

On 03-May-07 07:31, Greg Knaddison - GVS wrote:
> On 5/3/07, Sammy Spets <sammys-drupal at synerger.com> wrote:
> >In addition to these modules i'd like to see token module's .inc file
> >included into core. Haven't heard/read anything about this happening
> >other than a quick chat to Eaton about the possibility.
> I can't speak to whether or not token should be included in core.  I
> can only say that if it's not, it will quickly be the most downloaded
> contributed module.
> More and more modules are beginning to depend on token. Auto
> nodetitle, parts of ecommerce, custom breadcrumbs, and pathauto
> currently depend on it. Moshe has committed code to cvs that requires
> token into Organic Groups.  I imagine other projects are seeing the
> benefit and will require it shortly.  Personally the upgrade between
> Drupal versions (e.g. 5->6) is a time where I add in features that
> I've been meaning to add.  I think that's pretty common and that
> between 5 and 6 more modules will start depending on token.  There are
> few pieces of code (including core) that wouldn't benefit from using
> token.
> Based upon the January download data, 3 of the top 35 modules either
> currently rely on token or are in progress towards that.  All of the
> modules that depend on token were downloaded 8,588 times in January.
> 8.588 downloads would put token at the top of the contrib module
> download list (beating views by 185).  If I forecast a few modules
> that would benefit from token the number of downloads that would also
> require token quickly jumps to over 15,000 (project*, casetracker,
> signup, troll, subscriptions, notify, spam).  For comparison, total
> downloads of the Drupal core tarball were 57,509.
> To be my own devil's advocate...if we use "number of downloads" as a
> motivation for which modules should be included in core, then views,
> tinymce, and cck are the top suspects in that order.
> */me shudders at tinymce*
> In terms of a path to core for token - I don't know what it would be,
> but there are actually several inc files in token.  I believe eaton
> has ideas on how that could work if it were desirable and if we the
> idea were to merge it into an existing module instead of just
> including the module itself.
> And now I'm putting away my pivot tables...
> Regards,
> Greg

More information about the development mailing list