slitaz-forge view forum/themes/slitaz-2/views/discussion/comments.php @ rev 1

Add slitaz themes for vanilla
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Dec 22 10:36:12 2010 +0100 (2010-12-22)
parents
children
line source
1 <?php if (!defined('APPLICATION')) exit();
2 $Session = Gdn::Session();
3 $this->FireEvent('BeforeCommentsRender');
4 if (!function_exists('WriteComment'))
5 include($this->FetchViewLocation('helper_functions', 'discussion'));
7 $CurrentOffset = $this->Offset;
8 if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) {
9 echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset);
10 }
12 // Only prints individual comment list items
13 $CommentData = $this->CommentData->Result();
14 $i = 0;
15 foreach ($CommentData as $Comment) {
16 ++$CurrentOffset;
17 $this->CurrentComment = $Comment;
18 if ($i % 2) {
19 $counter = 'Odd';
20 } else {
21 $counter = 'Even';
22 }
23 WriteComment($Comment, $this, $Session, $CurrentOffset, $counter);
24 $i++;
25 }