Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 690

How to add a notification to posting suspensions

$
0
0
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...
PHP Code:
if($forumpermissions['canview'] == || $forumpermissions['canpostthreads'] == || $mybb->user['suspendposting'] == 1)

and below it add...
PHP Code:
//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...
PHP Code:
if($forumpermissions['canview'] == || $forumpermissions['canpostreplys'] == || $mybb->user['suspendposting'] == 1)

and below it add...
PHP Code:
//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.

.zip  Upload to server.zip (Size: 16.75 KB / Downloads: 2)

Viewing all articles
Browse latest Browse all 690

Trending Articles