MyBB Community Forums

Full Version: How to add a notification to posting suspensions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I posted this in the general support forum before I saw this one so this is how you add a notification to posting suspensions.

Open ROOT/newthread.php
Find...
if($forumpermissions['canview'] == 0 || $forumpermissions['canpostthreads'] == 0 || $mybb->user['suspendposting'] == 1)
{ 
and below it add...
//Custom for Suspend time
    if ($mybb->user['suspendposting'] == 1)
    {
            $susdate = my_date($mybb->settings['dateformat'], $mybb->user['suspensiontime']);
            $sustime = my_date($mybb->settings['timeformat'], $mybb->user['suspensiontime']);
            
        error("Your posting privileges are currently suspended until $susdate $sustime.", "Posting Suspended");
    }
    //Custom for Suspend time 
Then open ROOT/newreply.php
Find...
if($forumpermissions['canview'] == 0 || $forumpermissions['canpostreplys'] == 0 || $mybb->user['suspendposting'] == 1)
{ 
and below it add...
//Custom for Suspend time
    if ($mybb->user['suspendposting'] == 1)
    {
            $susdate = my_date($mybb->settings['dateformat'], $mybb->user['suspensiontime']);
            $sustime = my_date($mybb->settings['timeformat'], $mybb->user['suspensiontime']);
            
        error("Your posting privileges are currently suspended until $susdate $sustime.", "Posting Suspended");
    }
    //Custom for Suspend time 
You are done, you can edit the message to whatever suites your needs.
Here is a screenshot of what it will look like.
[Image: mrsm6u.png]

IF YOU DO NOT WANT TO EDIT IT YOURSELF YOU CAN DOWNLOAD MY EDIT OF THE TWO FILES BELOW.
[attachment=29197]