| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: newsfeed.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 6 * @license GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // Check to ensure this file is included in Joomla! 15 defined('_JEXEC') or die( 'Restricted access' ); 16 17 /** 18 * Renders a newsfeed selection element 19 * 20 * @package Newsfeeds 21 * @subpackage Parameter 22 * @since 1.5 23 */ 24 25 class JElementNewsfeed extends JElement 26 { 27 /** 28 * Element name 29 * 30 * @access protected 31 * @var string 32 */ 33 var $_name = 'Newsfeed'; 34 35 function fetchElement($name, $value, &$node, $control_name) 36 { 37 $db =& JFactory::getDBO(); 38 39 $query = 'SELECT a.id, c.title, a.name' 40 . ' FROM #__newsfeeds AS a' 41 . ' INNER JOIN #__categories AS c ON a.catid = c.id' 42 . ' WHERE a.published = 1' 43 . ' AND c.published = 1' 44 . ' ORDER BY a.catid, a.name' 45 ; 46 $db->setQuery( $query ); 47 $options = $db->loadObjectList( ); 48 49 $n = count( $options ); 50 for ($i = 0; $i < $n; $i++) 51 { 52 $options[$i]->text = $options[$i]->title . '-' . $options[$i]->name; 53 } 54 55 array_unshift($options, JHTML::_('select.option', '0', '- '.JText::_('Select Feed').' -', 'id', 'text')); 56 57 return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'id', 'text', $value, $control_name.$name ); 58 } 59 }
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 |