-
-
Save Bodge-IT/e4a6cd4a236520cef243bd2b5ec5134c to your computer and use it in GitHub Desktop.
Override Core Joomla! Classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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('JClassToOverride', OVERRIDES.'/libraries/joomla/class/to/override.php', true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
silence is golden |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<extension version="2.5" type="plugin" group="system" method="upgrade"> | |
<name>plg_system_overrides</name> | |
<author>Don Gilbert</author> | |
<creationDate>Aug 2012</creationDate> | |
<copyright>(C) 2012 Don Gilbert. All rights reserved.</copyright> | |
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> | |
<authorEmail>[email protected]</authorEmail> | |
<authorUrl>www.electriceasel.com</authorUrl> | |
<version>2.5.6</version> | |
<description>This plugin will override classes contained in the included config file.</description> | |
<files> | |
<filename plugin="overrides">overrides.php</filename> | |
<filename>config.php</filename> | |
<filename>index.html</filename> | |
<folder>overrides</folder> | |
</files> | |
</extension> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment