- md5
- b409556c3f7dde19d60ea2512d222574
- sha1
- b9c29a7772d87f5b349b13378eb39270e794c9e6
- sha256
- f99f545d52bf1ce1bc5a035b9fe0769495dcfe37056e6d103b4c8838980125e0
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* HTML View class for the Content component
*
* @package Joomla.Site
* @subpackage com_content
* @since 1.5
*/
class ContentViewCategory extends JViewCategoryfeed
{
/**
* @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, author and date
$app = JFactory::getApplication();
$params = $app->getParams();
$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->description .= '<p class="feed-readmore"><a target="_blank" href ="' . $link . '">' . JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>';
}
$item->author = $item->created_by_alias ? $item->created_by_alias : $item->author;
}
}
The same content is in 6 releases, Joomla 3.3.1 to 3.3.6. See them all, or every version of this file.