bbPress

Simple, fast, elegant

bbPress Plugin Browser »

Moderator New Post Notification

Download

Version:

Other Versions

Last Updated: 2008-1-19

Requires bbPress Version: 0.83 or higher

Compatible up to: 0.83

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(1)

Your Rating

Author: finalwebsites

This bbpress plugin will guaranty that you and your forum moderators will never miss a new post made by some regular member. Inspired by the Post Notification plugin written by Thomas Klaiber is this plugin the best solution to get every new post into the forum moderator's mail box.

These days forum spam is a big problem and also bad messages could drive away your members. Just be the first reader of each new post and protect your forum for bad influences.


  1. I receive the following error when trying to post as a Member user:

    Fatal error: Call to undefined function: notification_is_activated() in /my-plugins/moderator_notification.php on line 74

    I receive the error after selecting the send post button, logged in as a Member. I set my key master id to receive notifications.

    I am using bbpress 0.8.3.1. The only other plugins activated are Quote and Support Forum.

    Any ideas?

    Posted: 2 years ago #
  2. You're right I missed something :D

    Replace the row with:
    if (mod_notification_is_activated($userdata->ID)) {

    Posted: 2 years ago #
  3. I thought that was the issue, but what not sure.

    Thanks a lot. It is working great now.

    Posted: 2 years ago #
  4. the last bug(s) is removed in version 1.01

    Posted: 2 years ago #
  5. Great plugin. The only problem is that the DB names are hard coded for the default BB intallation (using BB_ as DB prefix), so you have to change them manually if you're using a different prefix for the DB, and/or if you've integrated BB with WP.

    Posted: 2 years ago #
  6. thanks for pointing me on that (I guess I copy/pasted some code bad code)

    I will change that with the next release.

    Posted: 2 years ago #
  7. helpy

    Member

    I use WP/BB integration ... that means, that wp and bb are using the same table for the users. When I activate this plugin and then post a new message the following error occurs:

    bbPress database error: [Table 'MyDatabase.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

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /homepages/.../moderator_notification.php on line 40

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /homepages/.../moderator_notification.php on line 40

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /homepages/.../moderator_notification.php on line 40

    Warning: Invalid argument supplied for foreach() in /homepages/.../moderator_notification.php on line 73

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/46/d180234142/htdocs/helpy.de/5bn1983/www/forum/bb-includes/db.php:86) in /homepages/.../www/forum/bb-includes/pluggable.php on line 164

    Posted: 2 years ago #
  8. helpy

    Member

    Sorry! I just recognized that this "bug" was mentioned before.

    Posted: 2 years ago #
  9. jldean

    Member

    I just tried running this plugin with bbpress 0.9.0.2 integrated with WP.

    I had to change the user table names (bb_users and bb_usermeta to wp_users and wp_usermeta) to stop getting errors in the edit profile page.

    Now there are no errors on the profile page, but no tickbox to select notification either... no new options at all.

    Would it be easy to tweak this invaluable plugin for the latest bbpress?

    Thanks

    Posted: 1 year ago #
  10. jldean

    Member

    After a couple of tweaks, I got it working with 0.9.0.2

    More info here

    Posted: 1 year ago #
  11. Anonymous

    Unregistered

    I don't get any error messages when I post a new topic but I don't get any emails. I've enabled the option in my profile and I have double checked my email address.

    Any ideas?

    I'm running bbPress 0.9.0.2

    Posted: 1 year ago #
  12. TrishaM

    Member

    I also got this running by changing the user table names from bb_users and bb_usermeta to wp_users and wp_usermeta since I have my bbPress install integrated with WP,

    However, when I get the email there is no "from" address - not sure why since my email address is set up under my user data in both WP and bbPress........I don't see what is wrong with this line from the code, but is there some modification I can make to this?

    $header = 'From: '.bb_get_option('admin_email')."\n";

    Posted: 11 months ago #
  13. bripirie

    Member

    Hi Trisha,

    I fixed this problem of no from address by doing the following:

    Replace the line that reads:
    mail($userdata->user_email, $subject, $msg, $header);

    With this instead:
    bb_mail($userdata->user_email, $subject, $msg);

    Now, all the subscribed moderators receive proper emails when any new post appears on the site.

    Posted: 11 months ago #
  14. davidgv

    Member

    and how i could insert (in mail body) the post message and the post link ( topyc#post-xxx ) ?

    Posted: 6 months ago #
  15. TrishaM

    Member

    Just installed this plugin on a new bbPress install (v. 1.0.2) and when I edit a user I see this error:

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /homepages/25/d263871326/htdocs/FSPW_NewWP/Forum/my-plugins/moderator-new-post-notification/moderator_notification.php on line 40

    Repeated three times - if I try to edit the user and click on Update Profile, I get a blank page with that error repeated again three times followed by the headers already sent error message, telling me that the headers were already sent by /bb-includes/functions.bb-pluggable.php

    Any ideas?

    Posted: 3 months ago #
  16. TrishaM

    Member

    Update: I posted this in the plugin's official forum, unfortunately the developer cannot help because he does not have his bbPress integrated with Wordpress, as I do.

    I'm on WP 2.8.6, bbPress 1.0.2, and version 1.0.1 of this plugin.

    I suspect the problem is with the fact that because I have bbPress integrated with WP, my users table is NOT bb_users, but instead is wp_users. However, I did add to my bb-config.php file two lines I found in some WP integration instructions that I assume are supposed to tell bbPress about the user table, but it doesn't seem to make any difference at all - those lines are:

    $bb->custom_user_table = 'wp_users';
    $bb->custom_user_meta_table = 'wp_usermeta';

    Also, I don't seem to be able to get the "deep" integration working - when I follow the instructions to add a require_once statement with a path to wp_blog_header.php to my bb-config.php file, I get 500 server errors. I don't know if this is part of the problem or not, but would like to fix that too since I really need to call some core WP functions from within bbPress but can't.

    Since the developer can't help, is there anyone who has this working with an integrated setup?

    Posted: 3 months ago #
  17. TrishaM

    Member

    ANOTHER UPDATE:

    I fixed my problem with this plugin by modifying one line of it's code. The problem is caused by the fact that this plugin is not written to take into account users who have bbPress integrated with Wordpress and are sharing the user table. The plugin is hard-coded to use two tables called bb_users and bb_usermeta, which may not exist if you have a WP integrated setup sharing the user table.

    So if you have the same problem, you can fix it by looking for this function in the plugin file moderator-notification.php (in version 1.0.1 of the plugin it starts at line 27):

    function is_moderator($user_id) {
    global $bbdb;
    $mods = array('moderator', 'administrator', 'keymaster');
    $is_mod = false;
    $row = $bbdb->get_row("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 = $user_id
    ");
    $arr = unserialize($row->role);
    foreach($mods as $val) {
    if (array_key_exists($val, $arr)) {
    $is_mod = true;
    break;
    }
    }
    return $is_mod;

    }

    Modify this line:
    FROM bb_users AS u, bb_usermeta AS um

    to read:
    FROM wp_users AS u, wp_usermeta AS um

    OR whatever YOUR users and usermeta tables are named if different (they are MOST LIKELY wp_)

    This worked for me, hopefully it will help someone else. I suggested to the plugin developer that he add an admin setting to let users designate the user table names since a lot of people use bbPress WITH Wordpress, and in my opinion this is a GREAT plugin once you get it working :)

    Posted: 3 months ago #
  18. something4ken

    Member

    worked like a charm. Great plugin

    Posted: 3 months ago #

RSS feed for this topic

Add a Comment

You must log in to post.

Code is Poetry.