roxcoder

default.php

Nov 24th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.41 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_content
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2014 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. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
  13. JHtml::_('jquery.framework');
  14.  
  15. //Load Helix
  16. $helix3_path = JPATH_PLUGINS.'/system/helix3/core/helix3.php';
  17.  
  18. if (file_exists($helix3_path)) {
  19.     require_once($helix3_path);
  20.     helix3::addJS('jquery.prettySocial.min.js'); // JS Files
  21. }
  22.  
  23. // Create shortcuts to some parameters.
  24. $doc = JFactory::getDocument();
  25. $params  = $this->item->params;
  26. $tpl_params     = JFactory::getApplication()->getTemplate(true)->params;
  27. $images  = json_decode($this->item->images);
  28. $urls    = json_decode($this->item->urls);
  29. $canEdit = $params->get('access-edit');
  30. $user    = JFactory::getUser();
  31. $info    = $params->get('info_block_position', 0);
  32. JHtml::_('behavior.caption');
  33. $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
  34.     || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author'));
  35.  
  36.     $post_format = $params->get('post_format', 'standard');
  37.  
  38.     $has_post_format = $tpl_params->get('show_post_format');
  39.  
  40.     if($this->print) $has_post_format = false;
  41.  
  42. ?>
  43. <article class="item item-page<?php echo $this->pageclass_sfx . ($this->item->featured) ? ' item-featured' : ''; ?>" itemscope itemtype="http://schema.org/Article">
  44.     <meta itemprop="inLanguage" content="<?php echo ($this->item->language === '*') ? JFactory::getConfig()->get('language') : $this->item->language; ?>" />
  45.     <?php if ($this->params->get('show_page_heading', 1)) : ?>
  46.     <div class="page-header">
  47.         <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
  48.     </div>
  49.     <?php endif;
  50.  
  51.     if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && $this->item->paginationrelative) {
  52.         echo $this->item->pagination;
  53.     }
  54. ?>
  55.  
  56.     <?php
  57.         if($post_format=='standard') {
  58.             echo JLayoutHelper::render('joomla.content.full_image', $this->item);
  59.         } else {
  60.             echo JLayoutHelper::render('joomla.content.post_formats.post_' . $post_format, array('params' => $params, 'item' => $this->item));
  61.         }
  62.     ?>
  63.  
  64.     <div class="entry-header<?php echo $has_post_format ? ' has-post-format': ''; ?>">
  65.         <?php echo JLayoutHelper::render('joomla.content.post_formats.icons',  $post_format); ?>
  66.        
  67.         <?php if ($params->get('show_title') || $params->get('show_author')) : ?>
  68.             <h2 itemprop="name">
  69.                 <?php if ($params->get('show_title')) : ?>
  70.                     <?php echo $this->escape($this->item->title); ?>
  71.                 <?php endif; ?>
  72.             </h2>
  73.             <?php if ($this->item->state == 0) : ?>
  74.                 <span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
  75.             <?php endif; ?>
  76.             <?php if (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?>
  77.                 <span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span>
  78.             <?php endif; ?>
  79.             <?php if ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != '0000-00-00 00:00:00') : ?>
  80.                 <span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span>
  81.             <?php endif; ?>
  82.         <?php endif; ?>
  83.        
  84.         <?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
  85.             <?php echo JLayoutHelper::render('joomla.content.info_block_details.header_block', $this->item); ?>
  86.         <?php endif; ?>
  87.  
  88.         <?php if (!$this->print && $useDefList && ($info == 0 || $info == 2)) : ?>
  89.             <?php echo JLayoutHelper::render('joomla.content.info_block_details.block', array('item' => $this->item, 'params' => $params, 'position' => 'above')); ?>
  90.         <?php endif; ?>
  91.  
  92.  
  93.     </div>
  94.  
  95.     <?php if (!$this->print) : ?>
  96.         <?php if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
  97.             <?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item, 'print' => false)); ?>
  98.         <?php endif; ?>
  99.     <?php else : ?>
  100.         <?php if ($useDefList) : ?>
  101.             <div id="pop-print" class="btn hidden-print">
  102.                 <?php echo JHtml::_('icon.print_screen', $this->item, $params); ?>
  103.             </div>
  104.         <?php endif; ?>
  105.     <?php endif; ?>
  106.  
  107.     <?php if (!$params->get('show_intro')) : echo $this->item->event->afterDisplayTitle; endif; ?>
  108.     <?php echo $this->item->event->beforeDisplayContent; ?>
  109.  
  110.     <?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == '0')) || ($params->get('urls_position') == '0' && empty($urls->urls_position)))
  111.         || (empty($urls->urls_position) && (!$params->get('urls_position')))) : ?>
  112.     <?php echo $this->loadTemplate('links'); ?>
  113.     <?php endif; ?>
  114.     <?php if ($params->get('access-view')):?>
  115.  
  116.     <?php //echo JLayoutHelper::render('joomla.content.full_image', $this->item); ?>
  117.  
  118.     <?php
  119.     if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && !$this->item->paginationrelative):
  120.         echo $this->item->pagination;
  121.     endif;
  122.     ?>
  123.     <?php if (isset ($this->item->toc)) :
  124.         echo $this->item->toc;
  125.     endif; ?>
  126.     <div itemprop="articleBody">
  127.         <?php echo $this->item->text; ?>
  128.     </div>
  129.  
  130.     <?php if (!$this->print && $useDefList && ($info == 1 || $info == 2)) : ?>
  131.         <?php echo JLayoutHelper::render('joomla.content.info_block_details.block', array('item' => $this->item, 'params' => $params, 'position' => 'below')); ?>
  132.     <?php  endif; ?>
  133.  
  134.     <?php if ( $doc->countModules('article-details-add') ) { ?>
  135.     <div class="items-row row clearfix">
  136.         <div class="col-sm-12">
  137.         <?php
  138.             jimport( 'joomla.application.module.helper' );
  139.             $modules = JModuleHelper::getModules( 'article-details-add' );
  140.             $attribs['style'] = 'sp_xhtml';
  141.  
  142.             foreach ($modules as $key => $module) {
  143.                 echo JModuleHelper::renderModule( $module, $attribs );
  144.             }
  145.         ?>
  146.         </div> <!-- /.col-sm- -->
  147.     </div> <!-- /.items-row -->
  148.     <?php } ?> <!-- // END:: has module add condition -->
  149.  
  150.     <!-- <?php //if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
  151.         <?php //$this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
  152.         <?php //echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
  153.     <?php //endif; ?> -->
  154.  
  155.     <?php
  156. if (!empty($this->item->pagination) && $this->item->pagination && $this->item->paginationposition && !$this->item->paginationrelative):
  157.     echo $this->item->pagination;
  158. ?>
  159.     <?php endif; ?>
  160.     <?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == '1')) || ($params->get('urls_position') == '1'))) : ?>
  161.     <?php echo $this->loadTemplate('links'); ?>
  162.     <?php endif; ?>
  163.     <?php // Optional teaser intro text for guests ?>
  164.     <?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
  165.     <?php echo $this->item->introtext; ?>
  166.     <?php //Optional link to let them register to see the whole article. ?>
  167.     <?php if ($params->get('show_readmore') && $this->item->fulltext != null) :
  168.         $link1 = JRoute::_('index.php?option=com_users&view=login');
  169.         $link = new JUri($link1);?>
  170.     <p class="readmore">
  171.         <a href="<?php echo $link; ?>">
  172.         <?php $attribs = json_decode($this->item->attribs); ?>
  173.         <?php
  174.         if ($attribs->alternative_readmore == null) :
  175.             echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
  176.         elseif ($readmore = $this->item->alternative_readmore) :
  177.             echo $readmore;
  178.             if ($params->get('show_readmore_title', 0) != 0) :
  179.                 echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
  180.             endif;
  181.         elseif ($params->get('show_readmore_title', 0) == 0) :
  182.             echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
  183.         else :
  184.             echo JText::_('COM_CONTENT_READ_MORE');
  185.             echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
  186.         endif; ?>
  187.         </a>
  188.     </p>
  189.     <?php endif; ?>
  190.     <?php endif; ?>
  191.  
  192.     <?php
  193. if (!empty($this->item->pagination) && $this->item->pagination && $this->item->paginationposition && $this->item->paginationrelative) :
  194.     echo $this->item->pagination;
  195. ?>
  196.     <?php endif; ?>
  197.  
  198.     <?php echo $this->item->event->afterDisplayContent; ?>
  199.  
  200.     <?php if(!$this->print) : ?>
  201.         <?php echo JLayoutHelper::render('joomla.content.social_share.share', $this->item); //Helix Social Share ?>
  202.         <?php echo JLayoutHelper::render('joomla.content.comments.comments', $this->item); //Helix Comment ?>
  203.     <?php endif; ?>
  204.    
  205. </article>
Advertisement
Add Comment
Please, Sign In to add comment