Advertisement
Guest User

mod_articles_category template file

a guest
Mar 7th, 2013
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.40 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  mod_articles_category
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC') or die;
  11.  
  12. ?>
  13. <ul class="category-module<?php echo $moduleclass_sfx; ?>">
  14. <?php if ($grouped) : ?>
  15.     <?php foreach ($list as $group_name => $group) : ?>
  16.     <li>
  17.         <h<?php echo $item_heading; ?>><?php echo $group_name; ?></h<?php echo $item_heading; ?>>
  18.         <ul>
  19.             <?php foreach ($group as $item) : ?>
  20.                 <li>
  21.                     <h<?php echo $item_heading + 1; ?>>
  22.                         <?php if ($params->get('link_titles') == 1) : ?>
  23.                         <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>">
  24.                         <?php echo $item->title; ?>
  25.                         <?php if ($item->displayHits) :?>
  26.                             <span class="mod-articles-category-hits">
  27.                             (<?php echo $item->displayHits; ?>)  </span>
  28.                         <?php endif; ?></a>
  29.                         <?php else :?>
  30.                         <?php echo $item->title; ?>
  31.                             <?php if ($item->displayHits) :?>
  32.                             <span class="mod-articles-category-hits">
  33.                             (<?php echo $item->displayHits; ?>)  </span>
  34.                         <?php endif; ?></a>
  35.                             <?php endif; ?>
  36.                     </h<?php echo $item_heading + 1; ?>>
  37.  
  38.  
  39.                 <?php if ($params->get('show_author')) :?>
  40.                     <span class="mod-articles-category-writtenby">
  41.                     <?php echo $item->displayAuthorName; ?>
  42.                     </span>
  43.                 <?php endif;?>
  44.  
  45.                 <?php if ($item->displayCategoryTitle) :?>
  46.                     <span class="mod-articles-category-category">
  47.                     (<?php echo $item->displayCategoryTitle; ?>)
  48.                     </span>
  49.                 <?php endif; ?>
  50.                 <?php if ($item->displayDate) : ?>
  51.                     <span class="mod-articles-category-date"><?php echo $item->displayDate; ?></span>
  52.                 <?php endif; ?>
  53.                 <?php if ($params->get('show_introtext')) :?>
  54.             <p class="mod-articles-category-introtext">
  55.             <?php echo $item->displayIntrotext; ?>
  56.             </p>
  57.         <?php endif; ?>
  58.  
  59.         <?php if ($params->get('show_readmore')) :?>
  60.             <p class="mod-articles-category-readmore">
  61.                 <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>">
  62.                 <?php if ($item->params->get('access-view') == false) :
  63.                         echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE');
  64.                     elseif ($readmore = $item->alternative_readmore) :
  65.                         echo $readmore;
  66.                         echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit'));
  67.                         if ($params->get('show_readmore_title', 0) != 0) :
  68.                             echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
  69.                         endif;
  70.                     elseif ($params->get('show_readmore_title', 0) == 0) :
  71.                         echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE');
  72.                     else :
  73.  
  74.                         echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE');
  75.                         echo JHtml::_('string.truncate', ($item->title), $params->get('readmore_limit'));
  76.                     endif; ?>
  77.             </a>
  78.             </p>
  79.             <?php endif; ?>
  80.         </li>
  81.             <?php endforeach; ?>
  82.         </ul>
  83.     </li>
  84.     <?php endforeach; ?>
  85. <?php else : ?>
  86.     <?php foreach ($list as $item) : ?>
  87.         <li>
  88.         <h<?php echo $item_heading; ?>>
  89.         <?php if ($params->get('link_titles') == 1) : ?>
  90.         <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>">
  91.         <?php echo $item->title; ?>
  92.         <?php if ($item->displayHits) :?>
  93.             <span class="mod-articles-category-hits">
  94.             (<?php echo $item->displayHits; ?>)  </span>
  95.         <?php endif; ?></a>
  96.         <?php else :?>
  97.         <?php echo $item->title; ?>
  98.             <?php if ($item->displayHits) :?>
  99.             <span class="mod-articles-category-hits">
  100.             (<?php echo $item->displayHits; ?>)  </span>
  101.         <?php endif; ?></a>
  102.             <?php endif; ?>
  103.         </h<?php echo $item_heading; ?>>
  104.  
  105.         <?php if ($params->get('show_author')) :?>
  106.             <span class="mod-articles-category-writtenby">
  107.             <?php echo $item->displayAuthorName; ?>
  108.             </span>
  109.         <?php endif;?>
  110.         <?php if ($item->displayCategoryTitle) :?>
  111.             <span class="mod-articles-category-category">
  112.             (<?php echo $item->displayCategoryTitle; ?>)
  113.             </span>
  114.         <?php endif; ?>
  115.         <?php if ($item->displayDate) : ?>
  116.             <span class="mod-articles-category-date"><?php echo $item->displayDate; ?></span>
  117.         <?php endif; ?>
  118.         <?php if ($params->get('show_introtext')) :?>
  119.             <p class="mod-articles-category-introtext">
  120.             <?php echo $item->displayIntrotext; ?>
  121.             </p>
  122.         <?php endif; ?>
  123.  
  124.         <?php if ($params->get('show_readmore')) :?>
  125.             <p class="mod-articles-category-readmore">
  126.                 <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>">
  127.                 <?php if ($item->params->get('access-view') == false) :
  128.                         echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE');
  129.                     elseif ($readmore = $item->alternative_readmore) :
  130.                         echo $readmore;
  131.                         echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit'));
  132.                     elseif ($params->get('show_readmore_title', 0) == 0) :
  133.                         echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE');
  134.                     else :
  135.                         echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE');
  136.                         echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit'));
  137.                     endif; ?>
  138.             </a>
  139.             </p>
  140.         <?php endif; ?>
  141.     </li>
  142.     <?php endforeach; ?>
  143. <?php endif; ?>
  144. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement