tocsetpos
Редактор
- Сообщения
- 3
- Реакции
- 0
Хочу поделиться с вами несколькими кодами для отображения индикаторов: Автор темы, Сотрудники, Администратор, Модератор, Забанен в сообщениях
В шаблоне post_macros найдите:
И добавьте ниже:
![[XenForo.Info]_1.webp [XenForo.Info]_1.webp](https://code-forum.ru/data/attachments/1/1717-71e4f6415cae4d5949997e6742c841ed.jpg?hash=IJWxeXbAl6)
В шаблоне post_macros найдите:
Код:
<ul class="message-attribution-opposite message-attribution-opposite--list">
Код:
<xf:if is="$post.user_id == $thread.user_id">
<li><span class="message-newIndicator message-threadStarter" style="background: #46a751;">{{ phrase('thread_starter') }}</span></li>
</xf:if>
<xf:if is="$post.User.is_admin">
<li><span class="message-newIndicator message-adminIndicator" style="background: #bd1919;">{{ phrase('admin') }}</span></li>
<xf:elseif is="$post.User.is_moderator" />
<li><span class="message-newIndicator message-moderatorIndicator" style="background: #3c57bd;">{{ phrase('moderator') }}</span></li>
<xf:elseif is="$post.User.is_staff" />
<li><span class="message-newIndicator message-staffIndicator" style="background: #3c57bd;">{{ phrase('admin_navigation.usersStaff') }}</span></li>
<xf:elseif is="$post.User.is_banned" />
<li><span class="message-newIndicator message-bannedIndicator" style="background: #fba406;">{{ phrase('banned') }}</span></li>
</xf:if>
![[XenForo.Info]_1.webp [XenForo.Info]_1.webp](https://code-forum.ru/data/attachments/1/1717-71e4f6415cae4d5949997e6742c841ed.jpg?hash=IJWxeXbAl6)