Wicko

latest_item.php

Jul 3rd, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.47 KB | None | 0 0
  1. <?php
  2. /**
  3. * @version $Id: latest_item.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
  4. * @package K2
  5. * @author JoomlaWorks http://www.joomlaworks.net
  6. * @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
  7. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
  8. */
  9. // no direct access
  10. defined('_JEXEC') or die;
  11. ?>
  12.  
  13. <!-- Start K2 Item Layout -->
  14. <div class="latestItemView">
  15.  
  16. <!-- Plugins: BeforeDisplay -->
  17. <?php echo $this->item->event->BeforeDisplay; ?>
  18.  
  19. <!-- K2 Plugins: K2BeforeDisplay -->
  20. <?php echo $this->item->event->K2BeforeDisplay; ?>
  21.  
  22. <div class="latestItemHeader">
  23. <?php if ($this->item->params->get('latestItemTitle')): ?>
  24. <!-- Item title -->
  25. <h2 class="latestItemTitle">
  26. <?php if ($this->item->params->get('latestItemTitleLinked')): ?>
  27. <a href="<?php echo $this->item->link; ?>">
  28. <?php echo $this->item->title; ?>
  29. </a>
  30. <?php else: ?>
  31. <?php echo $this->item->title; ?>
  32. <?php endif; ?>
  33. </h2>
  34. <?php endif; ?>
  35. </div>
  36.  
  37. <?php if ($this->item->params->get('latestItemCategory') || $this->item->params->get('latestItemDateCreated')): ?>
  38. <dl class="article-info">
  39. <dt class="article-info-term"><?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?></dt>
  40. <?php endif; ?>
  41.  
  42.  
  43. <?php if ($this->item->params->get('latestItemCategory')): ?>
  44. <!-- Item category name -->
  45. <dd class="category-name">
  46. <?php echo JText::_('K2_PUBLISHED_IN'); ?> <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>
  47. </dd>
  48. <?php endif; ?>
  49.  
  50. <?php if ($this->item->params->get('latestItemDateCreated')): ?>
  51. <!-- Date created -->
  52. <dd class="blog-published">
  53. <span class="rt-date-day rt-date-ribbon"><?php echo JHTML::_('date', $this->item->created, JText::_('d')) ?></span>
  54. <span class="rt-date-month rt-date-ribbon"><?php echo JHTML::_('date', $this->item->created, JText::_('M')) ?></span>
  55. </dd>
  56.  
  57. <?php /* <span class="latestItemDateCreated">
  58. <?php echo JHTML::_('date', $this->item->created, JText::_('K2_DATE_FORMAT_LC2')); ?>
  59. </span> */ ?>
  60. <?php endif; ?>
  61.  
  62. <?php if ($this->item->params->get('latestItemCategory') || $this->item->params->get('latestItemDateCreated')): ?>
  63. </dl>
  64. <?php endif; ?>
  65.  
  66. <!-- Plugins: AfterDisplayTitle -->
  67. <?php echo $this->item->event->AfterDisplayTitle; ?>
  68.  
  69. <!-- K2 Plugins: K2AfterDisplayTitle -->
  70. <?php echo $this->item->event->K2AfterDisplayTitle; ?>
  71.  
  72.  
  73. <!-- Plugins: BeforeDisplayContent -->
  74. <?php echo $this->item->event->BeforeDisplayContent; ?>
  75.  
  76. <!-- K2 Plugins: K2BeforeDisplayContent -->
  77. <?php echo $this->item->event->K2BeforeDisplayContent; ?>
  78.  
  79. <?php if ($this->item->params->get('latestItemImage') && !empty($this->item->image)): ?>
  80. <!-- Item Image -->
  81. <div>
  82. <a href="<?php echo $this->item->link; ?>" title="<?php if (!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
  83. <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="float: left;width:<?php echo $this->item->imageWidth; ?>px;height:auto;margin-right:16px;" />
  84. </a> </div>
  85. <?php if ($this->item->params->get('latestItemIntroText')): ?>
  86. <!-- Item introtext -->
  87. <div> <?php echo $this->item->introtext; ?>
  88. <?php endif; ?>
  89. <div class="clr"></div>
  90. </div>
  91. <?php endif; ?>
  92.  
  93.  
  94. <?php if ($this->item->params->get('latestItemTags') && count($this->item->tags)): ?>
  95. <!-- Item tags -->
  96. <div class="smallmarginbottom submedmargintop rt-relative">
  97. <div class="rt-floatright rt-teaser">
  98. <?php foreach ($this->item->tags as $tag): ?>
  99. <a class="button rt-btn-condensed" href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a>
  100. <?php endforeach; ?>
  101. </div>
  102. </div>
  103. <?php endif; ?>
  104.  
  105. <div class="clr"></div>
  106.  
  107.  
  108.  
  109. <div class="clr"></div>
  110.  
  111. <!-- Plugins: AfterDisplayContent -->
  112. <?php echo $this->item->event->AfterDisplayContent; ?>
  113.  
  114. <!-- K2 Plugins: K2AfterDisplayContent -->
  115. <?php echo $this->item->event->K2AfterDisplayContent; ?>
  116.  
  117. <div class="clr"></div>
  118.  
  119.  
  120.  
  121. <?php if ($this->params->get('latestItemVideo') && !empty($this->item->video)): ?>
  122. <!-- Item video -->
  123. <div class="latestItemVideoBlock">
  124. <h3><?php echo JText::_('K2_RELATED_VIDEO'); ?></h3>
  125. <span class="latestItemVideo<?php if ($this->item->videoType == 'embedded'): ?> embedded<?php endif; ?>"><?php echo $this->item->video; ?></span>
  126. </div>
  127. <?php endif; ?>
  128.  
  129. <?php if ($this->item->params->get('latestItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1'))): ?>
  130. <!-- Anchor link to comments below -->
  131. <div class="latestItemCommentsLink">
  132. <?php if (!empty($this->item->event->K2CommentsCounter)): ?>
  133. <!-- K2 Plugins: K2CommentsCounter -->
  134. <?php echo $this->item->event->K2CommentsCounter; ?>
  135. <?php else: ?>
  136. <?php if ($this->item->numOfComments > 0): ?>
  137. <a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
  138. <?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments > 1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
  139. </a>
  140. <?php else: ?>
  141. <a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
  142. <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?>
  143. </a>
  144. <?php endif; ?>
  145. <?php endif; ?>
  146. </div>
  147. <?php endif; ?>
  148.  
  149. <?php if ($this->item->params->get('latestItemReadMore')): ?>
  150. <!-- Item "read more..." link -->
  151. <div class="latestItemReadMore">
  152. <a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
  153. <?php echo JText::_('K2_READ_MORE'); ?>
  154. </a>
  155. </div>
  156. <?php endif; ?>
  157.  
  158. <div class="clr"></div>
  159.  
  160. <!-- Plugins: AfterDisplay -->
  161. <?php echo $this->item->event->AfterDisplay; ?>
  162.  
  163. <!-- K2 Plugins: K2AfterDisplay -->
  164. <?php echo $this->item->event->K2AfterDisplay; ?>
  165.  
  166. <div class="clr"></div>
  167. <div class="item-separator"></div>
  168. </div>
  169. <!-- End K2 Item Layout -->
Advertisement
Add Comment
Please, Sign In to add comment