Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/news/components/com_simple_review/templates/default/commentdisplay/ |
Upload File : |
<?php /** * $Id: template.php 326 2010-11-17 08:57:24Z rowan $ * * Copyright (C) 2005-2010 Rowan Youngson * * This file is part of Simple Review. * * Simple Review is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * Simple Review is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with Simple Review. If not, see <http://www.gnu.org/licenses/>. */ // ensure this file is being included by a parent file defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' ); class TemplateCommentDisplay extends TemplateCommentDisplayBase { function TemplateCommentDisplay(&$setup) { parent::Addon_Base_Template($setup, __FILE__); $templateDirectoryUrl = $this->GetUrlToTemplateDirectory(); $cssUrl = $templateDirectoryUrl.'css/'; $cssFile = $cssUrl.'commentdisplay.css'; $this->addonManager->Bridge->IncludeCssLink($cssFile); } function Display() { $option = $this->addonManager->Bridge->Option; $commentModule =& $this->setup->relatedAddon; $reviewModule = $this->addonManager->GetModule('Review_Module'); $vm =& $this->setup->viewModel; $guest = $commentModule->GetString('Guest'); $defaultComment = $commentModule->GetString('DefaultComment'); $imagePath = $this->GetUrlToTemplateDirectory() .'images/'; $useStarRating = intVal($commentModule->GetSetting('UseStarRating'), 10) == 1; $useDefaultComment = intVal($commentModule->GetSetting('UseDefaultComment'), 10) == 1; foreach($vm as $c): if(strlen($c->comment) < 1) { if(!$useDefaultComment) { continue; } $c->comment = "<em class='defaultComment'>$defaultComment {$c->userRating}.</em>"; } ?> <!-- start editing from here--> <div class='commentOutline'> <!--header--> <div class='commentBubble'> <span class='commenter'><?php echo $c->commenter;?></span> :: <?php echo $c->createdDate;?> <?php if($c->userRating != ''): ?> :: <span class='commenterRating'> <?php if($useStarRating) { echo $reviewModule->SR_GetStarRating($c->userRating); } else { echo $c->userRating; } ?> </span> <?php endif;?> <span><?php echo $c->adminLinks;?></span> </div> <!--header end--> <!-- content --> <div class='roundCont'> <img align='left' src="<?php echo $c->avatar;?>" width="48px" height="48px"/> <?php echo $c->comment;?> <div style="clear:both;height:1px;overflow:hidden;"></div> </div> <!-- content end--> </div> <!--stop editing here--> <?php endforeach; } } ?>