Results 1 to 4 of 4

Thread: Group users for emails

  1. #1
    Thread Starter
    lausha's Avatar
    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    422
    Thanks
    62
    Thanked 11 Times in 11 Posts

    Group users for emails

    I'm using EMU2 for group emails. I have set up a mailing list. People who sign up to it are entered into my user database as subscribers, and then I can send the email newsletters from EMU2. However a couple of advertisers have signed up and they're already registered as authors, so they can't be subscribers as well. I have tried setting up separate identities for them as subscribers but because it's the same email address WP won't let me.

    I tried using Role Scoper plug in which created other groups, but EMU2 only recognises the default WP user groups (subscribers, authors etc), so that didn't work.

    Does anyone know of a plugin that can create groups that works with EMU2 or can recommend another way of getting round this problem? I would like to keep everything within the site if possible, rather than sending from my mail client.

    Thanks

  2. #2
    Veteran hugo's Avatar
    Join Date
    Aug 2010
    Location
    United Kingdom
    Posts
    310
    Thanks
    13
    Thanked 80 Times in 54 Posts
    Quote Originally Posted by lausha View Post
    I'm using EMU2 for group emails. I have set up a mailing list. People who sign up to it are entered into my user database as subscribers, and then I can send the email newsletters from EMU2. However a couple of advertisers have signed up and they're already registered as authors, so they can't be subscribers as well. I have tried setting up separate identities for them as subscribers but because it's the same email address WP won't let me.

    I tried using Role Scoper plug in which created other groups, but EMU2 only recognises the default WP user groups (subscribers, authors etc), so that didn't work.

    Does anyone know of a plugin that can create groups that works with EMU2 or can recommend another way of getting round this problem? I would like to keep everything within the site if possible, rather than sending from my mail client.

    Thanks
    could try modding up this block of code in emu2.php to add and invoke your custom role:

    PHP Code:
    function EMU2_add_default_capabilities() {
        
    $role get_role('contributor');
        
    $role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);

        
    $role get_role('author');
        
    $role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);

        
    $role get_role('editor');
        
    $role->add_cap(EMU2_NOTIFY_USERS_CAP);
        
    $role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
        
    $role->add_cap(EMU2_EMAIL_USER_GROUPS_CAP);
        
    $role->add_cap(EMU2_EXPORT_LIST_CAP);

        
    $role get_role('administrator');
        
    $role->add_cap(EMU2_MANAGE_OPTIONS_CAP);
        
    $role->add_cap(EMU2_NOTIFY_USERS_CAP);
        
    $role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
        
    $role->add_cap(EMU2_EMAIL_USER_GROUPS_CAP);
        
    $role->add_cap(EMU2_EXPORT_LIST_CAP);
    }function 
    EMU2_remove_default_capabilities() {
        
    $role get_role('contributor');
        
    $role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);

        
    $role get_role('author');
        
    $role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);

        
    $role get_role('editor');
        
    $role->remove_cap(EMU2_NOTIFY_USERS_CAP);
        
    $role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
        
    $role->remove_cap(EMU2_EMAIL_USER_GROUPS_CAP);
        
    $role->remove_cap(EMU2_EXPORT_LIST_CAP);

        
    $role get_role('administrator');
        
    $role->remove_cap(EMU2_MANAGE_OPTIONS_CAP);
        
    $role->remove_cap(EMU2_NOTIFY_USERS_CAP);
        
    $role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
        
    $role->remove_cap(EMU2_EMAIL_USER_GROUPS_CAP);
        
    $role->remove_cap(EMU2_EXPORT_LIST_CAP);

    not looked through any of the other files, but that could well be enough
    My Classipress Suggestion: http://ideas.appthemes.com/forums/84...ents?ref=title vote if you like!

  3. #3
    Thread Starter
    lausha's Avatar
    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    422
    Thanks
    62
    Thanked 11 Times in 11 Posts
    Thanks for that. So I amend that bit of code - presumably cut and paste what you've supplied over similar code in that file? Then what do I do? What does that code do exactly? Will I be able to create a group from existing users, and will EMU2 allow me to send emails to just that group then?

  4. #4
    Veteran hugo's Avatar
    Join Date
    Aug 2010
    Location
    United Kingdom
    Posts
    310
    Thanks
    13
    Thanked 80 Times in 54 Posts
    Quote Originally Posted by lausha View Post
    Thanks for that. So I amend that bit of code - presumably cut and paste what you've supplied over similar code in that file? Then what do I do? What does that code do exactly? Will I be able to create a group from existing users, and will EMU2 allow me to send emails to just that group then?
    in all probability yes, lets say you have a custom role called advertisers what you need to do is copy the two blocks of code that relate to authors role and paste them below authors and just change the role name from author to advertiser in your two new blocks. an example (remember the example uses advertiser)

    look for the block of code in my other post in emu2.php paste this
    PHP Code:
    $role get_role('advertiser');
        
    $role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP); 
    below this:
    PHP Code:
    $role get_role('author');
        
    $role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP); 
    further down a few lines, paste this:
    PHP Code:
    $role get_role('advertiser');
        
    $role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP); 
    below this:

    PHP Code:
    $role get_role('author');
        
    $role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
        
    $role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP); 
    now when you go to "send to users" you should see your custom group members in there as you have told the programme that they exist.
    My Classipress Suggestion: http://ideas.appthemes.com/forums/84...ents?ref=title vote if you like!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to remove "Wordpress" in the "From" field in emails for new users?
    By tuanma in forum JobRoller General Discussion
    Replies: 6
    Last Post: June 7th, 2011, 01:31 AM
  2. How to group fields in Ad details
    By digitun in forum ClassiPress General Discussion
    Replies: 2
    Last Post: April 28th, 2011, 03:34 AM