Changeset 31245
- Timestamp:
- Jul 20, 2015, 1:45:59 AM (9 years ago)
- Location:
- extensions/GDThumb
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GDThumb/admin.php
r31060 r31245 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 function delete_gdthumb_cache($height) { 6 $pattern = '#.*-cu_s9999x'.$height.'\.[a-zA-Z0-9]{3,4}$#'; 7 if ($contents = @opendir(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR)): 5 function int_delete_gdthumb_cache($pattern) { 6 if ($contents = @opendir(PHPWG_ROOT_PATH . PWG_DERIVATIVE_DIR)): 8 7 while (($node = readdir($contents)) !== false): 9 8 if ($node != '.' 10 9 and $node != '..' 11 and is_dir(PHPWG_ROOT_PATH .PWG_DERIVATIVE_DIR.$node)):12 clear_derivative_cache_rec(PHPWG_ROOT_PATH .PWG_DERIVATIVE_DIR.$node, $pattern);10 and is_dir(PHPWG_ROOT_PATH . PWG_DERIVATIVE_DIR . $node)): 11 clear_derivative_cache_rec(PHPWG_ROOT_PATH . PWG_DERIVATIVE_DIR . $node, $pattern); 13 12 endif; 14 13 endwhile; … … 16 15 endif; 17 16 } 17 18 function delete_gdthumb_cache($height) { 19 int_delete_gdthumb_cache('#.*-cu_s9999x' . $height . '\.[a-zA-Z0-9]{3,4}$#'); 20 int_delete_gdthumb_cache('#.*-cu_s' . $height . 'x9999\.[a-zA-Z0-9]{3,4}$#'); 21 } 22 23 global $template, $conf, $page; 24 25 load_language('plugin.lang', GDTHUMB_PATH); 26 include(dirname(__FILE__).'/config_default.inc.php'); 27 $params = $conf['gdThumb']; 18 28 19 29 if (isset($_GET['getMissingDerivative'])) { … … 43 53 if ($src_image->is_mimetype()) 44 54 continue; 45 $derivative = new DerivativeImage(ImageStdParams::get_custom(9999, $conf['gdThumb']['height']), $src_image); 55 if (($params['method'] == "slide") || ($params['method'] == "square")): 56 $derivative = new DerivativeImage(ImageStdParams::get_custom($params['height'], 9999), $src_image); 57 else: 58 $derivative = new DerivativeImage(ImageStdParams::get_custom(9999, $params['height']), $src_image); 59 endif; 46 60 if (@filemtime($derivative->get_path())===false) { 47 61 $urls[] = $derivative->get_url().$uid; … … 64 78 } 65 79 66 global $template, $conf, $page;67 68 load_language('plugin.lang', GDTHUMB_PATH);69 include(dirname(__FILE__).'/config_default.inc.php');70 $params = $conf['gdThumb'];71 72 80 // Delete cache 73 81 if (isset($_POST['cachedelete'])) { 74 82 check_pwg_token(); 75 delete_gdthumb_cache($ conf['gdThumb']['height']);76 delete_gdthumb_cache($ conf['gdThumb']['height'] * 2 + $conf['gdThumb']['margin']);83 delete_gdthumb_cache($params['height']); 84 delete_gdthumb_cache($params['height'] * 2 + $params['margin']); 77 85 redirect('admin.php?page=plugin-GDThumb'); 78 86 } … … 92 100 endif; 93 101 94 $big_thumb = !empty($_POST['big_thumb']); 102 $big_thumb = !empty($_POST['big_thumb']); 103 $big_thumb_noinpw = !empty($_POST['big_thumb_noinpw']); 104 $thumb_animate = !empty($_POST['thumb_animate']); 105 $thumb_mode_album = $_POST['thumb_mode_album']; 106 $thumb_mode_photo = $_POST['thumb_mode_photo']; 107 108 if ($method == "slide"): 109 if ($big_thumb): 110 $big_thumb = false; 111 array_push($page['warnings'], l10n('Big thumb cannot be used in Slide mode. Disabled')); 112 endif; 113 if ($thumb_animate): 114 $thumb_animate = false; 115 array_push($page['warnings'], l10n('Thumb animation cannot be used in Slide mode. Disabled')); 116 endif; 117 118 if (($thumb_mode_album == "overlay-ex") || ($thumb_mode_album == "overlay") || ($thumb_mode_album == "top") || ($thumb_mode_album == "bottom")): 119 $thumb_mode_album = "bottom_static"; 120 array_push($page['warnings'], l10n('This Thumb mode cannot be used in Slide mode. Changed to default')); 121 endif; 122 123 if (($thumb_mode_photo == "overlay-ex") || ($thumb_mode_photo == "overlay") || ($thumb_mode_photo == "top") || ($thumb_mode_photo == "bottom")): 124 $thumb_mode_photo = "bottom_static"; 125 array_push($page['warnings'], l10n('This Thumb mode cannot be used in Slide mode. Changed to default')); 126 endif; 127 endif; 128 129 if (($big_thumb_noinpw) && (!$big_thumb)): 130 $big_thumb_noinpw = false; 131 endif; 132 95 133 $params = array( 96 134 'height' => $_POST['height'] … … 98 136 , 'nb_image_page' => $_POST['nb_image_page'] 99 137 , 'big_thumb' => $big_thumb 100 , 'big_thumb_noinpw'=> !empty($_POST['big_thumb_noinpw'])138 , 'big_thumb_noinpw'=> $big_thumb_noinpw 101 139 , 'cache_big_thumb' => !empty($_POST['cache_big_thumb']) 102 140 , 'normalize_title' => $normalize 103 141 , 'method' => $method 104 , 'thumb_mode_album'=> $ _POST['thumb_mode_album']105 , 'thumb_mode_photo'=> $ _POST['thumb_mode_photo']142 , 'thumb_mode_album'=> $thumb_mode_album 143 , 'thumb_mode_photo'=> $thumb_mode_photo 106 144 , 'thumb_metamode' => $_POST['thumb_metamode'] 107 145 , 'no_wordwrap' => !empty($_POST['no_wordwrap']) 108 , 'thumb_animate' => !empty($_POST['thumb_animate'])146 , 'thumb_animate' => $thumb_animate 109 147 ); 110 148 111 149 if (!is_numeric($params['height'])) { 112 array_push($page['errors'], 'Thumbnails max height must be an integer.');150 array_push($page['errors'], l10n('Thumbnails max height must be an integer')); 113 151 } 114 152 if (!is_numeric($params['margin'])) { 115 array_push($page['errors'], 'Margin between thumbnails must be an integer.');153 array_push($page['errors'], l10n('Margin between thumbnails must be an integer')); 116 154 } 117 155 if (!is_numeric($params['nb_image_page'])) { 118 array_push($page['errors'], 'Number of photos per page must be an integer.');156 array_push($page['errors'], l10n('Number of photos per page must be an integer')); 119 157 } 120 158 … … 127 165 128 166 if (empty($page['errors'])) { 129 $query = ' 130 UPDATE ' . CONFIG_TABLE . ' 131 SET value="' . addslashes(serialize($params)) . '" 132 WHERE param="gdThumb" 133 LIMIT 1'; 134 pwg_query($query); 135 167 conf_update_param('gdThumb', $params); 136 168 array_push($page['infos'], l10n('Information data registered in database')); 137 169 } -
extensions/GDThumb/changelog.txt
r31134 r31245 26 26 27 27 === Changelog === 28 version 1.0.18 29 + ADMIN: style improvements 30 + ADMIN: Experimental: New option for Thumbnail mode - "slide" - Square thumb with standard static Overlay (bottom/top) 31 + ADMIN: Changed to use standard PWG persistance method for settings 32 + Improved handling of derivatives 33 - Fixed issue with Photo thumb metadata not including Visits and Rating metadata 34 - Translation improvements. New languages: NO, TR, GR, PT 35 28 36 version 1.0.17 29 37 + All language translations are deprecated to allow full reset. en_UK folder now includes full set of translation resources -
extensions/GDThumb/css/gdthumb.css
r31060 r31245 1 ul.thumbnails { overflow: hidden; }1 ul.thumbnails { overflow: hidden; background: inherit; } 2 2 3 ul.thumbnails .gdthumb { position: relative; overflow: hidden; float: left; display: inline; background: none!important; }3 ul.thumbnails .gdthumb { position: relative; overflow: hidden; float: left; display: inline; background: inherit !important; } 4 4 ul.thumbnails .gdthumb a { position: absolute; z-index:0; } 5 5 … … 9 9 ul.thumbnails .gdthumb.animate:hover img { transform: scale(1.5,1.5) rotate(10deg); -ms-transform: scale(1.5,1.5) rotate(10deg); -webkit-transform: scale(1.5,1.5) rotate(10deg); -o-transform: scale(1.5,1.5) rotate(10deg); -moz-transform: scale(1.5,1.5) rotate(10deg); } 10 10 11 ul.thumbnails .gdthumb .thumbLegend { position: absolute; z-index: 1; height: 5em; left:0; right:0; padding:5px 0; width:100%; background:rgba(0,0,0,0.7); text-align:center; overflow:hidden; color:#aaa; padding-left: 4px; padding-right: 4px; } 11 ul.thumbnails .gdthumb .thumbLegend { position: absolute; z-index: 1; height: 5em; left:0; right:0; padding:5px 0; width:100%; background:rgba(0,0,0,0.7); text-align:center; overflow:hidden; color:#aaa; padding-left: 4px; padding-right: 4px; } 12 ul.thumbnails .gdthumb.slide .thumbLegend { background: inherit; height: auto; } 12 13 13 14 ul.thumbnails .thumbLegend .thumbName { display:block; color:#eee; } … … 49 50 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .glyphicon { padding-top: 3px; font-size: 17px; } 50 51 52 ul.thumbnails.nowrap .gdthumb .thumbLegend { white-space: nowrap; overflow: hidden; height: auto; } 51 53 52 ul.thumbnails.nowrap .gdthumb .thumbLegend { white-space: nowrap; overflow: hidden; height: auto; } 54 body.theme-whitehawk .gdthumb.slide { border: 1px solid #000; } 55 body.theme-whitehawk .gdthumb.slide .thumbLegend.bottom_static { background: #FFF; color: #555; } 56 body.theme-whitehawk .gdthumb.slide .thumbLegend.bottom_static .thumbTitle { color: #555; } 57 body.theme-whitehawk .gdthumb.slide .thumbLegend.bottom_static .thumbName { color: #555; } -
extensions/GDThumb/js/gdthumb.js
r31060 r31245 64 64 GDThumb.big_thumb.crop = GDThumb.big_thumb.height; 65 65 GDThumb.max_height = thumb_width; 66 } 66 } else if (GDThumb.method == 'slide') { 67 var main_width = jQuery('ul.thumbnails').width(); 68 var max_col_count = Math.floor(main_width / GDThumb.max_height); 69 var thumb_width = Math.floor(main_width / max_col_count) - GDThumb.margin; 70 GDThumb.max_height = thumb_width; 71 } 67 72 68 73 GDThumb.t = new Array; … … 71 76 height = parseInt(jQuery(this).attr('height')); 72 77 th = {index: index, width: width, height: height, real_width: width, real_height: height}; 78 73 79 if (GDThumb.check_pv) { 74 80 var ratio = th.width / th.height; 75 81 GDThumb.big_thumb_block = (ratio > 2.2) || (ratio < 0.455); 76 82 } 77 if ((GDThumb.method == 'square') && (th.height != th.width)) { 83 84 if (((GDThumb.method == 'square') || (GDThumb.method == 'slide')) && (th.height != th.width)) { 85 th.width = GDThumb.max_height; 78 86 th.height = GDThumb.max_height; 79 th.width = GDThumb.max_height;80 87 th.crop = GDThumb.max_height; 81 88 } else if (height < GDThumb.max_height) { … … 110 117 var best_size = {width: 1, height: 1}; 111 118 112 if (GDThumb.method == 'square') { 119 if (GDThumb.method == 'slide') { 120 best_size.width = GDThumb.max_height; 121 best_size.height = GDThumb.max_height; 122 123 GDThumb.resize(first_thumb, GDThumb.t[0].real_width, GDThumb.t[0].real_height, GDThumb.t[0].width, GDThumb.t[0].height, false); 124 } else if (GDThumb.method == 'square') { 113 125 if (GDThumb.big_thumb != null) { 114 126 best_size.width = GDThumb.big_thumb.width; … … 215 227 for (j=0;j<thumb_process.length;j++) { 216 228 217 if ( GDThumb.method == 'square') {229 if ((GDThumb.method == 'square') || (GDThumb.method == 'slide')) { 218 230 new_width = GDThumb.max_height; 219 231 new_height = GDThumb.max_height; … … 254 266 255 267 resize: function(thumb, width, height, new_width, new_height, is_big) { 256 if ((!is_big) && (GDThumb.method == 'square')) { 268 269 use_crop = true; 270 if (GDThumb.method == 'slide') { 271 use_crop = false; 257 272 thumb.css({height: '', width: ''}); 258 273 new_width = new_height; … … 268 283 height_crop = Math.round((real_height - new_height) / 2); 269 284 width_crop = Math.round((real_width - new_height) / 2); 285 thumb.css({ 286 height: real_height+'px', 287 width: real_width+'px' 288 }); 289 } else if ((!is_big) && (GDThumb.method == 'square')) { 290 thumb.css({height: '', width: ''}); 291 new_width = new_height; 292 293 if (width < height) { 294 real_height = Math.round(height * new_width / width); 295 real_width = new_width; 296 } else { 297 real_height = new_width; 298 real_width = Math.round(width * new_height / height); 299 } 300 301 height_crop = Math.round((real_height - new_height) / 2); 302 width_crop = Math.round((real_width - new_width) / 2); 270 303 thumb.css({ 271 304 height: real_height+'px', … … 298 331 299 332 thumb.parents('li').css({ height: new_height+'px', width: new_width+'px' }); 300 thumb.parent('a').css({ clip: 'rect('+height_crop+'px, '+(new_width+width_crop)+'px, '+(new_height+height_crop)+'px, '+width_crop+'px)', top: -height_crop+'px', left: -width_crop+'px' }); 333 if (use_crop) { 334 thumb.parent('a').css({ clip: 'rect('+height_crop+'px, '+(new_width+width_crop)+'px, '+(new_height+height_crop)+'px, '+width_crop+'px)', top: -height_crop+'px', left: -width_crop+'px' }); 335 } else { 336 thumb.parent('a').css({ top: -height_crop+'px', left: -width_crop+'px' }); 337 } 301 338 } 302 339 } -
extensions/GDThumb/language/en_UK/plugin.lang.php
r31147 r31245 6 6 $lang['Block for Panoramic Photo Page'] = 'Block for Panoramic Photo Page'; 7 7 $lang['Cache have been generated'] = 'Cache have been generated'; 8 $lang['Cache Informations'] = 'Cache Information ';8 $lang['Cache Informations'] = 'Cache Informations'; 9 9 $lang['Cache the big thumbnails (recommended)'] = 'Cache the big thumbnails (recommended)'; 10 10 $lang['Changelog'] = 'Changelog'; … … 34 34 $lang['Prevent word wrap'] = 'Prevent word wrap'; 35 35 $lang['Purge thumbnails cache'] = 'Purge thumbnails cache'; 36 $lang[' Scale thumbnails'] = 'Scale thumbnails';36 $lang['Thumbnail Mode'] = 'Thumbnail Mode'; 37 37 $lang['Show thumbnails caption'] = 'Show thumbnails caption'; 38 38 $lang['Square'] = 'Square'; … … 44 44 $lang['Use Description if Set'] = 'Use Description if Set'; 45 45 $lang['Vertical'] = 'Vertical'; 46 46 $lang['Slide'] = 'Slide'; 47 $lang['%d visit'] = '%d visit'; 48 $lang['%d visits'] = '%d visits'; 49 $lang['Big thumb cannot be used in Slide mode. Disabled'] = 'Big thumb cannot be used in Slide mode. Disabled'; 50 $lang['Margin between thumbnails must be an integer'] = 'Margin between thumbnails must be an integer'; 51 $lang['Number of photos per page must be an integer'] = 'Number of photos per page must be an integer'; 52 $lang['Rating:'] = 'Rating:'; 53 $lang['This Thumb mode cannot be used in Slide mode. Changed to default'] = 'This Thumb mode cannot be used in Slide mode. Changed to default'; 54 $lang['Thumb animation cannot be used in Slide mode. Disabled'] = 'Thumb animation cannot be used in Slide mode. Disabled'; 55 $lang['Thumbnails max height must be an integer'] = 'Thumbnails max height must be an integer'; 56 57 ?> -
extensions/GDThumb/main.inc.php
r31134 r31245 2 2 /* 3 3 Plugin Name: gdThumb 4 Version: 1.0.1 74 Version: 1.0.18 5 5 Description: Apply Masonry style to album or image thumbs 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=771 … … 19 19 // | Plugin constants | 20 20 // +-----------------------------------------------------------------------+ 21 define('GDTHUMB_VERSION', '1.0.1 7');21 define('GDTHUMB_VERSION', '1.0.18'); 22 22 define('GDTHUMB_ID', basename(dirname(__FILE__))); 23 23 define('GDTHUMB_PATH' , PHPWG_PLUGINS_PATH . GDTHUMB_ID . '/'); … … 28 28 if (!isset($conf['gdThumb'])): 29 29 include(dirname(__FILE__).'/config_default.inc.php'); 30 31 $query = ' 32 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 33 VALUES ("gdThumb" , "'.addslashes(serialize($config_default)).'" , "GDThumb plugin parameters");'; 34 pwg_query($query); 30 conf_update_param('gdThumb', $config_default); 35 31 load_conf_from_db(); 36 32 endif; … … 113 109 $template->set_filename( 'index_thumbnails', dirname(__FILE__) . '/template/gdthumb_thumb.tpl'); 114 110 $template->assign('GDThumb', $confTemp); 115 $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height'])); 111 if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")): 112 $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom($confTemp['height'], 9999)); 113 else: 114 $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height'])); 115 endif; 116 116 117 117 if ($confTemp['big_thumb'] and !empty($tpl_vars[0])): 118 $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']); 118 if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")): 119 $derivative_params = ImageStdParams::get_custom(2 * $confTemp['height'] + $confTemp['margin'], 9999); 120 else: 121 $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']); 122 endif; 119 123 $template->assign('GDThumb_big', new DerivativeImage($derivative_params, $tpl_vars[0]['src_image'])); 120 124 endif; … … 132 136 $template->set_filename( 'index_category_thumbnails', dirname(__FILE__) . '/template/gdthumb_cat.tpl'); 133 137 $template->assign('GDThumb', $confTemp); 134 $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height'])); 138 if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")): 139 $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom($confTemp['height'], 9999)); 140 else: 141 $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height'])); 142 endif; 135 143 136 144 if ($confTemp['big_thumb'] and !empty($tpl_vars[0])): 137 145 $id = $tpl_vars[0]["representative_picture_id"]; 138 146 if (($id) && ($rep = $tpl_vars[0]["representative"])): 139 $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']); 147 if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")): 148 $derivative_params = ImageStdParams::get_custom(2 * $confTemp['height'] + $confTemp['margin'], 9999); 149 else: 150 $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']); 151 endif; 140 152 $template->assign('GDThumb_big', new DerivativeImage($derivative_params, $rep['src_image'])); 141 153 endif; -
extensions/GDThumb/template/admin.tpl
r31060 r31245 24 24 <label for="direction">{'Masonry Type'|@translate}</label> 25 25 </li> 26 <li> 27 <select id="method" name="method" > 28 <option {if $METHOD == 'crop'}selected="selected"{/if} value="crop">{'Crop (Default)'|@translate}</option> 29 <option {if $METHOD == 'resize'}selected="selected"{/if} value="resize">{'Resize'|@translate}</option> 30 <option {if $METHOD == 'square'}selected="selected"{/if} value="square">{'Square'|@translate}</option> 31 <option {if $METHOD == 'slide'}selected="selected"{/if} value="slide">{'Slide'|@translate}</option> 32 </select> 33 <label for="method">{'Thumbnail Mode'|@translate}</label> 34 </li> 26 35 <li><input id="height" type="text" size="2" maxlength="3" name="height" value="{$HEIGHT}"><label for="height">{'Thumbnails max height'|@translate} (px)</label></li> 27 36 <li><input id="margin" type="text" size="2" maxlength="3" name="margin" value="{$MARGIN}"><label for="margin">{'Margin between thumbnails'|@translate} px</label></li> … … 31 40 <li> <label><span class="graphicalCheckbox {if $BIG_THUMB_NOINPW}icon-check{else}icon-check-empty{/if}"> </span><input name="big_thumb_noinpw" id="big_thumb_noinpw" type="checkbox" value="1" {if $BIG_THUMB_NOINPW}checked="checked"{/if}>{'Block for Panoramic Photo Page'|@translate} (x2.2+)</label></li> 32 41 <li><label><span class="graphicalCheckbox {if $CACHE_BIG_THUMB}icon-check{else}icon-check-empty{/if}"> </span><input name="cache_big_thumb" id="cache_big_thumb" type="checkbox" value="1" {if $CACHE_BIG_THUMB}checked="checked"{/if}>{'Cache the big thumbnails (recommended)'|@translate}</label></li> 42 <li><label><span class="graphicalCheckbox {if $THUMB_ANIMATE}icon-check{else}icon-check-empty{/if}"> </span><input name="thumb_animate" id="thumb_animate" type="checkbox" value="1" {if $THUMB_ANIMATE}checked="checked"{/if}>{'Animate thumbnail on hover'|@translate}</label></li> 33 43 <li> 34 44 <select id="normalize_title" name="normalize_title" > … … 40 50 </li> 41 51 <li><label><span class="graphicalCheckbox {if $NO_WORDWRAP}icon-check{else}icon-check-empty{/if}"> </span><input name="no_wordwrap" id="no_wordwrap" type="checkbox" value="1" {if $NO_WORDWRAP}checked="checked"{/if}>{'Prevent word wrap'|@translate}</label></li> 42 <li>43 <select id="method" name="method" >44 <option {if $METHOD == 'crop'}selected="selected"{/if} value="crop">{'Crop (Default)'|@translate}</option>45 <option {if $METHOD == 'resize'}selected="selected"{/if} value="resize">{'Resize'|@translate}</option>46 <option {if $METHOD == 'square'}selected="selected"{/if} value="square">{'Square'|@translate}</option>47 </select>48 <label for="method">{'Scale thumbnails'|@translate}</label>49 </li>50 52 <li> 51 53 <select id="thumb_mode_album" name="thumb_mode_album" > … … 84 86 <label for="thumb_metamode">{'Metadata Display Mode'|@translate}</label> 85 87 </li> 86 <li><label><span class="graphicalCheckbox {if $THUMB_ANIMATE}icon-check{else}icon-check-empty{/if}"> </span><input name="thumb_animate" id="thumb_animate" type="checkbox" value="1" {if $THUMB_ANIMATE}checked="checked"{/if}>{'Animate thumbnail on hover'|@translate}</label></li>87 88 </ul> 88 89 </fieldset> … … 91 92 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> 92 93 <input type="submit" name="submit" value="{'Submit'|@translate}"> 93 <input type=" submit" name="cachedelete" id="cachedelete" value="{'Purge thumbnails cache'|@translate}" title="{'Delete images in GDThumb cache.'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');">94 <input type="button" name="cachedelete" id="cachedelete" value="{'Purge thumbnails cache'|@translate}" title="{'Delete images in GDThumb cache.'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');"> 94 95 <input type="button" name="cachebuild" id="cachebuild" value="{'Pre-cache thumbnails'|@translate}" title="{'Finds images that have not been cached and creates the cached version.'|@translate}" onclick="jQuery.gdThumb_start();"> 95 96 </p> -
extensions/GDThumb/template/gdthumb_cat.tpl
r31134 r31245 7 7 {assign var=derivative value=$pwg->derivative($GDThumb_derivative_params, $cat.representative.src_image)} 8 8 9 <li class="gdthumb{if $GDThumb.thumb_animate} animate{/if} ">9 <li class="gdthumb{if $GDThumb.thumb_animate} animate{/if} {$GDThumb.method}"> 10 10 {if $GDThumb.thumb_mode_album !== "hide" } 11 11 <span class="thumbLegend {$GDThumb.thumb_mode_album}"> -
extensions/GDThumb/template/gdthumb_thumb.tpl
r31134 r31245 6 6 {* {$thumbnails|print_r} *} 7 7 8 <li class="gdthumb{if $GDThumb.thumb_animate} animate{/if} ">8 <li class="gdthumb{if $GDThumb.thumb_animate} animate{/if} {$GDThumb.method}"> 9 9 {if $GDThumb.thumb_mode_photo !== "hide" } 10 10 <span class="thumbLegend {$GDThumb.thumb_mode_photo}"> … … 42 42 {elseif $GDThumb.thumb_metamode !== "hide"} 43 43 {if isset($thumbnail.NB_COMMENTS)} 44 <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> 45 {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)} 46 </span> 44 <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">{$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}</span> 47 45 {/if} 48 46 {if isset($thumbnail.NB_COMMENTS) && isset($thumbnail.NB_HITS)} - {/if} 49 47 {if isset($thumbnail.NB_HITS)} 50 <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> 51 {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)} 52 </span> 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> 53 54 {/if} 54 55 {/if}
Note: See TracChangeset
for help on using the changeset viewer.