Source for file view.feed.php
Documentation is available at view.feed.php
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @subpackage com_content
public function display($tpl =
null)
$params =
$app->getParams();
$feedEmail =
$app->getCfg('feed_email', 'author');
$siteEmail =
$app->getCfg('mailfrom');
$doc->link =
JRoute::_('index.php?option=com_content&view=featured');
// Get some data from the model
$app->input->set('limit', $app->getCfg('feed_limit'));
$rows =
$this->get('Items');
// strip html from feed item title
$title =
$this->escape($row->title);
// Compute the article slug
$row->slug =
$row->alias ?
($row->id .
':' .
$row->alias) :
$row->id;
$query =
'SELECT' .
$db->quoteName('fulltext').
'FROM #__content WHERE id ='.
$row->id;
$row->fulltext =
$db->loadResult();
$description =
($params->get('feed_summary', 0) ?
$row->introtext.
$row->fulltext :
$row->introtext);
$author =
$row->created_by_alias ?
$row->created_by_alias :
$row->author;
// Load individual item creator class
$item->date =
$row->publish_up;
$item->category =
array();
$item->category[] =
JText::_('JFEATURED'); // All featured articles are categorized as "Featured"
for ($item_category =
$categories->get($row->catid); $item_category !==
null; $item_category =
$item_category->getParent())
if ($item_category->id >
1) { // Only add non-root categories
$item->category[] =
$item_category->title;
if ($feedEmail ==
'site')
$item->authorEmail =
$siteEmail;
elseif ($feedEmail ===
'author')
$item->authorEmail =
$row->author_email;
// Add readmore link to description if introtext is shown, show_readmore is true and fulltext exists
if (!$params->get('feed_summary', 0) &&
$params->get('feed_show_readmore', 0) &&
$row->fulltext)
$description .=
'<p class="feed-readmore"><a target="_blank" href ="' .
$item->link .
'">' .
JText::_('COM_CONTENT_FEED_READMORE') .
'</a></p>';
// Load item description and add div
$item->description =
'<div class="feed-description">'.
$description.
'</div>';
// Loads item info into rss array
Documentation generated on Tue, 19 Nov 2013 15:16:47 +0100 by phpDocumentor 1.4.3