This topic is close on phpBb.com so I was able to add parse bbcode and smilies to this mod. The only thing is you will get a general error due to the length of your alert if your message is too long so it's best to adjust it. I had to go my phpMyAdmin and adjust it since it will initially count all characters of your message like the below Example Message and with urls and bbcodes, they can be easily filled up with just a couple of links. So I changed my alert_text varchar to 800 to accommodate my message plus links.
Open:
roots/index.php
Find:
Code: Select all
$template->assign_block_vars('alerts', array(
Add Before:
Code: Select all
$message = utf8_normalize_nfc($row['alert_text']);
$uid = $bitfield = $options = '';
$allow_bbcode = $allow_urls = $allow_smilies = true;
generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
$row['alert_text'] = generate_text_for_display($message, $uid, $bitfield, $options);
Open:
roots/includes/ucp/ucp_alerts.php
Find:
Code: Select all
$template->assign_block_vars('alerts', array(
'U_ALERT' => $row['alert_text'],
Add Before:
Code: Select all
$message = utf8_normalize_nfc($row['alert_text']);
$uid = $bitfield = $options = '';
$allow_bbcode = $allow_urls = $allow_smilies = true;
generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
$row['alert_text'] = generate_text_for_display($message, $uid, $bitfield, $options);
Example Message:
Code: Select all
HOLIDAY LIGHTS / SNOW - You might have noticed the holiday lights and snow! When you hover over the lights with your mouse they smash. Be aware, there is a smashing sound. They are our holiday decoration for the month of December. You can turn off the lights/snow permanently in the User CP, choose Board preferences and click No for both options! For GUESTS - You can stop the snow temporally by clicking on Stop Snowing in the menu item. It will resume again when you maneuver to a new page.
[br][/br]Feel free to share your thoughts: [url=http://www.sonyreaderboards.com/forums/viewtopic.php?f=28&t=2374]Go To Light Topic[/url] and [url=http://www.sonyreaderboards.com/forums/viewtopic.php?f=28&t=2389]Go To Snow Topic[/url]! Happy Holidays! :party: