The 2 simple solutions would be for the BBpress members to have an RSS feed reader, or you could e-mail them.
What you’re looking for is a plugin that emails every member of a BBpress forum every time a new topic is started. I doubt anyone’s build anything like that because it would just end up adding to spam (even if it wouldn’t in your particular case).
Yes indeed, I would like it to email the members.
I understand that this is only relevant to small teams, but applications like 37signals’s Basecamp support emailing on a new thread, and it massively improves team collaboration.
Depending on how many members you are talking about, or how many time you expect a new post to be on the forum, i would definitely be sceptical of something like this. It’s a massive hark back to the old ways of doing things.
So my suggestions:
1) When you make a new post, physically email everyone.
I’m not sure when e-mail became incredibly difficult to do manually.
2) If you really want to write a plugin it should go something like:
function notification_new_post($post_id=0) {
global $bbdb, $bb_table_prefix, $topic_id, $bb_current_user;
$all_users = $bbdb->get_results("SELECT ID, user_email FROM $bbdb->users WHERE user_status=0");
foreach ($all_users as $userdata)
{
$message = __("There is a new post on: %1$s nReply by: %2$s nText: %3$s nn%4$s ");
mail( $userdata->user_email, bb_get_option('name') . ': ' . __('Notification'),
sprintf( $message, get_topic_title($topic_id), get_user_name($bb_current_user->ID), strip_tags(get_post_text($post_id)), get_topic_link($topic_id) ),
'From: '.bb_get_option('name').' <'.bb_get_option('from_email').'>'
);
} //foreach
}
add_action('bb_new_post', 'notification_new_post');
You may need to edit some of that code, but found that by searing for email notification on this website (props to Thomas Klaiber who’s code i quickly edited). Amazing what searching first does
Again Neotoxic, i strongly suggest against this unless you know for sure that everyone’s going to be ok with getting an email everytime. RSS readers on email clients, phones, browsers etc save so much hassle…
Take Care
kevinjohngallagher – Thank you very much for your help. I understand you caution completely, however given the nature of my community I am sure that this will be appreciated.
Can you confirm that the following will only select users who are bbpress members and above, and not all users in my WordPress users table.
$bbdb->users WHERE user_status=0"
Hi Neotoxic,
No i’m afraid you’ll have to figure out your own SQL script for the users. My code isn’t tested or anything, i’m afraid you’ll have to write teh custom code for your own specific solution yourself. the code i’ve posted above just does 95% of the work for you