cck integration

scottrigby - November 3, 2008 - 22:55
Project:Listhandler
Version:HEAD
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,
I'm using the current HEAD and most of the bi-directional integration between forum posts/comments and mailman list posts/replies is working really well :)

However, another issue I'm having is that CCK fields added to forum posts are not being sent to the mailman list.

For instance, I added an imagefield and date fields to the forum node type, but neither the image thumbnail (generated by imagecache) or the date is passed to the mailman list - only what's in the node->body.

Are there configurations I missed (or other modules required for this functionality), or is this not yet working?

Thanks in advance for clarification / support
Scott

#1

cglusky - November 29, 2008 - 19:53

Scott,
I am still learning the guts of Drupal, so this is just based on me looking through the code.. There could be a couple possibilities:

1) Listhandler is running prior to CCK which may mean that the nodeapi hook for listhandler that sends your email when a new forum topic is inserted would not contain the CCK fields/data yet. Still trying to figure out the importance of module weights, but most are set to zero in the system database table unless expressly set on install or an update. Also note that listhandler does not send mail on update; just insert (create).

2) The function in listhandler that builds the email is focused on core fields like mapping node title to mail subject etc. There is a call to get file attachments but I am assuming it only returns files attached via core upload. Also a part I am still fuzzy on. I need to look around some more to see where CCK fields are stuffed in the node array. Is it working if you upload a file using the core upload module?

Right now, I need someone smarter than me to say if it's 1 or 2 causing your problem.

If you look at Notifications/Messaging framework they allow some customization using Tokens, which could be a way for listhandler to allow for a bit more flex in the future to build outgoing emails. But that would be a feature request me thinks.

BTW, have you tried mailsave for bringing in attachments? That module allows to save incoming attachments to fields like imagefield.

Again, I have not installed listhandler or mailsave so this is all based on digging through the code.

R,
Coby

#2

philipnet - March 14, 2009 - 17:25

Listhandler was born way before CCK came on the scene and Listhandler was only intended for forums ;) .

If scottrigby can (briefly) detail the configuration of the Forum type, then I (or someone else!) can look into updating Listhandler for this.

If anyone wants to do any work on it, the function that builds the email is "listhandler_send_mail".

Regards.

P.

#3

scottrigby - July 9, 2009 - 18:17
Title:listhandler not adding cck images» cck integration

@philipnet: if Listhandler is going to continue to be in use at all, we'll want integration with cck fields. cck fields can be added to forum posts, so this scenario is important even if we're only talking about forums (though of course I'm interested in #328980: other node-types than forum posts?).

For this issue, i think we're only talking about sending not receiving (mailhandler is responsible for receiving, right?). If so, can we just send the equivalent of the $content variable in node.tpl.php http://api.drupal.org/api/file/modules/node/node.tpl.php, which contains the node body as well as cck data?

BTW, should new features go against 6.x-1.x-dev or HEAD?

 
 

Drupal is a registered trademark of Dries Buytaert.