diff options
| author | lsces <lester@lsces.co.uk> | 2013-09-23 21:11:06 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2013-09-23 21:11:06 +0100 |
| commit | 1f15393fc00c90dffe83991ec277baf89d20d94e (patch) | |
| tree | d1109658bf4c8e9b40b34e4b7650bb1f11525c37 /modules | |
| parent | cc48d558ccad46f775ee0e8196787a0a70edec28 (diff) | |
| download | fisheye-1f15393fc00c90dffe83991ec277baf89d20d94e.tar.gz fisheye-1f15393fc00c90dffe83991ec277baf89d20d94e.tar.bz2 fisheye-1f15393fc00c90dffe83991ec277baf89d20d94e.zip | |
Scrolling image module. Displays sequence of pictures from a gallery using
innerfade
Diffstat (limited to 'modules')
| -rwxr-xr-x | modules/mod_specials.php | 40 | ||||
| -rwxr-xr-x | modules/mod_specials.tpl | 14 |
2 files changed, 54 insertions, 0 deletions
diff --git a/modules/mod_specials.php b/modules/mod_specials.php new file mode 100755 index 0000000..038f332 --- /dev/null +++ b/modules/mod_specials.php @@ -0,0 +1,40 @@ +<?php +/** + * @version $Header$ + * @package fisheye + * @subpackage modules + */ + +global $gQueryUserId, $gContent, $moduleParams; + +// makes things in older modules easier +extract( $moduleParams ); + +/** + * required setup + */ +require_once( FISHEYE_PKG_PATH.'FisheyeGallery.php' ); + +$image = new FisheyeImage(); + +$display = TRUE; + +$listHash = $module_params; +$listHash['gallery_id'] = 3; + +if( $display ) { + $listHash['size'] = 'medium'; + $listHash['max_records'] = 5; + $listHash['sort_mode'] = 'random'; + $images = $image->getList( $listHash ); + + $moduleTitle = 'Specials'; + $moduleTitle = tra( $moduleTitle ); + + $gBitSmarty->assign( 'moduleTitle', $moduleTitle ); + $gBitSmarty->assign( 'modImages', $images ); + $gBitSmarty->assign( 'module_params', $module_params ); + $gBitSmarty->assign( 'maxlen', isset( $module_params["maxlen"] ) ? $module_params["maxlen"] : 0 ); + $gBitSmarty->assign( 'maxlendesc', isset( $module_params["maxlendesc"] ) ? $module_params["maxlendesc"] : 0 ); +} +?> diff --git a/modules/mod_specials.tpl b/modules/mod_specials.tpl new file mode 100755 index 0000000..0d43b98 --- /dev/null +++ b/modules/mod_specials.tpl @@ -0,0 +1,14 @@ +{strip} +{if $gBitSystem->isPackageActive( 'fisheye' ) && $modImages} + <ul id="specials"> + {foreach from=$modImages item=modImg} + <li> + <h1>{$modImg.title|escape}</h1> + <a href="{$modImg.display_url}" alt="{$modImg.title|escape}" title="{$modImg.title|escape} - {$modImg.last_modified|bit_short_datetime}, by {displayname user=$modImg.modifier_user real_name=$modImg.modifier_real_name nolink=1}{if (strlen($modImg.title) > $maxlen) AND ($maxlen > 0)}, {$modImg.title|escape}{/if}"> + <img src="{$modImg.thumbnail_url}" title="{$modImg.title|escape}" alt="{$modImg.title|escape}" /> + </a> + </li> + {/foreach} + </ul> +{/if} +{/strip} |
