slitaz-forge annotate 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
rev   line source
erjo@1 1 <?php if (!defined('APPLICATION')) exit();
erjo@1 2 $Session = Gdn::Session();
erjo@1 3 $this->FireEvent('BeforeCommentsRender');
erjo@1 4 if (!function_exists('WriteComment'))
erjo@1 5 include($this->FetchViewLocation('helper_functions', 'discussion'));
erjo@1 6
erjo@1 7 $CurrentOffset = $this->Offset;
erjo@1 8 if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) {
erjo@1 9 echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset);
erjo@1 10 }
erjo@1 11
erjo@1 12 // Only prints individual comment list items
erjo@1 13 $CommentData = $this->CommentData->Result();
erjo@1 14 $i = 0;
erjo@1 15 foreach ($CommentData as $Comment) {
erjo@1 16 ++$CurrentOffset;
erjo@1 17 $this->CurrentComment = $Comment;
erjo@1 18 if ($i % 2) {
erjo@1 19 $counter = 'Odd';
erjo@1 20 } else {
erjo@1 21 $counter = 'Even';
erjo@1 22 }
erjo@1 23 WriteComment($Comment, $this, $Session, $CurrentOffset, $counter);
erjo@1 24 $i++;
erjo@1 25 }