HOWTO: Pretty styled "official" moderator messages


If you would like special formatted moderator messages which would separate staff messages from general messages posted in forums and other places, this tutorial is for you.
In order to accomplish this in composr, we are going to create a custom comcode tag that is marked as dangerous not because it is, but because we want to restrict who can use it to staff only.First off make sure all non-staff cannot use dangerous comcode in your permissions. If anyone who is a non-staff can use dangerous comcode, this tutorial will not be effective as non-staff can then imitate official staff messages.
Then, go to Setup -> Custom Comcode and add a new comcode tag.
Codename it something that begins with "moderator_" so that it's obvious to other staff it's a moderator comcode tag. For example, "moderator_message".
You can add parameters if you like, but in this example, we're going to erase everything in the parameters field and not have any (except the default… content).
Replacement text: Here's an example style. Tweak as necessary and desired.
Code
<div style="background: rgba(255, 128, 0, 0.2)">
<h3 style="text-align: center;">Moderator Message</h3>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td style="width: 25%;"><img src="https://compo.sr/themes/default/images/messageicons/warn_large.png" alt="Notice"></td>
<td><strong>Please read the following moderator message carefully:</strong><br /><br />{content}</td>
</tr>
</tbody>
</table>
</div>

Then, when you want to use an official moderator message, use this tag to make a nicely formatted warning/notice message.
- Need support for version 10? The core development team is no-longer offering it for free (unless it's a critical bug that breaks your entire site or a serious security hole). Please consider hiring me instead if you need v10 support or a non-critical bug fix. Or, ask the community in the forums!
- Do you enjoy Composr? Please consider contributing your talent to the project or recommending Composr to others. Even small contributions make a big impact in the Composr community.
- Do you have feedback for us? You can report bugs, suggest features, or give feedback on the Free support options page.
- Do you need professional service with your Composr website? Please consider contracting me for your needs through my company, PDStig, LLC. Doing so will also help fund Composr development.
- Want to watch live streams of me developing Composr CMS? Please subscribe to me on Twitch to be notified when I stream. Composr development streams are usually spontaneous / not scheduled in advance as work priorities come first.