Guest User

Untitled

a guest
Dec 23rd, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.71 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * @package K2
  5. * @author GavickPro http://gavick.com
  6. */
  7.  
  8. // no direct access
  9. defined('_JEXEC') or die;
  10.  
  11. // Code used to generate the page elements
  12. $params = $this->item->params;
  13. $k2ContainerClasses = (($this->item->featured) ? ' itemIsFeatured' : '') . ($params->get('pageclass_sfx')) ? ' '.$params->get('pageclass_sfx') : '';
  14.  
  15. $app = JFactory::getApplication();
  16. $tpl = $app->getTemplate(true);
  17. $tpl_params = $tpl->params;
  18. $inset_position = $params->get('inset_position', 'right');
  19.  
  20. $gkparams = $tpl->params;
  21. $fblang = $gkparams->get('fb_lang', 'en_US');
  22. ?>
  23. <?php if(JRequest::getInt('print')==1): ?>
  24.  
  25. <a class="itemPrintThisPage" rel="nofollow" href="#" onclick="window.print(); return false;"> <?php echo JText::_('K2_PRINT_THIS_PAGE'); ?> </a>
  26. <?php endif; ?>
  27. <article id="k2Container" class="itemView<?php echo $k2ContainerClasses; ?>"> <?php echo $this->item->event->BeforeDisplay; ?> <?php echo $this->item->event->K2BeforeDisplay; ?>
  28.  
  29.  
  30.  
  31. <header>
  32. <?php if(isset($this->item->editLink)): ?>
  33. <a data-k2-modal="edit" href="<?php echo $this->item->editLink; ?>"><?php echo JText::_('K2_EDIT_ITEM'); ?></a>
  34. <?php endif; ?>
  35. <?php if($params->get('itemTitle')): ?>
  36. <div class="contentItemTitle"><?php echo $this->item->title; ?></div>
  37. <?php endif; ?>
  38. <?php if(
  39. $params->get('itemFontResizer') ||
  40. $params->get('itemAuthor') ||
  41. $params->get('itemPrintButton') ||
  42. $params->get('itemEmailButton') ||
  43. $params->get('itemSocialButton') ||
  44. $params->get('itemVideoAnchor') ||
  45. $params->get('itemImageGalleryAnchor') ||
  46. $params->get('itemHits') ||
  47. $params->get('itemCategory')
  48. ): ?>
  49. <ul>
  50. <?php if($this->item->params->get('itemDateCreated')): ?>
  51. <li><time datetime="<?php echo JHtml::_('date', $this->item->created, DATE_W3C); ?>"><?php echo JHTML::_('date', $this->item->created, 'F j, Y'); ?></time></li>
  52. <?php endif; ?>
  53. <?php if($params->get('itemAuthor')): ?>
  54. <li><?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>&nbsp;<?php if(empty($this->item->created_by_alias)): ?><a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a><?php else: ?><?php echo $this->item->author->name; ?><?php endif; ?></li>
  55. <?php endif; ?>
  56. <?php if($params->get('itemCategory')): ?>
  57. <li><a href="/pretstavi/arhiva-na-pretstavi"><?php echo $this->item->category->name; ?></a></li>
  58. <?php endif; ?>
  59. <?php if($params->get('itemHits')): ?>
  60. <li><?php echo JText::_('K2_READ'); ?> <?php echo $this->item->hits; ?> <?php echo JText::_('K2_TIMES'); ?> </li>
  61. <?php endif; ?>
  62. <?php if($params->get('itemFontResizer')): ?>
  63. <li class="itemResizer"> <span><?php echo JText::_('K2_FONT_SIZE'); ?></span> <a href="#" id="fontDecrease"><?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?></a> <a href="#" id="fontIncrease"><?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?></a></li>
  64. <?php endif; ?>
  65. <?php if($params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
  66. <li class="itemPrint"><a rel="nofollow" href="<?php echo $this->item->printLink; ?>" onclick="window.open(this.href,'printWindow','width=900,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes'); return false;"><?php echo JText::_('K2_PRINT'); ?></a></li>
  67. <?php endif; ?>
  68. <?php if($params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
  69. <li class="itemEmail"><a rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;"><?php echo JText::_('K2_EMAIL'); ?></a></li>
  70. <?php endif; ?>
  71. <?php if($params->get('itemSocialButton') && !is_null($params->get('socialButtonCode', NULL))): ?>
  72. <li class="itemSocial"><?php echo $params->get('socialButtonCode'); ?></li>
  73. <?php endif; ?>
  74. <?php if($params->get('itemVideoAnchor') && !empty($this->item->video)): ?>
  75. <li class="itemVideo"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a> </li>
  76. <?php endif; ?>
  77. <?php if($params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?>
  78. <li class="itemGallery"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a> </li>
  79. <?php endif; ?>
  80. <?php if($params->get('itemCommentsAnchor') && $params->get('itemComments') && ( ($params->get('comments') == '2' && !$this->user->guest) || ($params->get('comments') == '1')) ): ?>
  81. <li><?php if(!empty($this->item->event->K2CommentsCounter)): ?><?php echo $this->item->event->K2CommentsCounter; ?><?php else: ?><?php if($this->item->numOfComments > 0): ?><a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor"><span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </a><?php else: ?><a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor"> <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?></a><?php endif; ?><?php endif; ?></li>
  82. <?php endif; ?>
  83. </ul>
  84. <?php endif; ?>
  85. </header>
  86. <?php if($params->get('itemImage') && !empty($this->item->image)): ?>
  87. <div class="itemImageBlock sodrzina">
  88. <?php if($params->get('itemFeaturedNotice') && $this->item->featured): ?>
  89. <sup><?php echo JText::_('K2_FEATURED'); ?></sup>
  90. <?php endif; ?>
  91. <a data-k2-modal="image" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a>
  92. <?php if($params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
  93. <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
  94. <?php endif; ?>
  95. <?php if($params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
  96. <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
  97. <?php endif; ?>
  98. </div>
  99. <?php endif; ?>
  100.  
  101. <?php if($params->get('itemTwitterButton',1) || $params->get('itemFacebookButton',1) || $params->get('itemGooglePlusOneButton',1)): ?>
  102. <div class="itemSocialSharing">
  103. <?php if($params->get('itemRating')): ?>
  104. <div class="itemRatingBlock"> <span><?php echo JText::_('K2_RATE_THIS_ITEM'); ?></span>
  105. <div class="itemRatingForm">
  106. <ul class="itemRatingList">
  107. <li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li>
  108. <li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a> </li>
  109. <li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a> </li>
  110. <li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a> </li>
  111. <li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a> </li>
  112. <li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a> </li>
  113. </ul>
  114. <div id="itemRatingLog<?php echo $this->item->id; ?>" class="itemRatingLog"> <?php echo $this->item->numOfvotes; ?> </div>
  115. </div>
  116. </div>
  117. <?php endif; ?>
  118.  
  119. <?php if($this->item->params->get('itemTwitterButton',1)): ?>
  120. <!-- Twitter Button -->
  121. <div class="itemTwitterButton">
  122. <a href="https://twitter.com/share" class="twitter-share-button" data-via="<?php if($this->item->params->get('twitterUsername')) echo $this->item->params->get('twitterUsername'); ?>"><?php echo JText::_('K2_TWEET'); ?></a>
  123. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
  124. </div>
  125. <?php endif; ?>
  126.  
  127. <?php if($this->item->params->get('itemFacebookButton',1)): ?>
  128. <!-- Facebook Button -->
  129. <div class="itemFacebookButton">
  130. <div id="fb-root"></div>
  131. <script>(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)) return;js=d.createElement(s);js.id=id;js.src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>
  132. <div class="fb-like" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
  133. </div>
  134. <?php endif; ?>
  135.  
  136. <?php if($this->item->params->get('itemGooglePlusOneButton',1)): ?>
  137. <!-- Google +1 Button -->
  138. <div class="itemGooglePlusOneButton">
  139. <div class="g-plusone" data-size="medium" width="120"></div>
  140. <script>(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/platform.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();</script>
  141. </div>
  142. <?php endif; ?>
  143.  
  144. </div>
  145. <?php endif; ?>
  146.  
  147.  
  148. <?php echo $this->item->event->AfterDisplayTitle; ?> <?php echo $this->item->event->K2AfterDisplayTitle; ?>
  149. <div class="itemBody<?php if($inset_position == 'left') : ?> gkInsetLeft<?php endif; ?>">
  150. <?php echo $this->item->event->BeforeDisplayContent; ?> <?php echo $this->item->event->K2BeforeDisplayContent; ?>
  151. <?php if(!empty($this->item->fulltext)): ?>
  152. <?php if($params->get('itemIntroText')): ?>
  153. <div class="itemIntroText"> <?php echo $this->item->introtext; ?> </div>
  154. <?php endif; ?>
  155. <?php endif; ?>
  156. <?php if($params->get('itemFullText')): ?>
  157. <div class="itemFullText"> <?php echo (!empty($this->item->fulltext)) ? $this->item->fulltext : $this->item->introtext; ?> </div>
  158. <?php endif; ?>
  159.  
  160. <?php if($params->get('itemVideo') && !empty($this->item->video)): ?>
  161. <div class="itemVideoBlock" id="itemVideoAnchor">
  162. <h3><?php echo JText::_('K2_MEDIA'); ?></h3>
  163. <?php if($this->item->videoType=='embedded'): ?>
  164. <div class="itemVideoEmbedded"> <?php echo $this->item->video; ?> </div>
  165. <?php else: ?>
  166. <span class="itemVideo"><?php echo $this->item->video; ?></span>
  167. <?php endif; ?>
  168. <?php if($params->get('itemVideoCaption') && !empty($this->item->video_caption)): ?>
  169. <span class="itemVideoCaption"><?php echo $this->item->video_caption; ?></span>
  170. <?php endif; ?>
  171. <?php if($params->get('itemVideoCredits') && !empty($this->item->video_credits)): ?>
  172. <span class="itemVideoCredits"><?php echo $this->item->video_credits; ?></span>
  173. <?php endif; ?>
  174. </div>
  175. <?php endif; ?>
  176.  
  177. <?php if(($params->get('itemDateModified') && intval($this->item->modified)!=0)): ?>
  178. <div class="itemBottom">
  179. <?php if($params->get('itemDateModified') && intval($this->item->modified) != 0 && $this->item->created != $this->item->modified): ?>
  180. <small class="itemDateModified"> <?php echo JText::_('K2_LAST_MODIFIED_ON') . JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?> </small>
  181. <?php endif; ?>
  182. </div>
  183. <?php endif; ?>
  184.  
  185. <?php if($params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
  186. <div class="itemExtraFields">
  187. <ul>
  188. <?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
  189. <?php if($extraField->value != ''): ?>
  190. <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
  191. <?php if($extraField->type == 'header'): ?>
  192. <h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
  193. <?php else: ?>
  194. <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span> <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
  195. <?php endif; ?>
  196. </li>
  197. <?php endif; ?>
  198. <?php endforeach; ?>
  199. </ul>
  200. </div>
  201. <?php endif; ?>
  202. <?php echo $this->item->event->AfterDisplayContent; ?> <?php echo $this->item->event->K2AfterDisplayContent; ?>
  203. <?php if(
  204. $params->get('itemTags') ||
  205. $params->get('itemAttachments')
  206. ): ?>
  207. <div class="itemLinks">
  208. <?php if($params->get('itemAttachments') && count($this->item->attachments)): ?>
  209. <div class="itemAttachmentsBlock"> <span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span>
  210. <ul class="itemAttachments">
  211. <?php foreach ($this->item->attachments as $attachment): ?>
  212. <li> <a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?>
  213. <?php if($params->get('itemAttachmentsCounter')): ?>
  214. <span>(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span>
  215. <?php endif; ?>
  216. </a> </li>
  217. <?php endforeach; ?>
  218. </ul>
  219. </div>
  220. <?php endif; ?>
  221. <?php if($params->get('itemTags') && count($this->item->tags)): ?>
  222. <div class="itemTagsBlock"> <span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span>
  223. <ul class="itemTags">
  224. <?php foreach ($this->item->tags as $tag): ?>
  225. <li> <a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a> </li>
  226. <?php endforeach; ?>
  227. </ul>
  228. </div>
  229. <?php endif; ?>
  230. </div>
  231. <?php endif; ?>
  232.  
  233. <?php if(($this->item->params->get('itemAuthorBlock') && empty($this->item->created_by_alias)) || ($params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems))):?>
  234. <div class="itemAuthorData">
  235. <?php if($this->item->params->get('itemAuthorBlock') && empty($this->item->created_by_alias)):?>
  236. <div class="itemAuthorBlock">
  237. <?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)):?>
  238. <div class="gkAvatar"> <img src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" /> </div>
  239. <?php endif; ?>
  240. <div class="itemAuthorDetails">
  241. <h3> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a> </h3>
  242. <?php if($params->get('itemAuthorDescription') && !empty($this->item->author->profile->description)):?>
  243. <p><?php echo $this->item->author->profile->description; ?></p>
  244. <?php endif; ?>
  245. <?php if($params->get('itemAuthorURL') && !empty($this->item->author->profile->url)):?>
  246. <span class="itemAuthorUrl"><?php echo JText::_('K2_WEBSITE'); ?> <a rel="me" href="<?php echo $this->item->author->profile->url; ?>" target="_blank" rel="nofollow"> <?php echo str_replace('http://','',$this->item->author->profile->url); ?> </a> </span>
  247. <?php endif; ?>
  248. <?php if($params->get('itemAuthorEmail')):?>
  249. <span class="itemAuthorEmail"><?php echo JText::_('K2_EMAIL'); ?> <?php echo JHTML::_('Email.cloak', $this->item->author->email); ?> </span>
  250. <?php endif; ?>
  251. </div>
  252. <?php echo $this->item->event->K2UserDisplay; ?> </div>
  253. <?php endif; ?>
  254. </div>
  255. <?php endif; ?>
  256. <?php if($params->get('itemRelated') && isset($this->relatedItems)): ?>
  257. <div class="itemAuthorContent">
  258. <h3><?php echo JText::_("K2_RELATED_ITEMS_BY_TAG"); ?></h3>
  259. <ul>
  260. <?php foreach($this->relatedItems as $key=>$item): ?>
  261. <li class="<?php echo ($key%2) ? "odd" : "even"; ?>"> <a class="itemRelTitle" href="<?php echo $item->link ?>"><?php echo $item->title; ?></a> </li>
  262. <?php endforeach; ?>
  263. </ul>
  264. </div>
  265. <?php endif; ?>
  266.  
  267. <?php if($params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems)): ?>
  268. <div class="itemAuthorContent">
  269. <?php if($params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems)): ?>
  270. <h3><?php echo JText::_('K2_LATEST_FROM'); ?> <?php echo $this->item->author->name; ?></h3>
  271. <ul>
  272. <?php foreach($this->authorLatestItems as $key=>$item): ?>
  273. <li class="<?php echo ($key%2) ? "odd" : "even"; ?>"> <a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a> </li>
  274. <?php endforeach; ?>
  275. </ul>
  276. <?php endif; ?>
  277. </div>
  278. <?php endif; ?>
  279.  
  280. <?php if($params->get('itemImageGallery') && !empty($this->item->gallery)): ?>
  281. <div class="itemImageGallery" id="itemImageGalleryAnchor">
  282. <h3><?php echo JText::_('K2_IMAGE_GALLERY'); ?></h3>
  283. <?php echo $this->item->gallery; ?> </div>
  284. <?php endif; ?>
  285.  
  286. <?php if($params->get('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?>
  287. <div class="itemNavigation"> <span><?php echo JText::_('K2_MORE_IN_THIS_CATEGORY'); ?></span>
  288. <?php if(isset($this->item->previousLink)): ?>
  289. <a class="itemPrevious" href="<?php echo $this->item->previousLink; ?>">&laquo; <?php echo $this->item->previousTitle; ?></a>
  290. <?php endif; ?>
  291. <?php if(isset($this->item->nextLink)): ?>
  292. <a class="itemNext" href="<?php echo $this->item->nextLink; ?>"><?php echo $this->item->nextTitle; ?> &raquo;</a>
  293. <?php endif; ?>
  294. </div>
  295. <?php endif; ?>
  296. <?php echo $this->item->event->AfterDisplay; ?> <?php echo $this->item->event->K2AfterDisplay; ?> </div>
  297.  
  298. <?php
  299. $document = JFactory::getDocument();
  300. $renderer = $document->loadRenderer('modules');
  301. if($document->countModules('article_inset')) {
  302. echo '<aside id="gkArticleInset">';
  303. echo $renderer->render('article_inset', array('style' => 'gk_style'), null);
  304. echo '</aside>';
  305. }
  306. ?>
  307.  
  308.  
  309. <?php if($params->get('itemComments') && ( ($params->get('comments') == '2' && !$this->user->guest) || ($params->get('comments') == '1'))):?>
  310. <?php echo $this->item->event->K2CommentsBlock; ?>
  311. <?php endif;?>
  312. <?php if($params->get('itemComments') && !JRequest::getInt('print') && ($params->get('comments') == '1' || ($params->get('comments') == '2')) && empty($this->item->event->K2CommentsBlock)):?>
  313. <div class="itemComments" id="itemCommentsAnchor">
  314. <?php if($params->get('commentsFormPosition')=='above' && $params->get('itemComments') && !JRequest::getInt('print') && ($params->get('comments') == '1' || ($params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
  315. <div class="itemCommentsForm"> <?php echo $this->loadTemplate('comments_form'); ?> </div>
  316. <?php endif; ?>
  317. <?php if($this->item->numOfComments>0 && $params->get('itemComments') && !JRequest::getInt('print') && ($params->get('comments') == '1' || ($params->get('comments') == '2'))): ?>
  318. <h3> <?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </h3>
  319. <ul class="itemCommentsList">
  320. <?php foreach ($this->item->comments as $key=>$comment): ?>
  321. <li class="<?php echo ($key%2) ? "odd" : "even"; echo (!$this->item->created_by_alias && $comment->userID==$this->item->created_by) ? " authorResponse" : ""; echo($comment->published) ? '':' unpublishedComment'; ?>">
  322. <?php if($comment->userImage):?>
  323. <img src="<?php echo $comment->userImage; ?>" alt="<?php echo JFilterOutput::cleanText($comment->userName); ?>" width="<?php echo $params->get('commenterImgWidth'); ?>" />
  324. <?php endif; ?>
  325. <div> <span>
  326. <?php if(!empty($comment->userLink)): ?>
  327. <a href="<?php echo JFilterOutput::cleanText($comment->userLink); ?>" title="<?php echo JFilterOutput::cleanText($comment->userName); ?>" target="_blank" rel="nofollow"> <?php echo $comment->userName; ?> </a>
  328. <?php else: ?>
  329. <?php echo $comment->userName; ?>
  330. <?php endif; ?>
  331. </span> <span> <?php echo JHTML::_('date', $comment->commentDate, JText::_('DATE_FORMAT_LC2')); ?> </span> <span> <a class="commentLink" href="<?php echo $this->item->link; ?>#comment<?php echo $comment->id; ?>" name="comment<?php echo $comment->id; ?>" id="comment<?php echo $comment->id; ?>"> <?php echo JText::_('K2_COMMENT_LINK'); ?> </a> </span>
  332. <?php if($this->inlineCommentsModeration || ($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest)))): ?>
  333. <span class="commentToolbar">
  334. <?php if($this->inlineCommentsModeration): ?>
  335. <?php if(!$comment->published): ?>
  336. <a class="commentApproveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=publish&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_APPROVE')?></a>
  337. <?php endif;?>
  338. <a class="commentRemoveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=remove&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_REMOVE')?></a>
  339. <?php endif;?>
  340. <?php if($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest))): ?>
  341. <a data-k2-modal="iframe" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=report&commentID='.$comment->id)?>"><?php echo JText::_('K2_REPORT')?></a>
  342. <?php endif; ?>
  343. </span>
  344. <?php endif; ?>
  345. <p><?php echo $comment->commentText; ?></p>
  346. </div>
  347. </li>
  348. <?php endforeach; ?>
  349. </ul>
  350. <div> <?php echo $this->pagination->getPagesLinks(); ?> </div>
  351. <?php endif; ?>
  352. <?php if($params->get('commentsFormPosition')=='below' && $params->get('itemComments') && !JRequest::getInt('print') && ($params->get('comments') == '1' || ($params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
  353. <h3> <?php echo JText::_('K2_LEAVE_A_COMMENT') ?> </h3>
  354. <div class="itemCommentsForm"> <?php echo $this->loadTemplate('comments_form'); ?> </div>
  355. <?php endif; ?>
  356. <?php $user = JFactory::getUser(); if ($params->get('comments') == '2' && $user->guest):?>
  357. <div class="itemCommentsLoginFirst"><?php echo JText::_('K2_LOGIN_TO_POST_COMMENTS'); ?></div>
  358. <?php endif; ?>
  359. </div>
  360. <?php endif; ?>
  361. </article>
Advertisement
Add Comment
Please, Sign In to add comment