source: extensions/PwgCarbon/template/thumbnails.tpl @ 18843

Last change on this file since 18843 was 18843, checked in by Miklfe, 11 years ago
File size: 2.6 KB
Line 
1{php}
2        global $PwgCarbon;
3        $this->assign( 'PwgCarbon', $PwgCarbon );
4{/php}
5
6
7{if !empty($thumbnails)}{strip}
8{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
9{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
10{*define_derivative name='derivative_params' width=160 height=90 crop=true*}
11{html_style}
12{*Set some sizes according to maximum thumbnail width and height*}
13
14.thumbnails .wrap2{ldelim}
15        height: {$derivative_params->max_height()+3}px;
16}
17{if $derivative_params->max_width() > 600}
18.thumbLegend {ldelim}font-size: 130%}
19{else}
20{if $derivative_params->max_width() > 400}
21.thumbLegend {ldelim}font-size: 110%}
22{else}
23.thumbLegend {ldelim}font-size: 90%}
24{/if}
25{/if}
26{/html_style}
27
28
29
30{foreach from=$thumbnails item=thumbnail}
31{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
32        <li>
33        <span class="wrap1">
34                <span class="wrap2">
35                <div class="thumbnail">         
36                        {if ($PwgCarbon.lytebox)==1}
37                                <a href="{$thumbnail.path}" class="lytebox" data-lyte-options="borderSize:100 slide:true group:name showNavigation:true navType:1 slideInterval:10000 pauseOnPrevClick:true pauseOnNextClick:true" title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}">
38                                        {else}
39                        <a href="{$thumbnail.URL}">
40                        {/if}
41                                <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
42                                {if (empty($PwgCarbon.thumbreflex)) or (($PwgCarbon.thumbreflex)==1)}
43                                {footer_script}{literal}
44                                jQuery(function($) {
45                                        $(".thumbnail").reflect({height:0.2,opacity:0.2});
46                                });
47                                {/literal}{/footer_script}
48                                {/if}
49                        </a>
50                        {if $SHOW_THUMBNAIL_CAPTION }
51                        <div class=description>
52                                <span class="thumbLegend">
53                                                <span class="thumbName">{$thumbnail.NAME}</span>
54                                                {if !empty($thumbnail.icon_ts)}
55                                                        <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
56                                                {/if}
57                                        {if isset($thumbnail.NB_COMMENTS)}
58                                                <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
59                                                        <br>
60                                                        {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
61                                                </span>
62                                        {/if}
63                                        {if isset($thumbnail.NB_HITS)}
64                                                <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
65                                                        <br>
66                                                        {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
67                                                </span>
68                                        {/if}
69                                </span>
70                        </div>
71                        </div>                         
72                </span>
73                {/if}
74        </span>
75        </li>
76
77{/foreach}{/strip}
78{/if}
Note: See TracBrowser for help on using the repository browser.