HOWTO: Pretty styled "official" moderator messages

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris GrahamLiked by Jason VerhagenLiked by moimaimLiked by Duck)
#282 (In Topic #64)
Avatar
Site director
Patrick Schmalstig is in the usergroup ‘Administrators’

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>

Here's an example of what the above would look like:

1644ee44d21ef125ff9379e8650d69d8.png Check the boxes for dangerous tag, block tag, textual tag, and enabled. And then save.

Then, when you want to use an official moderator message, use this tag to make a nicely formatted warning/notice message.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

MVLipwig, ManojSree, Paul D, Philip, babu, John Connor

Forum statistics:
  • 1,292 topics, 5,826 posts, 7,052 members
  • Our newest member is dhanandip
Birthdays:
Back to Top