/** * Imports module dependencies. */ public static function import() { if (!is_null(self::$imported)) { return self::$imported; } $import = JPATH_PLUGINS . DIRECTORY_SEPARATOR . 'content' . DIRECTORY_SEPARATOR . 'sigplus' . DIRECTORY_SEPARATOR . 'core.php'; if (!is_file($import)) { $errormsg = '<kbd>mod_sigplus</kbd> (sigplus module) requires <kbd>plg_sigplus</kbd> (sigplus plug-in) to be installed. The latest version of <kbd>plg_sigplus</kbd> is available from <a href="http://joomlacode.org/gf/project/sigplus/frs/">JoomlaCode</a>.'; self::$imported = false; throw new SIGPlusModuleException($errormsg); } require_once $import; if (!defined('SIGPLUS_VERSION') || !defined('SIGPLUS_VERSION_MODULE') || SIGPLUS_VERSION !== SIGPLUS_VERSION_MODULE) { $errormsg = '<kbd>mod_sigplus</kbd> (sigplus module) requires a matching version of <kbd>plg_sigplus</kbd> (sigplus plug-in) to be installed. Currently you have <kbd>mod_sigplus</kbd> version ' . SIGPLUS_VERSION_MODULE . ' but your version of <kbd>plg_sigplus</kbd> is ' . SIGPLUS_VERSION . '. The latest version of <kbd>plg_sigplus</kbd> and <kbd>mod_sigplus</kbd> is available from <a href="http://joomlacode.org/gf/project/sigplus/frs/">JoomlaCode</a>.'; self::$imported = false; throw new SIGPlusModuleException($errormsg); } self::$imported = true; return true; }
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