04/01/2015, 13:09:19
Voici,
et le JS
Code :
[== HTML ==]
{assign var='firstimage' value='1'}
{foreach from=$images item=image}
<div class="img">
{if $image->isdir}
{* commented out: don't show subgalleries
<a href="{$image->file}" title="{$image->title}"><div class="gallery"><div class="start"><img src="uploads/images/play.png" alt="" width="50" height="50" /></div><img src="{$image->thumb}" alt="{$image->title}" /></a><br />
{$image->title} *}
{elseif $firstimage}
<a class="group" href="{$image->file|escape:'url'|replace:'%2F':'/'}" title="{$image->titlename}" rel="fancybox"><div class="gallery"><div class="start"><img src="uploads/images/play.png" alt="" width="50" height="50" /></div><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
{assign var='firstimage' value='0'}
{else}
<a class="group hide" href="{$image->file|escape:'url'|replace:'%2F':'/'}" title="{$image->titlename}" rel="fancybox">{* no thumb here *}</a>
{/if}
</div>{/foreach}
</div>
et le JS
Code :
[== JavaScript ==]
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="modules/Gallery/templates/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="modules/Gallery/templates/jquery/jquery.mousewheel.pack.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a.group").fancybox({
'speedIn': 300,
'speedOut': 300,
'overlayColor': '#000',
'overlayOpacity': 0.7
});
});
</script>
<style type="text/css">
#fancybox-content {border-width:5px!important;}
</style>
-------------------------
CMSMmmmmmmmmm...