biow0lf / evedev-kb

Automatically exported from code.google.com/p/evedev-kb
1 stars 0 forks source link

"Force" loading mods #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Would it be doable to add a "forced" loader for mods, like mods without 
settings - that just add small tiny things like api verification for 
kill_detail page, or such.

This is a tiny addition to the mod loader, instead of looking if they are set 
to load, just look through a folder for mods to load.

Ive made my own tiny (non folder scanning) version of it to pastebin here ->
http://pastebin.com/f51fb51da

That is loaded as a require_once in index.php, but could ofc. be put into 
index.php without any problems.

Original issue reported on code.google.com by karbow...@gmail.com on 13 Dec 2009 at 2:55

GoogleCodeExporter commented 9 years ago
if the above approach was used, to load replacement pages (ie. about.php) needs 
to be 
fixed.

a temporary fix (might be a more clever way to do it i guess) could be

elseif ($modOverrides)
{
        if (file_exists('mods/'.$modOverride.'/'.$page.'.php'))
        {
                include('mods/'.$modOverride.'/'.$page.'.php');
        }
        else
        {
                include('emods/'.$modOverride.'/'.$page.'.php');
        }
}

So it loads either from mods or emods

Original comment by karbow...@gmail.com on 14 Dec 2009 at 12:03

GoogleCodeExporter commented 9 years ago
This only makes sense to me as an option for a super-admin of a shared 
killboard. 
Super-admin set mods show on all boards while admin set mods show only on one 
board. 
This concept could be used in kb3_config as well since some settings apply to 
all 
boards.

Slightly more complicated is that if you do that then you would probably also 
like to 
have default settings that can be changed.

e.g.
Super-admin sets on: All boards must have the RSS feed.
Super-admin sets default: By default all boards have the tech III mod but can 
disable 
it.
Super-admin does not set: All other mods are only active if the board admin 
activate 
them.

Super-admin sets on: All boards must have have summary table on.
Super-admin sets default: By default all boards also show efficiency but can 
disable 
it.
Super-admin does not set: All other settings are only on if the board admin 
sets 
them.

If this is added then the first step would be the mods as that's the easiest 
change 
and does not affect other parts of the board.

Original comment by kovellia on 17 Dec 2009 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by kovellia on 20 Jan 2010 at 9:56