Topic: Announcement feature - bbcode and smilies
Any chance of enabling bbcode and/or smilies instead of HTML in the new Announcement feature? Or options to enable any of the three in the admin panel?
You are not logged in. Please login or register.
PunBB Forums → Feature requests → Announcement feature - bbcode and smilies
Any chance of enabling bbcode and/or smilies instead of HTML in the new Announcement feature? Or options to enable any of the three in the admin panel?
Well, I guess it's possible. I don't perticularily like the idea of allowing both HTML and BBCode though. If you want the field to be HTML, then a regular line break \n should not be converted into <br />. However, if the field can contain BBCode, it feels more like a regular post and then the forum should convert line breaks into <br />.
But, if you want to do it yourself, it's quite easy. If you want to, I can describe how.
Yes please
I'm at school now, but give me a minute.
OK no problem... take as much time as you like
Open up header.php, goto line 185 (after "ob_start();"). Insert:
include_once $pun_root.'include/parser.php';
Then a few line down, replace
<?php echo $pun_config['o_announcement_message'] ?><br><br>
with
<?php echo parse_message($pun_config['o_announcement_message'], 1) ?><br><br>
Then, you have to search all files for the string:
require $pun_root.'include/parser.php';
and replace it with
require_once $pun_root.'include/parser.php';
The files you need to search in are delete.php, edit.php, help.php, moderate.php, post.php (2 places), profile.php (2 places) and viewtopic.php.
It was a bit more tedious than I had first expected, but I'm sure you can handle it :)
Thankyou very much I've had more tedious code editing than this
PunBB Forums → Feature requests → Announcement feature - bbcode and smilies
Powered by PunBB, supported by Informer Technologies, Inc.