Dear Paul,
First off, kudo's on how far this module has already come, but I would like to pick your brain on how you see the future direction.
I'm currently working on a (pretty much) full implementation of the backend of phplist, so our client never has to see a phplist page.
It's still in early stages and will probably be pretty specific to the client's needs, but I'm sure you will be able to pick up some of it's functionality.
One of my goals is to make it play nice with Drupal's multilingual abilities. I was thinking something along the lines of an option on the admin page to which attribute to map the languages and as what to map each language ("en" to "1", "nl" to "2", ...) so it can be adapted to pretty much every1's settings. And also sync this when syncing.
Now of course this would be rather useless if you couldn't queue up messages from within Drupal with conditionals for the language attribute, so I'm also planning to integrate the phplist create message form.
Also, I was thinking of using taxonomy terms for the subject, so they can easily be translated, numbered consistently over translations and you could tag nodes with the terms and map out a view with that term as argument, that way you can just set the message to [URL:http://www.example.com/view/4] where 4 would be the taxonomy term ID. That way you can put a link to the view with the tid as argument and keep an archive of the newsletter. Even better: you could add another argument for the date and keep an "upcoming" block on the archive page that doesn't update to the current date, but stays on the date of the time the newsletter was created.
But to make this all customizable to any1s needs and flexible to change to the phplist core, I think we need to move more towards an API with a UI on top. Moving as much as possible to theming functions, like the subject, body wrapper, ...
right now, all I've done is add an option for the attribute name of language and how to map each active language, it then maps it when synching and when subscribing anonymously, it will put the active language in the postdata, properly converted
so if you have phplist to take language in account when sending the confirmation mail, it will do so
Comment | File | Size | Author |
---|---|---|---|
#7 | phplistbackend-6.x-1.x-dev.tar_.gz | 5.8 KB | seutje |
#3 | phplist.module.patch | 10.28 KB | seutje |
#2 | phplist.module_1.patch | 3.27 KB | seutje |
phplist.module.patch | 3.27 KB | seutje |
Comments
Comment #1
seutje CreditAttribution: seutje commentedhm, something went wrong with the indentation, I'll fix it tomorrow, rly need to get to bed
Comment #2
seutje CreditAttribution: seutje commentedFixed indentation and converted all tabs into double spaces as per http://drupal.org/node/318
Comment #3
seutje CreditAttribution: seutje commentedadded wrong one
Comment #4
seutje CreditAttribution: seutje commentedStarted integrating the messages backend, preliminary version can be found at http://seutje.be/mine/phplistbackend.zip
Things will prolly split from this project now, as my setup is pretty specific, using taxonomy term to name the phplist message and then exposing a form where nodes can be tagged to be added to that message, then a view is constructed, taking that message's tid as an argument and only showing the tagges nodes.
Comment #5
paulbeaney CreditAttribution: paulbeaney commentedHi seutje,
Your project sounds interestig, but wy beyond what I ever enisaged this module to be. My ethos has been to keep the coupling fairly loose between Drupal and PHPlist, although it would be nice to be able to send messages from Drupal too (à la Newsletters module).
I'm not clear on whether you are wanting to extend this existing module by adding functionality, or if you are starting something new from scratch, but if you want to roll up your development into this module I ma very happy to dicusss how we could do that.
I'm on holiday for a few days at the moment and won't have net access again until next week, so I'll look out for your replies when I get back.
Regards,
- Paul
Comment #6
seutje CreditAttribution: seutje commentedDon't worry, the integration of the backend (just messages for now, but maybe the majority of the backend in the future) is still very specific to my use-case at the moment
I'd first want to finish that before I turn it into a more generic solution. Reason I made the backend a separate module right now is because I can imagine that some people would like to keep the backend in phplist, but still be able to sync drupal users and stuff, so I figured, maybe it's best to keep it as a submodule to phplist
but: I would prefer the backend module to just be the UI that uses functions which are in the regular phplist module. Thinking of stuff like phplist_save_message($msg), which would work pretty much the same as node_save, pass a $msg->id and it'll assume ur editing one. Then of course, you would also need a phplist_load_message($id), so you could do the following easily:
and ur message would be queued
unfortunately, I think about 6/10 phplist installations is hacked beyond repair, so the functions should be as generic as possible. But that also makes me think to just integrate it all... like the way you currently handle anonymous users registering trough drupal is just (excuse my language) rubbish. If a language other than english is used or if the thank you message is changed, it simply pretends to break, when it really doesn't break, so there's definately room for improvement there, at least add an option to set the thank you message that's returned by phplist, and maybe even completely migrate the whole process of signup to drupal, up to the sending of the confirmation message
that would make it way easier to turn phplist into a mean, lean, multilingual machine :P
enjoy your vacation :)
Comment #7
seutje CreditAttribution: seutje commenteddev update:
- added 'add message' form
- added func to easily map (active) lists and associated messages
- using taxonomy as identifier for which nodes should be added to the message
- added dependency on date_popup (part of date_api) for the senddate
I don't think any1 will be able to use this version, as it is still way too specific for my use-case, but once I get it running properly and tested, I'll get working on a generic solution
Functions and workflow need some work so I can use 1 function for saving and editing
latest (11/05/09): http://seutje.be/mine/phplistbackend-6.x-1.x-dev.tar.gz
I'll attach it aswell
Comment #8
seutje CreditAttribution: seutje commentedgetting a bit further in the development of this... but I was wondering if it wouldn't be more interesting to put my _message_load and _message_save functions in the base phplist module so the rest is just a ui on top
this is what I'm currently using to load up messages and their associated lists
this returns an numbered array of arrays with all values escaped, like this:
I might throw in a module_invoke_all right before the return so we can use a hook_phplist_load_message or something so other modules can easily manipulate message on load
just keeping u posted :)
EDIT:
forgot to mention, to filter messages, simply pass in an array as parameter specifying anything (xcept lists for now), for instance:
will get the message with id 27 (if found ofc)
or:
will get all the messages marked as draft
or:
will get all the messages that use template id 8
of course you can combine these:
will get all messages with status "sent" and owner "2"
Comment #9
jwuk CreditAttribution: jwuk commentedSeutje, thanks for keeping this development public. I'm keen to see a comparison between the present Phplist, what you're doing, and modules such as Simplenews. Drupal choices are overwhelming! :)
Comment #10
seutje CreditAttribution: seutje commentedactually, this a just an implementation of the phplist backend, since it depends on the phplist module, there's no comparing to be done :P
might even move some functions to the main phplist module, coz it has a better "position" to function as an API for other modules
simplenews on the other hand, is a totally independent module that doesn't require a 3rd party package and like the name suggests, is a lot less feature-rich in comparison to phplist
btw, currently finalizing the message handling for my specific use-case, then I'll form this into a generic module that can use regular messages, RSS feed lists and HTTP_Request style fetching based on a view of nodes tagged with taxonomy like I did
when I'm done with that, I might integrate the statistics reporting with a dependency on the graph module or something... we'll see :)
Comment #11
seutje CreditAttribution: seutje commentedgot some more time to work on this, current version can be checked out from http://github.com/seutje/phplistbackend
allows u to set a content type as being a newsletter, when enabled, keeps track of which node id (drupal) is connected to which newsletter id (phplist), sets the subject to that of the node, uses site email as from address, sets the newsletter body to the URL of the node and adds proper userselection based on language
when the page is getting fetched, both preprocess_page and preprocess_node will have an extra $vars['phplist'] that will be TRUE when phplist is fetching it and FALSE when phplist isn't the one fetching the page. (so any page.tpl.php or node.tpl.php have a lil checker var called $phplist)
that module sorta relies on #903356: Easy language mapping for the language mapping though
Comment #12
paulbeaney CreditAttribution: paulbeaney commentedHi seutje,
Glad to hear that things are progressing on your side. Interesting developments ! I'll try it out as soon as get a chance.
Regards,
- Paul
Comment #13
paulbeaney CreditAttribution: paulbeaney commentedHi seutje,
I've added your sub-module into the D6-DEV release as I have just tried it myself and it's great - I think everyone should have the chance to try it out! It makes sending mailshots a breeze. I'm sure there'll be lots of feedback on tweaking it (I've added a validation function to ensure the user selects at least one mail list to send to, for example).
Regards,
- Paul
Comment #14
seutje CreditAttribution: seutje commentedoh cool, thanks.
I'm still working on a clean way to send test versions from drupal for which I might just rip the sendEmail function right out of phpList and convert it
was also thinking it would be nice to get some stats in the drupal backend, possibly with some fancy graphs, but there's no client demanding this, so it might take a while before I get to any of that
Comment #15
SchwebDesign CreditAttribution: SchwebDesign commentedThis is very exciting to see, but i'm not able to figure out how to try it.
Can anyone share with me what needs to be done to get this phplistbackend module to work? I have installed it and i have looked at the content type creation page: https://mydomain.com/admin/content/types/add and edit page: https://mydomain.com/admin/content/node-type/newsletter as well as https://mydomain.com/node/66/edit but don't see the checkbox mentioned for PHPlist:
Thanks for all your great work. Any feed back would be appreciated!
Comment #16
paulbeaney CreditAttribution: paulbeaney commentedHi suetje,
No idea if you're still working on this, but I came across this module which provides functionality which would be perfect for what you are doing with phplistbackend: http://drupal.org/project/echo
Regards,
- Paul
Comment #17
paulbeaney CreditAttribution: paulbeaney commentedHi SchwebDesign,
Sorry it's taken me a little while to reply to this one...!
When the PHPlistbackend module is installed, it adds an extra option to the "Workflow settings" group when you edit a content type. "Send as a newsletter".
If you set this to "Enabled", when you create or edit content of that type, you will have extra fields on the form which allow you to send that node as a PHPlist message.
Regards,
- Paul
Comment #18
seutje CreditAttribution: seutje commentedsorry, I'm no longer using PHPlist, so I'm no longer actively developing the backend integration module.
Comment #19
paulbeaney CreditAttribution: paulbeaney commentedChaing status as this relates to development of the module rather than any specific bug.
Comment #20
AdamBrown-1 CreditAttribution: AdamBrown-1 commentedHi Paul and seutje,
Thanks for all the hard work! Please excuse my ignorance with this module and Drupal, but I can't seem to find out how exactly to send the mailshots directly form Drupal 6. I have the PHP Intergration module installed and enabled, and also the phplistbackend module patch installed and enabled.
On the Administer > PHPlist page, I can see tabs for Settings and List Access, but I can't find an option anywhere to compose/send a message from within Drupal, that PHPlist can read and send.
Thanks for any help!
Adam
Comment #21
seutje CreditAttribution: seutje commentedI'll just copy/paste what Paul said in #17
Comment #22
AdamBrown-1 CreditAttribution: AdamBrown-1 commentedWow how did I miss that.. Sorry, I was scanning tons of pages as once I think.. Anyways, thanks for pointing me to the right place!