This commit is contained in:
bugzilla%micropipes.com 2006-04-11 03:47:29 +00:00
Родитель 09565a011c
Коммит ac8c4ecfc7
3 изменённых файлов: 20 добавлений и 3 удалений

Просмотреть файл

@ -102,7 +102,13 @@ Works with:
<li>
<div class="opinions-vote">{$addon->Comments[comments].CommentVote} <span class="opinions-caption">out of 5</span></div>
<h4 class="opinions-title">{$addon->Comments[comments].CommentTitle|strip_tags}</h4>
<p class="opinions-info">by {$addon->Comments[comments].CommentName|strip_tags}, {$addon->Comments[comments].CommentDate|date_format}</p>
<p class="opinions-info">by
{if $addon->Comments[comments].CommentName}
{$addon->Comments[comments].CommentName|strip_tags}
{else}
{$addon->Comments[comments].UserName|strip_tags}
{/if}
, {$addon->Comments[comments].CommentDate|date_format}</p>
<p class="opinions-text">{$addon->Comments[comments].CommentNote|strip_tags}</p>
<p class="opinions-helpful"><strong>{$addon->Comments[comments].helpful_yes}</strong> out of <strong>{$addon->Comments[comments].helpful_total}</strong> viewers found this comment helpful<br>
Was this comment helpful? <a href="{$config.webpath}/ratecomment.php?aid={$addon->ID}&amp;cid={$addon->Comments[comments].CommentID}&amp;r=yes&amp;app={$app}">Yes</a> &#124; <a href="{$config.webpath}/ratecomment.php?aid={$addon->ID}&amp;cid={$addon->Comments[comments].CommentID}&amp;r=no&amp;app={$app}">No</a></p>

Просмотреть файл

@ -55,7 +55,13 @@ Next Page &raquo;
<li>
<div class="opinions-vote">{$addon->Comments[comments].CommentVote}<span class="opinions-caption">out of 5</span></div>
<h4 class="opinions-title">{$addon->Comments[comments].CommentTitle|strip_tags}</h4>
<p class="opinions-info">by {$addon->Comments[comments].CommentName|strip_tags}, {$addon->Comments[comments].CommentDate|date_format}</p>
<p class="opinions-info">by
{if $addon->Comments[comments].CommentName}
{$addon->Comments[comments].CommentName|strip_tags}
{else}
{$addon->Comments[comments].UserName|strip_tags}
{/if}
, {$addon->Comments[comments].CommentDate|date_format}</p>
<p class="opinions-text">{$addon->Comments[comments].CommentNote|strip_tags}</p>
<p class="opinions-helpful"><strong>{$addon->Comments[comments].helpful_yes}</strong> out of <strong>{$addon->Comments[comments].helpful_total}</strong> viewers found this comment helpful<br>
Was this comment helpful? <a href="{$config.webpath}/ratecomment.php?aid={$addon->ID}&amp;cid={$addon->Comments[comments].CommentID}&amp;r=yes">Yes</a> &#124; <a href="{$config.webpath}/ratecomment.php?aid={$addon->ID}&amp;cid={$addon->Comments[comments].CommentID}&amp;r=no">No</a></p>

Просмотреть файл

@ -323,9 +323,14 @@ class AddOn extends AMO_Object {
CommentVote,
`helpful-yes` as helpful_yes,
`helpful-no` as helpful_no,
`helpful-yes` + `helpful-no` as helpful_total
`helpful-yes` + `helpful-no` as helpful_total,
UserName
FROM
feedback
LEFT JOIN
userprofiles
ON
userprofiles.UserID = feedback.UserID
WHERE
ID = '{$this->ID}' AND
CommentVote IS NOT NULL