Index: extensions/stripped-galleria/readme.txt
===================================================================
--- extensions/stripped-galleria/readme.txt (revision 13075)
+++ extensions/stripped-galleria/readme.txt (revision 13089)
@@ -13,4 +13,8 @@
Changelog
---------
+*** version 1.3.0
+- Piwigo history is now working (thanks to P@t's script from Lightbox plugin)
+- download link added for HD pictures (if authorized in Piwigo config)
+- many new translations available
*** version 1.2.0
Index: extensions/stripped-galleria/save_history.php
===================================================================
--- extensions/stripped-galleria/save_history.php (revision 13089)
+++ extensions/stripped-galleria/save_history.php (revision 13089)
@@ -0,0 +1,78 @@
+
Index: extensions/stripped-galleria/template/index.tpl
===================================================================
--- extensions/stripped-galleria/template/index.tpl (revision 13075)
+++ extensions/stripped-galleria/template/index.tpl (revision 13089)
@@ -1,6 +1,5 @@
{php}
- global $pwg_loaded_plugins;
- $this->assign('GMaps_loaded', isset($pwg_loaded_plugins[ 'GMaps' ]));
- $this->assign('ThumbScroller_loaded', isset($pwg_loaded_plugins[ 'rv_tscroller' ]));
+ global $conf;
+ $this->assign('downloadLink', $conf['picture_download_icon']);
{/php}
Index: extensions/stripped-galleria/template/thumbnails.tpl
===================================================================
--- extensions/stripped-galleria/template/thumbnails.tpl (revision 13075)
+++ extensions/stripped-galleria/template/thumbnails.tpl (revision 13089)
@@ -1,23 +1,28 @@
{if !empty($thumbnails)}
{php}
- global $stripped, $strippedgalleria;
+ global $stripped, $strippedgalleria, $page;
$this->assign( 'stripped', $stripped );
$this->assign( 'strippedgalleria', $strippedgalleria );
+ $this->assign( 'get_root_url', get_root_url() );
+ $this->assign( 'catid', @$page['category']['id'] );
+ $this->assign( 'section', @$page['section'] );
+ $this->assign( 'tagids', @implode(',', @$page['tag_ids']) );
{/php}
-
- {strip}{foreach from=$thumbnails item=thumbnail}
-
-
- {/foreach}{/strip}
-
+
{footer_script}
{literal}
+ var data = [
+ {/literal}{foreach from=$thumbnails item=thumbnail name=thumb}{literal}
+ {
+ thumb: '{/literal}{$thumbnail.TN_SRC}{literal}',
+ image: '{/literal}{$thumbnail.FILE_PATH}{literal}',
+ big: '{/literal}{if (($thumbnail.FILE_HAS_HD) && ($strippedgalleria.lightbox == 'hd'))}{$thumbnail.HD_PATH}{else}{$thumbnail.FILE_PATH}{/if}{literal}',
+ title: '{/literal}{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}{literal}',
+ description: '{/literal}{$thumbnail.FILE_DESC|strip_tags:false|replace:'\'':'''|replace:'"':'"'}{literal}',
+ piwigo_id: {/literal}{$thumbnail.ID}{literal},
+ piwigo_hashd: {/literal}{if ($thumbnail.FILE_HAS_HD)}true{else}false{/if}{literal}
+ }{/literal}{if (!$smarty.foreach.thumb.last)},{/if}
+ {/foreach}{literal}
+ ];
var Htotal=jQuery(window).height();
var Hheader=jQuery("#content").position().top;
@@ -25,5 +30,6 @@
var Hgallery = Htotal - Hheader - Hfooter - 2;
jQuery("#gallery").galleria({
- height: Hgallery,
+ dataSource: data,
+ height: Hgallery,
lightbox:{/literal}{if ($strippedgalleria.lightbox != 'none')}true{else}false{/if}{literal},
clicknext:{/literal}{if ($strippedgalleria.clicknext)}true{else}false{/if}{literal},
@@ -35,6 +41,37 @@
this.attachKeyboard({
left: this.prev,
- right: this.next
+ right: this.next,
});
+ this.bind("image", function(e) {
+ var gid = e.index;
+ var pid = this.getData(gid).piwigo_id;
+ var hashd = this.getData(gid).piwigo_hashd;
+ if (hashd) {
+ jQuery("#downloadlink").show();
+ jQuery("#downloadlink").prop("href","action.php?id="+pid+"&part=h");
+ } else {
+ jQuery("#downloadlink").hide();
+ }
+ jQuery.post("{/literal}{$get_root_url}{literal}themes/stripped-galleria/save_history.php", {
+ imgid: "img-"+pid,
+ catid: "{/literal}{$catid}{literal}",
+ section: "{/literal}{$section}{literal}",
+ tagids: "{/literal}{$tagids}{literal}"
+ });
+ });
+ this.bind("lightbox_image", function() {
+ var image=jQuery("img",".galleria-lightbox-content");
+ image.css("width","100%");
+ image.css("height","100%");
+ var gid=parseInt(jQuery(".galleria-lightbox-counter").text())-1;
+ var pid = this.getData(gid).piwigo_id;
+ var hashd = this.getData(gid).piwigo_hashd;
+ jQuery.post("{/literal}{$get_root_url}{literal}themes/stripped-galleria/save_history.php", {
+ imgid: "img-"+pid,
+ catid: "{/literal}{$catid}{literal}",
+ section: "{/literal}{$section}{literal}",
+ tagids: "{/literal}{$tagids}{literal}"
+ });
+ });
}
});
Index: extensions/stripped-galleria/theme.css
===================================================================
--- extensions/stripped-galleria/theme.css (revision 13075)
+++ extensions/stripped-galleria/theme.css (revision 13089)
@@ -1,6 +1,6 @@
.galleria-container {background:none!important;}
.galleria-thumbnails {margin: 0 auto;}
+.galleria-info-text {text-transform:none}
.galleria-info-link {left:0}
-.galleria-lightbox-content .galleria-image {width:99.5%; left:0.25%;}
#galleria_page #the_page {max-width:none; width:auto; margin:0 10px; }
#galleria_page #content {background:none; padding:0; max-width:none;}