Changeset 13089


Ignore:
Timestamp:
Feb 10, 2012, 11:45:52 PM (12 years ago)
Author:
Zaphod
Message:

version 1.3.0

Location:
extensions/stripped-galleria
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped-galleria/readme.txt

    r12975 r13089  
    1313Changelog
    1414---------
     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
    1519
    1620*** version 1.2.0
  • extensions/stripped-galleria/template/index.tpl

    r12975 r13089  
    11{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']);
    54{/php}
    65<div class="titrePage">
     
    1110                <h2>{$TITLE}</h2>
    1211        </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) }
    1413                <div class="categoryActionsContainer">
    1514                        <ul class="categoryActions group1">
     
    2019                                {if isset($U_CADDIE) }
    2120                                        <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>
    2224                                {/if}
    2325                        </ul>
  • extensions/stripped-galleria/template/thumbnails.tpl

    r12975 r13089  
    11{if !empty($thumbnails)}
    22{php}
    3         global $stripped, $strippedgalleria;
     3        global $stripped, $strippedgalleria, $page;
    44        $this->assign( 'stripped', $stripped );
    55        $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']) );
    610{/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>
    2012{footer_script}
    2113{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:'\'':'&#39;'|replace:'"':'&quot;'}{literal}',
     21                        description: '{/literal}{$thumbnail.FILE_DESC|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}{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                ];
    2227                        var Htotal=jQuery(window).height();
    2328                        var Hheader=jQuery("#content").position().top;
     
    2530                        var Hgallery = Htotal - Hheader - Hfooter - 2;
    2631            jQuery("#gallery").galleria({
    27                 height: Hgallery,
     32                                dataSource: data,
     33                                height: Hgallery,
    2834                                lightbox:{/literal}{if ($strippedgalleria.lightbox != 'none')}true{else}false{/if}{literal},
    2935                                clicknext:{/literal}{if ($strippedgalleria.clicknext)}true{else}false{/if}{literal},
     
    3541                                        this.attachKeyboard({
    3642                                                left: this.prev,
    37                                                 right: this.next
     43                                                right: this.next,
    3844                                        });
     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                                    });
    3976                                }
    4077            });
  • extensions/stripped-galleria/theme.css

    r12975 r13089  
    11.galleria-container {background:none!important;}
    22.galleria-thumbnails {margin: 0 auto;}
     3.galleria-info-text {text-transform:none}
    34.galleria-info-link {left:0}
    4 .galleria-lightbox-content .galleria-image {width:99.5%; left:0.25%;}
    55#galleria_page #the_page {max-width:none; width:auto; margin:0 10px; }
    66#galleria_page #content {background:none; padding:0; max-width:none;}
Note: See TracChangeset for help on using the changeset viewer.