Changeset 30901
- Timestamp:
- Jan 23, 2015, 7:56:01 PM (9 years ago)
- Location:
- extensions/GDThumb
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GDThumb/changelog.txt
r30890 r30901 26 26 27 27 === Changelog === 28 version 1.0.15 29 + In Overlay Ex mode place "New Item" marker is placed in metadata area 30 + Further and final improvement for file type markers in Overlay Ex mode. Now sensitive to file extensions. Supports image, video, music, pdf, doc, xls, ppt formats with associated markers. 31 - Fixed issue when "big thumb" for video files become smaller than desired min size 32 28 33 version 1.0.14 29 + Added integration with VideoJS plugin to allow display of "film" icon in squaremode34 + Added integration with VideoJS plugin to allow display of "film" icon in Overlay Ex mode 30 35 - Fixed issue with incorrect callback when "RV Thumb Scroller" plugin is used 31 36 -
extensions/GDThumb/css/gdthumb.css
r30890 r30901 39 39 ul.thumbnails .gdthumb .thumbLegend.overlay-ex .thumbTitle { position: absolute; left: 10px; right: 10px; top: 10px;font-size: 1.2em; text-transform: uppercase; } 40 40 ul.thumbnails .gdthumb .thumbLegend.overlay-ex .thumbInfo { position: absolute; bottom: 10px; left: 10px; right: 10px; padding-top: 6px; border-top: 1px solid #aaa; text-align: left; } 41 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .item-num { background-color: #cc3333; min-width: 15px; height: 16px; display: block; color: #fff; float: left; line-height: 16px; padding: 1px; padding-top: 0px; padding-right: 4px; padding-left: 4px; margin-top: 4px; margin-right: 10px; font-size: 10px; text-align: center; } 42 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .hit-num { background-color: #036FE5; min-width: 15px; height: 16px; display: block; color: #fff; float: left; line-height: 16px; padding: 1px; padding-top: 0px; padding-right: 4px; padding-left: 4px; margin-top: 4px; margin-right: 10px; font-size: 10px; text-align: center; } 41 ul.thumbnails .gdthumb .thumbLegend.overlay-ex .thumbInfo span { display: inline-block; } 42 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .item-num { background-color: #cc3333; min-width: 15px; height: 16px; display: block; color: #fff; float: left; line-height: 16px; padding: 1px; padding-top: 0px; padding-right: 4px; padding-left: 4px; margin-top: 5px; margin-right: 6px; font-size: 10px; text-align: center; } 43 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .hit-num { background-color: #036FE5; min-width: 15px; height: 16px; display: block; color: #fff; float: left; line-height: 16px; padding: 1px; padding-top: 0px; padding-right: 4px; padding-left: 4px; margin-top: 4px; margin-right: 6px; font-size: 10px; text-align: center; } 43 44 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .rank-num { float: right; margin-top: 2px; vertical-align: middle; height: 20px; line-height: 20px; } 44 45 45 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .glyphicon-th-large { padding-top: 2px; font-size: 18px; } 46 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .glyphicon-picture { padding-top: 1px; font-size: 18px; } 47 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .glyphicon-film { padding-top: 3px; font-size: 18px; } 46 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .glyphicon { padding-top: 3px; font-size: 17px; } 48 47 49 48 ul.thumbnails.nowrap .gdthumb .thumbLegend { white-space: nowrap; overflow: hidden; height: auto; } -
extensions/GDThumb/js/gdthumb.js
r30225 r30901 48 48 build: function () { 49 49 50 if ((GDThumb.method == 'square') && (GDThumb.big_thumb != null) && ( GDThumb.big_thumb.height != GDThumb.big_thumb.width)){50 if ((GDThumb.method == 'square') && (GDThumb.big_thumb != null) && ((GDThumb.big_thumb.height != GDThumb.big_thumb.width) || (GDThumb.big_thumb.height < GDThumb.max_height))){ 51 51 var main_width = jQuery('ul.thumbnails').width(); 52 52 var max_col_count = Math.floor(main_width / GDThumb.max_height); -
extensions/GDThumb/main.inc.php
r30890 r30901 2 2 /* 3 3 Plugin Name: gdThumb 4 Version: 1.0.1 45 Description: Display thumbnails as patchwork4 Version: 1.0.15 5 Description: Apply Masonry style to album or image thumbs 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=771 7 7 Author: Serge Dosyukov … … 19 19 // | Plugin constants | 20 20 // +-----------------------------------------------------------------------+ 21 define('GDTHUMB_VERSION', '1.0.1 4');21 define('GDTHUMB_VERSION', '1.0.15'); 22 22 define('GDTHUMB_ID', basename(dirname(__FILE__))); 23 23 define('GDTHEME_PATH' , PHPWG_THEMES_PATH . 'greydragon/'); … … 59 59 function GDThumb_index() { 60 60 global $template; 61 61 62 $template->smarty->registerPlugin("function", "media_type", "GDThumb_media_type"); 62 63 $template->set_prefilter('index', 'GDThumb_prefilter'); 63 64 64 65 add_event_handler('loc_end_index_thumbnails', 'GDThumb_process_thumb', 50, 2); 66 } 67 68 function GDThumb_endsWith($needles, $haystack) { 69 if(empty($needles) || empty($haystack)): 70 return false; 71 else: 72 $arr_needles = explode(',', $needles); 73 74 foreach ((array) $arr_needles as $needle) { 75 if ((string) $needle === substr($haystack, -strlen($needle))) return true; 76 } 77 return false; 78 endif; 79 } 80 81 function GDThumb_media_type($params, $smarty) { 82 if(empty($params["file"])) 83 return "image"; 84 85 $file = $params["file"]; 86 if (GDThumb_endsWith("webm,webmv,ogv,m4v,flv,mp4", $file)) 87 return "video"; 88 if (GDThumb_endsWith("mp3,ogg,oga,m4a,webma,fla,wav", $file)) 89 return "music"; 90 if (GDThumb_endsWith("pdf", $file)) 91 return "pdf"; 92 if (GDThumb_endsWith("doc,docx,odt", $file)) 93 return "doc"; 94 if (GDThumb_endsWith("xls,xlsx,ods", $file)) 95 return "xls"; 96 if (GDThumb_endsWith("ppt,pptx,odp", $file)) 97 return "ppt"; 98 99 return "image"; 65 100 } 66 101 -
extensions/GDThumb/template/gdthumb_cat.tpl
r30225 r30901 15 15 <span class="thumbName"> 16 16 <span class="thumbTitle">{$cat.NAME} 17 {if !empty($cat.icon_ts)} 18 <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" alt="(!)"> 17 {if $GDThumb.thumb_mode_album !== "overlay-ex"} 18 {if !empty($cat.icon_ts)} 19 <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" alt="(!)"> 20 {/if} 19 21 {/if} 20 22 </span> 21 23 {if $GDThumb.thumb_mode_album == "overlay-ex"} 22 <span class="thumbInfo"> 23 <span class="item-num">{$cat.count_images}</span> 24 <span class="glyphicon glyphicon-th-large grid-gallery-icon"></span> 25 </span> 24 <span class="thumbInfo"> 25 <span class="item-num">{$cat.count_images}</span> 26 <span class="glyphicon glyphicon-th-large grid-gallery-icon"></span> 27 {if !empty($cat.icon_ts)} 28 <span class="new-thumb glyphicon glyphicon-asterisk" title="{$cat.icon_ts.TITLE}" alt="(!)"></span> 29 {/if} 30 </span> 26 31 {elseif $GDThumb.thumb_metamode !== "hide"} 27 32 {if isset($cat.INFO_DATES) } -
extensions/GDThumb/template/gdthumb_thumb.tpl
r30890 r30901 1 1 {if !empty($thumbnails)} 2 2 {* 3 {$thumbnails|print_r} 4 *} 3 5 {foreach from=$thumbnails item=thumbnail} 4 6 {assign var=derivative value=$pwg->derivative($GDThumb_derivative_params, $thumbnail.src_image)} 7 {assign var=media_type value={media_type file=$thumbnail.file}} 8 5 9 <li class="gdthumb"> 6 10 {if $GDThumb.thumb_mode_photo !== "hide" } … … 20 24 {/if} 21 25 {/if} 26 {if $GDThumb.thumb_mode_album !== "overlay-ex"} 22 27 {if !empty($thumbnail.icon_ts)} 23 28 <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> 24 29 {/if} 30 {/if} 25 31 </span> 26 32 {if $GDThumb.thumb_mode_album == "overlay-ex"} 27 33 <span class="thumbInfo"> 28 34 <span class="hit-num">{$thumbnail.hit}</span> 29 <span class="glyphicon {if $derivative->is_cached()}{if $derivative->get_url()|strstr:"/piwigo-videojs/"}glyphicon-film{else}glyphicon-picture{/if}{else}glyphicon-picture{/if}"></span> 35 <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> 36 {if !empty($thumbnail.icon_ts)} 37 <span class="new-thumb glyphicon glyphicon-asterisk" title="{$thumbnail.icon_ts.TITLE}" alt="(!)"></span> 38 {/if} 30 39 {if $thumbnail.rating_score > 0} 31 40 <span class="rank-num glyphicon glyphicon-star">{$thumbnail.rating_score|string_format:"%d"}</span>
Note: See TracChangeset
for help on using the changeset viewer.