loadByOption('com_k2'); $post = JRequest::get('post'); $component->bind($post); if (!$component->check()) { $mainframe->enqueueMessage($component->getError(), 'error'); return false; } if (!$component->store()) { $mainframe->enqueueMessage($component->getError(), 'error'); return false; } return true; } function & getParams() { static $instance; if ($instance == null) { $component = JTable::getInstance('component'); $component->loadByOption('com_k2'); $instance = new JParameter($component->params, JPATH_ADMINISTRATOR.DS.'components'.DS.'com_k2'.DS.'config.xml'); } return $instance; } }