Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Right now the user has to fill the message (subject & body) at the send phase. We need an alternative provided through UI so that the user can choose between filling the message or, simply, picking up an existing node.
Comment | File | Size | Author |
---|---|---|---|
#18 | views_send-send-node-796694-1.patch | 24.65 KB | ademarco |
#16 | views_send_content_type_settings.png | 27.3 KB | ademarco |
#16 | views_send_test_email.png | 20.97 KB | ademarco |
#16 | views_send_preview.png | 133.61 KB | ademarco |
#16 | views_send_html_email.png | 94.1 KB | ademarco |
Comments
Comment #1
Peng.Pif CreditAttribution: Peng.Pif commentedYes, this will be great and save a lot of time if the body field is quite long. Also, if there are numerous messages that need to be sent out to various users on the site it could be tedious having to copy / paste text into the body field for the Admin.
If there was a way to have a node type associated with the module, Admin's could create various messages (nodes) and then select which one they want to send from a drop down when sending out a mail.
Do you need help with this?
Comment #2
claudiu.cristeaI imagine something like...
The 3. step means that you can send only the node as body (node.tpl.php) or you can send the whole page (node in the page view). In the last case you can use separate templates for desired node types (see http://drupal.org/node/249726) like: page-node-story.tpl.php
What you think?
Comment #3
Peng.Pif CreditAttribution: Peng.Pif commentedHi, that sounds good.
If a admin selects a content type, for example Message, will the email be able to send out more fields than just Node Title and Node Body? The only reason i ask is if there are more fields available, then pre-defined fields from CCK can be used in that content type.
Comment #4
claudiu.cristeaIt will send out the themed node. This mean all data with the same theming that is viewable as node.
Comment #5
elioshI think it will be a great feature.
Comment #6
pvhee CreditAttribution: pvhee commentedLooking forward to use template emails as well. Basing them on existing nodes with token integration is a great idea.
Comment #7
patcon CreditAttribution: patcon commentedGreat module!!! Views Mail was wonderful, but the implementation seemed a little cobbled together or hackish (no disrespect intended to the wonderful maintainer). This seems to be a step in the right direction.
Agreed that sending nodes seemed pretty important. What about integrating with simplenews to send newsletters nodes?
Comment #8
roball CreditAttribution: roball commentedYes, associating node types with Views send would be a very useful enhancement.
Comment #9
ademarco CreditAttribution: ademarco commentedI've been working on a module called Views Send Node which implements what described in this feature request, you can find it here:
http://github.com/ademarco/views_send_node
For a quick overview have a look at the README.txt, I'm planning to release it as soon as possible.
Nevertheless I had to patch Views Send in order to add $mailkey to _views_send_prepare_mail() call. Doing so allows the module to use its own implementation of mimemail.tpl.php, a necessary step to have full control over the final email template (see README.txt).
I now set "views_send_direct" as mailkey, but, as this TODO states:
the mailkey must depend on which method we actually use to send the email: direct or by selecting a node. I can work on a better patch if you are interested, for the moment the quick fix is attached (patched against HEAD).
Comment #10
claudiu.cristea@antoniodemarco I don't understand why you choose to build a separate module? It would have been better if you tried to create a patch against this module.
Comment #11
roball CreditAttribution: roball commentedYes, agreed. Druapl already has way tooo much modules needed to implement a few features.
Comment #12
ademarco CreditAttribution: ademarco commentedI could have made a patch but Views Send has not stable releases yet and creating another module is just more maintainable. It's ok for me to make a patch out of it but I'd like to discuss with you its design before, so for the moment help me testing this module and give feedback, once it's stable i'll roll out a patch.
Comment #13
patcon CreditAttribution: patcon commentedGreat effort antonio! Sounds like a really interesting take! I agree that splitting efforts is not the best way, but in your defence, you're sort of working in the way that I expect we'll all be working once git is implemented, right? Fork your own branch, implement the feature you want to, then offer to have it pulled back in? Maybe a bit more dialogue would have been better, but it's looking like you're on that route now :)
Thanks for the contribution regardless -- I'll try to help test it when I get some free time
Comment #14
ademarco CreditAttribution: ademarco commentedThanks Patrick for the words! Let's indeed focus on testing it being sure it really does what we want, then it will not a big deal turning it into a patch.
Comment #15
ademarco CreditAttribution: ademarco commentedI've made a patch out of the latest version of the Views Send Node module available on Github. Patch is against DRUPAL-6--1 branch of the Views Send module. Now you can:
1. Enable a content type to be "sendable"
2. Preview email as node content or as separate page
3. Send test email from within the node edit page
4. Receive HTML email with the node as content
Refer to README.txt for the full list of changes.
Comment #16
ademarco CreditAttribution: ademarco commentedSome screenshots illustrating the main changes. EDIT: the second "Send test email from within the node edit page" should have been "Preview email as node content or as separate page".
Comment #17
patcon CreditAttribution: patcon commentedYou're amazing Antonio. I'm a little busy with something else right now, but I'll try to test it out for you sometime!
Comment #18
ademarco CreditAttribution: ademarco commentedI attach an updated version of the patch which adjusts the module's behavior in case the Mimemail is not enabled. It also fixes a validation error in "Send content by email" action form.
Comment #19
claudiu.cristeaHi. The patch look great. I will be out in holidays next 10 days so I will review the code when I will get back... A single point right now: I saw the nodes are sent instantly through hook_nodeapi(). This is somehow against how Views Send is build. Sending bulk messages instantly is quite dangerous. So IMO it's better to queue also node mails in the spool table. Consider this please.
Thanks again for this great work.
Comment #20
ademarco CreditAttribution: ademarco commentedHi Claudiu, I actually use hook_nodeapi() only to send test messages to one test email, it helps editors to test the final result. The the VBO action the patch implements does use the spool table, 100% Views Send style.
Comment #21
Glottus CreditAttribution: Glottus commentedsubscribing
Comment #22
jayson CreditAttribution: jayson commentedThis is going in a great direction! I've been using Simplenews for a while, but would really like to have the ability to personalize emails with first and last name or full name, but it doesn't seem to be happening with Simplenews despite a lot of discussion.
Do you guys think this is possible with this module?
If I installed Content Profile to have user profiles as nodes, added first and last name fields to the content type as well as a single checkbox called "Subscribe me to receive email notifications", and exposed those three fields on the user account creation form - then I wouldn't need a newsletter signup form or even Simplenews for that matter. The account creation form would serve as the newsletter signup form. Then I could email out any node to any list of email addresses and have all the emails personalized using tokens for first name and last name. If you send out a node, can you add greeting personalization with tokens?
Is that possible now?
Comment #23
ademarco CreditAttribution: ademarco commentedHi Jayson,
that's exactly the way I use it and the reason for making such a patch. What I would suggest is to use the patched module in combination of Mimemail and Views module and to embed a view in the module's provided TPL. Quoting the README.txt:
So you would create, in your theme dir:
and then in your template.php:
and, in mimemail-views-send-node-mycontenttype.tpl.php, something like:
This is taken from a real life example, the user_profile block_1 views display shows user's picture, first and last name. One thing: make sure you start theming from the default "mimemail-views-send-node.tpl.php".
Comment #24
roball CreditAttribution: roball commentedThis patch seems to be very amazing. I just tested it applying against the latest official dev, but the annoying critical bug #808058: HTML messages are sent as plain-text including (visible) HTML-tags prevented this improvement to be testable (the received HTML email is garbage). If I revert the patch from http://drupal.org/node/808058#comment-3101134, then this patch (http://drupal.org/node/796694#comment-3230146) won't apply :-(. As long as #808058: HTML messages are sent as plain-text including (visible) HTML-tags won't be fixed, we are blocked here too.
Comment #25
claudiu.cristeaGreat features/improvements to come :)
On Drupal we type "E-mail". Please use this form in code & docs.
On Drupal we type "E-mail". Please use this form in code & docs.
Start the CSS file with CVS Header:
/* $Id$ */
Add a new line at the end of the file http://drupal.org/coding-standards#indenting
Add a new line at the end of the file http://drupal.org/coding-standards#indenting
Add a new line at the end of the file http://drupal.org/coding-standards#indenting
Type "E-mail" form.
Too many \n
Add the "description" field.
* The 'title' & 'description' should not be translated. The Menu System will do this automatically.
* Type "E-mail" form.
Add the "description" field.
* The 'title' & 'description' should not be translated. The Menu System will do this automatically.
* Type "E-mail" form.
Add reference to the API resource
Example:
@see http://api.drupal.org/api/function/hook_theme_registry_alter/6
Just a discussion... Wouldn't be better to handle all setting in a single place? He always have "admin/settings/views_send". We can display there a multiselect list with content types and default test E-mail addresses (that can anyway be overwritten in the node form). In this case we can simplify by saving a single array variable for types variable_set('views_send_node_types', array('page', 'story;, ...)). Some functions will fall.
Powered by Dreditor.
Comment #26
ademarco CreditAttribution: ademarco commentedAt DrupalCon CPH I had a discussion with Claudiu about refactoring this patch to be better integrated into the module's architecture.
One of the first things we must address is code duplication. The only changing part in the VBO email sending form is the email body: in case of n email message typed by the user it's a textarea, in case of a node sent by email it's a preview of such a node.
One approach could be to expose an hook (call it
hook_views_send_message_info()
) that would simply populate that part of the form depending on the action type ("send a node" or "send a message"). This implies that Drupal actions should be generated dynamically, something like what's already happening into VBO'sruleset.action.inc
:Using this approach Views Send would implement:
Views Send module will then dynamically generate Drupal actions. This would be interesting, for instance, in case a custom module would need to send a specific view:
What do you think? I will experiment in this direction and let you know.
Comment #27
claudiu.cristeaYes. Let's go this way. This will make Views Send pluggable so we can create submodules like views_send_node or views_send_views and plug into VBO interface the right form elements, validation and processing.
Can you provide a patch in this direction? Thank you!
Comment #28
Aron NovakIt seems to be a really flexible approach, i'd love to see it in the module.
Comment #29
bsnodgrass CreditAttribution: bsnodgrass commentedLove the direction this is going... Is there a patch available or has this been rolled into the dev version of views send yet? I would be glad to help test.
bob
Comment #30
benone CreditAttribution: benone commented+1 for this what's happening here :)
also something like simplenews statistics to track how many users opened email and how many clicked any link inside it ... but it's a different story for later submodule...
THX for the patch Antonio!
Comment #31
kappaluppa CreditAttribution: kappaluppa commentedsubscribing...
Comment #32
Marko B CreditAttribution: Marko B commentedAlso subscribing and looking FWD.
Comment #33
hansfn CreditAttribution: hansfn commentedNo more development on the D6 version.