1 | {if !empty($thumbnails)} |
---|
2 | {foreach from=$thumbnails item=thumbnail} |
---|
3 | {assign var=derivative value=$pwg->derivative($GDThumb_derivative_params, $thumbnail.src_image)} |
---|
4 | {assign var=media_type value={media_type file=$thumbnail.file}} |
---|
5 | {assign var=media_type_name value={$media_type|capitalize:false:true}} |
---|
6 | {* {$thumbnails|print_r} *} |
---|
7 | |
---|
8 | <li class="gdthumb{if $GDThumb.thumb_animate} animate{/if} {$GDThumb.method}"> |
---|
9 | {if $GDThumb.thumb_mode_photo !== "hide" } |
---|
10 | <span class="thumbLegend {$GDThumb.thumb_mode_photo}"> |
---|
11 | <span class="thumbName thumbTitle"> |
---|
12 | {if $GDThumb.normalize_title == "desc" && $thumbnail.DESCRIPTION} |
---|
13 | {$thumbnail.DESCRIPTION} |
---|
14 | {elseif $GDThumb.normalize_title == "off"} |
---|
15 | {$thumbnail.NAME} |
---|
16 | {else} |
---|
17 | {assign var="file_title" value=$thumbnail.NAME|cat:"."} |
---|
18 | {assign var="file_name" value=$thumbnail.file|replace:"_":" "} |
---|
19 | {if $file_name|strstr:$file_title} |
---|
20 | {$media_type_name|@translate} {$thumbnail.id} |
---|
21 | {else} |
---|
22 | {$thumbnail.NAME} |
---|
23 | {/if} |
---|
24 | {/if} |
---|
25 | {if $GDThumb.thumb_mode_album !== "overlay-ex"} |
---|
26 | {if !empty($thumbnail.icon_ts)} |
---|
27 | <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> |
---|
28 | {/if} |
---|
29 | {/if} |
---|
30 | </span> |
---|
31 | {if $GDThumb.thumb_mode_album == "overlay-ex"} |
---|
32 | <span class="thumbInfo"> |
---|
33 | <span class="hit-num">{$thumbnail.hit}</span> |
---|
34 | <span class="glyphicon {if $media_type=="video"}glyphicon-film{elseif $media_type=="music"}glyphicon-music{elseif $media_type=="doc"}glyphicon-file{elseif $media_type=="pdf"}glyphicon-book{else}glyphicon-picture{/if}"></span> |
---|
35 | {if !empty($thumbnail.icon_ts)} |
---|
36 | <span class="new-thumb glyphicon glyphicon-asterisk" title="{$thumbnail.icon_ts.TITLE}" alt="(!)"></span> |
---|
37 | {/if} |
---|
38 | {if $thumbnail.rating_score > 0} |
---|
39 | <span class="rank-num"><i class="glyphicon glyphicon-star"></i>{$thumbnail.rating_score|string_format:"%d"}</span> |
---|
40 | {/if} |
---|
41 | </span> |
---|
42 | {elseif $GDThumb.thumb_metamode !== "hide"} |
---|
43 | {if isset($thumbnail.NB_COMMENTS)} |
---|
44 | <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">{$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}</span> |
---|
45 | {/if} |
---|
46 | {if isset($thumbnail.NB_COMMENTS) && isset($thumbnail.NB_HITS)} - {/if} |
---|
47 | {if isset($thumbnail.NB_HITS)} |
---|
48 | <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">{$pwg->l10n_dec('%d visit', '%d visits',$thumbnail.NB_HITS)}</span> |
---|
49 | {elseif isset($thumbnail.hit)} |
---|
50 | <span class="{if 0==$thumbnail.hit}zero {/if}nb-hits">{$pwg->l10n_dec('%d visit', '%d visits',$thumbnail.hit)}</span> |
---|
51 | {/if} |
---|
52 | {if isset($thumbnail.rating_score)} |
---|
53 | <span class="{if 0==$thumbnail.rating_score}zero {/if}rating">, {'Rating:'|@translate} {$thumbnail.rating_score}</span> |
---|
54 | {/if} |
---|
55 | {/if} |
---|
56 | </span> |
---|
57 | {/if} |
---|
58 | <a href="{$thumbnail.URL}"> |
---|
59 | <img class="thumbnail" {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.icon_dir}/img_small.png" data-src="{$derivative->get_url()}"{/if} alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" {$derivative->get_size_htm()}> |
---|
60 | </a> |
---|
61 | </li> |
---|
62 | {/foreach} |
---|
63 | |
---|
64 | {combine_css path=$GDThumb.GDTHUMB_ROOT|cat:"/css/gdthumb.css" version=1} |
---|
65 | {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'} |
---|
66 | {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'} |
---|
67 | {combine_script id='jquery.ba-resize' path=$GDThumb.GDTHUMB_ROOT|cat:"/js/jquery.ba-resize.min.js" load="footer"} |
---|
68 | {combine_script id='gdthumb' require='jquery,jquery.ba-resize' path=$GDThumb.GDTHUMB_ROOT|cat:"/js/gdthumb.js" load="footer"} |
---|
69 | |
---|
70 | {footer_script require="gdthumb"} |
---|
71 | |
---|
72 | {if isset($has_cats)} |
---|
73 | {else} |
---|
74 | $(function() { |
---|
75 | {if isset($GDThumb_big)} |
---|
76 | {assign var=gt_size value=$GDThumb_big->get_size()} |
---|
77 | var big_thumb = {ldelim}id: {$GDThumb_big->src_image->id}, src: '{$GDThumb_big->get_url()}', width: {$gt_size[0]}, height: {$gt_size[1]}{rdelim}; |
---|
78 | {else} |
---|
79 | var big_thumb = null; |
---|
80 | {/if} |
---|
81 | GDThumb.setup('{$GDThumb.method}', {$GDThumb.height}, {$GDThumb.margin}, false, big_thumb, {$GDThumb.big_thumb_noinpw}); |
---|
82 | }); |
---|
83 | {/if} |
---|
84 | {/footer_script} |
---|
85 | |
---|
86 | {html_head} |
---|
87 | <style type="text/css">#thumbnails .gdthumb {ldelim} margin:{$GDThumb.margin / 2}px {$GDThumb.margin / 2}px {$GDThumb.margin - $GDThumb.margin / 2}px {$GDThumb.margin - $GDThumb.margin / 2}px !important; }</style> |
---|
88 | <!--[if IE 8]> |
---|
89 | <style type="text/css">#thumbnails .gdthumb a {ldelim} right: 0px; }</style> |
---|
90 | <![endif]--> |
---|
91 | {/html_head} |
---|
92 | {/if} |
---|