Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

[Résolu] Enchaînement des galeries (module Gallery) sur une même page
#3

Voici,

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...
Sujet fermé


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 2 visiteur(s)