Custom Module Libs
Jamroom Developers
Take a look over the codebase, you will see
require_once used in a lot of places, eg:
require_once APP_DIR . "/modules/jrBackup/contrib/S3/S3.php";
The normal place to put libraries and external packages is in the /contrib/ folder of the module.
a common pattern used in multiple places is to see if the function you're after exits, if it doesn't but you expect it to be there, include the file, then recheck for the function eg:
$func = "{$show_skin}_skin_init";
if (!function_exists($func)) {
require_once APP_DIR . "/skins/{$show_skin}/include.php";
if (function_exists($func)) {
$func();
}
}