summaryrefslogtreecommitdiff
path: root/modules/mod_banner_rand.php
blob: 0fdaf1888d5e49a16e363b47b0e8e6dbf85d72f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
 * @version $Header$
 * @package fisheye
 * @subpackage modules
 */

/**
 * required setup
 */
namespace Bitweaver\Fisheye;

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 FisheyeImage();

$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 );