Closed (fixed)
Project:
Subscriptions
Version:
5.x-2.0-rc1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
9 Dec 2007 at 00:34 UTC
Updated:
29 Apr 2008 at 02:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
gustav commentedI have seen somewhere (I can't remember where) the very good suggestion that for this purpose the subscription module should hook into CCK to provide an extra column on admin/content/types/xxxx/display. On that page one currently can configure how a CCK field should display in the teaser and how it should display on the full node page. It is thus the natural place to specify how it should display in a notification email.
Comment #2
nbayaman commentedI don't know if it's better or not then your idea, but i think using tokens module would solve this issue. This seems to me like more flexible way of customizing of the mail body.
Comment #3
gustav commentedI think that as a first step a new variable !full should be added to the list of variables that can be used in the mail templates. This should provide the full node content as defined by the content type.
Comment #4
nbayaman commentedsure, that would make a room to breath for now :)
Comment #5
salvisAnd who (or what) would set !full?
The architecture of mail_edit and Subscriptions is such, that any module should be able to define additional content types and/or variables.
Comment #6
gustav commentedWhat is contained in the full content of a node is specified by the admin at admin/content/types/xxxx/display (for content type xxxx).
Comment #7
nbayaman commentedis there already !full variable?
Comment #8
salvis!full as in $node->full or what?
Comment #9
gustav commentedI think !full should contain the return value of node_view() (see http://api.drupal.org/api/function/node_view/5)
Comment #10
salvisInteresting — we'll try that, thanks!
Comment #11
salvisI've tentatively implemented !full using node_view() in BETA12. Please let me know how that works out.
Comment #12
salvis!full_node is essentially a dump of the node. It's useful in its own right — I'll keep it, but I'll disable it by default, so it doesn't unnecessarily waste cron time.
For CCK, the results aren't so great, because the CCK fields are only in <div> tags, and without any CSS styling, they run together, because node_view() returns something like
HTML to text simply removes the <div> tags, and so the fields all end up on the same line with the "Submitted by" information, producing something like
This is obviously not good enough...
Comment #13
salvisPlease try this. It creates variables
cckLabel_<fieldname>
cckValue1_<fieldname>
cckValue2_<fieldname>
as explained on the mail_edit pages (the variable listing will be fixed). Let me know how it works.
(remove ".txt" and "_.txt" from the file names)
P.S. I posted a similar add-on module for Events 5.x-2.x-dev at #236123: Weekly email of all upcoming events.
Comment #14
salvisIt would have been nice to get some comments here, but since no one complained, I'm marking this done. Please reopen if there's a problem.
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.