User Tools

Site Tools



We put the OOP back into your fox !

This add-on is not for novice webmasters

You need a working knowledge of php basics.

Nothing elegant or clever going on here. This is a php sledgehammer.

What is it?

Extend or replace phpfox scripts, as we do with templates. If no custom code exists, fall back to the standard fox.

I have busted my brain trying to accomplish this within the confines of their “don't touch the core or you will lose support” rule. That is, I tried to use hooks and plugins. I failed ;)

While I can come very close, it gets too hairy. I need this to be simple.

Therefore we do indeed “hack the core”.

But. The point of this exercise is to keep my code separate from fox code.

So the core really does remains untouched. My “hacks” are supplied in copies.

So you can revert back to standard at any time.

And you can either replace a script wholesale, or extend a class via OOP, just tweaking what you need.

We've done the top level for you.

For the bulk of scripts this just works. Libraries, components and services can be customized, hacked or extended via OOP.

If you need to replace anything buried deep in the fox, just copy it to your custom folder!

Deep overrides: It is possible you may need to override intermediate scripts on your own. If any script has a require statement along the way, then that need to be copied to your custom folder, and replace the original “get something” call with the stewLoader equivalent. To make this clear look at how we override static jscript

By overriding at this level, we do not interfere with other plugins that may already be using the hooks provided in the standard routines to getService, getLib, getObject and getComponent. So you should be able to run all your add-ons normally (and override them too!)

This is the ultimate override. Simple and logically infallible.

How does it work?

Create a custom folder in your web root.

The contents of the custom folder exactly mirror your fox website.

If a script exists in the custom folder, it is used instead of the standard folder.

You enable or disable this add-on by using a different script.

Using a different causes the core scripts to be loaded from the custom folder.

There are only two scripts that really matter:




The changes in these scripts are very simple. In a few key places we replace


with one of





So you see this is a very low level interception.

Performance ?

It may seem that we have doubled the fie i/o for script loading, since we now need to check in an extra place for every script.

We solve his by caching the custom folder file names. There is no hit at runtime, except for the extra second to re-cache after the cache has been cleared.


June 2014. Beta in progress, Documentation is a work in progress

Quick Start Installation for 3.7.7 is straightforward

Detailed install Installation for other versions

The following are optional for the interested reader

Notes Discussion

How shall I load thee? Overview of phpfox object instantiation. Background for coders.

Loader A diversion using SPL autoload.



Please do not ask for support unless you have donated. We suggest $29.

To support continuing development

products/stewload/start.txt · Last modified: 2015/05/14 13:17 by steward