I want to override the output of the select radiolist. I can hack the core, but I'm not really fond of doing that in relation to updates.
So i checked out a system plugin to override the JHTMLselect class. But I am stuck on how to implement it.
I found this topic: How to override core classes?
But it seems that it's not working properly anymore. Also I can't upload the plugin, I get an error. I have the exact code as the plugin above.
This is my code for the override:
<?php
/**
* @package Joomla.Plugin
* @subpackage System.Overrides
*
* @copyright Copyright (C) 2012 Don Gilbert. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_BASE') or die;
/**
* System plugin to override core classes terms.
*
* @package Joomla.Plugin
* @subpackage System.Overrides
* @since 2.5
*/
class PlgSystemOverrides extends JPlugin
{
/* We do our thing in the __construct method
* so that our overridden classes will be
* available everywhere
*/
public function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
include_once 'config.php';
}
}
That is my main php file. this is my config file
<?php
/**
* @package Joomla.Plugin
* @subpackage System.Overrides
*
* @copyright Copyright (C) 2012 Don Gilbert. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
define('OVERRIDES', dirname(__FILE__).'/overrides');
// Use JLoader to register all the classes you want to override
JLoader::register('JHtmlSelect', OVERRIDES.'/select.php', true);
My select.php file is basiscally the whole select.php file in /libraries/cms/html/select.php with a slight change in the radiolist