КАк можно выделить комментарии админа?

Главные вкладки

Комментарии

Аватар пользователя beerman beerman 3 марта 2009 в 16:01

comment.tpl.php

// Начинаем телепать
<?php global $user; ?>
<?php $is_admin = ''; ?>
<?php if ($user->uid == 1): ?>
  $is_admin = ' myclass';
<?php endif; ?>
<div class="comment<?php if ($comment->status == COMMENT_NOT_PUBLISHED) print ' comment-unpublished'; ?><?php print $is_admin; ?>"> // А тут еще потелепали
<?php if ($new != ''): ?>
  <span class="new"><?php print $new; ?></span>
<?php endif; ?>
  <h3 class="title"><?php print $title; ?></h3>
<?php if ($picture) print $picture; ?>
  <span class="submitted"><?php print t('Submitted on ') . format_date($comment->timestamp, 'custom', 'F jS, Y') . t(' by '); ?> <?php print theme('username', $comment); ?></span>
  <div class="content">
    <?php print $content ?>
      <?php if ($signature): ?>
        <div class="user-signature clear-block">
          <?php print $signature ?>
        </div>
      <?php endif; ?>
  </div>
  <div class="links">
<?php print $links; ?>
  </div>
</div>
CSS
.myclass {
  // Тут еще телепаем с CSS
}
Аватар пользователя Zen Zen 3 марта 2009 в 18:37

спасибо за копипаст, но может руки не оттуда? у меня возле каждого сообщения выводится надпись $is_admin = ' myclass';