slitaz-forge diff forum/vanilla/themes/slitaz/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 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/forum/vanilla/themes/slitaz/views/discussion/comments.php Wed Dec 22 10:41:18 2010 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +<?php if (!defined('APPLICATION')) exit(); 1.5 +$Session = Gdn::Session(); 1.6 +$this->FireEvent('BeforeCommentsRender'); 1.7 +if (!function_exists('WriteComment')) 1.8 + include($this->FetchViewLocation('helper_functions', 'discussion')); 1.9 + 1.10 +$CurrentOffset = $this->Offset; 1.11 +if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) { 1.12 + echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset); 1.13 +} 1.14 + 1.15 +// Only prints individual comment list items 1.16 +$CommentData = $this->CommentData->Result(); 1.17 +$i = 0; 1.18 +foreach ($CommentData as $Comment) { 1.19 + ++$CurrentOffset; 1.20 + $this->CurrentComment = $Comment; 1.21 + if ($i % 2) { 1.22 + $counter = 'Odd'; 1.23 + } else { 1.24 + $counter = 'Even'; 1.25 + } 1.26 + WriteComment($Comment, $this, $Session, $CurrentOffset, $counter); 1.27 + $i++; 1.28 +}