{foreach from=$subcomments item=c}
{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} {* ----- БЛОК РЕЙТИНГА (ЗВЕЗДЫ ИЛИ ЛАЙКИ) ----- *} {* Добавлена проверка на полное отключение (значение 2) *} {if $comment_rating_type != 2}
{if $comment_rating_type == 1} {* РЕЖИМ ЛАЙКОВ (СЕРДЕЧКО) *}
{if isset($c.rating_count)} {$c.rating_count} {/if} {else} {* РЕЖИМ ЗВЕЗД (1-5) - ПО УМОЛЧАНИЮ ПРИ 0 *}
{assign var="avg_rating" value=0} {if isset($c.rating_count) && $c.rating_count > 0} {math equation="round(x / y)" x=$c.rating_sum y=$c.rating_count assign="avg_rating"} {/if} {section name=star start=1 loop=6} {/section}
{if isset($c.rating_count)} ({$c.rating_count}) {/if} {/if}
{/if} {* --------------------------------- *} {if $comment_show_f1 == 1 && $c.comment_author_website} {$comment_name_f1|default:#COMMENT_YOUR_SITE#}: {$c.comment_author_website|stripslashes|escape} {/if} {if $comment_show_f2 == 1 && $c.comment_author_city} {$comment_name_f2|default:#COMMENT_YOUR_FROM#}: {$c.comment_author_city|stripslashes|escape} {/if} {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|stripslashes|nl2br}
{* ВЫВОД ПРИКРЕПЛЕННОГО ИЗОБРАЖЕНИЯ *} {if !empty($c.comment_file)} {/if}
{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}
{/foreach}