Previous Thread
Next Thread
Print Thread
Hop To
Anonymous
Unregistered
Anonymous
Unregistered
Hi,
Is there a possibility to send email to the moderators of a forum on any new post <img border="0" title="" alt="[Confused]" src="images/icons/confused.gif" />

I mean something similar to real moderation, but not requiring to approve posts.

Ideally an option for anyone to subscribe to all posts done in a forum (like subscribing to a thread, but at a higher level)

Anonymous
Unregistered
Anonymous
Unregistered
All I could find was this:

Do you want this forum to use real moderation (posts must be approved by admin or moderator)?
Yes No

Otherwise subscribing to the forum is your only alternative.

--

UBBDesign.com: enhancements for ubb.classic & ubb.threads. Creator of the "JC" Templates

Anonymous
Unregistered
Anonymous
Unregistered
Yes, look in addpost.php around line 780 (not sure, since mine is pretty well hacked up) for:
if ($Mailto){

This is the section that mails a followup to the thread starter if he selects to be notified of any followups. And it is where we get an $EmailBody variable that can be also mailed to the moderators.

Now scroll down to just above:
// ---------------------------------------------
// Update the total post if the post is Approved

and insert the following (forgive its untidyness):


<pre> // pgregg addition
// Send email to o the moderators for this board
$newline = "\n";
if (stristr(PHP_OS,"win")) {
$newline = "\r\n";
}
$EmailBody = $Body;
if ($config['stripcodes']) {
$EmailBody = preg_replace("/<([^>])*>/","",$EmailBody);
}
$mailer = new mailer;
$header = $mailer -> headers();
$subject = "[OSS New Post] ($Board) $postername: $Subject_q";
$msg = "New post from: $postername${newline}Subject: $Subject_q${newline}Board: $Board${newline}${newline}URL: {$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$Mnumber$newline${newline}Message:$newline$EmailBody";

$Board_q = addslashes($Board);
$query = "
SELECT Mod_Username, U_Email, U_Name
FROM w3t_moderators, w3t_users
WHERE w3t_moderators.Mod_Username=w3t_users.U_Username AND w3t_moderators.Mod_Board = '$Board_q'
";
$sth_mod = $dbh -> do_query($query);
$modusers = "";
while($rows = $dbh -> fetch_array($sth_mod)) {
list($tmp_moderator, $tmp_modemail, $tmp_modname) = $rows;
if ($tmp_moderator != 'deleteuser') // ignore the "deleteuser" non-human admin user
$modusers .= sprintf("%s _%s_ <%s>, ", $tmp_modname, $tmp_moderator, $tmp_modemail);
}
if (!preg_match("/myusername/", $modusers)) $modusers .= "Paul Gregg _myusername_ <[email protected]>"; // keep me informed also <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

$dbh -> finish_sth($rows);
$modusers = preg_replace("/, $/", "", $modusers);
@mail("$modusers", "$subject", $msg, $header);
</pre>

Now, with all posts and followups your moderators will also be emailed.

Paul.

Anonymous
Unregistered
Anonymous
Unregistered
JC,
Subscribing to the forums needs setting up cron tasks. Seems to be a hard thing on a W2k machine.
Maybe I'll be wrapping up a small console application to cycle through the forums. The code in the cron-script doesn't seem too difficult to copy.

Paul,
Thanks, I'll give this a closer look after the holidays.

Anonymous
Unregistered
Anonymous
Unregistered
Another idea is to pu t a forum on your favorites list.

sounds interesting Qube..

--

UBBDesign.com: enhancements for ubb.classic & ubb.threads. Creator of the "JC" Templates


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
1 members (1 invisible), 304 guests, and 96 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)