EZ-Web,
Тут?
<!-- Отображение комментариев -->
<xsl:template match="comment">
<!-- Отображаем комментарий, если задан текст или тема комментария -->
<xsl:if test="text != '' or subject != ''">
<a name="comment{@id}"></a>
<div class="comment" id="comment{@id}">
<xsl:if test="subject != ''">
<div class="subject" hostcms:id="{@id}" hostcms:field="subject" hostcms:entity="comment"><xsl:value-of select="subject"/></div>
</xsl:if>
<div hostcms:id="{@id}" hostcms:field="text" hostcms:entity="comment" hostcms:type="wysiwyg"><xsl:value-of select="text" disable-output-escaping="yes"/></div>
<p class="tags">
<!-- Оценка комментария -->
<xsl:if test="grade != 0">
<span><xsl:call-template name="show_average_grade">
<xsl:with-param name="grade" select="grade"/>
<xsl:with-param name="const_grade" select="5"/>
</xsl:call-template></span>
</xsl:if>
<img src="/images/user.png" />
<xsl:choose>
<!-- Комментарий добавил авторизированный пользователь -->
<xsl:when test="count(siteuser) > 0">
<span><a href="/users/info/{siteuser/path}/"><xsl:value-of select="siteuser/login"/></a></span>
</xsl:when>
<!-- Комментарй добавил неавторизированный пользователь -->
<xsl:otherwise>
<span><xsl:value-of select="author" /></span>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="rate/node()">
<span id="comment_id_{@id}" class="thumbs">
<xsl:choose>
<xsl:when test="/informationsystem/siteuser_id > 0">
<xsl:choose>
<xsl:when test="vote/value = 1">
<xsl:attribute name="class">thumbs up</xsl:attribute>
</xsl:when>
<xsl:when test="vote/value = -1">
<xsl:attribute name="class">thumbs down</xsl:attribute>
</xsl:when>
</xsl:choose>
<span id="comment_likes_{@id}"><xsl:value-of select="rate/@likes" /></span>
<span class="inner_thumbs">
<a onclick="return $.sendVote({@id}, 1, 'comment')" href="{/informationsystem/url}?id={@id}&vote=1&entity_type=comment" alt="Нравится"></a>
<span class="rate" id="comment_rate_{@id}"><xsl:value-of select="rate" /></span>
<a onclick="return $.sendVote({@id}, 0, 'comment')" href="{/informationsystem/url}?id={@id}&vote=0&entity_type=comment" alt="Не нравится"></a>
</span>
<span id="comment_dislikes_{@id}"><xsl:value-of select="rate/@dislikes" /></span>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">thumbs inactive</xsl:attribute>
<span id="comment_likes_{@id}"><xsl:value-of select="rate/@likes" /></span>
<span class="inner_thumbs">
<a alt="Нравится"></a>
<span class="rate" id="comment_rate_{@id}"><xsl:value-of select="rate" /></span>
<a alt="Не нравится"></a>
</span>
<span id="comment_dislikes_{@id}"><xsl:value-of select="rate/@dislikes" /></span>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:if>
<img src="/images/calendar.png" /> <span><xsl:value-of select="datetime"/></span>
<xsl:if test="/informationsystem/show_add_comments/node()
and ((/informationsystem/show_add_comments = 1 and /informationsystem/siteuser_id > 0)
or /informationsystem/show_add_comments = 2)">
<span class="red" onclick="$('.comment_reply').hide('slow');$('#cr_{@id}').toggle('slow')">ответить</span></xsl:if>
<span class="red"><a href="{/informationsystem/informationsystem_item/url}#comment{@id}" title="Ссылка на комментарий">#</a></span>
</p>
</div>
<!-- Отображаем только авторизированным пользователям -->
<xsl:if test="/informationsystem/show_add_comments/node() and ((/informationsystem/show_add_comments = 1 and /informationsystem/siteuser_id > 0) or /informationsystem/show_add_comments = 2)">
<div class="comment_reply" id="cr_{@id}">
<xsl:call-template name="AddCommentForm">
<xsl:with-param name="id" select="@id"/>
</xsl:call-template>
</div>
</xsl:if>
<!-- Выбираем дочерние комментарии -->
<xsl:if test="count(comment) > 0">
<div class="comment_sub">
<xsl:apply-templates select="comment"/>
</div>
</xsl:if>
</xsl:if>
</xsl:template>