- md5
- dd4267dd135847e9b11efd8fa4585095
- sha1
- b44ffa01bf0fa0c5b2974e67f6cbfe6b75ad9524
- sha256
- 879be4ee6a9d2ba22fad2addaa4d0ec2d6883d2f1f61e0cb3b2edc57685f3f20
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
<?php
/**
* @version $Id: view.feed.php 20196 2011-01-09 02:40:25Z ian $
* @package Joomla.Site
* @subpackage Weblinks
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* HTML View class for the WebLinks component
*
* @static
* @package Joomla.Site
* @subpackage Weblinks
* @since 1.0
*/
class WeblinksViewCategory extends JView
{
function display($tpl = null)
{
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$document->link = JRoute::_(WeblinksHelperRoute::getCategoryRoute(JRequest::getVar('id',null, '', 'int')));
JRequest::setVar('limit', $app->getCfg('feed_limit'));
$siteEmail = $app->getCfg('mailfrom');
$fromName = $app->getCfg('fromname');
$document->editor = $fromName;
$document->editorEmail = $siteEmail;
// Get some data from the model
$items = $this->get('Items');
$category = $this->get('Category');
foreach ($items as $item)
{
// strip html from feed item title
$title = $this->escape($item->title);
$title = html_entity_decode($title, ENT_COMPAT, 'UTF-8');
// url link to article
$link = JRoute::_(WeblinksHelperRoute::getWeblinkRoute($item->slug, $item->catid));
// strip html from feed item description text
$description = $item->description;
$date = ($item->date ? date('r', strtotime($item->date)) : '');
// load individual item creator class
$feeditem = new JFeedItem();
$feeditem->title = $title;
$feeditem->link = $link;
$feeditem->description = $description;
$feeditem->date = $date;
$feeditem->category = 'Weblinks';
// loads item info into rss array
$document->addItem($feeditem);
}
}
}
?>
The same content is in 2 releases, Joomla 1.6.0 to 1.6.1. See them all, or every version of this file.