Forums

[resolved] Help COMPLETING admin comment highlight code! (5 posts)

  1. sworddude247
    Member
    Posted 6 months ago #

    Okay, so I figured out how to highlight admins comments. Here are the 2 codes I'm using:

    This code for the comments.php:

    <li class=”user_id)
    $oddcomment = “admincomment”;
    echo $oddcomment;
    ?>” id=”comment-”>

    And this code for the style.css:

    .admincomment{
    background:#FF0000;
    border:1px solid #99FF00;
    padding:5px 0px 5px 0px;
    }

    The problem is I want it to be a user ID instead of "Admincomment" because for some reason it is also highlighting another subscriber users comments... PLEASE HELP!

  2. arleym
    Member
    Posted 6 months ago #

    instead of

    $oddcomment = “admincomment”;
    echo $oddcomment;

    if (1 == $comment->user_id) $oddcomment = "admincomment"; echo $oddcomment;

    the if statement checks if you're an admin (1)

  3. sworddude247
    Member
    Posted 6 months ago #

    Thanks, but then what should I change about the style.css file?

  4. sworddude247
    Member
    Posted 6 months ago #

    Resolved :) !

  5. polle001
    Member
    Posted 5 months ago #

    Hi, how about highlighting admin comments in 2.7 ?

    I know by author I can use something like this:

    .bypostauthor{
    background-color: #4d535f;
    }

    Anyone can tell the way for the admin ?

    Thanks.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.