Current Path :
/
home
/
develito
/
www
/
components
/
com_dmod
/
views
/
category
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/develito/www/components/com_dmod/views/category/view.feed.php
<?php /*------------------------------------------------------------------------ # com_dmod - Dmod Module Manager # ------------------------------------------------------------------------ # author Jesus Vargas Garita # copyright Copyright (C) 2010 www.joomlahill.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.joomlahill.com # Technical Support: Forum - http://www.joomlahill.com/forum -------------------------------------------------------------------------*/ defined('_JEXEC') or die; class DmodViewCategory extends JViewLegacy { function display() { // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $app = JFactory::getApplication(); // Get some data from the models $category = $this->get('Category'); $rows = $this->get('Items'); $doc = JFactory::getDocument(); $params = $app->getParams(); $doc->link = JRoute::_(DmodHelperRoute::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::_(DmodHelperRoute::getDmodRoute($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); } } }