|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
Had a thought... I've seen this somewhere and found it pretty nice...
Ok, modding your forum invalidates your support from infopop, and to un-mod things is easy since you can just upload the old files right...
how about we have a "mod" directory for templates/scripts/etc (templates/mods) or a "mod" extension (showmembers.inc.mod for example) which will override the original files; thus the originals are untouched, and replacements are used if they are available...
So (ex1): if the script associated with showmembers.inc.php is called, and showmembers.inc.mod exists, showmembers.inc.mod is used instead of showmembers.inc.php.
So (ex2): if the script associated with showmembers.inc.php is called, and showmembers.inc.php exists in the mod directory, showmembers.inc.php in the mod directory is used.
This would be helpful for those who modify their forums, and don't want to worry about re-modding for an upgrade (as they can use beyondcompare or visually edit the scripts to apply the updates to their modded files)...
what do you think?
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
Great idea Giz, that would save a lot of time for those of us who use mods a lot. I know with the gallery software I use, inside the template directory there is a local directory where you put your modded stuff. It looks there first and when you upgrade it wont over ride the modded file in the local directory.
|
|
|
|
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
|
Pooh-Bah
Joined: Dec 2003
Posts: 1,796 |
yes, please
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
I really like the idea, and it would be fairly easy to implement. The only thing I'm not sure about is all of the extra file_exists() calls. Every place this was used it would need to do a file_exists to see if a modded version exists. Since we have a header/footer and the body template, you'd be looking at 3 file_exists for the templates and 1 for the script, for a total of 4 for every page load. I'd need to do some benchmarking and see what type of impact this would cause on a busy forum.
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
Perhaps we could have a inc.mods.php that has a simple system in it: $showmembers == 0;
$viewflat == 1;
Then if 0 use stock, if 1 use modded; then we wouldn't have to use a ton of if exists? woudln't be dummyproof, but it'd save some time in the benchmarking market no?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Actually, we might be able to use some type of caching system for this. The admin would need to manually rebuild it, but basically it would do a scan and build a cache file of all scripts/templates that have a modded counterpart.
Something to chew on...
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
See, sometimes I have good ideas :nod:
|
|
|
|
Joined: Jun 2006
Posts: 3,839 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Jun 2006
Posts: 3,839 Likes: 1 |
sometimes
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
I've had a few... SE Friendly URL's CAPTCHA Moficiation System
and i'm sure there where others over the years lol...
|
|
|
2 members (Ruben, Gizmo),
953
guests, and
102
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|