Answer the question
In order to leave comments, you need to log in
The avatar of the Bitrix forum comments component is not displayed?
Hello, dear colleagues, I can’t understand why, the user’s avatar is not displayed in the comments on Bitrix?
Comments to the infoblock were connected from the forum component, please help me
understand the code:
<? foreach( $arResult["MESSAGES"] as $aMessage ):?>
<div class="comment">
<?if(is_array($res["AVATAR"]) && array_key_exists("HTML", $res["AVATAR"])):?>
<img class="comment__avatar" src="<?=$res["AVATAR"]["HTML"]?>" alt="">
<?else:?>
<img src="/bitrix/components/bitrix/forum.topic.reviews/templates/.default/images/noavatar.gif" border="10" />
<?endif;?>
<div class="comment__body">
<p><span class="comment__author"><?=$aMessage['AUTHOR_NAME']?></span> • <span class="comment__time"><?=FormatDate( 'd.m.Y', strtotime( $aMessage['POST_DATE'] ) )?></span></p>
<p class="comment__text"><?=$aMessage['POST_MESSAGE']?></p>
<ul class="comment__icons">
<li class="comment__icon comment__icon--appreciations"><a href="#">like</a> Нравится / <span><?=$arItem['SHOW_COUNTER']?></span></li>
<li class="comment__icon comment__icon--comments"><a href="#">Ответить</a> / <span>0</span></li>
</ul>
</div>
</div>
<? endforeach; ?>
<? if( $arResult["NAV_RESULT"] && $arResult["NAV_RESULT"]->NavPageCount > 1 ): ?>
<?=$arResult["NAV_STRING"]?>
<? endif; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question