WordPress.org

Ready to get started?Download WordPress

Forums

bbPress Notify (No Spam)
[resolved] dynamic user roles (3 posts)

  1. youtag
    Member
    Posted 1 year ago #

    Hello useStrict, thanks for picking up this great little plugin.
    I suppose the original author has dropped support?

    I needed the plugin to send email to forum participants and other user roles, which did not appear in the list, so I wrote a quick fix. I think this could be useful to lots of folks, so I share the code, hoping this will make it in the next version of the plugin:

    In functions _topic_recipients_inputfield() and _reply_recipients_inputfield(), replace

    $options = array('blogadmin'...

    by

    global $wp_roles;
    $options = $wp_roles->get_names();

    and

    In functions notify_new_topic() and notify_new_reply(), replace the long switch statement by

    $users = get_users(array('role' => $opt_recipient));
    foreach ((array)$users as $user)
    {
    $user = get_object_vars($user);
    $recipients[] = $user['ID'];
    }

    You might also consider removing settings conversions relating to version 0.1.

    http://wordpress.org/extend/plugins/bbpress-notify-nospam/

  2. useStrict
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Paul,

    I tried to contact the original author with a change request pretty much like you did here but I never got a reply. So I adopted the plugin.

    I had a look at your pastebin code @ http://pastebin.com/d3Xt4A4a and I like the changes. My only concern is that you removed the old plugin deactivator. Was it causing errors? I put it there to avoid conflicts in case someone is using the spam-permitting version of the plugin.

    Cheers,
    Vinny

  3. youtag
    Member
    Posted 1 year ago #

    Hi Vinny, yea, I saw that you tried to contact the original author. it's a pity that the plugin repository doesn't provide more tools for collaboration. I wish there was something like an official fork of a plugin, that would avoid redundant work and result in fewer but better plugins with good support.

    Feel free to place the old plugin deactivator back, it did not cause errors.

    Cheers,
    Paul

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic