[18905] | 1 | {define_derivative name='carousel' width='300' height='300' min_width='300'} |
---|
[18811] | 2 | {php} |
---|
| 3 | global $page, $template; |
---|
| 4 | $template->assign('cat_name', $page['category']['name']); |
---|
| 5 | |
---|
| 6 | global $Slim; $this->assign( 'Slim', $Slim ); |
---|
| 7 | {/php} |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | <div id="carouselthumb"> |
---|
| 11 | <div id="wrap"> |
---|
| 12 | <ul id="carousel" class="jcarousel-skin-cat"> |
---|
| 13 | {if !empty($category_thumbnails)} |
---|
| 14 | |
---|
| 15 | {foreach from=$category_thumbnails item=cat} |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | <li> |
---|
| 19 | <div class="illustration"> |
---|
| 20 | <a href="{$cat.URL}"> |
---|
[18905] | 21 | <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()}"/> |
---|
[18811] | 22 | </a> |
---|
| 23 | </div> |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | <div class="CatMPdescription"> |
---|
| 27 | <h3> |
---|
| 28 | <a href="{$cat.URL}">{$cat.NAME}</a> |
---|
| 29 | </h3> |
---|
| 30 | <div> |
---|
| 31 | {$cat.CAPTION_NB_IMAGES} |
---|
| 32 | </div> |
---|
| 33 | </div> |
---|
| 34 | </li> |
---|
| 35 | {/foreach}{/if} |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | {foreach from=$thumbnails item=thumbnail} |
---|
[18905] | 39 | {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} |
---|
[18811] | 40 | <li> |
---|
| 41 | <div class="iIllustration"> |
---|
| 42 | <a href="{if ($Slim.style_slim)!=3}{$thumbnail.path}" class="lytebox" rev="slide:true group:name showNavigation:true navType:1 slideInterval:6000"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> |
---|
[18905] | 43 | <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()}"/> |
---|
[18811] | 44 | |
---|
| 45 | {if $SHOW_THUMBNAIL_CAPTION } |
---|
| 46 | <div class="CatMPdescription"> |
---|
| 47 | <H3> |
---|
| 48 | {$thumbnail.NAME} |
---|
| 49 | |
---|
| 50 | {if !empty($thumbnail.icon_ts)} |
---|
| 51 | <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> |
---|
| 52 | {/if} |
---|
| 53 | </h3> |
---|
| 54 | {if isset($thumbnail.NB_COMMENTS) or isset($thumbnail.NB_HITS)} |
---|
| 55 | <div> |
---|
| 56 | {if isset($thumbnail.NB_COMMENTS)} |
---|
| 57 | <p class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> |
---|
| 58 | {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)} |
---|
| 59 | </p> |
---|
| 60 | {/if} |
---|
| 61 | {if isset($thumbnail.NB_HITS)} |
---|
| 62 | <p class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> |
---|
| 63 | {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)} |
---|
| 64 | </p> |
---|
| 65 | {/if} |
---|
| 66 | </div> |
---|
| 67 | {/if} |
---|
| 68 | </div> |
---|
| 69 | {/if} |
---|
| 70 | </a> |
---|
| 71 | </div> |
---|
| 72 | </li> |
---|
| 73 | {/foreach} |
---|
| 74 | </ul> |
---|
| 75 | {footer_script}{literal} |
---|
| 76 | function mycarousel_initCallback(carousel) |
---|
| 77 | { |
---|
| 78 | // Pause autoscrolling if the user moves with the cursor over the clip. |
---|
| 79 | carousel.clip.hover(function() { |
---|
| 80 | carousel.stopAuto(); |
---|
| 81 | }, function() { |
---|
| 82 | carousel.startAuto(); |
---|
| 83 | }); |
---|
| 84 | }; |
---|
| 85 | |
---|
| 86 | jQuery(document).ready(function() { |
---|
| 87 | jQuery('#carousel').jcarousel({ |
---|
| 88 | auto: 0, |
---|
| 89 | wrap: 'circular', |
---|
| 90 | scroll: 2, |
---|
| 91 | initCallback: mycarousel_initCallback, |
---|
| 92 | |
---|
| 93 | }); |
---|
| 94 | }); |
---|
| 95 | |
---|
| 96 | {/literal}{/footer_script} |
---|
| 97 | |
---|
| 98 | </div> |
---|
| 99 | </div> |
---|