The New, NEW, idea is to have a separate main folder for "contribs" which would run along side of the main folders, and follow the same directory structure as the rest of the files.
For Example:
Core file:
/catalog/controller/product.php
Contrib override file:
/contrib/catalog/controller/product.php
The same easy code change would still apply to the library files:
- library/application/controller.php
CHANGE:
Code: Select all
$file = $this->directory . basename($action['class']) . '.php';
Code: Select all
$file = DIR_BASE . 'contrib/controller/'. basename($action['class']) . '.php';
if (!file_exists($file)) {
$file = $this->directory . basename($action['class']) . '.php';
}
But in comparison to my other override idea, this one is:
- a lot less excess (and usually empty) folders.
- a lot less confusing (since there won't be an intermingling of core and custom throughout the main folders)
- a lot easier to debug and follow which contribs you've installed and which is causing the problem.
- a lot easier to see if 2 contribs conflict (since it will warn you about file overwrite)
- a lot easier to use existing contribs without them having to be restructured and reuploaded. Just tell people to extract them into the "contrib" folder
- a lot easier for me to release it as a contrib for people to try (other idea would be hard to make as a contrib)
So I think I just beat out my genius idea with an even geniuser idea

