1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Making warned posts stand out

Discussion in 'XenForo Development Discussions' started by Jake Hakoda Shirley, Jul 22, 2012.

  1. Jake Hakoda Shirley

    Jake Hakoda Shirley Active Member

    Hey guys, I was looking for a way to make posts that have received warnings a different color. Any ideas?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> message

    Add the red code:

    <xen:require css="message.css" />
    <xen:require css="bb_code.css" />
    <li id="{$messageId}" class="message {xen:if $message.warning_id, 'warned'} {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
    	<xen:include template="message_user_info">
    		<xen:map from="$message" to="$user" />
    Admin CP -> Appearance -> Templates -> EXTRA.css

    Add this code:

    .message.warned .messageContent
    	background-color: red;
    You can use any CSS / markup you want using .message.warned as the first part of the selector.
  3. Jake Hakoda Shirley

    Jake Hakoda Shirley Active Member

    Thanks a ton Jake!

Share This Page