- md5
- a19289bfb2678a64b7bea08e36a7580f
- sha1
- 426b15bfc7867e2780a4f4b87ab06614242b371a
- sha256
- 00252c48cdac0d883c2339d6633ef413b677ab90398c2727deaafa7abee7081c
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
<?php
/**
* @version $Id: view.feed.php 21097 2011-04-07 15:38:03Z dextercowley $
* @package Joomla.Site
* @subpackage com_contact
* @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 Contact component
*
* @package Joomla.Site
* @subpackage com_contact
* @since 1.5
*/
class ContactViewCategory extends JView
{
function display()
{
// Get some data from the models
$category = $this->get('Category');
$rows = $this->get('Items');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$params = $app->getParams();
$doc->link = JRoute::_(ContactHelperRoute::getCategoryRoute($category->id));
foreach ($rows as $row)
{
// strip html from feed item title
$title = $this->escape($row->name);
$title = html_entity_decode($title, ENT_COMPAT, 'UTF-8');
// Compute the contact slug
$row->slug = $row->alias ? ($row->id . ':' . $row->alias) : $row->id;
// url link to article
// & used instead of & as this is converted by feed creator
$link = JRoute::_(ContactHelperRoute::getContactRoute($row->slug, $row->catid), false);
// strip html from feed item description text
// TODO: Only pull fulltext if necessary (actually, just get the necessary fields).
$description = ($params->get('feed_summary', 0) ? $row->introtext/*.$row->fulltext*/ : $row->introtext);
$author = $row->created_by_alias ? $row->created_by_alias : $row->author;
@$date = ($row->created ? date('r', strtotime($row->created)) : '');
// load individual item creator class
$item = new JFeedItem();
$item->title = $title;
$item->link = $link;
$item->description = $description;
$item->date = $date;
$item->category = $row->category;
// loads item info into rss array
$doc->addItem($item);
}
}
}
The same content is in 5 releases, Joomla 1.6.2 to 1.6.6. See them all, or every version of this file.