summaryrefslogtreecommitdiff
path: root/modules/mod_banner_rand.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mod_banner_rand.php')
-rwxr-xr-x[-rw-r--r--]modules/mod_banner_rand.php29
1 files changed, 15 insertions, 14 deletions
diff --git a/modules/mod_banner_rand.php b/modules/mod_banner_rand.php
index 719cd3b..6110f2c 100644..100755
--- a/modules/mod_banner_rand.php
+++ b/modules/mod_banner_rand.php
@@ -5,30 +5,31 @@
* @subpackage modules
*/
-global $gQueryUserId, $gContent, $moduleParams;
-
-// makes things in older modules easier
-extract( $moduleParams );
-
/**
* required setup
*/
-require_once( FISHEYE_PKG_CLASS_PATH.'FisheyeGallery.php' );
+namespace Bitweaver\Fisheye;
+use Bitweaver\KernelTools;
-$image = new FisheyeImage();
+global $gBitSmarty, $gContent;
+// makes things in older modules easier
-$display = TRUE;
+if ( !empty($gBitSmarty->tpl_vars) ) {
+ $tpls = $gBitSmarty->tpl_vars;
+ $module_params = $tpls['moduleParams'];
+ $listHash = $module_params->value;
+ $listHash['gallery_id'] = $module_params->value['module_rows'];
+}
+$image = new FisheyeImage();
-$listHash = $module_params;
+$display = true;
$listHash['size'] = 'extra-large';
-$listHash['gallery_id'] = $module_rows;
$listHash['max_records'] = 5;
$listHash['sort_mode'] = 'random';
$images = $image->getList( $listHash );
$moduleTitle = 'Banner Image';
-$_template->tpl_vars['moduleTitle'] = new Smarty_variable( $title );
-$_template->tpl_vars['modImages'] = new Smarty_variable( $images );
-$_template->tpl_vars['module_params'] = new Smarty_variable( $module_params );
-?>
+$gBitSmarty->assign( 'moduleTitle', $moduleTitle );
+$gBitSmarty->assign( 'modImages', $images );
+$gBitSmarty->assign( 'module_params', $listHash );