roxcoder

blog.php

Nov 24th, 2015
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.88 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_content
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2015 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. JHtml::_('behavior.caption');
  12. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
  13.  
  14.  
  15. $doc = JFactory::getDocument();
  16. $tpl_params = JFactory::getApplication()->getTemplate(true)->params;
  17.  
  18. $title_load = $this->escape($this->params->get('page_heading'));
  19.  
  20.  
  21.  
  22.  
  23. ?>
  24. <div class="blog<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="http://schema.org/Blog">
  25.     <?php if ($this->params->get('show_page_heading', 1)) : ?>
  26.         <div class="page-header">
  27.             <h1> <span class="spns-cat-icon"><?php echo $title_load[0]; ?></span> <?php echo $this->escape($this->params->get('page_heading')); ?></h1>
  28.         </div>
  29.     <?php endif; ?>
  30.  
  31.     <?php if ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading')) : ?>
  32.         <h2> <?php echo $this->escape($this->params->get('page_subheading')); ?>
  33.             <?php if ($this->params->get('show_category_title')) : ?>
  34.                 <span class="subheading-category"><?php echo $this->category->title; ?></span>
  35.             <?php endif; ?>
  36.         </h2>
  37.     <?php endif; ?>
  38.  
  39.     <?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
  40.         <?php $this->category->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
  41.         <?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
  42.     <?php endif; ?>
  43.  
  44.     <?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
  45.         <div class="category-desc clearfix">
  46.             <?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
  47.                 <img src="<?php echo $this->category->getParams()->get('image'); ?>" alt="<?php echo htmlspecialchars($this->category->getParams()->get('image_alt')); ?>"/>
  48.             <?php endif; ?>
  49.             <?php if ($this->params->get('show_description') && $this->category->description) : ?>
  50.                 <?php echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
  51.             <?php endif; ?>
  52.         </div>
  53.     <?php endif; ?>
  54.  
  55.     <?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
  56.         <?php if ($this->params->get('show_no_articles', 1)) : ?>
  57.             <p><?php echo JText::_('COM_CONTENT_NO_ARTICLES'); ?></p>
  58.         <?php endif; ?>
  59.     <?php endif; ?>
  60.  
  61.     <?php $leadingcount = 0; ?>
  62.     <?php if (!empty($this->lead_items)) : ?>
  63.         <div class="items-leading clearfix">
  64.             <div id="art-leading-carousel" class="carousel slide" data-ride="art-carousel">
  65.                 <div class="carousel-inner" role="listbox">
  66.                     <?php foreach ($this->lead_items as $key=> &$item) :
  67.                     $key ++; ?>
  68.                         <article class="item  <?php echo ($key == 1) ? 'active' : '' ?> leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?><?php echo $item->featured ? ' item-featured' : ''; ?>"
  69.                             itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
  70.                             <?php
  71.                             $this->item             = & $item;
  72.                             $this->item->key        = $key;
  73.                             $this->item->item_type  = "leading";
  74.                             echo $this->loadTemplate('item');
  75.                             ?>
  76.                         </article>
  77.                         <?php $leadingcount++; ?>
  78.                     <?php endforeach; ?>
  79.                 </div><!-- / .carousel-inner -->
  80.  
  81.                 <!-- Controls -->
  82.                 <div class="carousel-controls">
  83.                     <a class="left art-control" data-target="#art-leading-carousel" role="button" data-slide="prev">
  84.                         <i class="fa fa-angle-left"></i>
  85.                     </a>
  86.                     <a class="right art-control" data-target="#art-leading-carousel" role="button" data-slide="next">
  87.                         <i class="fa fa-angle-right"></i>
  88.                     </a>
  89.                 </div>  
  90.  
  91.                 <!-- Indicators -->
  92.                 <ol class="carousel-indicators">
  93.                     <?php foreach ($this->lead_items as $key=> &$item) : ?>
  94.                         <li data-target="#art-leading-carousel" data-slide-to="<?php echo $key ?>" class="<?php echo ($key == 0) ? 'active' : '' ?>"></li>
  95.                     <?php endforeach; ?>
  96.                 </ol>
  97.                    
  98.             </div><!-- / . art-leading-carousel -->
  99.  
  100.         </div><!-- end items-leading -->
  101.     <?php endif; ?>
  102.  
  103.     <?php
  104.     $introcount = (count($this->intro_items));
  105.     $counter = 0;
  106.     ?>
  107.  
  108.     <?php if (empty($this->intro_items) && $doc->getBuffer('modules', 'cat-list-add-one', array('style' => 'sp_xhtml')) ) : ?>
  109.         <div class="items-row row clearfix">
  110.             <div class="col-sm-12">
  111.                 <?php echo $doc->getBuffer('modules', 'cat-list-add-one', array('style' => 'sp_xhtml')); ?>
  112.             </div> <!-- /.col-sm- -->
  113.         </div> <!-- /.items-row -->
  114.     <?php endif; ?>
  115.  
  116.     <?php if (!empty($this->intro_items)) : ?>
  117.         <?php foreach ($this->intro_items as $key => &$item) : ?>
  118.             <?php $rowcount = ((int) $key % (int) $this->columns) + 1; ?>
  119.             <?php if ($rowcount == 1) : ?>
  120.                 <?php $row = $counter / $this->columns; ?>
  121.                 <div class="items-row <?php echo 'row-' . $row; ?> row clearfix">
  122.             <?php endif; ?>
  123.             <div class="col-sm-<?php echo round((12 / $this->columns)); ?>">
  124.                 <article class="item column-<?php echo $rowcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?><?php echo $item->featured ? ' item-featured' : ''; ?>"
  125.                     itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
  126.                     <?php
  127.                     $this->item             = & $item;
  128.                     $this->item->key        = $key;
  129.                     $this->item->item_type  = "intro";
  130.                     echo $this->loadTemplate('item');
  131.                     ?>
  132.                 </article>
  133.                 <!-- end item -->
  134.                 <?php $counter++; ?>
  135.             </div><!-- end col-sm-* -->
  136.             <?php if (($rowcount == $this->columns) or ($counter == $introcount)) : ?>
  137.                 </div><!-- end row -->
  138.             <?php endif; ?>
  139.  
  140.             <!-- if item has 3 then module position will be set -->
  141.             <?php if ( ($key == ( $tpl_params->get('bl_list_add_one', 3) - 1 ) ) && $doc->countModules('cat-list-add-one') ) { ?>
  142.                 <div class="items-row row clearfix">
  143.                     <div class="col-sm-12">
  144.                     <?php
  145.                         jimport( 'joomla.application.module.helper' );
  146.                         $modules = JModuleHelper::getModules( 'cat-list-add-one' );
  147.                         $attribs['style'] = 'sp_xhtml';
  148.  
  149.                         foreach ($modules as $key => $module) {
  150.                             echo JModuleHelper::renderModule( $module, $attribs );
  151.                         }
  152.                     ?>
  153.                     </div> <!-- /.col-sm- -->
  154.                 </div> <!-- /.items-row -->
  155.             <?php } ?> <!-- // END:: key condition -->
  156.  
  157.             <?php if ( ($key == ($tpl_params->get('bl_list_add_two', 9) - 1) ) && $doc->countModules('cat-list-add-two') ) { ?>
  158.                 <div class="items-row row clearfix">
  159.                     <div class="col-sm-12">
  160.                         <?php
  161.                             jimport( 'joomla.application.module.helper' );
  162.                             $modules = JModuleHelper::getModules( 'cat-list-add-two' );
  163.                             $attribs['style'] = 'sp_xhtml';
  164.  
  165.                             foreach ($modules as $key => $module) {
  166.                                 echo JModuleHelper::renderModule( $module, $attribs );
  167.                             }
  168.                         ?>
  169.                     </div> <!-- /.col-sm- -->
  170.                 </div> <!-- /.items-row -->
  171.             <?php } ?> <!-- // END:: key condition -->
  172.  
  173.         <?php endforeach; ?>
  174.     <?php endif; ?>
  175.  
  176.     <?php if (!empty($this->link_items)) : ?>
  177.         <div class="items-more">
  178.             <?php echo $this->loadTemplate('links'); ?>
  179.         </div>
  180.     <?php endif; ?>
  181.  
  182.     <?php if (!empty($this->children[$this->category->id]) && $this->maxLevel != 0) : ?>
  183.         <div class="cat-children">
  184.             <?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
  185.                 <h3> <?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
  186.             <?php endif; ?>
  187.             <?php echo $this->loadTemplate('children'); ?> </div>
  188.     <?php endif; ?>
  189.     <?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 1)) : ?>
  190.         <div class="pagination-wrapper">
  191.             <?php if ($this->params->def('show_pagination_results', 1)) : ?>
  192.                 <p class="counter"> <?php echo $this->pagination->getPagesCounter(); ?> </p>
  193.             <?php endif; ?>
  194.             <?php echo $this->pagination->getPagesLinks(); ?>
  195.         </div>
  196.     <?php endif; ?>
  197. </div>
Advertisement
Add Comment
Please, Sign In to add comment