From 1a378ee6b2aa63bc85966463b13f7ac5ae68138e Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sun, 3 Apr 2011 18:20:55 +1000 Subject: Public ban messages --- inc/config.php | 11 ++++++++--- inc/mod.php | 20 ++++++++++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/config.php b/inc/config.php index 13370614..d4a62d40 100644 --- a/inc/config.php +++ b/inc/config.php @@ -256,6 +256,12 @@ $config['mod']['noticeboard_display'] = 50; // Number of entries to summarize and display on the dashboard $config['mod']['noticeboard_dashboard'] = 5; + // Default public ban message + $config['mod']['default_ban_message'] = 'USER WAS BANNED FOR THIS POST'; + // What to append to the post for public bans ("%s" is the message) + $config['mod']['ban_message'] = '(%s)'; + // Wait indefinitely when rebuilding everything + $config['mod']['rebuild_timelimit'] = 0; // Probably best not to change these: if(!defined('JANITOR')) { @@ -347,9 +353,8 @@ $config['mod']['noticeboard_post'] = MOD; // Delete entries from the noticeboard $config['mod']['noticeboard_delete'] = ADMIN; - - // Wait indefinitely when rebuilding everything - $config['mod']['rebuild_timelimit'] = 0; + // Public ban messages; attached to posts + $config['mod']['public_ban'] = MOD; // Mod links (full HTML) // Correspond to above permission directives diff --git a/inc/mod.php b/inc/mod.php index 77c3960c..274159ba 100644 --- a/inc/mod.php +++ b/inc/mod.php @@ -146,11 +146,12 @@ return $body; } - function form_newBan($ip=null, $reason='', $continue=false, $delete=false, $board=false) { + function form_newBan($ip=null, $reason='', $continue=false, $delete=false, $board=false, $allow_public = false) { + global $config, $mod; return '
New ban' . '
' . ($continue ? '' : '') . - ($delete ? '' : '') . + ($delete || $allow_public ? '' : '') . ($board ? '' : '') . '' . '' . @@ -167,6 +168,21 @@ htmlentities($reason) . '' . '' . + ($mod['type'] >= $config['mod']['public_ban'] && $allow_public ? + '' . + '' . + '' . + '' . + '' + : '') . '' . '' . '
' . + ' ' . + ' (public; attached to post)
' . -- cgit v1.3