PHP Script Forums » bbpress plugins and modifications

Moderator New Post Notify , DB error w/ WordPress Integration

(8 posts)
Please support us by buying these products:

  1. twincascos

    twincascos
    Member

    Hello, I've just been trying your plugin Moderator New Post Notification with a wordpress - bbpress Integrated install and I get the following error `database error:

    [Table 'bbpress.bb_users' doesn't exist]
    SELECT um.meta_value AS role FROM bb_users AS u, bb_usermeta AS um WHERE u.ID = um.user_id AND um.meta_key = 'bb_capabilities' AND u.user_status = 0 AND u.ID = 2`

    Posted 1 year ago #
  2. Olaf

    Olaf
    PHP Coder

    Yes right, the plugin needs an update if the prefix is different from "bb_".

    replace the SQL statement within the function "is_moderator":

    $row = $bbdb->get_row("SELECT um.meta_value AS role
    		FROM $bbdb->users AS u, $bbdb->usermeta AS um
    		WHERE u.ID = um.user_id
    		AND um.meta_key = 'bb_capabilities'
    		AND u.user_status = 0
    		AND u.ID = $user_id
    	");
    Posted 1 year ago #
  3. User has not uploaded an avatar

    facelikebambi
    Member

    Hiya,

    I'm trying to use the plugin with Wordpress and BBPress 0.9.0.2 integrated. I had the same error, and the fix mentioned above does indeed remove the SQL error.

    However, I'm still not getting the activate checkbox when I edit my (keymaster) profile.

    As a test, I installed a local, non-WP-integrated version of 0.9.0.2 to see if it was a problem with the latest BBpress... and the plugin works fine!

    Any suggestions welcomed - thanks!

    Posted 1 year ago #
  4. Olaf

    Olaf
    PHP Coder

    hm... I think that some variable is replaced by the code which is written for WP.

    what error do you get if you access the plugin-file via the browser?

    Posted 1 year ago #
  5. User has not uploaded an avatar

    facelikebambi
    Member

    Ah I fixed it!

    Just had to change the two references to bb_capabilities to bbpress_capabilities

    Also, the notification emails had no sender, so I just changed the $header = 'From: '.bb_get_option('admin_email')."\n"; line to hard code the from address.

    Thanks!

    Posted 1 year ago #
  6. Olaf

    Olaf
    PHP Coder

    Ok, cool that it works now (will add this to the next version)

    Posted 1 year ago #
  7. User has not uploaded an avatar

    paulikro
    Member

    Quote from: facelikebambi
    "Ah I fixed it!
    Just had to change the two references to bb_capabilities to bbpress_capabilities
    Also, the notification emails had no sender, so I just changed the $header = 'From: '.bb_get_option('admin_email')."\n"; line to hard code the from address.
    Thanks!"

    that is great tipp! i have to replace bb_capabilities to bbpressforumcapabilities .. maybe somewhen will help this..

    Posted 5 months ago #
  8. Olaf

    Olaf
    PHP Coder

    paulikro,

    this is for everyone differnet, must of the people using the standard prefix "bb_"

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.