Example #1
0
if (!defined('SIGPLUS_VERSION_MODULE')) {
    define('SIGPLUS_VERSION_MODULE', '1.4.2');
}
if (!defined('SIGPLUS_DEBUG')) {
    // Triggers debug mode. Debug uses uncompressed version of scripts rather than the bandwidth-saving minified versions.
    define('SIGPLUS_DEBUG', false);
}
if (!defined('SIGPLUS_LOGGING')) {
    // Triggers logging mode. Verbose status messages are printed to the output.
    define('SIGPLUS_LOGGING', false);
}
// include the helper file
require_once 'helper.php';
try {
    // import dependencies
    if (SIGPlusModuleHelper::import()) {
        // get parameters from the module's configuration
        $configuration = new SIGPlusConfiguration();
        $configuration->setParameters($params);
        if (preg_match('#^https?://#', $configuration->services->imagesfolder)) {
            // remote image sources
            $body = $configuration->services->imagesfolder;
            // artificial body
            $configuration->services->imagesfolder = 'images';
            // folder never used
        } else {
            $body = '';
        }
        $core = new SIGPlusCore($configuration);
        $galleryhtml = $core->getGalleryHtml($body);
        // use images directly from folder specified as image folder