WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Group Email Subscription
Request for multinetwork compatibility (2 posts)

  1. Fee
    Member
    Posted 2 years ago #

    Hello Boone,
    thanks for your wonderful plugin!

    With bp-multi-network the digest function sends wrong mails if a group of the one Buddypress network has an equal activity id as a group with same group id on the other network.
    bp-multi-network uses different prefixes for bp tables and for bp related usermeta data. So first I had to add the usermeta of your plugin to bp-multi-network - I wrote a request on this into the bp multi networf support forum: http://wordpress.org/support/topic/plugin-bp-multi-network-request-for-compatibility-with-group-email-subscription?replies=1#post-3078506

    And second - and this is where your part may come in - I had to change your usermeta queries. Maybe you're interested in changing this in your next version:
    Change all update_user_meta to bp_update_user_meta
    Change all get_user_meta to bp_get_user_meta
    Change sql queries like:
    $user_subscriptions = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, meta_value FROM $wpdb->usermeta WHERE meta_key = 'ass_digest_items' AND meta_value != ''" ) );
    to:
    $user_subscriptions = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, meta_value FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != ''", bp_get_user_meta_key('ass_digest_items') ) );

    Thank you,
    Fee

    http://wordpress.org/extend/plugins/buddypress-group-email-subscription/

  2. Boone Gorges
    Moderator
    Plugin Author

    Posted 2 years ago #

    Great suggestion, Fee! I've opened a ticket https://github.com/boonebgorges/buddypress-group-email-subscription/issues/31 so that I don't forget about this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic