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