Changeset 13089 for extensions/stripped-galleria
- Timestamp:
- Feb 10, 2012, 11:45:52 PM (12 years ago)
- Location:
- extensions/stripped-galleria
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/stripped-galleria/readme.txt
r12975 r13089 13 13 Changelog 14 14 --------- 15 *** version 1.3.0 16 - Piwigo history is now working (thanks to P@t's script from Lightbox plugin) 17 - download link added for HD pictures (if authorized in Piwigo config) 18 - many new translations available 15 19 16 20 *** version 1.2.0 -
extensions/stripped-galleria/template/index.tpl
r12975 r13089 1 1 {php} 2 global $pwg_loaded_plugins; 3 $this->assign('GMaps_loaded', isset($pwg_loaded_plugins[ 'GMaps' ])); 4 $this->assign('ThumbScroller_loaded', isset($pwg_loaded_plugins[ 'rv_tscroller' ])); 2 global $conf; 3 $this->assign('downloadLink', $conf['picture_download_icon']); 5 4 {/php} 6 5 <div class="titrePage"> … … 11 10 <h2>{$TITLE}</h2> 12 11 </div> 13 {if isset($U_EDIT) or isset($U_SLIDESHOW) or !empty($PLUGIN_INDEX_ACTIONS) }12 {if isset($U_EDIT) or isset($U_SLIDESHOW) or !empty($PLUGIN_INDEX_ACTIONS) or !empty($THUMBNAILS) } 14 13 <div class="categoryActionsContainer"> 15 14 <ul class="categoryActions group1"> … … 20 19 {if isset($U_CADDIE) } 21 20 <li class="mainAction"><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}">{'caddie'|@translate}</a></li> 21 {/if} 22 {if (!empty($THUMBNAILS) && $downloadLink) } 23 <li class="mainAction"><a id="downloadlink" href="" title="{'download this file'|@translate}" style="display: none;">{'download'|@translate}</a></li> 22 24 {/if} 23 25 </ul> -
extensions/stripped-galleria/template/thumbnails.tpl
r12975 r13089 1 1 {if !empty($thumbnails)} 2 2 {php} 3 global $stripped, $strippedgalleria ;3 global $stripped, $strippedgalleria, $page; 4 4 $this->assign( 'stripped', $stripped ); 5 5 $this->assign( 'strippedgalleria', $strippedgalleria ); 6 $this->assign( 'get_root_url', get_root_url() ); 7 $this->assign( 'catid', @$page['category']['id'] ); 8 $this->assign( 'section', @$page['section'] ); 9 $this->assign( 'tagids', @implode(',', @$page['tag_ids']) ); 6 10 {/php} 7 <div id="gallery" class="test"> 8 {strip}{foreach from=$thumbnails item=thumbnail} 9 <a href="{$thumbnail.FILE_PATH}" {if (($thumbnail.FILE_HAS_HD) && ($strippedgalleria.lightbox == 'hd'))}rel="{$thumbnail.HD_PATH}"{/if}> 10 <img src="{$thumbnail.TN_SRC}" 11 {if ($stripped.imageCaption == 'description' )} 12 alt="{$thumbnail.FILE_DESC|strip_tags:false}" 13 {/if} 14 {if ($stripped.imageCaption == 'title' )} 15 alt="{$thumbnail.NAME}" 16 {/if} 17 /></a> 18 {/foreach}{/strip} 19 </div> 11 <div id="gallery"></div> 20 12 {footer_script} 21 13 {literal} 14 var data = [ 15 {/literal}{foreach from=$thumbnails item=thumbnail name=thumb}{literal} 16 { 17 thumb: '{/literal}{$thumbnail.TN_SRC}{literal}', 18 image: '{/literal}{$thumbnail.FILE_PATH}{literal}', 19 big: '{/literal}{if (($thumbnail.FILE_HAS_HD) && ($strippedgalleria.lightbox == 'hd'))}{$thumbnail.HD_PATH}{else}{$thumbnail.FILE_PATH}{/if}{literal}', 20 title: '{/literal}{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}{literal}', 21 description: '{/literal}{$thumbnail.FILE_DESC|strip_tags:false|replace:'\'':'''|replace:'"':'"'}{literal}', 22 piwigo_id: {/literal}{$thumbnail.ID}{literal}, 23 piwigo_hashd: {/literal}{if ($thumbnail.FILE_HAS_HD)}true{else}false{/if}{literal} 24 }{/literal}{if (!$smarty.foreach.thumb.last)},{/if} 25 {/foreach}{literal} 26 ]; 22 27 var Htotal=jQuery(window).height(); 23 28 var Hheader=jQuery("#content").position().top; … … 25 30 var Hgallery = Htotal - Hheader - Hfooter - 2; 26 31 jQuery("#gallery").galleria({ 27 height: Hgallery, 32 dataSource: data, 33 height: Hgallery, 28 34 lightbox:{/literal}{if ($strippedgalleria.lightbox != 'none')}true{else}false{/if}{literal}, 29 35 clicknext:{/literal}{if ($strippedgalleria.clicknext)}true{else}false{/if}{literal}, … … 35 41 this.attachKeyboard({ 36 42 left: this.prev, 37 right: this.next 43 right: this.next, 38 44 }); 45 this.bind("image", function(e) { 46 var gid = e.index; 47 var pid = this.getData(gid).piwigo_id; 48 var hashd = this.getData(gid).piwigo_hashd; 49 if (hashd) { 50 jQuery("#downloadlink").show(); 51 jQuery("#downloadlink").prop("href","action.php?id="+pid+"&part=h"); 52 } else { 53 jQuery("#downloadlink").hide(); 54 } 55 jQuery.post("{/literal}{$get_root_url}{literal}themes/stripped-galleria/save_history.php", { 56 imgid: "img-"+pid, 57 catid: "{/literal}{$catid}{literal}", 58 section: "{/literal}{$section}{literal}", 59 tagids: "{/literal}{$tagids}{literal}" 60 }); 61 }); 62 this.bind("lightbox_image", function() { 63 var image=jQuery("img",".galleria-lightbox-content"); 64 image.css("width","100%"); 65 image.css("height","100%"); 66 var gid=parseInt(jQuery(".galleria-lightbox-counter").text())-1; 67 var pid = this.getData(gid).piwigo_id; 68 var hashd = this.getData(gid).piwigo_hashd; 69 jQuery.post("{/literal}{$get_root_url}{literal}themes/stripped-galleria/save_history.php", { 70 imgid: "img-"+pid, 71 catid: "{/literal}{$catid}{literal}", 72 section: "{/literal}{$section}{literal}", 73 tagids: "{/literal}{$tagids}{literal}" 74 }); 75 }); 39 76 } 40 77 }); -
extensions/stripped-galleria/theme.css
r12975 r13089 1 1 .galleria-container {background:none!important;} 2 2 .galleria-thumbnails {margin: 0 auto;} 3 .galleria-info-text {text-transform:none} 3 4 .galleria-info-link {left:0} 4 .galleria-lightbox-content .galleria-image {width:99.5%; left:0.25%;}5 5 #galleria_page #the_page {max-width:none; width:auto; margin:0 10px; } 6 6 #galleria_page #content {background:none; padding:0; max-width:none;}
Note: See TracChangeset
for help on using the changeset viewer.