Topic: Just wondering...
...if you can use HTML and/or BB-code in ban messages?
Thanks, Ed.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → Just wondering...
...if you can use HTML and/or BB-code in ban messages?
Thanks, Ed.
Anybody know?
I believe you can't
Not without a modification I guess.
Just played around with the functions file and here's what you can do to be able to use BBCode in the ban messages.
1. Open ./include/functions.php and find on line 191
$bans_altered = false;
2. Add after:
require PUN_ROOT.'include/parser.php';
3. Find on line 206
message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'<br /><br /><strong>'.pun_htmlspecialchars($cur_ban['message']).'</strong><br /><br />' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);
4. Replace with
message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'</p>'.parse_message($cur_ban['message'], false).'<p>' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);
5. Find on line 220
message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'<br /><br /><strong>'.pun_htmlspecialchars($cur_ban['message']).'</strong><br /><br />' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);
6. Replace with
message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'</p>'.parse_message($cur_ban['message'], false).'<p>' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);
7. Save & upload
Hope this helps
EDIT: Almost forgot, if you want to use HTML instead of BBCode, just replace pun_htmlspecialchars($cur_ban['message']) with $cur_ban['message'] on line 206 & 220 instead of following the steps listed above.
Thanks.
PunBB Forums → PunBB 1.2 discussion → Just wondering...
Powered by PunBB, supported by Informer Technologies, Inc.