{foreach from=$subcomments item=c} {* Контейнер комментария: Используем .card для блока, и ms-4 для вложенности *}
{* Подсветка (Highlight) *} {if isset($smarty.request.subaction) && $smarty.request.subaction=='showonly' && isset($smarty.request.comment_id) && $smarty.request.comment_id==$c.Id}
{/if}
{* ===================================================================== *} {* ТЕЛО КОММЕНТАРИЯ (Включает Аватар, Автор, Метаданные и Текст) *} {* ===================================================================== *}
{* ----- БЛОК АВАТАРА ----- *} {$avatar_url = "{$ABS_PATH}modules/comment/img/no_avatar.webp"} {if isset($c.avatar) && $c.avatar != ''} {$avatar_url = $c.avatar} {/if}
Аватар пользователя {$c.comment_author_name|stripslashes|escape}
{* -------------------------- *}
{* Информация об авторе и дате *}
{* Автор - ИКОНКА ОБНОВЛЕНА *} {#COMMENT_USER_ADD#} {$c.comment_author_name|stripslashes|escape} {* Дата публикации - ИКОНКА ОБНОВЛЕНА *} {$c.comment_published} {* IP-адрес (для Админа) *} {if $smarty.const.UGROUP==1} • IP:{$c.comment_author_ip} {/if} {* Метка "Изменено" *} {if isset($c.comment_changed) && $c.comment_changed > 1} ({#COMMENT_TEXT_CHANGED#} {$c.comment_changed}){/if}
{* Текст комментария *}
{$c.comment_text|escape}
{* --------------------------------------------------------------------- *} {* ===================================================================== *} {* ПАНЕЛЬ ДЕЙСТВИЙ (card-footer) *} {* ===================================================================== *} {* --------------------------------------------------------------------- *}
{* Закрываем подсветку *} {if isset($smarty.request.subaction) && $smarty.request.subaction=='showonly' && isset($smarty.request.comment_id) && $smarty.request.comment_id==$c.Id}
{/if} {* Точка вставки формы ответа *} {* Рекурсивный вызов дочерних комментариев *} {if isset($comments) && isset($comments[$c.Id])}
{include file="$subtpl" subcomments=$comments[$c.Id] sub=1}
{/if}
{* Закрывает mod_comment_comment *} {/foreach}