Your IP : 216.73.216.209


Current Path : /home/megadansyp/www/plugins/system/t3/base-bs3/html/com_content/category/
Upload File :
Current File : /home/megadansyp/www/plugins/system/t3/base-bs3/html/com_content/category/blog_item.php

<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Language\Associations;

HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers/html');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('behavior.framework');

// Create a shortcut for params.
$params = $this->item->params;
$images  = json_decode($this->item->images);
$canEdit = $this->item->params->get('access-edit');
$info    = $params->get('info_block_position', 0);
$icons = $params->get('access-edit') || $params->get('show_print_icon') || $params->get('show_email_icon');

$aInfo1 = ($params->get('show_publish_date') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author'));
$aInfo2 = ($params->get('show_create_date') || $params->get('show_modify_date') || $params->get('show_hits'));
$topInfo = ($aInfo1 && $info != 1) || ($aInfo2 && $info == 0);
$botInfo = ($aInfo1 && $info == 1) || ($aInfo2 && $info != 0);


// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
	$timePublishDown = $this->item->publish_down != null ? $this->item->publish_down : '';
	$timePublishUp = $this->item->publish_up != null ? $this->item->publish_up : '';
// update catslug if not exists - compatible with 2.5
if (empty ($this->item->catslug)) {
  $this->item->catslug = $this->item->category_alias ? ($this->item->catid.':'.$this->item->category_alias) : $this->item->catid;
}
?>

<?php if ($this->item->state == 0 || strtotime($timePublishUp) > strtotime(Factory::getDate())
|| ((strtotime($timePublishDown) < strtotime(Factory::getDate())) && !in_array($this->item->publish_down,array('',Factory::getDbo()->getNullDate())) )) : ?>
<div class="system-unpublished">
<?php endif; ?>

	<!-- Article -->
	<article>
  
    <?php if ($params->get('show_title')) : ?>
			<?php echo LayoutHelper::render('joomla.content.item_title', array('item' => $this->item, 'params' => $params, 'title-tag'=>'h2')); ?>
    <?php endif; ?>
	
    <?php if (!$params->get('show_intro')) : ?>
      <?php // Content is generated by content plugin event "onContentAfterTitle" ?>
      <?php echo $this->item->event->afterDisplayTitle; ?>
    <?php endif; ?>

    <!-- Aside -->
    <?php if ($topInfo) : ?>
    <aside class="article-aside clearfix">
      <?php if ($icons): ?>
      <?php echo LayoutHelper::render('joomla.content.icons', array('item' => $this->item, 'params' => $params)); ?>
      <?php endif; ?>

      <?php if ($topInfo): ?>
      <?php echo LayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'above')); ?>
      <?php endif; ?>
    </aside>  
    <?php endif; ?>
    <!-- //Aside -->

		<section class="article-intro clearfix">
      <?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
			<?php echo $this->item->event->beforeDisplayContent; ?>

			<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>

			<?php echo $this->item->introtext; ?>
		</section>

    <!-- footer -->
    <?php if ($botInfo) : ?>
      <footer class="article-footer clearfix">
        <?php if ($icons && $info == 1): ?>
        <?php echo LayoutHelper::render('joomla.content.icons', array('item' => $this->item, 'params' => $params)); ?>
        <?php endif; ?>

        <?php // Todo: for Joomla4 joomla.content.info_block.block can be changed to joomla.content.info_block ?>
        <?php echo LayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'below')); ?>
      </footer>
    <?php endif; ?>
    <!-- //footer -->


		<?php if ($params->get('show_readmore') && $this->item->readmore) :
			if ($params->get('access-view')) :
				$link = Route::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
			else :
				$menu      = Factory::getApplication()->getMenu();
				$active    = $menu->getActive();
				$itemId    = $active->id;
        $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
        $link->setVar('return', base64_encode(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)));
			endif; ?>

      <?php echo LayoutHelper::render('joomla.content.readmore', array('item' => $this->item, 'params' => $params, 'link' => $link)); ?>
      
		<?php endif; ?>

	</article>
	<!-- //Article -->

<?php if ($this->item->state == 0 || strtotime($timePublishUp) > strtotime(Factory::getDate())
|| ((strtotime($timePublishDown) < strtotime(Factory::getDate())) && !in_array($this->item->publish_down,array('',Factory::getDbo()->getNullDate())) )) : ?>
</div>
<?php endif; ?>

<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>