Your IP : 216.73.216.240
<?php
/**
* @package My RSS Reader
* @copyright Copyright (C) 2010 FalsinSoft. All rights reserved.
* @license GNU/GPL
* @website http://falsinsoft-joomla.blogspot.com
* @email falsinsoft@gmail.com
*
*/
defined('_JEXEC') or die( 'Restricted access' );
class JFormFieldCategory extends JFormField
{
public $type = 'Category';
protected function getInput()
{
$db = &JFactory::getDBO();
$db->setQuery('SELECT id, title FROM #__myrssreader_category ORDER BY title');
$category_list = $db->loadObjectList();
$options = array();
$options[] = JHTML::_('select.option', '0', JText::_('COM_MYRSSREADER_UNCATEGORISED'));
foreach($category_list as $category)
{
$options[] = JHTML::_('select.option', $category->id, $category->title);
}
return JHTML::_('select.genericlist', $options, $this->name, 'class="inputbox"', 'value', 'text', $this->value);
}
}
?>