Changeset 4489


Ignore:
Timestamp:
Dec 13, 2009, 11:35:47 PM (14 years ago)
Author:
grum
Message:

[Template:Gally] feature 1096, feature 1097, feature 1098, feature 1099, feature 1313
And some other improvments...

Location:
extensions/gally
Files:
201 added
1 deleted
37 edited

Legend:

Unmodified
Added
Removed
  • extensions/gally/about.tpl

    r4446 r4489  
    1111    <h2>{'About'|@translate}</h2>
    1212  </div>
    13   <ul>
    1413  <div id="content2">
    15     {$ABOUT_MESSAGE}
    16     {if isset($THEME_ABOUT) }
    17     <li>{$THEME_ABOUT}</li>
    18     {/if}
     14    <ul>
     15      {$ABOUT_MESSAGE}
     16      {if isset($THEME_ABOUT) }
     17      <li>{$THEME_ABOUT}</li>
     18      {/if}
    1919    </ul>
    2020  </div>
  • extensions/gally/config.js.tpl

    r4446 r4489  
    1212  interfaceAnimated:"{#interfaceAnimated#}",
    1313  interfaceHidden:{if #interfaceHidden#=='yes'}true{else}false{/if},
    14   interfaceOnImage:{if #interfaceOnImage#=='yes'}true{else}false{/if},
     14  interfaceOnImage:"{#interfaceOnImage#}",
    1515  margin_container:{#margin_container#},
    1616  tabsAnimated:{if #tabsAnimated#=='yes'}true{else}false{/if},
    1717  tabsHidden:{#tabsHidden#},
    1818  tabsVisible:{#tabsVisible#},
     19  tabsPosition:"{#tabsPosition#}",
    1920  metaNumCols:{#metaNumCols#},
    2021  commentRows:{#commentRows#},
  • extensions/gally/footer.tpl

    r4446 r4489  
    11<!-- **GBL** >FOOTER> -->
    2 {* $Id: footer.tpl 2381 2008-06-01 19:19:46Z vdigital $ *}
    32<div id="copyright">
    43 <a name="EoP"></a> <!-- End of Page -->
     
    1312
    1413  {'powered_by'|@translate}
    15   <a href="http://piwigo.org" class="Piwigo">
     14  <a href="{$PHPWG_URL}" class="Piwigo">
    1615  <span class="Piwigo">Piwigo</span></a>
    1716  {$VERSION}
  • extensions/gally/gallyjs-tcp.js

    r4446 r4489  
    11/* -----------------------------------------------------------------------------
    2   GALLY 
     2  GALLY
    33  Template for Piwigo
    44  ------------------------------------------------------------------------------
     
    1818var menuState;
    1919
    20 $("document").ready( function() 
    21   { 
    22     initMenu(); 
     20$("document").ready( function()
     21  {
     22    initMenu();
    2323    initContentDesc();
    2424  }
    2525);
    2626
    27 function initMenu()
    28 {
    29   $("#menubar").css(
    30     {
    31       visibility:"hidden",
    32       top: $("#titrePageID").attr("offsetTop")+$("#titrePageID").attr("offsetHeight")-2+'px'
    33     }
    34   );
    35   switchmenu('n');
    36   switch(options.menuWidth)
    37   {
    38     case "auto":
    39       $("#menubar").css("width", "auto");
    40       maxwidth=options.menuMaxWidth;
    41       if(jQuery.browser.msie)
    42       {
    43         maxwidth=options.menuMSIEMaxWidth;
    44       }
    45       if(maxwidth>0) { $("#menubar").css("max-width", maxwidth+"px"); }
    46       break;
    47     case "info":
    48       $("#menubar").css("width", $(".additionnal_info").css("width"));
    49       break;
    50     default:
    51       $("#menubar").css("width", options.menuWidth+"px");
    52   }
    53 }
    5427
    5528function initContentDesc()
     
    6235  }
    6336/*
    64   this code permit to manage 3 informations panels with one text area (or 2 if 
     37  this code permit to manage 3 informations panels with one text area (or 2 if
    6538  extended description plugin is used)
    6639
    67   this function don't use a regExp object (due to some freeze with this method 
     40  this function don't use a regExp object (due to some freeze with this method
    6841  during test)
    6942
    7043  known tags :
    71     <!--up-down--> 
     44    <!--up-down-->
    7245    <!--right-left-->
    7346
     
    7548  already managed by the plugin :
    7649    - top text is in a <div class="additional_info">
    77         => text is moved to the to the '#additional_infoTOP' div  and 
     50        => text is moved to the to the '#additional_infoTOP' div  and
    7851            the '.additional_info' div added by the plugin is deleted
    7952    - bottom text is in <div id="additional_infoLEFT">
    8053        => if tag "<!--right-left-->" is present
    81             text on right is moved to the to the '#additional_infoBOTTOM' div and 
     54            text on right is moved to the to the '#additional_infoBOTTOM' div and
    8255            removed from the '#additional_infoLEFT' div
    8356
    84   if the plugin "ExtendedDescription" is not installed, all the text is in 
    85   the <div id="additional_infoLEFT"> 
     57  if the plugin "ExtendedDescription" is not installed, all the text is in
     58  the <div id="additional_infoLEFT">
    8659    => if tag "<!--up-down-->" is present
    87         text on right is moved to the to the '#additional_infoTOP' div and 
     60        text on right is moved to the to the '#additional_infoTOP' div and
    8861        removed from the '#additional_infoLEFT' div
    8962    => if tag "<!--right-left-->" is present on the '#additional_infoLEFT' div
    90         text on right is moved to the to the '#additional_infoBOTTOM' div and 
     63        text on right is moved to the to the '#additional_infoBOTTOM' div and
    9164        removed from the '#additional_infoLEFT' div
    9265*/
    93  
     66
    9467  // <!--up-down--> tag
    9568  txt = $("#additional_infoLEFT").attr("innerHTML");
    9669  if(txt==null) { txt=""; }
    9770  tmp = txt.indexOf("<!--up-down-->");
    98  
     71
    9972  if(tmp>-1)
    10073  { // tag is not managed by the ExtendedDescription plugin
     
    10477  else
    10578  { // perhaps tag is managed by the ExtendedDescription plugin
    106     $(".additional_info").each( function (i) 
     79    $(".additional_info").each( function (i)
    10780      {
    10881        if(this.id=="")
     
    11790  // <!--right-left--> tag
    11891  tmp = txt.indexOf("<!--right-left-->");
    119  
     92
    12093  if(tmp>-1)
    121   { // tag is present, cut the right text to the 
     94  { // tag is present, cut the right text to the
    12295    $("#additional_infoBOTTOM").attr("innerHTML", txt.slice(0,tmp));
    12396    txt=txt.substr(tmp+17);
    12497  }
    12598
    126   $("#additional_infoLEFT").attr("innerHTML", txt); 
     99  $("#additional_infoLEFT").attr("innerHTML", txt);
    127100
    128101  if((txt.replace(/\s*/im, "")=="")&&($("#additional_infoID").length>0))
     
    154127}
    155128
     129
     130function initMenu()
     131{
     132  if(options.menuAnimated != "noswitch")
     133  {
     134    $("#menubar").css(
     135      {
     136        visibility:"hidden",
     137        top: $("#titrePageID").attr("offsetTop")+$("#titrePageID").attr("offsetHeight")-2+'px'
     138      }
     139    );
     140    switchmenu('n');
     141    switch(options.menuWidth)
     142    {
     143      case "auto":
     144        $("#menubar").css("width", "auto");
     145        maxwidth=options.menuMaxWidth;
     146        if(jQuery.browser.msie)
     147        {
     148          maxwidth=options.menuMSIEMaxWidth;
     149        }
     150        if(maxwidth>0) { $("#menubar").css("max-width", maxwidth+"px"); }
     151        break;
     152      case "info":
     153        $("#menubar").css("width", $(".additionnal_info").css("width"));
     154        break;
     155      default:
     156        $("#menubar").css("width", options.menuWidth+"px");
     157    }
     158  }
     159  else
     160  {
     161    $("#menubar dl dd").each(
     162      function (index, elem)
     163      {
     164        //alert($(this.parentNode).attr('offsetWidth')+"---"+$(this.parentNode).attr('id'));
     165        $(this).css("min-width", $(this.parentNode).attr('offsetWidth'));
     166        if(jQuery.browser.msie)
     167        {
     168          $(this).css("max-width", options.menuMSIEMaxWidth+"px");
     169        }
     170      }
     171    );
     172  }
     173}
    156174
    157175
     
    171189          visibility:"visible",
    172190          height:"auto"
    173         }).fadeTo(options.animateDelay,1);     
     191        }).fadeTo(options.animateDelay,1);
    174192        $("#icon_menu").attr("className", "button2");
    175193        menuState=true;
    176194        break;
    177195      default:
    178         $("#menubar").fadeTo(options.animateDelay, 0, function () { 
     196        $("#menubar").fadeTo(options.animateDelay, 0, function () {
    179197          $("#menubar").css({
    180198            visibility:"hidden",
    181199            height:"0px"
    182           }); 
     200          });
    183201        });
    184202        $("#icon_menu").attr("className", "button");
     
    194212          visibility:"visible",
    195213          height:"auto"
    196         }); 
     214        });
    197215        $("#icon_menu").attr("className", "button2");
    198216        menuState=true;
     
    202220          visibility:"hidden",
    203221          height:"0px"
    204         }); 
     222        });
    205223        $("#icon_menu").attr("className", "button");
    206224        menuState=false;
  • extensions/gally/gallyjs-tpp.js

    r4446 r4489  
    2020var selectedTab;
    2121var interfaceTimerDelay;
     22var isScrollable;
    2223
    2324$("document").ready(
    24   function(){ inittoolbar(); }
     25  function(){inittoolbar(); }
    2526);
    2627
     
    5455  selectedTab=-1;
    5556  interfaceTimerDelay = null;
    56 
    5757  switchInterface('0', true);
    58   initializeImageMode();
    59 
    60 
    61   $("#theCommentList").css("height", options.comments_visible-42+"px");
    62 
    63   if(options.interfaceOnImage)
     58  initializeImageMode("init");
     59
     60  if(options.interfaceOnImage=="always" || (options.interfaceOnImage=="noscroll" && !isScrollable))
    6461  {
    6562    $("#theImg").bind("mouseenter", function () { switchInterface('y', true); } )
     
    7269  $("#imageToolBar").bind("mouseenter", function () { switchInterface('y', true); } )
    7370                    .bind("mouseleave", function () { switchInterface('n', true); } )
    74                     .bind("mousemove", function () { switchInterface('y', true); } )
    75                     .css("top", $("#imageToolBar").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#imageHeaderBar").attr("offsetHeight")+"px");
     71                    .bind("mousemove", function () { switchInterface('y', true); } );
     72
    7673
    7774  $("#navThumbPrev").bind("mouseenter", function () { switchInterface('Y', true); } )
     
    133130  );
    134131
    135   $(window).resize( function () { initializeImageMode(); } );
     132  $(window).resize( function () { initializeImageMode("resize"); } );
    136133
    137134  $(document).data("initialized", 1);
    138135}
    139136
    140 function initializeImageMode()
    141 {
    142   copyrightArea = $("#copyright").attr("clientHeight")+1;
    143   $("#theTabsContainer").css("bottom", copyrightArea+"px");
    144 
    145   $("#navThumbPrev").css("height", $("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px");
    146   $("#navThumbNext").css("height", $("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px");
     137function initializeImageMode(mode)
     138{
     139  if(mode=="init")
     140  {
     141    $("#imageToolBar").css("top", $("#imageToolBar").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#imageHeaderBar").attr("offsetHeight")+"px");
     142
     143    if(options.tabsPosition=="bottom")
     144    {
     145      copyrightArea = $("#copyright").attr("clientHeight")+1;
     146      $("#theTabsContainer").css("bottom", copyrightArea+"px");
     147    }
     148    else if(options.tabsPosition=="top")
     149    {
     150      toolBarArea = $("#imageToolBar").attr("offsetTop")+$("#imageToolBar").attr("offsetHeight");
     151      $("#theTabsContainer").css("top", toolBarArea+"px");
     152    }
     153
     154    if($("#navThumbPrev").length>0)
     155    {
     156      $("#navThumbPrev").css("height", $("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px");
     157    }
     158    if($("#navThumbNext").length>0)
     159    {
     160      $("#navThumbNext").css("height", $("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px");
     161    }
     162  }
    147163
    148164  cssValues = new Object;
     
    161177      }
    162178    );
     179    isScrollable=true;
    163180  }
    164181  else
     
    167184    $("#theImg").css("left", "0px");
    168185    cssValues.width = $("#theImg").attr("scrollWidth")+"px";
     186    isScrollable=false;
    169187  }
    170188  $("#theImgContainer").css(cssValues);
    171189
    172190  // imagecenter
    173   $("#theImage").css("padding-bottom", $("#copyright").attr("offsetHeight")+"px");
     191  if($("#copyright").css("position")=="fixed")
     192  {
     193    $("#theImage").css("padding-bottom", $("#copyright").attr("offsetHeight")+"px");
     194  }
    174195  switch(options.imageCenterMode)
    175196  {
  • extensions/gally/header.tpl

    r4446 r4489  
    118118
    119119
    120 <div id="theHeader">{if ($BODY_ID=='thePicturePage' and #displayBanner# == "yes") or $BODY_ID!='thePicturePage'}{$PAGE_BANNER}{/if}</div>
     120{if ($BODY_ID=='thePicturePage' and #displayBanner# == "yes") or $BODY_ID!='thePicturePage'}
     121<div id="theHeader">
     122  {$PAGE_BANNER}
     123</div>
     124{else}
     125<div id="theHeader" style="display:none;"></div>
     126{/if}
    121127
    122128
  • extensions/gally/identification.tpl

    r4446 r4489  
    1717
    1818
    19 <form action="{$F_LOGIN_ACTION}" method="post" name="login_form" class="properties">
     19<form action="{$F_LOGIN_ACTION}" method="post" name="login_form" class="properties" id="identification">
    2020  <fieldset>
    2121    <legend>{'Connection settings'|@translate}</legend>
     
    5050
    5151  <p><input class="submit" tabindex="4" type="submit" name="login" value="{'Submit'|@translate}"></p>
    52 </form>
    53 
    54 <script type="text/javascript"><!--
    55 document.login_form.username.focus();
    56 //--></script>
    5752
    5853  <p>
     
    6358  </p>
    6459
     60</form>
     61
     62
     63
     64
     65
     66<script type="text/javascript"><!--
     67document.login_form.username.focus();
     68//--></script>
     69
    6570</div> <!-- content -->
    6671<!-- **GBL** <IDENTIFICATION< -->
  • extensions/gally/index.tpl

    r4446 r4489  
    11<!-- **GBL** >INDEX> -->
    2 {* $Id: index.tpl 2352 2008-05-20 00:27:26Z patdenice $ *}
    3 
    42
    53{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
     
    75<div id="content" class="content">
    86  <div class="titrePage" id='titrePageID'>
     7
     8    {if #menuAnimated# == "noswitch"}
     9      {$MENUBAR}
     10    {else}
    911    <div id="menuswitcher">
    1012      <a id="icon_menu" class="button" onclick="switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
     
    1214      </a>
    1315    </div>
     16    {/if}
     17
    1418      <ul class="categoryActions" id="categoryActionsID">
    1519        <li>&nbsp;</li>
     
    5963        <li><a id="icon_calendar" class="button" href="{$U_MODE_POSTED}" title="{'mode_posted_hint'|@translate}" rel="nofollow"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar.png" class="button" alt="{'mode_posted_hint'|@translate}"> --></a></li>
    6064        {/if}
    61        
     65
    6266        {if isset($U_MODE_CREATED) }
    6367        <li><a id="icon_calendar_created" class="button" href="{$U_MODE_CREATED}" title="{'mode_created_hint'|@translate}" rel="nofollow"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar_created.png" class="button" alt="{'mode_created_hint'|@translate}"> --></a></li>
    6468        {/if}
    65        
     69
    6670        {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
    6771      </ul>
     
    7478  </div> <!-- titrePage -->
    7579
    76 {$MENUBAR}
     80{if #menuAnimated# != "noswitch"}
     81  {$MENUBAR}
     82{/if}
    7783
    7884
    7985<div id="subContent">
    80   <div class="titrePage" id="titreContent1">
     86  <div class="titrePage{if !(isset($chronology_views) or isset($chronology.TITLE))}Empty{/if}" id="titreContent1">
    8187    {if isset($chronology_views) }
    8288    <div class="calendarViews">{'calendar_view'|@translate}:
     
    140146          {$CONTENT_DESCRIPTION_TOP}
    141147          {/if}
    142         </div> 
     148        </div>
    143149
    144150        {if !empty($CATEGORIES) }<div id="categories">{$CATEGORIES}</div>{/if}
     
    149155          {$CONTENT_DESCRIPTION_BOTTOM}
    150156          {/if}
    151         </div> 
     157        </div>
    152158
    153159      </div>
  • extensions/gally/mail/text/html/cat_group_info.tpl

    r4446 r4489  
    1 {* $Id: cat_group_info.tpl 2628 2008-09-30 21:14:16Z rub $ *}
    21<div id="cat_group_info">
    32<h2>{'Informations'|@translate}</h2>
  • extensions/gally/mail/text/html/footer.tpl

    r4446 r4489  
    1 {* $Id: footer.tpl 2342 2008-05-15 18:43:33Z rub $ *}
    21</div> <!-- content -->
    32<div id="copyright">
  • extensions/gally/mail/text/html/global-mail-css.tpl

    r4446 r4489  
    1 {* $Id: global-mail-css.tpl 2285 2008-03-18 23:43:38Z rvelices $ *}
    21/* Global mail css */
    32
  • extensions/gally/mail/text/html/header.tpl

    r4446 r4489  
    1 {* $Id: header.tpl 2651 2008-10-04 09:50:02Z rub $ *}
    21-----={$BOUNDARY_KEY}
    32Content-Type: {$CONTENT_TYPE}; charset="{$CONTENT_ENCODING}";
     
    1716<body>
    1817<div id="the_page">
     18<div id="header"></div>
    1919<div id="content" class="content">
  • extensions/gally/mail/text/html/notification_by_mail.tpl

    r4446 r4489  
    1 {* $Id: notification_by_mail.tpl 2628 2008-09-30 21:14:16Z rub $ *}
    21<div id="nbm_message">
    32<h2>{'Notification'|@translate}</h2>
  • extensions/gally/mail/text/plain/cat_group_info.tpl

    r4446 r4489  
    1 {* $Id: cat_group_info.tpl 2628 2008-09-30 21:14:16Z rub $ *}
    21{'Hello,'|@translate}
    32
  • extensions/gally/mail/text/plain/footer.tpl

    r4446 r4489  
    1 {* $Id: footer.tpl 2342 2008-05-15 18:43:33Z rub $ *}
    2 
    31------------------------
    42Piwigo {$VERSION}
  • extensions/gally/mail/text/plain/header.tpl

    r4446 r4489  
    1 {* $Id: header.tpl 2740 2008-10-15 00:28:20Z rvelices $ *}
    21-----={$BOUNDARY_KEY}
    32Content-Type: {$CONTENT_TYPE}; charset="{$CONTENT_ENCODING}";
  • extensions/gally/mail/text/plain/notification_by_mail.tpl

    r4446 r4489  
    1 {* $Id: notification_by_mail.tpl 2628 2008-09-30 21:14:16Z rub $ *}
    21{'nbm_content_hello_1'|@translate}{$USERNAME}{'nbm_content_hello_2'|@translate}
    32
  • extensions/gally/mainpage_categories.tpl

    r4446 r4489  
    11<!-- **GBL** >MAINPAGE_CATEGORIES> -->
    2 {* $Id: mainpage_categories.tpl 2231 2008-03-01 13:12:07Z rvelices $ *}
    32
    43<ul class="thumbnailCategories">
    5   {foreach from=$category_thumbnails item=cat}
    6   <li>
     4  {foreach from=$category_thumbnails item=cat name=catloop}
     5  <li class="odd{if ($smarty.foreach.catloop.iteration-1) % 2 == 0}0{else}1{/if}">
    76    <div class="thumbnailCategory">
    87      <div class="illustration">
    98        <a href="{$cat.URL}">
    10           <img src="{$cat.TN_SRC}" alt="{$cat.TN_ALT}" title="{$cat.NAME|replace:'"':' '} - {'hint_category'|@translate}">
     9          <img src="{$cat.TN_SRC}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '} - {'hint_category'|@translate}">
    1110        </a>
    1211      </div>
  • extensions/gally/menubar.tpl

    r4446 r4489  
    11{if !empty($blocks) }
    22<div id="menubar">
    3         {foreach from=$blocks key=id item=block}
    4         {if ( not empty($block->template) or not empty($block->raw_content) )}
    5         <dl id="{$id}">
    6                 {if not empty($block->template)}
    7                 {include file=$block->template|@get_extent:$id }
    8                 {else}
    9                 {$block->raw_content}
    10                 {/if}
    11         </dl>
    12         {/if}
    13         {/foreach}
     3  {foreach from=$blocks key=id item=block}
     4  <dl id="{$id}">
     5    {if not empty($block->template)}
     6    {include file=$block->template|@get_extent:$id }
     7    {else}
     8    {$block->raw_content}
     9    {/if}
     10  </dl>
     11  {/foreach}
    1412</div>
    1513{/if}
  • extensions/gally/menubar_categories.tpl

    r4446 r4489  
    11<dt>
    22  {if isset($U_START_FILTER)}
    3   <a id="icon_start_filter" class="button" href="{$U_START_FILTER}" title="{'start_filter_hint'|@translate}" rel="nofollow"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/start_filter.png" class="button" alt="start filter">--></a>
     3  <a id="icon_start_filter" class="button" href="{$U_START_FILTER}" title="{'start_filter_hint'|@translate}" rel="nofollow"></a>
    44  {/if}
    55  {if isset($U_STOP_FILTER)}
    6   <a id="icon_stop_filter" class="button" href="{$U_STOP_FILTER}" title="{'stop_filter_hint'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_filter.png" class="button" alt="stop filter">--></a>
     6  <a id="icon_stop_filter" class="button" href="{$U_STOP_FILTER}" title="{'stop_filter_hint'|@translate}"></a>
    77  {/if}
    8         <a href="{$block->data.U_CATEGORIES}">{'Categories'|@translate}</a>
     8  <a href="{$block->data.U_CATEGORIES}">{'Categories'|@translate}</a>
    99</dt>
    1010<dd>
    11         {$block->data.MENU_CATEGORIES_CONTENT}
    12         {if isset($block->data.U_UPLOAD)}
    13         <ul>
    14                 <li>
    15                         <a href="{$block->data.U_UPLOAD}">{'upload_picture'|@translate}</a>
    16                 </li>
    17         </ul>
    18         {/if}
    19         <p class="totalImages">{$pwg->l10n_dec('%d element', '%d elements', $block->data.NB_PICTURE)}</p>
     11  {$block->data.MENU_CATEGORIES_CONTENT}
     12  {if isset($block->data.U_UPLOAD)}
     13  <ul>
     14    <li>
     15      <a href="{$block->data.U_UPLOAD}">{'upload_picture'|@translate}</a>
     16    </li>
     17  </ul>
     18  {/if}
     19  <p class="totalImages">{$pwg->l10n_dec('%d element', '%d elements', $block->data.NB_PICTURE)}</p>
    2020</dd>
  • extensions/gally/menubar_links.tpl

    r4446 r4489  
    11<dt>{'Links'|@translate}</dt>
    22<dd>
    3         <ul>
    4                 {foreach from=$block->data item=link}
    5                         <li>
    6                                 <a href="{$link.URL}"
    7                                         {if isset($link.new_window) }onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}
    8                                 >
    9                                 {$link.LABEL}
    10                                 </a>
    11                         </li>
    12                 {/foreach}
    13         </ul>
     3  <ul>
     4    {foreach from=$block->data item=link}
     5      <li>
     6        <a href="{$link.URL}" class="external"
     7          {if isset($link.new_window) }onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}
     8        >
     9        {$link.LABEL}
     10        </a>
     11      </li>
     12    {/foreach}
     13  </ul>
    1414</dd>
    1515
  • extensions/gally/picture.css

    r4446 r4489  
    310310}
    311311
     312/*
     313 * vd language switch plugin compatibility inside theme.css file
     314 * PWG Stuff plugin compatibility
     315*/
     316
     317/*
     318 * Comment editor compatibility
     319*/
     320div#ce-content.content, div#ce-message-block.content {
     321  margin:50px auto auto;
     322  width:75%;
     323  overflow:hidden;
     324}
     325
     326div#ce-content table {
     327  margin:auto;
     328}
     329
     330div#ce-content h2, div#ce-message-block h2 {
     331  margin-top:0px;
     332}
     333
     334div#ce-comments {
     335  padding:8px;
     336}
     337
  • extensions/gally/picture.tpl

    r4446 r4489  
    33{include file='dialogs.tpl'}
    44
    5 
    6 <div id="imageHeaderBar">
    7   <div class="browsePath">
    8     <h2>
    9     [ <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
    10     {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
    11     {$LEVEL_SEPARATOR}{$current.TITLE} ]
    12     </h2>
     5<div id="content">
     6
     7  <div id="imageHeaderBar">
     8    <div class="browsePath">
     9      <h2>
     10      [ <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
     11      {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
     12      {$LEVEL_SEPARATOR}{$current.TITLE} ]
     13      </h2>
     14    </div>
     15    <div class="imageNumber">{$PHOTO}</div>
     16    <h2>&nbsp;</h2>
     17  </div> <!-- imageHeaderBar -->
     18
     19  {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
     20  <div id="imageToolBar">
     21    <div id="imageToolBarContainer" class="uiImg">
     22        <div class="imageToolBarBg">&nbsp;</div>
     23
     24        <div class="randomButtons">
     25          {if isset($U_SLIDESHOW_START) }
     26            <a id="icon_start_slideshow" class="button" href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}">--></a>
     27          {/if}
     28          {if isset($U_SLIDESHOW_STOP) }
     29            <a id="icon_stop_slideshow" class="button" href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}">--></a>
     30          {/if}
     31            <a id="icon_metadata" class="button" href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata" />--></a>
     32          {if isset($current.U_DOWNLOAD) }
     33            <a id="icon_save" class="button" href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}">--></a>
     34          {/if}
     35          {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
     36          {if isset($favorite) }
     37            <a id="icon_{$favorite.FAVORITE_IMG|@regex_replace:'/(.*\/)*(del_)*(favorite)+(\.png)*/i':'$2$3'}" class="button" href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><!-- <img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"> --></a>
     38          {/if}
     39          {if !empty($U_SET_AS_REPRESENTATIVE) }
     40            <a id="icon_representative" class="button" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"> --></a>
     41          {/if}
     42          {if isset($U_ADMIN) }
     43            <a id="icon_preferences" class="button" href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"> --></a>
     44          {/if}
     45          {if isset($U_CADDIE) }{*caddie management BEGIN*}
     46          <script type="text/javascript">
     47          {literal}
     48          function addToCadie(aElement, rootUrl, id)
     49          {
     50            if (aElement.disabled) return;
     51            aElement.disabled=true;
     52            var y = new PwgWS(rootUrl);
     53
     54            y.callService(
     55              "pwg.caddie.add", {image_id: id} ,
     56              {
     57                onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
     58                onSuccess: function(result) { aElement.disabled = false; }
     59              }
     60            );
     61          }{/literal}
     62          </script>
     63          <a id="icon_caddie" class="button" href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"> --></a>
     64          {/if} {*caddie management END*}
     65        </div>
     66        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
     67
     68        {if $SHOW_PICTURE_NAME_ON_TITLE }
     69        <div><h2>{$current.TITLE}</h2></div>
     70        {/if}
     71
     72    </div>
     73  </div> <!-- imageToolBar -->
     74
     75  {if isset($previous) }
     76  <div id="navThumbPrev">
     77    <table id="navThumbPrevContainer" class="uiImg"><tr><td>
     78      <div class="navThumbPrevBg">&nbsp;</div>
     79      <div class="navThumbPrevContent">
     80        <a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
     81          <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
     82        </a>
     83      </div>
     84    </td></tr></table>
     85  </div> <!-- navThumbPrev -->
     86  {/if}
     87
     88  {if isset($next) }
     89  <div id="navThumbNext">
     90    <table id="navThumbNextContainer" class="uiImg"><tr><td>
     91      <div class="navThumbNextBg">&nbsp;</div>
     92      <div class="navThumbNextContent">
     93        <a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
     94          <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
     95        </a>
     96      </div>
     97    </td></tr></table>
     98  </div> <!-- navThumbNext -->
     99  {/if}
     100
     101
     102    <div id="theImage">
     103        {$ELEMENT_CONTENT}
     104
     105        {if isset($COMMENT_IMG)}
     106        <p>{$COMMENT_IMG}</p>
     107        {else}
     108        <p>&nbsp;</p>
     109        {/if}
     110
     111        {if isset($U_SLIDESHOW_STOP) }
     112        <p>
     113          [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
     114        </p>
     115        {/if}
     116    </div> <!-- theImage -->
     117
     118
     119  <div id="theTabsContainer">
     120  <div id="theTabs" class="uiImg">
     121    <ul id="theTabsheets">
     122      <li class="tab" id="tabImageInfos"><a href="#imageInfos">{"Informations"|@translate}</a></li>
     123      {if isset($metadata)}
     124        {foreach from=$metadata item=meta key=id}
     125          <li class="tab" id="tabImageMeta"><a href="#imageMeta{$id}">{$meta.TITLE|@translate}</a></li>
     126        {/foreach}
     127      {/if}
     128      {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
     129        <li class="tab" id="tabTheComment">
     130          <a href="#theComments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</a>
     131          <!-- <span class="comment_icon"><img src="{$ROOT_URL}{$themeconf.icon_dir}/comments.png" alt=""/></span> -->
     132        </li>
     133      {/if}
     134    </ul>
     135    <div id="theTabsBg"></div>
     136
     137    <div id="imageInfos" class="tabPanel">
     138      <div id="imageInfosContainer">
     139      <div class="imageInfosBg">&nbsp;</div>
     140
     141    <table class="infoTable" summary="Some info about this picture">
     142      <tr  class="emptyrow" style="line-height:0px;">
     143        <td colspan="2" width="49.75%">&nbsp;</td>
     144        <td>&nbsp;</td>
     145        <td colspan="2" width="49.75%">&nbsp;</td>
     146      </tr>
     147
     148      <tr>
     149        <td class="label">{'Author'|@translate}</td>
     150        <td class="value" style="min-width:214px;">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
     151        <td>&nbsp;</td>
     152        <td class="label">{'Dimensions'|@translate}</td>
     153        <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS|@replace:"*":"x"}{else}{'N/A'|@translate}{/if}</td>
     154      </tr>
     155      <tr>
     156        <td class="label">{'Created on'|@translate}</td>
     157        <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
     158        <td>&nbsp;</td>
     159        <td class="label">{'File'|@translate}</td>
     160        <td class="value">{$INFO_FILE}</td>
     161      </tr>
     162      <tr>
     163        <td class="label">{'Posted on'|@translate}</td>
     164        <td class="value">{$INFO_POSTED_DATE}</td>
     165        <td>&nbsp;</td>
     166        <td class="label">{'Filesize'|@translate}</td>
     167        <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
     168      </tr>
     169      {if isset($related_tags)}
     170        <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
     171        <tr id="infoTags">
     172          <td class="label">{'Tags'|@translate}</td>
     173          <td colspan="4" class="value">
     174              {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
     175              <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
     176          </td>
     177        </tr>
     178      {/if}
     179      {if isset($related_categories)}
     180        <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
     181        <tr id="infoCats">
     182          <td class="label">{'Categories'|@translate}</td>
     183          <td colspan="4" class="value">
     184            {foreach from=$related_categories item=cat name=tag_loop}{if !$smarty.foreach.tag_loop.first},&nbsp;{/if}
     185            {$cat}
     186            {/foreach}
     187          </td>
     188        </tr>
     189      {/if}
     190      <tr class="emptyrow"><td colspan="5">&nbsp;</td><tr>
     191      <tr>
     192        <td class="label">{'Visits'|@translate}</td>
     193        <td colspan="4" class="value">{$INFO_VISITS}</td>
     194      </tr>
     195
     196    {if isset($rate_summary) or isset($rating)}
     197      <tr>
     198        {if isset($rate_summary)}
     199          <td class="label">{'Average rate'|@translate}</td>
     200          <td class="value" id="ratingSummary">
     201          {if $rate_summary.count}
     202            {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
     203            {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
     204          {else}
     205            {'no_rate'|@translate}
     206          {/if}
     207          </td>
     208        {else}
     209          <td colspan="2">&nbsp;</td>
     210        {/if}
     211        <td>&nbsp;</td>
     212        {if isset($rating)}
     213          <td class="label">
     214            <span id="updateRate">{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}</span>
     215          </td>
     216          <td class="value">
     217            <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
     218            <div>&nbsp;
     219            {foreach from=$rating.marks item=mark name=rate_loop}
     220            {if !$smarty.foreach.rate_loop.first} | {/if}
     221            {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
     222              <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
     223            {else}
     224              <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
     225            {/if}
     226            {/foreach}
     227            <script type="text/javascript" src="{$ROOT_URL}template/{$themeconf.template}/rating.js"></script>
     228            <script type="text/javascript">
     229            makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
     230            updateRateText: "{'update_rate'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
     231            ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
     232            </script>
     233            </div>
     234            </form>
     235          </td>
     236        {else}
     237          <td colspan="2">&nbsp;</td>
     238        {/if}
     239      </tr>
     240    {/if}
     241
     242    {if isset($available_permission_levels) }
     243      <tr>
     244        <td class="label">{'Privacy level'|@translate}:</td>
     245        <td colspan="4" class="value">
     246    <script type="text/javascript">
     247    {literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
     248    {
     249    selectElement.disabled = true;
     250    var y = new PwgWS(rootUrl);
     251    y.callService(
     252      "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
     253      {
     254        onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
     255        onSuccess: function(result) { selectElement.disabled = false; }
     256      }
     257      );
     258    }{/literal}
     259    </script>
     260      <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
     261      {foreach from=$available_permission_levels item=level}
     262        <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
     263      {/foreach}
     264      </select>
     265      </td></tr>
     266    {/if}
     267
     268    </table>
     269
     270      </div>
     271    </div> <!-- imageInfos -->
     272
     273
     274
     275
     276    {if isset($metadata)}
     277    {foreach from=$metadata item=meta key=id}
     278    <div id="imageMeta{$id}" class="imageMeta tabPanel">
     279      <div id="imageMetaContainer{$id}">
     280        <div class="imageMetaBg">&nbsp;</div>
     281        <table id="displaymeta{$id}" class="displaymeta infoTable">
     282          {foreach from=$meta.lines item=value key=label name=metaloop}
     283          {if ($smarty.foreach.metaloop.iteration-1) % #metaNumCols# == 0}
     284            {if !$smarty.foreach.metaloop.first}</tr>{/if}
     285            {if !$smarty.foreach.metaloop.last}<tr>{/if}
     286          {/if}
     287            <td class="label">{$label|@translate}</td>
     288            <td class="value">{$value|@replace:',':', '}</td>
     289        {/foreach}
     290        </table>
     291      </div>
     292    </div> <!-- imageMeta -->
     293    {/foreach}
     294    {/if}
     295
     296
     297    {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
     298    <div id="theComments" class="tabPanel">
     299      <div id='theCommentBG'>&nbsp;</div>
     300
     301      {if !empty($COMMENT_NAV_BAR)}
     302      <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
     303      {/if}
     304
     305
     306      {if isset($comment_add) or isset($comments)}
     307      <table id="theCommentContainer">
     308        <tr style="vertical-align:top;">
     309          {if isset($comment_add)}
     310          {if isset($comments)}
     311          <td width="50%">
     312          {else}
     313          <td>
     314          {/if}
     315            <h4>{'comments_add'|@translate}</h4>
     316            <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
     317              <table>
     318                {if $comment_add.SHOW_AUTHOR}
     319                <tr>
     320                  <td>{'upload_author'|@translate}</td>
     321                  <td><input type="text" name="author"></td>
     322                </tr>
     323                {/if}
     324                <tr>
     325                  <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}><textarea name="content" id="contentid" rows="7" cols="80">{$comment_add.CONTENT}</textarea></td>
     326                </tr>
     327                <tr>
     328                  <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}>
     329                    <input type="hidden" name="key" value="{$comment_add.KEY}" />
     330                    <input class="submit" type="submit" value="{'Submit'|@translate}"/>
     331                  </td>
     332                </tr>
     333              </table>
     334            </form>
     335          </td>
     336          {/if}
     337
     338          {if isset($comments)}
     339          {if isset($comment_add)}
     340          <td width="50%">
     341          {else}
     342          <td>
     343          {/if}
     344            <div id="theCommentList">
     345              {include file='comment_list.tpl' comment_separator=true}
     346            </div>
     347          </td>
     348          {/if}
     349
     350        </tr>
     351      </table>
     352      {/if}
     353    </div>
     354    {/if} {*comments*}
     355
     356  </div><!-- theTabs -->
    13357  </div>
    14   <div class="imageNumber">{$PHOTO}</div>
    15   <h2>&nbsp;</h2>
    16 </div> <!-- imageHeaderBar -->
    17 
    18 {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
    19 <div id="imageToolBar">
    20   <div id="imageToolBarContainer" class="uiImg">
    21       <div class="imageToolBarBg">&nbsp;</div>
    22 
    23       <div class="randomButtons">
    24         {if isset($U_SLIDESHOW_START) }
    25           <a id="icon_start_slideshow" class="button" href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}">--></a>
    26         {/if}
    27         {if isset($U_SLIDESHOW_STOP) }
    28           <a id="icon_stop_slideshow" class="button" href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}">--></a>
    29         {/if}
    30           <a id="icon_metadata" class="button" href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata" />--></a>
    31         {if isset($current.U_DOWNLOAD) }
    32           <a id="icon_save" class="button" href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}">--></a>
    33         {/if}
    34         {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
    35         {if isset($favorite) }
    36           <a id="icon_{$favorite.FAVORITE_IMG|regex_replace:'/(.*\/)*(del_)*(favorite)+(\.png)*/i':'$2$3'}" class="button" href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><!-- <img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"> --></a>
    37         {/if}
    38         {if !empty($U_SET_AS_REPRESENTATIVE) }
    39           <a id="icon_representative" class="button" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"> --></a>
    40         {/if}
    41         {if isset($U_ADMIN) }
    42           <a id="icon_preferences" class="button" href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"> --></a>
    43         {/if}
    44         {if isset($U_CADDIE) }{*caddie management BEGIN*}
    45         <script type="text/javascript">
    46         {literal}
    47         function addToCadie(aElement, rootUrl, id)
    48         {
    49           if (aElement.disabled) return;
    50           aElement.disabled=true;
    51           var y = new PwgWS(rootUrl);
    52 
    53           y.callService(
    54             "pwg.caddie.add", {image_id: id} ,
    55             {
    56               onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
    57               onSuccess: function(result) { aElement.disabled = false; }
    58             }
    59           );
    60         }{/literal}
    61         </script>
    62         <a id="icon_caddie" class="button" href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"> --></a>
    63         {/if} {*caddie management END*}
    64       </div>
    65       {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
    66 
    67       {if $SHOW_PICTURE_NAME_ON_TITLE }
    68       <div><h2>{$current.TITLE}</h2></div>
    69       {/if}
    70 
    71   </div>
    72 </div> <!-- imageToolBar -->
    73 
    74 {if isset($previous) }
    75 <div id="navThumbPrev">
    76   <table id="navThumbPrevContainer" class="uiImg"><tr><td>
    77     <div class="navThumbPrevBg">&nbsp;</div>
    78     <div class="navThumbPrevContent">
    79       <a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
    80         <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
    81       </a>
    82     </div>
    83   </td></tr></table>
    84 </div> <!-- navThumbPrev -->
    85 {/if}
    86 
    87 {if isset($next) }
    88 <div id="navThumbNext">
    89   <table id="navThumbNextContainer" class="uiImg"><tr><td>
    90     <div class="navThumbNextBg">&nbsp;</div>
    91     <div class="navThumbNextContent">
    92       <a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
    93         <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
    94       </a>
    95     </div>
    96   </td></tr></table>
    97 </div> <!-- navThumbNext -->
    98 {/if}
    99 
    100 
    101   <div id="theImage">
    102       {$ELEMENT_CONTENT}
    103 
    104       {if isset($COMMENT_IMG)}
    105       <p>{$COMMENT_IMG}</p>
    106       {else}
    107       <p>&nbsp;</p>
    108       {/if}
    109 
    110       {if isset($U_SLIDESHOW_STOP) }
    111       <p>
    112         [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
    113       </p>
    114       {/if}
    115   </div> <!-- theImage -->
    116 
    117 
    118 <div id="theTabsContainer">
    119 <div id="theTabs" class="uiImg">
    120   <ul id="theTabsheets">
    121     <li class="tab" id="tabImageInfos"><a href="#imageInfos">imageInfos</a></li>
    122     {if isset($metadata)}
    123       {foreach from=$metadata item=meta key=id}
    124         <li class="tab" id="tabImageMeta"><a href="#imageMeta{$id}">{$meta.TITLE|@translate}</a></li>
    125       {/foreach}
    126     {/if}
    127     {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
    128       <li class="tab" id="tabTheComment">
    129         <a href="#theComments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</a>
    130         <!-- <span class="comment_icon"><img src="{$ROOT_URL}{$themeconf.icon_dir}/comments.png" alt=""/></span> -->
    131       </li>
    132     {/if}
    133   </ul>
    134   <div id="theTabsBg"></div>
    135 
    136   <div id="imageInfos" class="tabPanel">
    137     <div id="imageInfosContainer">
    138     <div class="imageInfosBg">&nbsp;</div>
    139 
    140   <table class="infoTable" summary="Some info about this picture">
    141     <tr  class="emptyrow" style="line-height:0px;">
    142       <td colspan="2" width="49.75%">&nbsp;</td>
    143       <td>&nbsp;</td>
    144       <td colspan="2" width="49.75%">&nbsp;</td>
    145     </tr>
    146 
    147     <tr>
    148       <td class="label">{'Author'|@translate}</td>
    149       <td class="value" style="min-width:214px;">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
    150       <td>&nbsp;</td>
    151       <td class="label">{'Dimensions'|@translate}</td>
    152       <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
    153     </tr>
    154     <tr>
    155       <td class="label">{'Created on'|@translate}</td>
    156       <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
    157       <td>&nbsp;</td>
    158       <td class="label">{'File'|@translate}</td>
    159       <td class="value">{$INFO_FILE}</td>
    160     </tr>
    161     <tr>
    162       <td class="label">{'Posted on'|@translate}</td>
    163       <td class="value">{$INFO_POSTED_DATE}</td>
    164       <td>&nbsp;</td>
    165       <td class="label">{'Filesize'|@translate}</td>
    166       <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
    167     </tr>
    168     {if isset($related_tags)}
    169       <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
    170       <tr id="infoTags">
    171         <td class="label">{'Tags'|@translate}</td>
    172         <td colspan="4" class="value">
    173             {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
    174             <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
    175         </td>
    176       </tr>
    177     {/if}
    178     {if isset($related_categories)}
    179       <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
    180       <tr id="infoCats">
    181         <td class="label">{'Categories'|@translate}</td>
    182         <td colspan="4" class="value">
    183           {foreach from=$related_categories item=cat name=tag_loop}{if !$smarty.foreach.tag_loop.first},&nbsp;{/if}
    184           {$cat}
    185           {/foreach}
    186         </td>
    187       </tr>
    188     {/if}
    189     <tr class="emptyrow"><td colspan="5">&nbsp;</td><tr>
    190     <tr>
    191       <td class="label">{'Visits'|@translate}</td>
    192       <td colspan="4" class="value">{$INFO_VISITS}</td>
    193     </tr>
    194 
    195   {if isset($rate_summary) or isset($rating)}
    196     <tr>
    197       {if isset($rate_summary)}
    198         <td class="label">{'Average rate'|@translate}</td>
    199         <td class="value" id="ratingSummary">
    200         {if $rate_summary.count}
    201           {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
    202           {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
    203         {else}
    204           {'no_rate'|@translate}
    205         {/if}
    206         </td>
    207       {else}
    208         <td colspan="2">&nbsp;</td>
    209       {/if}
    210       <td>&nbsp;</td>
    211       {if isset($rating)}
    212         <td class="label">
    213           <span id="updateRate">{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}</span>
    214         </td>
    215         <td class="value">
    216           <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
    217           <div>&nbsp;
    218           {foreach from=$rating.marks item=mark name=rate_loop}
    219           {if !$smarty.foreach.rate_loop.first} | {/if}
    220           {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
    221             <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
    222           {else}
    223             <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
    224           {/if}
    225           {/foreach}
    226           <script type="text/javascript" src="{$ROOT_URL}template/{$themeconf.template}/rating.js"></script>
    227           <script type="text/javascript">
    228           makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
    229           updateRateText: "{'update_rate'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
    230           ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
    231           </script>
    232           </div>
    233           </form>
    234         </td>
    235       {else}
    236         <td colspan="2">&nbsp;</td>
    237       {/if}
    238     </tr>
    239   {/if}
    240 
    241   {if isset($available_permission_levels) }
    242     <tr>
    243       <td class="label">{'Privacy level'|@translate}:</td>
    244       <td colspan="4" class="value">
    245   <script type="text/javascript">
    246   {literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
    247   {
    248   selectElement.disabled = true;
    249   var y = new PwgWS(rootUrl);
    250   y.callService(
    251     "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
    252     {
    253       onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
    254       onSuccess: function(result) { selectElement.disabled = false; }
    255     }
    256     );
    257   }{/literal}
    258   </script>
    259     <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
    260     {foreach from=$available_permission_levels item=level}
    261       <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
    262     {/foreach}
    263     </select>
    264     </td></tr>
    265   {/if}
    266 
    267   </table>
    268 
    269     </div>
    270   </div> <!-- imageInfos -->
    271 
    272 
    273 
    274 
    275   {if isset($metadata)}
    276   {foreach from=$metadata item=meta key=id}
    277   <div id="imageMeta{$id}" class="imageMeta tabPanel">
    278     <div id="imageMetaContainer{$id}">
    279       <div class="imageMetaBg">&nbsp;</div>
    280       <table id="displaymeta{$id}" class="displaymeta infoTable">
    281         {foreach from=$meta.lines item=value key=label name=metaloop}
    282         {if ($smarty.foreach.metaloop.iteration-1) % #metaNumCols# == 0}
    283           {if !$smarty.foreach.metaloop.first}</tr>{/if}
    284           {if !$smarty.foreach.metaloop.last}<tr>{/if}
    285         {/if}
    286           <td class="label">{$label|@translate}</td>
    287           <td class="value">{$value|replace:',':', '}</td>
    288       {/foreach}
    289       </table>
    290     </div>
    291   </div> <!-- imageMeta -->
    292   {/foreach}
    293   {/if}
    294 
    295 
    296   {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
    297   <div id="theComments" class="tabPanel">
    298     <div id='theCommentBG'>&nbsp;</div>
    299 
    300     {if !empty($COMMENT_NAV_BAR)}
    301     <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
    302     {/if}
    303 
    304 
    305     {if isset($comment_add) or isset($comments)}
    306     <table id="theCommentContainer">
    307       <tr style="vertical-align:top;">
    308         {if isset($comment_add)}
    309         {if isset($comments)}
    310         <td width="50%">
    311         {else}
    312         <td>
    313         {/if}
    314           <h4>{'comments_add'|@translate}</h4>
    315           <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
    316             <table>
    317               {if $comment_add.SHOW_AUTHOR}
    318               <tr>
    319                 <td>{'upload_author'|@translate}</td><td><input type="text" name="author"></td>
    320               </tr>
    321               {/if}
    322               <tr>
    323                 <td><textarea name="content" id="contentid" rows="7" cols="80">{$comment_add.CONTENT}</textarea></td>
    324               </tr>
    325               <tr>
    326                 <td>
    327                   <input type="hidden" name="key" value="{$comment_add.KEY}" />
    328                   <input class="submit" type="submit" value="{'Submit'|@translate}">
    329                 </td>
    330               </tr>
    331             </table>
    332           </form>
    333         </td>
    334         {/if}
    335 
    336         {if isset($comments)}
    337         {if isset($comment_add)}
    338         <td width="50%">
    339         {else}
    340         <td>
    341         {/if}
    342           <div id="theCommentList">
    343             {include file='comment_list.tpl' comment_separator=true}
    344           </div>
    345         </td>
    346         {/if}
    347 
    348       </tr>
    349     </table>
    350     {/if}
    351   </div>
    352   {/if} {*comments*}
    353 
    354 </div><!-- theTabs -->
     358
     359  {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
     360
    355361</div>
    356362
    357 {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
    358363<!-- **GBL** <PICTURE< -->
     364
  • extensions/gally/picture_content.tpl

    r4446 r4489  
    11<!-- **GBL** >PICTURE_CONTENT> -->
    2 {* $Id: picture_content.tpl 2225 2008-02-28 12:07:00Z rvelices $ *}
    32{if isset($high) }
    43<a href="javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')">
     
    76    <img id="theImg" src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"
    87      {if isset($COMMENT_IMG)}
    9         title="{$COMMENT_IMG|strip_tags:false|replace:'"':' '}" {else} title="{$current.TITLE|replace:'"':' '} - {$ALT_IMG}"
     8        title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
    109      {/if}>
    1110  </div>
  • extensions/gally/picture_nav_buttons.tpl

    r4446 r4489  
    1 {* $Id: picture_nav_buttons.tpl 2700 2008-10-10 13:11:31Z rvelices $ *}
    21  <div class="navButtons">
    3  
     2
    43{if isset($last)}
    54  <a id="icon_last" class="navButton" href="{$last.U_IMG}" title="{'last_page'|@translate} : {$last.TITLE}" rel="last"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/last.png" class="button" alt="{'last_page'|@translate}">--></a>
     
    76  <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
    87{/if}
    9  
     8
    109{if isset($next)}
    1110  <a id="icon_right" class="navButton" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" class="button" alt="{'next_page'|@translate}">--></a>
     
    2524  <a id="icon_up" class="navButton" href="{$U_UP}" title="{'thumbnails'|@translate}" rel="up"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png" class="button" alt="{'thumbnails'|@translate}"> --></a>
    2625{/if}
    27  
     26
    2827{if isset($previous)}
    2928  <a id="icon_left" class="navButton" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" class="button" alt="{'previous_page'|@translate}">--></a>
     
    3130  <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
    3231{/if}
    33  
     32
    3433{if isset($first)}
    3534  <a id="icon_first" class="navButton" href="{$first.U_IMG}" title="{'first_page'|@translate} : {$first.TITLE}" rel="first"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/first.png" class="button" alt="{'first_page'|@translate}">--></a>
     
    6766function keyboardNavigation(e)
    6867{
    69         if(!e) e=window.event;
    70         if (e.altKey) return true;
    71         var target = e.target || e.srcElement;
    72         if (target && target.type) return true; //an input editable element
    73         var keyCode=e.keyCode || e.which;
    74         var docElem = document.documentElement;
    75         switch(keyCode) {
     68  if(!e) e=window.event;
     69  if (e.altKey) return true;
     70  var target = e.target || e.srcElement;
     71  if (target && target.type) return true; //an input editable element
     72  var keyCode=e.keyCode || e.which;
     73  var docElem = document.documentElement;
     74  switch(keyCode) {
    7675{/literal}
    7776{if isset($next)}
    78         case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
     77  case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
    7978{/if}
    8079{if isset($previous)}
    81         case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     80  case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    8281{/if}
    8382{if isset($first)}
    84         /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     83  /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    8584{/if}
    8685{if isset($last)}
    87         /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     86  /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    8887{/if}
    8988{if isset($U_UP) and !isset($slideshow)}
    90         /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     89  /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    9190{/if}
    9291
    9392{if isset($slideshow.U_START_PLAY)}
    94         /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     93  /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    9594{/if}
    9695{if isset($slideshow.U_STOP_PLAY)}
    97         /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     96  /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    9897{/if}
    99         }
    100         return true;
     98  }
     99  return true;
    101100}
    102101document.onkeydown=keyboardNavigation;
  • extensions/gally/popuphelp.tpl

    r4446 r4489  
    22<div id="content" class="content help">
    33{$HELP_CONTENT}
     4
     5  <ul class="categoryActions">
     6    <li>
     7      <a id="icon_exit" class="button" href="#" onclick="window.close();" title="{'Close this window'|@translate}"><!--
     8        <img src="{$ROOT_URL}{$themeconf.icon_dir}/exit.png" class="button" alt="exit">-->
     9      </a>
     10    </li>
     11  </ul>
     12
    413</div> <!-- content -->
    514
    6 <ul class="categoryActions">
    7   <li>
    8     <a id="icon_exit" class="button" href="#" onclick="window.close();" title="{'Close this window'|@translate}"><!--
    9       <img src="{$ROOT_URL}{$themeconf.icon_dir}/exit.png" class="button" alt="exit">-->
    10     </a>
    11   </li>
    12 </ul>
     15
    1316<!-- **GBL** <POPUPHELP< -->
  • extensions/gally/profile_content.tpl

    r4446 r4489  
    11<!-- **GBL** >PROFILE_CONTENT> -->
    2 
    3 
    4 {* $Id: profile_content.tpl 2268 2008-03-08 12:38:09Z rvelices $ *}
    52<form method="post" name="profile" action="{$F_ACTION}" id="profile" class="properties">
    63
     
    108105    <input class="submit" type="submit" name="validate" value="{'Submit'|@translate}">
    109106    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
     107    <input class="submit" type="submit" name="reset_to_default" value="{'Reset_To_Default'|@translate}">
     108
    110109  </p>
    111110
  • extensions/gally/rating.js

    r4446 r4489  
    33function makeNiceRatingForm(options)
    44{
    5         gRatingOptions = options || {};
    6         var form = document.getElementById('rateForm');
    7         if (!form) return; //? template changed
     5  gRatingOptions = options || {};
     6  var form = document.getElementById('rateForm');
     7  if (!form) return; //? template changed
    88
    9         gRatingButtons = form.getElementsByTagName('input');
    10         gUserRating = "";
    11         for (var i=0; i<gRatingButtons.length; i++)
    12         {
    13                 if ( gRatingButtons[i].type=="button" )
    14                 {
    15                         gUserRating = gRatingButtons[i].value;
    16                         break;
    17                 }
    18         }
     9  gRatingButtons = form.getElementsByTagName('input');
     10  gUserRating = "";
     11  for (var i=0; i<gRatingButtons.length; i++)
     12  {
     13    if ( gRatingButtons[i].type=="button" )
     14    {
     15      gUserRating = gRatingButtons[i].value;
     16      break;
     17    }
     18  }
    1919
    20         for (var i=0; i<gRatingButtons.length; i++)
    21         {
    22                 var rateButton = gRatingButtons[i];
    23                 rateButton.initialRateValue = rateButton.value; // save it as a property
    24                 try { rateButton.type = "button"; } catch (e){}// avoid normal submit (use ajax); not working in IE6
     20  for (var i=0; i<gRatingButtons.length; i++)
     21  {
     22    var rateButton = gRatingButtons[i];
     23    rateButton.initialRateValue = rateButton.value; // save it as a property
     24    try { rateButton.type = "button"; } catch (e){}// avoid normal submit (use ajax); not working in IE6
    2525
    26                 if (navigator.userAgent.indexOf('AppleWebKit/') == -1 ) rateButton.value = ""; //hide the text IE/Opera - breaks safari
    27                 with (rateButton.style)
    28                 {
    29                         textIndent = "-50px"; //hide the text FF
    30                         marginLeft = marginRight = 0;
    31                 }
     26    if (navigator.userAgent.indexOf('AppleWebKit/') == -1 && navigator.userAgent.indexOf('MSIE 8')==-1) rateButton.value = ""; //hide the text IE<8/Opera - breaks safari
     27    with (rateButton.style)
     28    {
     29      textIndent = "-50px"; //hide the text FF
     30      marginLeft = marginRight = 0;
     31    }
    3232
    33                 if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
    34                         rateButton.parentNode.removeChild(rateButton.nextSibling);
    35                 if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
    36                         rateButton.parentNode.removeChild(rateButton.previousSibling);
     33    if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
     34      rateButton.parentNode.removeChild(rateButton.nextSibling);
     35    if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
     36      rateButton.parentNode.removeChild(rateButton.previousSibling);
    3737
    38                 if(window.addEventListener){ // Mozilla, Netscape, Firefox
    39                         rateButton.addEventListener("click", updateRating, false );
    40                         rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
    41                         rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
    42                 }
    43                 else if(window.attachEvent) { // IE
    44                         rateButton.attachEvent("onclick", updateRating);
    45                         rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
    46                         rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
    47                 }
    48         }
    49         resetRatingStarDisplay();
     38    if(window.addEventListener){ // Mozilla, Netscape, Firefox
     39      rateButton.addEventListener("click", updateRating, false );
     40      rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
     41      rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
     42    }
     43    else if(window.attachEvent) { // IE
     44      rateButton.attachEvent("onclick", updateRating);
     45      rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
     46      rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
     47    }
     48  }
     49  resetRatingStarDisplay();
    5050}
    5151
    5252function resetRatingStarDisplay()
    5353{
    54         updateRatingStarDisplay( gUserRating );
     54  updateRatingStarDisplay( gUserRating );
    5555}
    5656
    5757function updateRatingStarDisplay(userRating)
    5858{
    59         for (var i=0; i<gRatingButtons.length; i++)
    60                 gRatingButtons[i].className = (userRating!=="" && userRating>=gRatingButtons[i].initialRateValue ) ? "rateButtonStarFull" : "rateButtonStarEmpty";
     59  for (var i=0; i<gRatingButtons.length; i++)
     60    gRatingButtons[i].className = (userRating!=="" && userRating>=gRatingButtons[i].initialRateValue ) ? "rateButtonStarFull" : "rateButtonStarEmpty";
    6161}
    6262
    6363function updateRatingStarDisplayEvt(e)
    6464{
    65         updateRatingStarDisplay(
    66                 e.target ? e.target.initialRateValue : e.srcElement.initialRateValue);
     65  updateRatingStarDisplay(
     66    e.target ? e.target.initialRateValue : e.srcElement.initialRateValue);
    6767}
    6868
    6969function updateRating(e)
    7070{
    71         var rateButton = e.target || e.srcElement;
    72         if (rateButton.initialRateValue == gUserRating)
    73                 return false; //nothing to do
     71  var rateButton = e.target || e.srcElement;
     72  if (rateButton.initialRateValue == gUserRating)
     73    return false; //nothing to do
    7474
    75         for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=true;
    76         var y = new PwgWS(gRatingOptions.rootUrl);
    77         y.callService(
    78                 "pwg.images.rate", {image_id: gRatingOptions.image_id, rate: rateButton.initialRateValue } ,
    79                 {
    80                         onFailure: function(num, text) {
    81                                 alert(num + " " + text);
    82                                 document.location = rateButton.form.action + "&rate="+rateButton.initialRateValue;
    83                         },
    84                         onSuccess: function(result) {
    85                                 gUserRating = rateButton.initialRateValue;
    86                                 for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=false;
    87                                 if (gRatingOptions.updateRateElement) gRatingOptions.updateRateElement.innerHTML = gRatingOptions.updateRateText;
    88                                 if (gRatingOptions.ratingSummaryElement)
    89                                 {
    90                                         var t = gRatingOptions.ratingSummaryText;
    91                                         var args =[result.average, result.count, result.stdev], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
    92                                         _xxx = t.match( rexp );
    93                                         while (idx<args.length) t=t.replace(rexp, args[idx++]);
    94                                         gRatingOptions.ratingSummaryElement.innerHTML = t;
    95                                 }
    96                         }
    97                 }
    98         );
    99         return false;
     75  for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=true;
     76  var y = new PwgWS(gRatingOptions.rootUrl);
     77  y.callService(
     78    "pwg.images.rate", {image_id: gRatingOptions.image_id, rate: rateButton.initialRateValue } ,
     79    {
     80      onFailure: function(num, text) {
     81        alert(num + " " + text);
     82        document.location = rateButton.form.action + "&rate="+rateButton.initialRateValue;
     83      },
     84      onSuccess: function(result) {
     85        gUserRating = rateButton.initialRateValue;
     86        for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=false;
     87        if (gRatingOptions.updateRateElement) gRatingOptions.updateRateElement.innerHTML = gRatingOptions.updateRateText;
     88        if (gRatingOptions.ratingSummaryElement)
     89        {
     90          var t = gRatingOptions.ratingSummaryText;
     91          var args =[result.average, result.count, result.stdev], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
     92          _xxx = t.match( rexp );
     93          while (idx<args.length) t=t.replace(rexp, args[idx++]);
     94          gRatingOptions.ratingSummaryElement.innerHTML = t;
     95        }
     96      }
     97    }
     98  );
     99  return false;
    100100}
  • extensions/gally/redirect.tpl

    r4446 r4489  
    11<!-- **GBL** >REDIRECT> -->
    2 
    3 
    4 {* $Id: redirect.tpl 2249 2008-03-05 01:50:08Z rvelices $ *}
    52<p>{$REDIRECT_MSG}</p>
    63<p><a href="{$page_refresh.U_REFRESH}">{'click_to_redirect'|@translate}</a></p>
    7 
    8 
    94<!-- **GBL** <REDIRECT< -->
  • extensions/gally/register.tpl

    r4446 r4489  
    2222      <form>
    2323        <input class="submit" type="button" value="{'ok'|@translate}" onclick="closeDiv('div_errors');">
    24       </form>     
     24      </form>
    2525    </div>
    2626  </div>
    2727{/if}
    2828
    29 <form method="post" action="{$F_ACTION}" class="properties" name="register_form">
     29<form method="post" action="{$F_ACTION}" class="properties" name="register_form" id="register">
    3030  <fieldset>
    3131    <legend>{'Enter your personnal informations'|@translate}</legend>
     
    6666  </p>
    6767
     68  <p class="mandatorynfo">
     69    <span class="mandatorystar">*</span> : {'mandatory'|@translate}
     70  </p>
     71
    6872</form>
    6973
    7074
    71 <div class="mandatorynfo">
    72   <span class="mandatorystar">*</span> : {'mandatory'|@translate}
    73 </div>
     75
    7476
    7577
  • extensions/gally/release_notes.txt

    r4446 r4489  
    1919  |         |            |   . add the imageCenterMode feature
    2020  |         |            | * giving more space between image and notes
    21   | 1.2.0   | 2009-12-06 | * js for picture page is partially rewrited
     21  | 1.2.0   | 2009-12-06 | * js for picture & category page are partially
     22  |         |            |   rewrited
    2223  |         |            | * interface on the picture page is updated and is now
    2324  |         |            |   easier to use
    2425  |         |            |   . using tabs to display picture information
     26  |         |            | * EXIF & IPTC markup can be translated by the
     27  |         |            |   template ($lang["markup_id"] need to be defined in
     28  |         |            |   a local language file)
    2529  |         |            | * use of jQuery.ui.dialog to display modal messages
    26   |         |            | * themes are adapted to the plugin vd language switch
    27   |         |            | * themes are adapted to the plugin PWG Stuff
    2830  |         |            | * main theme are finalized
    2931  |         |            |   . Grum-dark II
    3032  |         |            |   . Graphite
     33  |         |            | * add a new theme
     34  |         |            |   . Lapis-Lazuli
     35  |         |            | * mantis: feature 1096
     36  |         |            |   . Compatibility with the plugin CommentEditor
    3137  |         |            | * mantis: feature 1097
    3238  |         |            |   . The template don't manage the local-layout file
    33   |         |            | * mantis: feature 1099
    34   |         |            |   . Compatibilty with PWG_Stuff
    3539  |         |            | * mantis: feature 1098
    3640  |         |            |   . Metadata panel doesn't works very well => the UI
    3741  |         |            |     is handled differently, this problem is not here
    3842  |         |            |     anymore
    39   |         |            |
    40   |         |            |
     43  |         |            | * mantis: feature 1099
     44  |         |            |   . Compatibility with the plugin PWG_Stuff
     45  |         |            | * mantis: feature 1313
     46  |         |            |   . gally's theme "Grum-dark II" contain spaces in
     47  |         |            |     filename
     48  |         |            |     => renamed "Grum-dark-II" : it's ugly :-(
     49  |         |            | * Compatibility with the plugin VD language switch
     50  |         |            | * report some changes made on the "yoga" template
     51  |         |            |   . r3060, r3121, r3137, r3147, r3196, r3538
    4152  |         |            |
    4253  |         |            |
    4354  ------------------------------------------------------------------------------
    44   To do :
    45     include revision when piwigo next release will be published
    46       r3168, r3172, r3173, r3188,
     55
     56
    4757  ------------------------------------------------------------------------------
    4858  | files           | description
  • extensions/gally/search.tpl

    r4446 r4489  
    11<!-- **GBL** >SEARCH> -->
    2 {* $Id: search.tpl 2352 2008-05-20 00:27:26Z patdenice $ *}
    32<div id="content" class="content">
    43
  • extensions/gally/slideshow.tpl

    r4446 r4489  
    11<!-- **GBL** >SLIDESHOW> -->
    2 <div id="imageHeaderBar">
    3   <div class="browsePath">
    4     {if isset($U_SLIDESHOW_STOP) }
    5     [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
     2
     3<div id="content">
     4  <div id="imageHeaderBar">
     5    <div class="browsePath slideShow">
     6      {if isset($U_SLIDESHOW_STOP) }
     7      [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
     8      {/if}
     9      {if $SHOW_PICTURE_NAME_ON_TITLE }
     10        <span class="showtitle">{$current.TITLE}</span>
     11      {/if}
     12    </div>
     13    <div class="imageNumber">{$PHOTO}</div>
     14
     15  </div>
     16
     17  <div id="imageToolBar">
     18    <div id="imageToolBarContainer" class="uiImg">
     19        <div class="imageToolBarBg">&nbsp;</div>
     20        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
     21    </div>
     22  </div>
     23
     24  <div id="theImage">
     25    {$ELEMENT_CONTENT}
     26    {if isset($COMMENT_IMG)}
     27    <p class="showlegend">{$COMMENT_IMG}</p>
    628    {/if}
    729  </div>
    8   <div class="imageNumber">{$PHOTO}</div>
    9   {if $SHOW_PICTURE_NAME_ON_TITLE }
    10   <h2 class="showtitle">{$current.TITLE}</h2>
    11   {/if}
    1230</div>
    13 
    14 <div id="imageToolBar">
    15   {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
    16 </div>
    17 
    18 <div id="theImage">
    19   {$ELEMENT_CONTENT}
    20   {if isset($COMMENT_IMG)}
    21   <p class="showlegend">{$COMMENT_IMG}</p>
    22   {/if}
    23 </div>
    24 
    2531<!-- **GBL** <SLIDESHOW< -->
  • extensions/gally/tags.tpl

    r4446 r4489  
    1 {* $Id: tags.tpl 2409 2008-07-01 02:09:21Z rvelices $ *}
    21<div id="content" class="content">
    32
     
    2726
    2827  {if $display_mode == 'letters'}
    29   <table>
     28  <table class="tagLetters">
    3029    <tr>
    3130      <td valign="top">
     
    4241    </table>
    4342  </fieldset>
    44       {if $letter.CHANGE_COLUMN|@default:false}
     43      {if isset($letter.CHANGE_COLUMN) }
    4544      </td>
    4645      <td valign="top">
  • extensions/gally/theme/graphite/default.conf

    r4446 r4489  
    4545# The 'imageCenterTopMin' option can take any positive integer value
    4646# This option define the minimal position at top for the picture (in pixels)
     47#  works only if the image is displayed in absolute/fixed mode (ignored with the
     48#  relative/static modes)
    4749imageCenterTopMin = 30
    4850
     
    7779# -- 1.2.0 --
    7880# The 'interfaceOnImage' option can take theses values :
    79 #   "yes" => display interface when the mouse is over the picture
    80 #   "no"  => don't display interface when the mouse is over the picture
    81 interfaceOnImage="yes"
     81#   "always"   => display interface when the mouse is over the picture
     82#   "noscroll" => display interface when the mouse is over the picture only if
     83#                 the picture is not scrollable
     84#   "never"    => don't display interface when the mouse is over the picture
     85interfaceOnImage="noscroll"
    8286
    8387# -- 1.2.0 --
     
    118122
    119123# -- 1.2.0 --
     124# The 'tabsPosition' option can take theses values :
     125#   "top"     => display the tabs area at the bottom of the image toobar area
     126#                (top of the page)
     127#   "bottom"  => display the tabs area at the top of the copyright area
     128#                (bottom of the page)
     129tabsPosition="bottom"
     130
     131# -- 1.2.0 --
    120132# The 'displayBanner' option can take theses values :
    121133#   "yes" => display the banner on the picture page
     
    137149
    138150# The 'menuAnimated' option can take theses values :
    139 #   "none" => no effect to switch the menu (on/off)
    140 #   "fade" => use fading to switch the menu (fade in/fade out)
    141 #   "slide" => use fading to switch the menu (fade in/fade out)
     151#   "none"     => no effect to switch the menu (on/off)
     152#   "fade"     => use fading to switch the menu (fade in/fade out)
     153#   "slide"    => use fading to switch the menu (fade in/fade out)
     154#   "noswitch" => [1.2.0] menu is not displayed by a click (always displayed,
     155#                 eventually managed by CSS)
     156#
     157#   Due to bug(?) under MSIE browser this option automaticaly forced to "none"
     158#   if it different of "noswitch" works well with FF2, FF3, Opera, Safari
    142159menuAnimated="none"
    143160
     
    157174#
    158175# please note that under MSIE, the 'menuWidth = "auto"' option don't work as well
    159 # as other browser and in this case, with the 'menuMSIEMaxWidth' option you can
    160 # force a mamximum width only for this browser
     176# as other browsers and in this case, with the 'menuMSIEMaxWidth' option you can
     177# force a maximum width only for this browser
     178# This option is not used when the 'menuAnimated' option is set to "noswitch"
    161179menuMaxWidth = 0
    162180menuMSIEMaxWidth = 350
  • extensions/gally/theme/graphite/theme.css

    r4446 r4489  
    830830
    831831
     832#theTabsContainer .navigationBar {
     833  text-align:right;
     834}
    832835
    833836
     
    905908}
    906909
     910/*
     911 * Comment editor compatibility
     912*/
     913div#ce-content.content, div#ce-message-block.content {
     914  background-color:#333333;
     915  border:2px solid #606060;
     916}
     917
  • extensions/gally/thumbnails.tpl

    r4446 r4489  
    11<!-- **GBL** >THUMBNAILS> -->
    2 
    3 
    4 {* $Id: thumbnails.tpl 2274 2008-03-11 02:04:27Z rvelices $ *}
    5 
    62{if !empty($thumbnails)}
    73<ul class="thumbnails">
Note: See TracChangeset for help on using the changeset viewer.