diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-21 19:26:26 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-21 19:26:26 +0100 |
| commit | 4ba9b3906b27e3571767689d2764b67dfe007e30 (patch) | |
| tree | 494f4e6a65d34a4338c14de4144595a2df8c65b5 /modules/mod_banner_rand.php | |
| download | stock-4ba9b3906b27e3571767689d2764b67dfe007e30.tar.gz stock-4ba9b3906b27e3571767689d2764b67dfe007e30.tar.bz2 stock-4ba9b3906b27e3571767689d2764b67dfe007e30.zip | |
Initial stock package — forked from fisheye
StockAssembly (was FisheyeGallery), StockComponent (was FisheyeImage),
StockBase (was FisheyeBase). All fisheye_ table prefixes and FISHEYE_
constants renamed to stock_/STOCK_. DB schema will need rework before
install; this gives a non-clashing base to diverge from fisheye.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'modules/mod_banner_rand.php')
| -rwxr-xr-x | modules/mod_banner_rand.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/mod_banner_rand.php b/modules/mod_banner_rand.php new file mode 100755 index 0000000..9afbec1 --- /dev/null +++ b/modules/mod_banner_rand.php @@ -0,0 +1,34 @@ +<?php +/** + * @version $Header$ + * @package stock + * @subpackage modules + */ + +/** + * required setup + */ +namespace Bitweaver\Stock; + +global $gBitSmarty, $gContent; +// makes things in older modules easier + +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 StockComponent(); + +$display = true; + +$listHash['size'] = 'extra-large'; +$listHash['max_records'] = 5; +$listHash['sort_mode'] = 'random'; + +$images = $image->getList( $listHash ); +$moduleTitle = 'Banner Image'; +$gBitSmarty->assign( 'moduleTitle', $moduleTitle ); +$gBitSmarty->assign( 'modImages', $images ); +$gBitSmarty->assign( 'module_params', $listHash ); |
