Guest User

Untitled

a guest
Dec 23rd, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.82 KB | None | 0 0
  1. <?php
  2. /**
  3. * @version 2.8.x
  4. * @package K2
  5. * @author JoomlaWorks http://www.joomlaworks.net
  6. * @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
  7. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
  8. */
  9.  
  10. // no direct access
  11. defined('_JEXEC') or die;
  12.  
  13. ?>
  14.  
  15. <?php if(JRequest::getInt('print')==1): ?>
  16. <!-- Print button at the top of the print page only -->
  17. <a class="itemPrintThisPage" rel="nofollow" href="#" onclick="window.print();return false;">
  18. <span><?php echo JText::_('K2_PRINT_THIS_PAGE'); ?></span>
  19. </a>
  20. <?php endif; ?>
  21.  
  22. <!-- Start K2 Item Layout -->
  23. <span id="startOfPageId<?php echo JRequest::getInt('id'); ?>"></span>
  24.  
  25. <div id="k2Container" class="itemView<?php echo ($this->item->featured) ? ' itemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>">
  26.  
  27. <!-- Plugins: BeforeDisplay -->
  28. <?php echo $this->item->event->BeforeDisplay; ?>
  29.  
  30. <!-- K2 Plugins: K2BeforeDisplay -->
  31. <?php echo $this->item->event->K2BeforeDisplay; ?>
  32.  
  33. <div class="itemHeader">
  34.  
  35. <?php if($this->item->params->get('itemDateCreated')): ?>
  36. <!-- Date created -->
  37. <span class="itemDateCreated">
  38. <?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
  39. </span>
  40. <?php endif; ?>
  41.  
  42. <?php if($this->item->params->get('itemTitle')): ?>
  43. <!-- Item title -->
  44. <h2 class="itemTitle">
  45. <?php if(isset($this->item->editLink)): ?>
  46. <!-- Item edit link -->
  47. <span class="itemEditLink">
  48. <a data-k2-modal="edit" href="<?php echo $this->item->editLink; ?>"><?php echo JText::_('K2_EDIT_ITEM'); ?></a>
  49. </span>
  50. <?php endif; ?>
  51.  
  52. <?php echo $this->item->title; ?>
  53.  
  54. <?php if($this->item->params->get('itemFeaturedNotice') && $this->item->featured): ?>
  55. <!-- Featured flag -->
  56. <span>
  57. <sup>
  58. <?php echo JText::_('K2_FEATURED'); ?>
  59. </sup>
  60. </span>
  61. <?php endif; ?>
  62. </h2>
  63. <?php endif; ?>
  64.  
  65. <?php if($this->item->params->get('itemAuthor')): ?>
  66. <!-- Item Author -->
  67. <span class="itemAuthor">
  68. <?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>
  69. <?php if(empty($this->item->created_by_alias)): ?>
  70. <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
  71. <?php else: ?>
  72. <?php echo $this->item->author->name; ?>
  73. <?php endif; ?>
  74. </span>
  75. <?php endif; ?>
  76.  
  77. </div>
  78.  
  79. <!-- Plugins: AfterDisplayTitle -->
  80. <?php echo $this->item->event->AfterDisplayTitle; ?>
  81.  
  82. <!-- K2 Plugins: K2AfterDisplayTitle -->
  83. <?php echo $this->item->event->K2AfterDisplayTitle; ?>
  84.  
  85. <?php if(
  86. $this->item->params->get('itemFontResizer') ||
  87. $this->item->params->get('itemPrintButton') ||
  88. $this->item->params->get('itemEmailButton') ||
  89. $this->item->params->get('itemSocialButton') ||
  90. ($this->item->params->get('itemVideoAnchor') && !empty($this->item->video)) ||
  91. ($this->item->params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)) ||
  92. ($this->item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && $this->item->params->get('comments'))
  93. ): ?>
  94. <div class="itemToolbar">
  95. <ul>
  96. <?php if($this->item->params->get('itemFontResizer')): ?>
  97. <!-- Font Resizer -->
  98. <li>
  99. <span class="itemTextResizerTitle"><?php echo JText::_('K2_FONT_SIZE'); ?></span>
  100. <a href="#" id="fontDecrease">
  101. <span><?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?></span>
  102. </a>
  103. <a href="#" id="fontIncrease">
  104. <span><?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?></span>
  105. </a>
  106. </li>
  107. <?php endif; ?>
  108.  
  109. <?php if($this->item->params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
  110. <!-- Print Button -->
  111. <li>
  112. <a class="itemPrintLink" 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;">
  113. <span><?php echo JText::_('K2_PRINT'); ?></span>
  114. </a>
  115. </li>
  116. <?php endif; ?>
  117.  
  118. <?php if($this->item->params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
  119. <!-- Email Button -->
  120. <li>
  121. <a class="itemEmailLink" 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;">
  122. <span><?php echo JText::_('K2_EMAIL'); ?></span>
  123. </a>
  124. </li>
  125. <?php endif; ?>
  126.  
  127. <?php if($this->item->params->get('itemSocialButton') && !is_null($this->item->params->get('socialButtonCode', NULL))): ?>
  128. <!-- Item Social Button -->
  129. <li>
  130. <?php echo $this->item->params->get('socialButtonCode'); ?>
  131. </li>
  132. <?php endif; ?>
  133.  
  134. <?php if($this->item->params->get('itemVideoAnchor') && !empty($this->item->video)): ?>
  135. <!-- Anchor link to item video below - if it exists -->
  136. <li>
  137. <a class="itemVideoLink k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a>
  138. </li>
  139. <?php endif; ?>
  140.  
  141. <?php if($this->item->params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?>
  142. <!-- Anchor link to item image gallery below - if it exists -->
  143. <li>
  144. <a class="itemImageGalleryLink k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a>
  145. </li>
  146. <?php endif; ?>
  147.  
  148. <?php if($this->item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
  149. <!-- Anchor link to comments below - if enabled -->
  150. <li>
  151. <?php if(!empty($this->item->event->K2CommentsCounter)): ?>
  152. <!-- K2 Plugins: K2CommentsCounter -->
  153. <?php echo $this->item->event->K2CommentsCounter; ?>
  154. <?php else: ?>
  155. <?php if($this->item->numOfComments > 0): ?>
  156. <a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
  157. <span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
  158. </a>
  159. <?php else: ?>
  160. <a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor"><?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?></a>
  161. <?php endif; ?>
  162. <?php endif; ?>
  163. </li>
  164. <?php endif; ?>
  165. </ul>
  166. <div class="clr"></div>
  167. </div>
  168. <?php endif; ?>
  169.  
  170. <?php if($this->item->params->get('itemRating')): ?>
  171. <!-- Item Rating -->
  172. <div class="itemRatingBlock">
  173. <span><?php echo JText::_('K2_RATE_THIS_ITEM'); ?></span>
  174. <div class="itemRatingForm">
  175. <ul class="itemRatingList">
  176. <li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li>
  177. <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li>
  178. <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li>
  179. <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li>
  180. <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li>
  181. <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a></li>
  182. </ul>
  183. <div id="itemRatingLog<?php echo $this->item->id; ?>" class="itemRatingLog"><?php echo $this->item->numOfvotes; ?></div>
  184. <div class="clr"></div>
  185. </div>
  186. <div class="clr"></div>
  187. </div>
  188. <?php endif; ?>
  189.  
  190. <div class="itemBody">
  191.  
  192. <!-- Plugins: BeforeDisplayContent -->
  193. <?php echo $this->item->event->BeforeDisplayContent; ?>
  194.  
  195. <!-- K2 Plugins: K2BeforeDisplayContent -->
  196. <?php echo $this->item->event->K2BeforeDisplayContent; ?>
  197.  
  198. <?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>
  199. <!-- Item Image -->
  200. <div class="itemImageBlock">
  201. <span class="itemImage">
  202. <a data-k2-modal="image" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
  203. <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;" />
  204. </a>
  205. </span>
  206.  
  207. <?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
  208. <!-- Image caption -->
  209. <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
  210. <?php endif; ?>
  211.  
  212. <?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
  213. <!-- Image credits -->
  214. <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
  215. <?php endif; ?>
  216.  
  217. <div class="clr"></div>
  218. </div>
  219. <?php endif; ?>
  220.  
  221. <?php if(!empty($this->item->fulltext)): ?>
  222.  
  223. <?php if($this->item->params->get('itemIntroText')): ?>
  224. <!-- Item introtext -->
  225. <div class="itemIntroText">
  226. <?php echo $this->item->introtext; ?>
  227. </div>
  228. <?php endif; ?>
  229.  
  230. <?php if($this->item->params->get('itemFullText')): ?>
  231. <!-- Item fulltext -->
  232. <div class="itemFullText">
  233. <?php echo $this->item->fulltext; ?>
  234. </div>
  235. <?php endif; ?>
  236.  
  237. <?php else: ?>
  238.  
  239. <!-- Item text -->
  240. <div class="itemFullText">
  241. <?php echo $this->item->introtext; ?>
  242. </div>
  243.  
  244. <?php endif; ?>
  245.  
  246. <div class="clr"></div>
  247.  
  248. <?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
  249. <!-- Item extra fields -->
  250. <div class="itemExtraFields">
  251. <h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
  252. <ul>
  253. <?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
  254. <?php if($extraField->value != ''): ?>
  255. <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
  256. <?php if($extraField->type == 'header'): ?>
  257. <h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
  258. <?php else: ?>
  259. <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
  260. <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
  261. <?php endif; ?>
  262. </li>
  263. <?php endif; ?>
  264. <?php endforeach; ?>
  265. </ul>
  266. <div class="clr"></div>
  267. </div>
  268. <?php endif; ?>
  269.  
  270. <?php if($this->item->params->get('itemHits') || ($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0)): ?>
  271. <div class="itemContentFooter">
  272.  
  273. <?php if($this->item->params->get('itemHits')): ?>
  274. <!-- Item Hits -->
  275. <span class="itemHits">
  276. <?php echo JText::_('K2_READ'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('K2_TIMES'); ?>
  277. </span>
  278. <?php endif; ?>
  279.  
  280. <?php if($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0): ?>
  281. <!-- Item date modified -->
  282. <span class="itemDateModified">
  283. <?php echo JText::_('K2_LAST_MODIFIED_ON'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?>
  284. </span>
  285. <?php endif; ?>
  286.  
  287. <div class="clr"></div>
  288. </div>
  289. <?php endif; ?>
  290.  
  291. <!-- Plugins: AfterDisplayContent -->
  292. <?php echo $this->item->event->AfterDisplayContent; ?>
  293.  
  294. <!-- K2 Plugins: K2AfterDisplayContent -->
  295. <?php echo $this->item->event->K2AfterDisplayContent; ?>
  296.  
  297. <div class="clr"></div>
  298.  
  299. </div>
  300.  
  301. <?php if(
  302. $this->item->params->get('itemTwitterButton',1) ||
  303. $this->item->params->get('itemFacebookButton',1) ||
  304. $this->item->params->get('itemGooglePlusOneButton',1)
  305. ): ?>
  306. <!-- Social sharing -->
  307. <div class="itemSocialSharing">
  308.  
  309. <?php if($this->item->params->get('itemTwitterButton',1)): ?>
  310. <!-- Twitter Button -->
  311. <div class="itemTwitterButton">
  312. <a href="https://twitter.com/share" class="twitter-share-button" data-lang="<?php echo $this->item->langTagForTW; ?>" data-via="<?php if($this->item->params->get('twitterUsername')) echo $this->item->params->get('twitterUsername'); ?>"><?php echo JText::_('K2_TWEET'); ?></a>
  313. <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>
  314. </div>
  315. <?php endif; ?>
  316.  
  317. <?php if($this->item->params->get('itemFacebookButton',1)): ?>
  318. <!-- Facebook Button -->
  319. <div class="itemFacebookButton">
  320. <div id="fb-root"></div>
  321. <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/<?php echo $this->item->langTagForFB; ?>/sdk.js#xfbml=1&version=v2.5";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>
  322. <div class="fb-like" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
  323. </div>
  324. <?php endif; ?>
  325.  
  326. <?php if($this->item->params->get('itemGooglePlusOneButton',1)): ?>
  327. <!-- Google +1 Button -->
  328. <div class="itemGooglePlusOneButton">
  329. <div class="g-plusone" data-size="medium"></div>
  330. <script>window.___gcfg={lang:'<?php echo $this->item->langTagForGP; ?>'};(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>
  331. </div>
  332. <?php endif; ?>
  333.  
  334. <div class="clr"></div>
  335.  
  336. </div>
  337. <?php endif; ?>
  338.  
  339. <?php if(
  340. $this->item->params->get('itemCategory') ||
  341. $this->item->params->get('itemTags') ||
  342. $this->item->params->get('itemAttachments')
  343. ): ?>
  344. <div class="itemLinks">
  345.  
  346. <?php if($this->item->params->get('itemCategory')): ?>
  347. <!-- Item category -->
  348. <div class="itemCategory">
  349. <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
  350. <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>
  351. </div>
  352. <?php endif; ?>
  353.  
  354. <?php if($this->item->params->get('itemTags') && count($this->item->tags)): ?>
  355. <!-- Item tags -->
  356. <div class="itemTagsBlock">
  357. <span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span>
  358. <ul class="itemTags">
  359. <?php foreach ($this->item->tags as $tag): ?>
  360. <li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
  361. <?php endforeach; ?>
  362. </ul>
  363. <div class="clr"></div>
  364. </div>
  365. <?php endif; ?>
  366.  
  367. <?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?>
  368. <!-- Item attachments -->
  369. <div class="itemAttachmentsBlock">
  370. <span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span>
  371. <ul class="itemAttachments">
  372. <?php foreach ($this->item->attachments as $attachment): ?>
  373. <li>
  374. <a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a>
  375. <?php if($this->item->params->get('itemAttachmentsCounter')): ?>
  376. <span>(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span>
  377. <?php endif; ?>
  378. </li>
  379. <?php endforeach; ?>
  380. </ul>
  381. </div>
  382. <?php endif; ?>
  383.  
  384. <div class="clr"></div>
  385. </div>
  386. <?php endif; ?>
  387.  
  388. <?php if($this->item->params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?>
  389. <!-- Author Block -->
  390. <div class="itemAuthorBlock">
  391. <?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)): ?>
  392. <img class="itemAuthorAvatar" src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />
  393. <?php endif; ?>
  394.  
  395. <div class="itemAuthorDetails">
  396. <h3 class="itemAuthorName">
  397. <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
  398. </h3>
  399.  
  400. <?php if($this->item->params->get('itemAuthorDescription') && !empty($this->item->author->profile->description)): ?>
  401. <p><?php echo $this->item->author->profile->description; ?></p>
  402. <?php endif; ?>
  403.  
  404. <?php if($this->item->params->get('itemAuthorURL') && !empty($this->item->author->profile->url)): ?>
  405. <span class="itemAuthorUrl"><i class="icon-globe"></i> <a rel="me" href="<?php echo $this->item->author->profile->url; ?>" target="_blank"><?php echo str_replace('http://','',$this->item->author->profile->url); ?></a></span>
  406. <?php endif; ?>
  407.  
  408. <?php if($this->item->params->get('itemAuthorURL') && !empty($this->item->author->profile->url) && $this->item->params->get('itemAuthorEmail')): ?>
  409. <span class="k2HorizontalSep">|</span>
  410. <?php endif; ?>
  411.  
  412. <?php if($this->item->params->get('itemAuthorEmail')): ?>
  413. <span class="itemAuthorEmail"><i class="icon-envelope"></i> <?php echo JHTML::_('Email.cloak', $this->item->author->email); ?></span>
  414. <?php endif; ?>
  415.  
  416. <div class="clr"></div>
  417.  
  418. <!-- K2 Plugins: K2UserDisplay -->
  419. <?php echo $this->item->event->K2UserDisplay; ?>
  420.  
  421. <div class="clr"></div>
  422. </div>
  423. <div class="clr"></div>
  424. </div>
  425. <?php endif; ?>
  426.  
  427. <?php if($this->item->params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems)): ?>
  428. <!-- Latest items from author -->
  429. <div class="itemAuthorLatest">
  430. <h3><?php echo JText::_('K2_LATEST_FROM'); ?> <?php echo $this->item->author->name; ?></h3>
  431. <ul>
  432. <?php foreach($this->authorLatestItems as $key=>$item): ?>
  433. <li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
  434. <a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
  435. </li>
  436. <?php endforeach; ?>
  437. </ul>
  438. <div class="clr"></div>
  439. </div>
  440. <?php endif; ?>
  441.  
  442. <?php
  443. /*
  444. A note regarding 'Related Items'...
  445. If you add:
  446. - the CSS rule 'overflow-x:scroll;' in the element div.itemRelated {…} in the k2.css
  447. - the class 'k2Scroller' to the ul element below
  448. - the classes 'k2ScrollerElement' and 'k2EqualHeights' to the li element inside the foreach loop below
  449. - the style attribute 'style="width:<?php echo $item->imageWidth; ?>px;"' to the li element inside the foreach loop below
  450. ...then your Related Items will be transformed into a vertical-scrolling block, inside which, all items have the same height (equal column heights). This can be very useful if you want to show your related articles or products with title/author/category/image etc., which would take a significant amount of space in the classic list-style display.
  451. */
  452. ?>
  453.  
  454. <?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
  455. <!-- Related items by tag -->
  456. <div class="itemRelated">
  457. <h3><?php echo JText::_("K2_RELATED_ITEMS_BY_TAG"); ?></h3>
  458. <ul>
  459. <?php foreach($this->relatedItems as $key=>$item): ?>
  460. <li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
  461.  
  462. <?php if($this->item->params->get('itemRelatedTitle', 1)): ?>
  463. <a class="itemRelTitle" href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
  464. <?php endif; ?>
  465.  
  466. <?php if($this->item->params->get('itemRelatedCategory')): ?>
  467. <div class="itemRelCat"><?php echo JText::_("K2_IN"); ?> <a href="<?php echo $item->category->link ?>"><?php echo $item->category->name; ?></a></div>
  468. <?php endif; ?>
  469.  
  470. <?php if($this->item->params->get('itemRelatedAuthor')): ?>
  471. <div class="itemRelAuthor"><?php echo JText::_("K2_BY"); ?> <a rel="author" href="<?php echo $item->author->link; ?>"><?php echo $item->author->name; ?></a></div>
  472. <?php endif; ?>
  473.  
  474. <?php if($this->item->params->get('itemRelatedImageSize')): ?>
  475. <img style="width:<?php echo $item->imageWidth; ?>px;height:auto;" class="itemRelImg" src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>" />
  476. <?php endif; ?>
  477.  
  478. <?php if($this->item->params->get('itemRelatedIntrotext')): ?>
  479. <div class="itemRelIntrotext"><?php echo $item->introtext; ?></div>
  480. <?php endif; ?>
  481.  
  482. <?php if($this->item->params->get('itemRelatedFulltext')): ?>
  483. <div class="itemRelFulltext"><?php echo $item->fulltext; ?></div>
  484. <?php endif; ?>
  485.  
  486. <?php if($this->item->params->get('itemRelatedMedia')): ?>
  487. <?php if($item->videoType=='embedded'): ?>
  488. <div class="itemRelMediaEmbedded"><?php echo $item->video; ?></div>
  489. <?php else: ?>
  490. <div class="itemRelMedia"><?php echo $item->video; ?></div>
  491. <?php endif; ?>
  492. <?php endif; ?>
  493.  
  494. <?php if($this->item->params->get('itemRelatedImageGallery')): ?>
  495. <div class="itemRelImageGallery"><?php echo $item->gallery; ?></div>
  496. <?php endif; ?>
  497. </li>
  498. <?php endforeach; ?>
  499. <li class="clr"></li>
  500. </ul>
  501. <div class="clr"></div>
  502. </div>
  503. <?php endif; ?>
  504.  
  505. <div class="clr"></div>
  506.  
  507. <?php if($this->item->params->get('itemVideo') && !empty($this->item->video)): ?>
  508. <!-- Item video -->
  509. <a name="itemVideoAnchor" id="itemVideoAnchor"></a>
  510. <div class="itemVideoBlock">
  511. <h3><?php echo JText::_('K2_MEDIA'); ?></h3>
  512.  
  513. <?php if($this->item->videoType=='embedded'): ?>
  514. <div class="itemVideoEmbedded">
  515. <?php echo $this->item->video; ?>
  516. </div>
  517. <?php else: ?>
  518. <span class="itemVideo"><?php echo $this->item->video; ?></span>
  519. <?php endif; ?>
  520.  
  521. <?php if($this->item->params->get('itemVideoCaption') && !empty($this->item->video_caption)): ?>
  522. <span class="itemVideoCaption"><?php echo $this->item->video_caption; ?></span>
  523. <?php endif; ?>
  524.  
  525. <?php if($this->item->params->get('itemVideoCredits') && !empty($this->item->video_credits)): ?>
  526. <span class="itemVideoCredits"><?php echo $this->item->video_credits; ?></span>
  527. <?php endif; ?>
  528.  
  529. <div class="clr"></div>
  530. </div>
  531. <?php endif; ?>
  532.  
  533. <?php if($this->item->params->get('itemImageGallery') && !empty($this->item->gallery)): ?>
  534. <!-- Item image gallery -->
  535. <a name="itemImageGalleryAnchor" id="itemImageGalleryAnchor"></a>
  536. <div class="itemImageGallery">
  537. <h3><?php echo JText::_('K2_IMAGE_GALLERY'); ?></h3>
  538. <?php echo $this->item->gallery; ?>
  539. </div>
  540. <?php endif; ?>
  541.  
  542. <?php if($this->item->params->get('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?>
  543. <!-- Item navigation -->
  544. <div class="itemNavigation">
  545. <span class="itemNavigationTitle"><?php echo JText::_('K2_MORE_IN_THIS_CATEGORY'); ?></span>
  546.  
  547. <?php if(isset($this->item->previousLink)): ?>
  548. <a class="itemPrevious" href="<?php echo $this->item->previousLink; ?>">&laquo; <?php echo $this->item->previousTitle; ?></a>
  549. <?php endif; ?>
  550.  
  551. <?php if(isset($this->item->nextLink)): ?>
  552. <a class="itemNext" href="<?php echo $this->item->nextLink; ?>"><?php echo $this->item->nextTitle; ?> &raquo;</a>
  553. <?php endif; ?>
  554. </div>
  555. <?php endif; ?>
  556.  
  557. <!-- Plugins: AfterDisplay -->
  558. <?php echo $this->item->event->AfterDisplay; ?>
  559.  
  560. <!-- K2 Plugins: K2AfterDisplay -->
  561. <?php echo $this->item->event->K2AfterDisplay; ?>
  562.  
  563. <?php if(
  564. $this->item->params->get('itemComments') &&
  565. (($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1'))
  566. ): ?>
  567. <!-- K2 Plugins: K2CommentsBlock -->
  568. <?php echo $this->item->event->K2CommentsBlock; ?>
  569. <?php endif; ?>
  570.  
  571. <?php if(
  572. $this->item->params->get('itemComments') &&
  573. ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2')) && empty($this->item->event->K2CommentsBlock)
  574. ): ?>
  575. <!-- Item comments -->
  576. <a name="itemCommentsAnchor" id="itemCommentsAnchor"></a>
  577. <div class="itemComments">
  578. <?php if($this->item->params->get('commentsFormPosition')=='above' && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
  579. <!-- Item comments form -->
  580. <div class="itemCommentsForm">
  581. <?php echo $this->loadTemplate('comments_form'); ?>
  582. </div>
  583. <?php endif; ?>
  584.  
  585. <?php if($this->item->numOfComments>0 && $this->item->params->get('itemComments') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2'))): ?>
  586. <!-- Item user comments -->
  587. <h3 class="itemCommentsCounter">
  588. <span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
  589. </h3>
  590.  
  591. <ul class="itemCommentsList">
  592. <?php foreach ($this->item->comments as $key=>$comment): ?>
  593. <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'; ?>">
  594. <span class="commentLink">
  595. <a href="<?php echo $this->item->link; ?>#comment<?php echo $comment->id; ?>" name="comment<?php echo $comment->id; ?>" id="comment<?php echo $comment->id; ?>">
  596. <?php echo JText::_('K2_COMMENT_LINK'); ?>
  597. </a>
  598. </span>
  599.  
  600. <?php if($comment->userImage): ?>
  601. <img src="<?php echo $comment->userImage; ?>" alt="<?php echo JFilterOutput::cleanText($comment->userName); ?>" width="<?php echo $this->item->params->get('commenterImgWidth'); ?>" />
  602. <?php endif; ?>
  603.  
  604. <span class="commentDate"><?php echo JHTML::_('date', $comment->commentDate, JText::_('K2_DATE_FORMAT_LC2')); ?></span>
  605.  
  606. <span class="commentAuthorName">
  607. <?php echo JText::_('K2_POSTED_BY'); ?>
  608. <?php if(!empty($comment->userLink)): ?>
  609. <a href="<?php echo JFilterOutput::cleanText($comment->userLink); ?>" title="<?php echo JFilterOutput::cleanText($comment->userName); ?>" target="_blank" rel="nofollow"><?php echo $comment->userName; ?></a>
  610. <?php else: ?>
  611. <?php echo $comment->userName; ?>
  612. <?php endif; ?>
  613. </span>
  614.  
  615. <p><?php echo $comment->commentText; ?></p>
  616.  
  617. <?php if(
  618. $this->inlineCommentsModeration ||
  619. ($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest)))
  620. ): ?>
  621. <span class="commentToolbar">
  622. <?php if($this->inlineCommentsModeration): ?>
  623. <?php if(!$comment->published): ?>
  624. <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>
  625. <?php endif; ?>
  626.  
  627. <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>
  628. <?php endif; ?>
  629.  
  630. <?php if($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest))): ?>
  631. <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>
  632. <?php endif; ?>
  633.  
  634. <?php if($comment->reportUserLink): ?>
  635. <a class="k2ReportUserButton" href="<?php echo $comment->reportUserLink; ?>"><?php echo JText::_('K2_FLAG_AS_SPAMMER'); ?></a>
  636. <?php endif; ?>
  637. </span>
  638. <?php endif; ?>
  639.  
  640. <div class="clr"></div>
  641. </li>
  642. <?php endforeach; ?>
  643. </ul>
  644.  
  645. <!-- Comments Pagination -->
  646. <div class="itemCommentsPagination">
  647. <?php echo $this->pagination->getPagesLinks(); ?>
  648. <div class="clr"></div>
  649. </div>
  650. <?php endif; ?>
  651.  
  652. <?php if(
  653. $this->item->params->get('commentsFormPosition')=='below' &&
  654. $this->item->params->get('itemComments') &&
  655. !JRequest::getInt('print') &&
  656. ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))
  657. ): ?>
  658. <!-- Item comments form -->
  659. <div class="itemCommentsForm">
  660. <?php echo $this->loadTemplate('comments_form'); ?>
  661. </div>
  662. <?php endif; ?>
  663.  
  664. <?php $user = JFactory::getUser(); if($this->item->params->get('comments') == '2' && $user->guest): ?>
  665. <div class="itemCommentsLoginFirst"><?php echo JText::_('K2_LOGIN_TO_POST_COMMENTS'); ?></div>
  666. <?php endif; ?>
  667.  
  668. </div>
  669. <?php endif; ?>
  670.  
  671. <?php if(!JRequest::getCmd('print')): ?>
  672. <div class="itemBackToTop">
  673. <a class="k2Anchor" href="<?php echo $this->item->link; ?>#startOfPageId<?php echo JRequest::getInt('id'); ?>">
  674. <?php echo JText::_('K2_BACK_TO_TOP'); ?>
  675. </a>
  676. </div>
  677. <?php endif; ?>
  678.  
  679. <div class="clr"></div>
  680.  
  681. </div>
  682. <!-- End K2 Item Layout -->
Advertisement
Add Comment
Please, Sign In to add comment