Active
Project:
Mass Mailer
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2005 at 21:26 UTC
Updated:
4 Sep 2005 at 01:35 UTC
Jump to comment: Most recent file
Comments
Comment #1
jjeff commentedFixed a minor bug that caused the template menu not to link correctly when there was no list value in the URL.
Comment #2
crunchywelch commentedok, took a look, i think this wil lbe very useful but we need to change a few things.
First, I would rename your module to massmailertamplate and remove the underscore. It's less readable, but otherwise you have the possibility of running over my namespace if I need to use massmailer_template as a function. This is sort of a drupal standard that was recently discussed on list, no worries, it should not take too long to do a find and replace.
Next, i added a few hooks in massmailer for you to use instaed of your patch. First, I call module_invoke_all('massmailer_create_message_links'); where you can return links to be included next to the 'create new message' link on the messages page. From there I would add a 'use message template' link. This way you dont have to have all the javascript warnings from the edit message page and it leave the edit page cleaner. The 'use message template' link should land you on a massmailertemplate page that lists the templates for you to select with links, look into the pager system, it's very useful for displaying pages like this.
Secondly, I added two more parameters to the create message url, a callback and an id value. So, you can do: admin/massmailer/message/send/$lid/$callback/$callbackid where:
$lid - the id number of the list to send to
$callback - the name of the module to load the $msg object from
$callbackid - an id number passed to the callback module
So, in your case, you can do admin/massmailer/message/send/1/massmailertemplate/4 and the function massmailertemplate_message_form(4) would be called. You return a message object, which is used to drop the values into the edit form. This way other plugin developers can use the same system.
Hope this makes sense and helps out. I also created a plugin directory for you to commit this to once it's all setup...
Thanks!
-A
Comment #3
jjeff commentedCool! Sounds good. And yes, in addition to the namespace problems, "massmailer_templates.module" is just a ridiculously long name for a module. So even removing the underscore character helps! :-)
I'll take a look at things when I get a chance in the next few days and make the appropriate changes.
In the meantime, anyone have any ideas for a better (shorter) module name?
Does mmtemplates.module work?
-Jeff
Comment #4
jjeff commentedOkey doke. Here's the new and improved version of massmailertemplate.module.
There are now ties into the new massmailer hooks and a few other nips and tucks.
Enjoy!
Comment #5
jjeff commentedComment #6
killes@www.drop.org commentedthis is now in the plugins directory in cvs.
Comment #7
(not verified) commentedComment #8
(not verified) commentedComment #9
(not verified) commentedComment #10
jjeff commentedComment #11
nausicaa commentedThe PHPList program uses placeholders like "[CONTENT]" to replace content into the templates it uses. It would be really nice if the templates could use this idea rather than the current implementation which simply presents the text entered in the template to the user when creating a new message.
In other words:
1) Create a template in PHP (ideal) or HTML containing the layout and special tags like [CONTENT] [SUBSCRIBE] [UNSUBSCRIBE]
2) When "using" a template, display an empty textarea where new HTML or text can be inserted.
3) Replace the [CONTENT] tag in the template with the text entered in the textarea for the new message.
Also, and this may be another issue, I would like to have the reply-to e-mails be set in the template. They could be editable in the message but I want them to appear automatically.