| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * version $Id: view.html.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Newsfeeds 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * 9 * Joomla! is free software. This version may have been modified pursuant 10 * to the GNU General Public License, and as distributed it includes or 11 * is derivative of works licensed under the GNU General Public License or 12 * other free or open source software licenses. 13 * See COPYRIGHT.php for copyright notices and details. 14 */ 15 16 // Check to ensure this file is included in Joomla! 17 defined('_JEXEC') or die( 'Restricted access' ); 18 19 jimport( 'joomla.application.component.view'); 20 21 /** 22 * HTML View class for the Newsfeeds component 23 * 24 * @static 25 * @package Joomla 26 * @subpackage Newsfeeds 27 * @since 1.0 28 */ 29 class NewsfeedsViewCategories extends JView 30 { 31 function display($tpl = null) 32 { 33 global $mainframe; 34 35 // Load the menu object and parameters 36 $params = &$mainframe->getParams(); 37 38 $categories =& $this->get('data'); 39 40 for($i = 0; $i < count($categories); $i++) 41 { 42 $category =& $categories[$i]; 43 $category->link = JRoute::_('index.php?view=category&id='. $category->slug ); 44 45 // Prepare category description 46 $category->description = JHTML::_('content.prepare', $category->description); 47 } 48 // Define image tag attributes 49 if ($params->get('image') != -1) 50 { 51 $attribs['align'] = $params->get('image_align'); 52 $attribs['hspace'] = 6; 53 54 // Use the static HTML library to build the image tag 55 56 $image = JHTML::_('image', 'images/stories/'.$params->get('image'), JText::_('NEWS_FEEDS'), $attribs); 57 } 58 59 $menus = &JSite::getMenu(); 60 $menu = $menus->getActive(); 61 62 // because the application sets a default page title, we need to get it 63 // right from the menu item itself 64 if (is_object( $menu )) { 65 $menu_params = new JParameter( $menu->params ); 66 if (!$menu_params->get( 'page_title')) { 67 $params->set('page_title', JText::_( 'Newsfeeds' )); 68 } 69 } else { 70 $params->set('page_title', JText::_( 'Newsfeeds' )); 71 } 72 $document = &JFactory::getDocument(); 73 $document->setTitle( $params->get( 'page_title' ) ); 74 75 $this->assignRef('image', $image); 76 $this->assignRef('params', $params); 77 $this->assignRef('categories', $categories); 78 79 parent::display($tpl); 80 } 81 } 82 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |