1
I used to help out with an open source perl-based flat-file portal system. One idea we came up with was to create a "user_lib" directory (I can't say the idea was original, but I haven't seen it in too many places).
The portal script first checks for the existence of a particular library file in this directory; if it isn't there, it uses the one in the default installation.
For example, if I hacked away at functions.php, I would upload the modified file into my user_lib directory. XOOPS then looks there first for the file, and uses it, rather than the copy within the /include directory. If I decide to remove the hack, I just remove the file from my user_lib directory, and voila, XOOPS uses the one within the /include directory.
In the other portal system, this made it extremely easy to keep track of which files I had hacked, especially when it came time to upgrade to a new version.
I'm not too sure how difficult it would be in a php environment, but in perl all we did was add this line to the bottom of the library files:
if (-e "$scriptdir/user_lib/filename.pl") {require "$scriptdir/user_lib/filename.pl"}
Brad