- md5
- bc85eb083dc2b475cc48567596c54316
- sha1
- c9e8b2a189f027475a47cceefa33b170e7a60219
- sha256
- 6892906f25f1728e90dff753beddd68e89fba5a9a564d4b1fba35f4d545e6741
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Content\Site\View\Category;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\CategoryFeedView;
/**
* HTML View class for the Content component
*
* @since 1.5
*/
class FeedView extends CategoryFeedView
{
/**
* @var string The name of the view to link individual items to
* @since 3.2
*/
protected $viewName = 'article';
/**
* Method to reconcile non standard names from components to usage in this class.
* Typically overriden in the component feed view class.
*
* @param object $item The item for a feed, an element of the $items array.
*
* @return void
*
* @since 3.2
*/
protected function reconcileNames($item)
{
// Get description, intro_image, author and date
$app = \JFactory::getApplication();
$params = $app->getParams();
$item->description = '';
$obj = json_decode($item->images);
$introImage = $obj->{'image_intro'} ?? '';
if (isset($introImage) && ($introImage != ''))
{
$image = preg_match('/http/', $introImage)? $introImage : \JURI::root() . $introImage;
$item->description = '<p><img src="' . $image . '"></p>';
}
$item->description .= ($params->get('feed_summary', 0) ? $item->introtext . $item->fulltext : $item->introtext);
// Add readmore link to description if introtext is shown, show_readmore is true and fulltext exists
if (!$item->params->get('feed_summary', 0) && $item->params->get('feed_show_readmore', 0) && $item->fulltext)
{
// Compute the article slug
$item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
// URL link to article
$link = \JRoute::_(\ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language));
$item->description .= '<p class="feed-readmore"><a target="_blank" href ="' . $link . '">' . \JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>';
}
$item->author = $item->created_by_alias ?: $item->author;
}
}
No other release has this exact content. See every version of this file.