This looks like an excellent module - thanks! I was hoping for a few pointers.

I'm new to phplist and this integration module. I have a few thousand users in drupal, some a few years old. There are options for grabbing info from a profile, but I'm not sure how to grab some basic user info.

A few newsletter tasks I may want to try, but I'm not sure how easy they are:

1. Can I add the username and / or uid as attributes, so that I can remind users of their account name and add a link to their account?

2. Similarly, I'd like to add the created date for users, which would allow me to send a sequence of letters to users who are 1, 5, 10 days 'old', etc.

3. Would I add these attributes to phplist first, or does this module add any attributes that are needed?

4. Is sync something you can do multiple times, or is it intended to just be used once?

Thanks in advance for any help,
Derek

Comments

dereks’s picture

To answer some of my own questions in case it helps someone else:

I modified the code here to achieve 1 & 2 - http://drupal.org/node/483366

Here is the function I created to grab the username and create date (I also had to modify phplist.module to add the hook):

function mymodule_phplist_sync_user($user, $phplistid) {
  $name = $user->name;
  $created = date('Y-m-d H:i:s',$user->created);
  _phplist_update_attribute('name', 'textline', $name, $phplistid);
  _phplist_update_attribute('created', 'date', $created, $phplistid);
}

3. Attributes are added on demand, and do not need to be created in phplist first.
4. Syncing multiple times is not an issue.

paulbeaney’s picture

Hi dereks,

Sorry for my lack of input and glad to see that you've found your own answers - I've been busy on a big server for a good few days. Your post reminds me that I must get that hook into the module soon...

Regards,

- Paul

dereks’s picture

Hi Paul,
No worries about the response - I was looking for answers to things I could figure out on my own. :-)

If you can get that hook in, it would be great.

Thanks for the great module!

Derek