Ignore:
Timestamp:
Mar 14, 2012, 2:34:13 PM (12 years ago)
Author:
plg
Message:

import theme Simple version 2.3

  • if cl_conflit is used, don't add jQuery.noConflict
  • fix the possibility to toggle visibility of image informations
  • show logout link when connected - thanks to gbo
  • update jquery to 1.4.4
  • backport commit from piwigo: r6244, r6430 & r6438
  • add gitignore
  • update javascripts + add script to combine/minify
  • apply r6594 from piwigo's trunk
  • move jquery in the header, using known_script
  • translation for the menu title
  • add 1px icon start_filter.png to avoid loading error with rvtree plugin
  • margin for error & info divs
Location:
extensions/simple_themes/simple
Files:
12 added
1 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • extensions/simple_themes/simple/README.md

    r13548 r13549  
    1010-------
    1111
    12 Copyright(C) 2009, 2010 Saïmon <contact@saimon.org>
     12Copyright(C) 2009-2011 Simon C. <contact at saimon dot org>
    1313
    1414The "Simple grey"  theme for Piwigo is free software:  you can redistribute it
     
    4040  extract it in ``your-gallery/template/``.
    4141
     42Notes for developpers
     43---------------------
     44
     45* `js/compress.sh` is a script which allows to compress and minify the
     46  different javascript files, using `yuicompressor`.
     47
    4248Changelog
    4349---------
    4450
    45 ### version 2.2
     51### version 2.3 (07/01/2011)
     52
     53* if cl_conflit is used, don't add jQuery.noConflict
     54* fix the possibility to toggle visibility of image informations
     55* show logout link when connected - thanks to gbo
     56* update jquery to 1.4.4
     57* backport commit from piwigo: r6244, r6430 & r6438
     58* add gitignore
     59* update javascripts + add script to combine/minify
     60* apply r6594 from piwigo's trunk
     61* move jquery in the header, using known_script
     62* translation for the menu title
     63* add 1px icon start_filter.png to avoid loading error with rvtree plugin
     64* margin for error & info divs
     65
     66### version 2.2 (23/09/2010)
    4667
    4768* fix the calendar's pages
     
    5273* remove standard deviation for votes
    5374
    54 ### version 2.1
     75### version 2.1 (16/06/2010)
    5576
    5677- bugfix for user's profile - use default `profile_content.tpl`
     
    6283- add login link in the footer
    6384
    64 ### version 2.0
     85### version 2.0 (31/05/2010)
    6586
    6687- adapt the theme for Piwigo 2.1
     
    6889- tweak for plugins adding icons in .titrePage (piwishak, addthis, ...)
    6990
    70 TODO
    71 ----
    7291
    73 * use known_script : does not work in the footer ... {known_script id="jquery"
    74   src=$ROOT_URL|@cat:"themes/simple/js/jquery-1.4.2.min.js"}
     92## TODO
     93
     94- put rss link in header.tpl (when ready)
  • extensions/simple_themes/simple/content.css

    r13548 r13549  
    3434#the_page {
    3535  width: 85%;
    36   min-width: 900px;
     36  min-width: 960px;
    3737  margin: 0 auto;
    3838  padding: 0;
     
    123123  color: #e04040;
    124124  border: 1px dashed;
    125   margin: 0 1em;
     125  margin: 1em;
    126126}
    127127
     
    292292  float: right;
    293293  clear: right;
    294   width: 20%;
    295   margin: 0 1em 0;
     294  width: 180px;
     295  margin: 0 10px;
    296296}
    297297
     
    311311#theImage {
    312312  text-align: center;
    313   padding: 1em 0;
     313  padding: 1em 0 2em;
    314314  margin: auto;
    315315}
     
    398398}
    399399
     400#theCommentsPage form label {
     401  display: inline-block;
     402  line-height: 25px;
     403}
     404
    400405/* calendar */
    401406
  • extensions/simple_themes/simple/js/rating.js

    r13546 r13549  
    3636                        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                 }
     38                pwgAddEventListener(rateButton, "click", updateRating);
     39                pwgAddEventListener(rateButton, "mouseout", resetRatingStarDisplay);
     40                pwgAddEventListener(rateButton, "mouseover", updateRatingStarDisplayEvt);
    4841        }
    4942        resetRatingStarDisplay();
     
    8982                                {
    9083                                        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 );
     84                                        var args =[result.average, result.count], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
     85                                        //_xxx = t.match( rexp );
    9386                                        while (idx<args.length) t=t.replace(rexp, args[idx++]);
    9487                                        gRatingOptions.ratingSummaryElement.innerHTML = t;
  • extensions/simple_themes/simple/js/scripts.js

    r13546 r13549  
    1 jQuery.noConflict();
     1// if cl_conflit is not used, use jQuery.noConflict to work with other libs
     2if (typeof (Conflit) == "undefined")
     3   jQuery.noConflict();
    24
    35jQuery(document).ready(function($){
     
    2830  };
    2931});
    30 
    31 /**
     32function SelectAll( formulaire )
     33{
     34var elts = formulaire.elements;
     35for(var i=0; i <elts.length; i++)
     36{
     37        if (elts[i].type=='checkbox')
     38                elts[i].checked = true;
     39}
     40}
     41
     42function DeselectAll( formulaire )
     43{
     44var elts = formulaire.elements;
     45for(var i=0; i <elts.length; i++)
     46{
     47        if (elts[i].type=='checkbox')
     48                elts[i].checked = false;
     49}
     50}
     51
     52function Inverser( formulaire )
     53{
     54var elts = formulaire.elements;
     55for(var i=0; i <elts.length; i++)
     56{
     57        if (elts[i].type=='checkbox')
     58                elts[i].checked = !elts[i].checked;
     59}
     60}
     61
     62function phpWGOpenWindow(theURL,winName,features)
     63{
     64        img = new Image();
     65        img.src = theURL;
     66        if (img.complete)
     67        {
     68                var width=img.width+40, height=img.height+40;
     69        }
     70        else
     71        {
     72                var width=640, height=480;
     73                img.onload = function () { newWin.resizeTo( img.width+50, img.height+100); };
     74        }
     75        newWin = window.open(theURL,winName,features+',left=2,top=1,width=' + width + ',height=' + height);
     76}
     77
     78function popuphelp(url)
     79{
     80        window.open( url, 'dc_popup',
     81                'alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no'
     82        );
     83}
     84
     85Function.prototype.pwgBind = function() {
     86                var __method = this, object = arguments[0], args = Array.prototype.slice.call(arguments,1);
     87                return function() {
     88                                return __method.apply(object, args.concat(arguments) );
     89                }
     90}
     91function PwgWS(urlRoot)
     92{
     93        this.urlRoot = urlRoot;
     94        this.options = {
     95                method: "GET",
     96                async:  true,
     97                onFailure: null,
     98                onSuccess: null
     99        };
     100};
     101
     102PwgWS.prototype = {
     103
     104        callService : function(method, parameters, options)
     105        {
     106                if (options)
     107                {
     108                        for (var property in options)
     109                                this.options[property] = options[property];
     110                }
     111                try { this.transport = new XMLHttpRequest();}
     112                catch(e) {
     113                        try { this.transport = new ActiveXObject('Msxml2.XMLHTTP'); }
     114                        catch(e) {
     115                                try { this.transport = new ActiveXObject('Microsoft.XMLHTTP'); }
     116                                catch (e){
     117                                        dispatchError(0, "Cannot create request object");
     118                                }
     119                        }
     120                }
     121                this.transport.onreadystatechange = this.onStateChange.pwgBind(this);
     122
     123                var url = this.urlRoot+"ws.php?format=json";
     124
     125                var body = "method="+method;
     126                if (parameters)
     127                {
     128                        for (var property in parameters)
     129                        {
     130                                if ( typeof parameters[property] == 'object' && parameters[property])
     131                                {
     132                                        for (var i=0; i<parameters[property].length; i++)
     133                                                body += "&"+property+"[]="+encodeURIComponent(parameters[property][i]);
     134                                }
     135                                else
     136                                        body += "&"+property+"="+encodeURIComponent(parameters[property]);
     137                        }
     138                }
     139
     140                if (this.options.method == "POST" )
     141                {
     142                        this.transport.open(this.options.method, url, this.options.async);
     143                        this.transport.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
     144                        this.transport.send(body);
     145                }
     146                else
     147                {
     148                        url += "&"+body;
     149                        this.transport.open(this.options.method, url, this.options.async);
     150                        this.transport.send(null);
     151                }
     152        },
     153
     154        onStateChange: function() {
     155                var readyState = this.transport.readyState;
     156                if (readyState==4)
     157                        this.respondToReadyState(readyState);
     158        },
     159
     160        dispatchError: function( httpCode, text )
     161        {
     162                !this.options.onFailure || this.options.onFailure( httpCode, text);
     163        },
     164
     165        respondToReadyState: function(readyState)
     166        {
     167                var transport = this.transport;
     168                if (readyState==4 && transport.status == 200)
     169                {
     170                        var resp;
     171                        try {
     172                                eval('resp = ' + transport.responseText);
     173                        }
     174                        catch (e) {
     175                                this.dispatchError( 200, e.message + '\n' + transport.responseText.substr(0,512) );
     176                        }
     177                        if (resp!=null)
     178                        {
     179                                if (resp.stat==null)
     180                                        this.dispatchError( 200, "Invalid response" );
     181                                else if (resp.stat=='ok')
     182                                {
     183                                        if (this.options.onSuccess) this.options.onSuccess( resp.result );
     184                                }
     185                                else
     186                                        this.dispatchError( 200, resp.err + " " + resp.message);
     187                        }
     188                }
     189                if (readyState==4 && transport.status != 200)
     190                        this.dispatchError( transport.status, transport.statusText );
     191        },
     192
     193
     194        transport: null,
     195        urlRoot: null,
     196        options: {}
     197}
     198
     199function pwgAddEventListener(elem, evt, fn)
     200{
     201        if (window.attachEvent)
     202                elem.attachEvent('on'+evt, fn);
     203        else
     204                elem.addEventListener(evt, fn, false);
     205}var gRatingOptions, gRatingButtons, gUserRating;
     206
     207function makeNiceRatingForm(options)
     208{
     209        gRatingOptions = options || {};
     210        var form = document.getElementById('rateForm');
     211        if (!form) return; //? template changed
     212
     213        gRatingButtons = form.getElementsByTagName('input');
     214        gUserRating = "";
     215        for (var i=0; i<gRatingButtons.length; i++)
     216        {
     217                if ( gRatingButtons[i].type=="button" )
     218                {
     219                        gUserRating = gRatingButtons[i].value;
     220                        break;
     221                }
     222        }
     223
     224        for (var i=0; i<gRatingButtons.length; i++)
     225        {
     226                var rateButton = gRatingButtons[i];
     227                rateButton.initialRateValue = rateButton.value; // save it as a property
     228                try { rateButton.type = "button"; } catch (e){}// avoid normal submit (use ajax); not working in IE6
     229
     230                if (navigator.userAgent.indexOf('AppleWebKit/')==-1 && navigator.userAgent.indexOf('MSIE 8')==-1) rateButton.value = ""; //hide the text IE<8/Opera - breaks safari
     231                with (rateButton.style)
     232                {
     233                        textIndent = "-50px"; //hide the text FF
     234                        marginLeft = marginRight = 0;
     235                }
     236
     237                if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
     238                        rateButton.parentNode.removeChild(rateButton.nextSibling);
     239                if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
     240                        rateButton.parentNode.removeChild(rateButton.previousSibling);
     241
     242                pwgAddEventListener(rateButton, "click", updateRating);
     243                pwgAddEventListener(rateButton, "mouseout", resetRatingStarDisplay);
     244                pwgAddEventListener(rateButton, "mouseover", updateRatingStarDisplayEvt);
     245        }
     246        resetRatingStarDisplay();
     247}
     248
     249function resetRatingStarDisplay()
     250{
     251        updateRatingStarDisplay( gUserRating );
     252}
     253
     254function updateRatingStarDisplay(userRating)
     255{
     256        for (var i=0; i<gRatingButtons.length; i++)
     257                gRatingButtons[i].className = (userRating!=="" && userRating>=gRatingButtons[i].initialRateValue ) ? "rateButtonStarFull" : "rateButtonStarEmpty";
     258}
     259
     260function updateRatingStarDisplayEvt(e)
     261{
     262        updateRatingStarDisplay(
     263                e.target ? e.target.initialRateValue : e.srcElement.initialRateValue);
     264}
     265
     266function updateRating(e)
     267{
     268        var rateButton = e.target || e.srcElement;
     269        if (rateButton.initialRateValue == gUserRating)
     270                return false; //nothing to do
     271
     272        for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=true;
     273        var y = new PwgWS(gRatingOptions.rootUrl);
     274        y.callService(
     275                "pwg.images.rate", {image_id: gRatingOptions.image_id, rate: rateButton.initialRateValue } ,
     276                {
     277                        onFailure: function(num, text) {
     278                                alert(num + " " + text);
     279                                document.location = rateButton.form.action + "&rate="+rateButton.initialRateValue;
     280                        },
     281                        onSuccess: function(result) {
     282                                gUserRating = rateButton.initialRateValue;
     283                                for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=false;
     284                                if (gRatingOptions.updateRateElement) gRatingOptions.updateRateElement.innerHTML = gRatingOptions.updateRateText;
     285                                if (gRatingOptions.ratingSummaryElement)
     286                                {
     287                                        var t = gRatingOptions.ratingSummaryText;
     288                                        var args =[result.average, result.count], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
     289                                        //_xxx = t.match( rexp );
     290                                        while (idx<args.length) t=t.replace(rexp, args[idx++]);
     291                                        gRatingOptions.ratingSummaryElement.innerHTML = t;
     292                                }
     293                        }
     294                }
     295        );
     296        return false;
     297}/**
    32298 * Cookie plugin
    33299 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
     
    39305var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
    40306return cookieValue;}};
    41 
    42 /**
    43  * Piwigo scripts
    44  */
    45 function phpWGOpenWindow(theURL,winName,features)
    46 {img=new Image();img.src=theURL;if(img.complete)
    47 {var width=img.width+40;var height=img.height+40;}
    48 else
    49 {var width=640;var height=480;img.onload=resizeWindowToFit;}
    50 newWin=window.open(theURL,winName,features+',left=2,top=1,width='+width+',height='+height);}
    51 function resizeWindowToFit()
    52 {newWin.resizeTo(img.width+50,img.height+100);}
    53 function popuphelp(url)
    54 {window.open(url,'dc_popup','alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no');}
    55 Function.prototype.pwgBind=function(){var __method=this,object=arguments[0],args=new Array();for(var i=1;i<arguments.length;i++)
    56 args[i-1]=arguments[i];return function(){return __method.apply(object,args);}}
    57 function PwgWS(urlRoot)
    58 {this.urlRoot=urlRoot;this.options={method:"GET",async:true,onFailure:null,onSuccess:null};};PwgWS.prototype={callService:function(method,parameters,options)
    59 {if(options)
    60 {for(var property in options)
    61 this.options[property]=options[property];}
    62 try{this.transport=new XMLHttpRequest();}
    63 catch(e){try{this.transport=new ActiveXObject('Msxml2.XMLHTTP');}
    64 catch(e){try{this.transport=new ActiveXObject('Microsoft.XMLHTTP');}
    65 catch(e){dispatchError(0,"Cannot create request object");}}}
    66 this.transport.onreadystatechange=this.onStateChange.pwgBind(this);var url=this.urlRoot+"ws.php?format=json";var body="method="+method;if(parameters)
    67 {for(var property in parameters)
    68 {if(typeof parameters[property]=='object'&&parameters[property])
    69 {for(var i=0;i<parameters[property].length;i++)
    70 body+="&"+property+"[]="+encodeURIComponent(parameters[property][i]);}
    71 else
    72 body+="&"+property+"="+encodeURIComponent(parameters[property]);}}
    73 if(this.options.method=="POST")
    74 {this.transport.open(this.options.method,url,this.options.async);this.transport.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.transport.send(body);}
    75 else
    76 {url+="&"+body;this.transport.open(this.options.method,url,this.options.async);this.transport.send(null);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState==4)
    77 this.respondToReadyState(this.transport.readyState);},dispatchError:function(httpCode,text)
    78 {!this.options.onFailure||this.options.onFailure(httpCode,text);},respondToReadyState:function(readyState)
    79 {var transport=this.transport;if(readyState==4&&transport.status==200)
    80 {var resp;try{eval('resp = '+transport.responseText);}
    81 catch(e){this.dispatchError(200,e.message+'\n'+transport.responseText.substr(0,512));}
    82 if(resp!=null)
    83 {if(resp.stat==null)
    84 this.dispatchError(200,"Invalid response");else if(resp.stat=='ok')
    85 {if(this.options.onSuccess)this.options.onSuccess(resp.result);}
    86 else
    87 this.dispatchError(200,resp.err+" "+resp.message);}}
    88 if(readyState==4&&transport.status!=200)
    89 this.dispatchError(transport.status,transport.statusText);},transport:null,urlRoot:null,options:{}}
  • extensions/simple_themes/simple/template/comment_list.tpl

    r13546 r13549  
    1212        {if isset($comment.U_DELETE)}
    1313        <li>
    14                 <a href="{$comment.U_DELETE}" title="{'delete this comment'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
    15                         [delete]
    16                 </a>
     14          <a href="{$comment.U_DELETE}" title="{'delete this comment'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
     15            [delete]
     16          </a>
    1717        </li>
    1818        {/if}
    19     {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
    20     <li>
    21       <a class="editComment" href="{$comment.U_EDIT}#edit_comment" title="{'edit this comment'|@translate}">
    22         [edit]
    23       </a>
    24     </li>
    25     {/if}
     19        {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
     20        <li>
     21          <a class="editComment" href="{$comment.U_EDIT}#edit_comment" title="{'edit this comment'|@translate}">
     22            [edit]
     23          </a>
     24        </li>
     25        {/if}
    2626        {if isset($comment.U_VALIDATE)}
    2727        <li>
    28                 <a href="{$comment.U_VALIDATE}" title="{'validate this comment'|@translate}">
    29                         [validate]
    30                 </a>
     28          <a href="{$comment.U_VALIDATE}" title="{'validate this comment'|@translate}">
     29            [validate]
     30          </a>
    3131        </li>
    3232        {/if}
     
    3737      <a name="edit_comment"></a>
    3838      <form  method="post" action="{$comment.U_EDIT}" class="filter" id="editComment">
    39           <fieldset>
    40                 <legend>{'Edit a comment'|@translate}</legend>
    41                 <label>{'Comment'|@translate}<textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></label>
    42                 <input type="hidden" name="key" value="{$comment.KEY}">
    43                 <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
    44                 <input class="submit" type="submit" value="{'Submit'|@translate}">
    45           </fieldset>
     39        <fieldset>
     40          <legend>{'Edit a comment'|@translate}</legend>
     41          <label>{'Comment'|@translate}<textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></label>
     42          <input type="hidden" name="key" value="{$comment.KEY}">
     43          <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
     44          <input class="submit" type="submit" value="{'Submit'|@translate}">
     45        </fieldset>
    4646      </form>
    4747      {else}
  • extensions/simple_themes/simple/template/comments.tpl

    r13546 r13549  
    88  <form class="filter" action="{$F_ACTION}" method="get">
    99    <fieldset>
    10     <legend>{'Filter'|@translate}</legend>
    11     <label>{'Keyword'|@translate}<input type="text" name="keyword" value="{$F_KEYWORD}"></label>
    12     <label>{'Author'|@translate}<input type="text" name="author" value="{$F_AUTHOR}"></label>
    13     <label>
    14       {'Category'|@translate}
     10      <legend>{'Filter'|@translate}</legend>
     11      <label>{'Keyword'|@translate} : <input type="text" name="keyword" value="{$F_KEYWORD}"></label>
     12      <label>{'Author'|@translate} : <input type="text" name="author" value="{$F_AUTHOR}"></label>
     13      <label>{'Category'|@translate} :
    1514      <select name="cat">
    1615        <option value="0">------------</option>
    1716        {html_options options=$categories selected=$categories_selected}
    1817      </select>
    19     </label>
    20     <label>
    21       {'Since'|@translate}
    22           <select name="since">
    23             {html_options options=$since_options selected=$since_options_selected}
    24           </select>
    25     </label>
     18      </label>
     19      <label>{'Since'|@translate} :
     20      <select name="since">
     21        {html_options options=$since_options selected=$since_options_selected}
     22      </select>
     23      </label>
    2624    </fieldset>
    2725    <fieldset>
    2826      <legend>{'Display'|@translate}</legend>
    29     <label>
    30       {'Sort by'|@translate}
    31           <select name="sort_by">
    32             {html_options options=$sort_by_options selected=$sort_by_options_selected}
    33           </select>
    34     </label>
    35     <label>
    36       {'Sort order'|@translate}
    37           <select name="sort_order">
    38             {html_options options=$sort_order_options selected=$sort_order_options_selected}
    39           </select>
    40     </label>
    41     <label>
    42       {'Number of items'|@translate}
    43           <select name="items_number">
    44             {html_options options=$item_number_options selected=$item_number_options_selected}
    45           </select>
    46     </label>
     27      <label>{'Sort by'|@translate} :
     28      <select name="sort_by">
     29        {html_options options=$sort_by_options selected=$sort_by_options_selected}
     30      </select>
     31      </label>
     32      <label>{'Sort order'|@translate} :
     33      <select name="sort_order">
     34        {html_options options=$sort_order_options selected=$sort_order_options_selected}
     35      </select>
     36      </label>
     37      <label>{'Number of items'|@translate} :
     38      <select name="items_number">
     39        {html_options options=$item_number_options selected=$item_number_options_selected}
     40      </select>
     41      </label>
    4742    </fieldset>
    4843    <p><input class="submit" type="submit" value="{'Filter and display'|@translate}"></p>
  • extensions/simple_themes/simple/template/footer.tpl

    r13548 r13549  
    55    {'Powered by'|@translate} <a href="{$PHPWG_URL}">Piwigo</a>
    66     - <a href="{$themeconf.url}">{$themeconf.name}</a>
    7      - <a href="{$U_LOGIN}" rel="nofollow">{'Login'|@translate}</a>
    8     {if isset($CONTACT_MAIL)}
     7    {if isset($U_LOGIN)}
     8    - <a href="{$U_LOGIN}" rel="nofollow">{'Login'|@translate}</a>
     9    {/if}
     10    {if isset($U_LOGOUT)}
     11    - <a href="{$U_LOGOUT}">{'Logout'|@translate}</a>
     12    {/if}
     13     {if isset($CONTACT_MAIL)}
    914    - {'Contact'|@translate}
    1015    <a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
     
    1722  {/if}
    1823</div> <!-- the_page -->
    19 <script type="text/javascript" src="{$ROOT_URL}themes/{$themeconf.theme_dir}/js/jquery-1.4.2.min.js"></script>
    20 <script type="text/javascript" src="{$ROOT_URL}themes/{$themeconf.theme_dir}/js/scripts.js"></script>
    2124{if isset($debug.QUERIES_LIST)}
    2225<div id="debug">
  • extensions/simple_themes/simple/template/header.tpl

    r13548 r13549  
    55  <meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
    66{if isset($meta_ref) }
    7 {if isset($INFO_AUTHOR)}
    8 <meta name="author" content="{$INFO_AUTHOR|@replace:'"':' '}">
    9 {/if}
    10 {if isset($related_tags)}
    11 <meta name="keywords" content="{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}{$tag.name}{/foreach}">
    12 {/if}
    13 {if isset($COMMENT_IMG)}
    14 <meta name="description" content="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
    15 {else}
    16 <meta name="description" content="{$PAGE_TITLE}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
    17 {/if}
     7  {if isset($INFO_AUTHOR)}
     8  <meta name="author" content="{$INFO_AUTHOR|@replace:'"':' '}">
     9  {/if}
     10  {if isset($related_tags)}
     11  <meta name="keywords" content="{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}{$tag.name}{/foreach}">
     12  {/if}
     13  {if isset($COMMENT_IMG)}
     14  <meta name="description" content="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
     15  {else}
     16  <meta name="description" content="{$PAGE_TITLE}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
     17  {/if}
    1818{/if}
    1919  <title>{$PAGE_TITLE} - {$GALLERY_TITLE}</title>
     
    2121  <link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" >
    2222  <link rel="search" title="{'Search'|@translate}" href="{$ROOT_URL}search.php" >
    23   {if isset($first.U_IMG)   }<link rel="first" title="{'First'|@translate}" href="{$first.U_IMG}" >{/if}
    24   {if isset($previous.U_IMG)}<link rel="prev" title="{'Previous'|@translate}" href="{$previous.U_IMG}" >{/if}
    25   {if isset($next.U_IMG)    }<link rel="next" title="{'Next'|@translate}" href="{$next.U_IMG}" >{/if}
    26   {if isset($last.U_IMG)    }<link rel="last" title="{'Last'|@translate}" href="{$last.U_IMG}" >{/if}
    27   {if isset($U_UP)          }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if}
     23  {if isset($first.U_IMG)}
     24  <link rel="first" title="{'First'|@translate}" href="{$first.U_IMG}" >
     25  {/if}
     26  {if isset($previous.U_IMG)}
     27  <link rel="prev" title="{'Previous'|@translate}" href="{$previous.U_IMG}" >
     28  {/if}
     29  {if isset($next.U_IMG)}
     30  <link rel="next" title="{'Next'|@translate}" href="{$next.U_IMG}" >
     31  {/if}
     32  {if isset($last.U_IMG)}
     33  <link rel="last" title="{'Last'|@translate}" href="{$last.U_IMG}" >
     34  {/if}
     35  {if isset($U_UP)}
     36  <link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >
     37  {/if}
    2838
    2939  <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/simple/content.css">
     
    3242  <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/{$theme.id}/theme.css">
    3343  {/if}
    34   {if isset($theme.local_head)}{include file=$theme.local_head}{/if}
     44  {if !empty($theme.local_head)}{include file=$theme.local_head}{/if}
    3545  {/foreach}
    3646
    3747  {if isset($U_PREFETCH)}<link rel="prefetch" href="{$U_PREFETCH}">{/if}
    38   {if not empty($page_refresh)}<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if}
     48  {if not empty($page_refresh)}
     49  <meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">
     50  {/if}
    3951  {if isset($U_FEED)}
    4052  <link rel="alternate" type="application/rss+xml" title="{'Image only RSS feed'|@translate}" href="{$U_FEED_IMAGE_ONLY}">
     
    4557    {/foreach}
    4658  {/if}
     59  {known_script id="jquery" src=$ROOT_URL|@cat:"themes/simple/js/jquery-1.4.4.min.js"}
     60  {known_script id="simplescripts" src=$ROOT_URL|@cat:"themes/simple/js/scripts.min.js"}
    4761  <script type="text/javascript">
    4862    document.documentElement.className = 'js';
  • extensions/simple_themes/simple/template/identification.tpl

    r13546 r13549  
    1818    <fieldset>
    1919      <legend>{'Connection settings'|@translate}</legend>
    20     <input type="hidden" name="redirect" value="{$U_REDIRECT|urlencode}">
    2120      <ul>
    2221        <li>
     
    3534        <li>
    3635        <span class="property">
    37           <label for="Auto login">{'Auto login'|@translate}</label>
     36          <label for="remember_me">{'Auto login'|@translate}</label>
    3837        </span>
    3938          <input tabindex="3" type="checkbox" name="remember_me" id="remember_me" value="1">
     
    4241      </ul>
    4342    </fieldset>
    44     <p><input class="submit" tabindex="4" type="submit" name="login" value="{'Submit'|@translate}"></p>
    45   <p>
    46     {if isset($U_REGISTER) }
    47     <a href="{$U_REGISTER}" title="{'Register'|@translate}">{'Register'|@translate}</a>
    48     {/if}
    49     <a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}">{'Forgot your password?'|@translate}</a>
    50   </p>
     43    <p>
     44      <input type="hidden" name="redirect" value="{$U_REDIRECT|@urlencode}">
     45      <input class="submit" tabindex="4" type="submit" name="login" value="{'Submit'|@translate}">
     46    </p>
     47    <p>
     48      {if isset($U_REGISTER) }
     49      <a href="{$U_REGISTER}" title="{'Register'|@translate}">{'Register'|@translate}</a>
     50      {/if}
     51      <a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}">{'Forgot your password?'|@translate}</a>
     52    </p>
    5153  </form>
    5254<script type="text/javascript"><!--
  • extensions/simple_themes/simple/template/index.tpl

    r13548 r13549  
    11{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
    22<div class="titrePage">
    3   <span id="menuswitcher" title="Afficher/cacher le menu">Menu</span> »
     3  <span id="menuswitcher" title="{'Show/hide menu'|@translate}">Menu</span> »
    44  {if isset($U_EDIT) or isset($U_SLIDESHOW) or !empty($PLUGIN_INDEX_ACTIONS)}
    55  <ul class="categoryActions">
  • extensions/simple_themes/simple/template/mainpage_categories.tpl

    r13546 r13549  
    99    <div class="description">
    1010      <h3>
    11                 <a href="{$cat.URL}">{$cat.NAME}</a>
    12                 {if !empty($cat.icon_ts)}
    13                   <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
    14                 {/if}
    15           </h3>
     11        <a href="{$cat.URL}">{$cat.NAME}</a>
     12        {if !empty($cat.icon_ts)}
     13        <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
     14        {/if}
     15      </h3>
    1616      {if isset($cat.INFO_DATES) }
    1717      <p class="thumbCatDescNfoDate">{$cat.INFO_DATES}</p>
    1818      {/if}
    19 
    2019      <p class="thumbCatDescNbImg">{$cat.CAPTION_NB_IMAGES}</p>
    2120      {if not empty($cat.DESCRIPTION)}
  • extensions/simple_themes/simple/template/menubar_categories.tpl

    r13546 r13549  
    2121{'</li></ul>'|@str_repeat:$ref_level}
    2222
    23         {if isset($block->data.U_UPLOAD)}
    24         <ul>
    25                 <li>
    26                         <a href="{$block->data.U_UPLOAD}">{'Upload a picture'|@translate}</a>
    27                 </li>
    28         </ul>
    29         {/if}
    30         <p class="totalImages">{$pwg->l10n_dec('%d image', '%d images', $block->data.NB_PICTURE)}</p>
     23{if isset($block->data.U_UPLOAD)}
     24<ul>
     25  <li>
     26    <a href="{$block->data.U_UPLOAD}">{'Upload a picture'|@translate}</a>
     27  </li>
     28</ul>
     29{/if}
     30<p class="totalImages">{$pwg->l10n_dec('%d image', '%d images', $block->data.NB_PICTURE)}</p>
  • extensions/simple_themes/simple/template/menubar_tags.tpl

    r13546 r13549  
    33  {foreach from=$block->data item=tag}
    44  <li>
    5         <a class="tagLevel{$tag.level}"
    6         {if isset($tag.U_ADD)}
    7                 href="{$tag.U_ADD}"
    8                 title="{$pwg->l10n_dec('%d image is also linked to current tags', '%d images are also linked to current tags', $tag.counter)}"
    9                 rel="nofollow">+
    10         {else}
    11                 href="{$tag.URL}"
    12                 title="{'See elements linked to this tag only'|@translate}">
    13         {/if}
    14                 {$tag.name}</a>
     5    <a class="tagLevel{$tag.level}"
     6       {if isset($tag.U_ADD)}
     7         href="{$tag.U_ADD}"
     8         title="{$pwg->l10n_dec('%d image is also linked to current tags', '%d images are also linked to current tags', $tag.counter)}"
     9         rel="nofollow">+
     10       {else}
     11         href="{$tag.URL}"
     12         title="{'See images linked to this tag only'|@translate}">
     13       {/if}
     14       {$tag.name}</a>
    1515  </li>
    1616  {/foreach}
  • extensions/simple_themes/simple/template/picture.tpl

    r13548 r13549  
    8080    <div id="imageInfos">
    8181      <dl>
    82         {if $display_info.author}
     82        {if $display_info.author and isset($INFO_AUTHOR)}
    8383        <dt>{'Author'|@translate}</dt>
    8484        <dd>{$INFO_AUTHOR}</dd>
    8585        {/if}
    86          {if $display_info.created_on}
     86        {if $display_info.created_on and isset($INFO_CREATION_DATE)}
    8787        <dt>{'Created on'|@translate}</dt>
    8888        <dd>{$INFO_CREATION_DATE}</dd>
    8989        {/if}
    90                 {if $display_info.posted_on}
     90        {if $display_info.posted_on}
    9191        <dt>{'Posted on'|@translate}</dt>
    9292        <dd>{$INFO_POSTED_DATE}</dd>
    93                 {/if}
    94         {if isset($related_tags)}
     93        {/if}
     94        {if $display_info.tags and isset($related_tags)}
    9595        <dt>{'Tags'|@translate}</dt>
    96         <dd>{foreach from=$related_tags item=tag name=tag_loop}
     96        <dd>
     97          {foreach from=$related_tags item=tag name=tag_loop}
    9798          {if !$smarty.foreach.tag_loop.first}, {/if}
    98           <a href="{$tag.URL}">{$tag.name}</a>{/foreach}</dd>
     99          <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
     100        </dd>
    99101        {/if}
    100          {if $display_info.tags}
     102        {if $display_info.categories and isset($related_categories)}
    101103        <dt>{'Categories'|@translate}</dt>
    102104        <dd>
    103105          {foreach from=$related_categories item=cat name=tag_loop}
    104           {if !$smarty.foreach.tag_loop.first}, {/if} {'&nbsp;'|@str_ireplace:'&#32;':$cat}{/foreach}
     106          {if !$smarty.foreach.tag_loop.first}, {/if}
     107          {'&nbsp;'|@str_ireplace:'&#32;':$cat}{/foreach}
    105108        </dd>
    106109        {/if}
    107                 {if $display_info.visits}
     110        {if $display_info.visits}
    108111        <dt>{'Visits'|@translate}</dt>
    109112        <dd>{$INFO_VISITS}</dd>
    110                  {/if}
    111         {if $display_info.average_rate and isset($rate_summary) }
     113        {/if}
     114        {if $display_info.average_rate}
     115        {if isset($rate_summary)}
    112116        <dt>{'Average rate'|@translate}</dt>
    113117        <dd id="ratingSummary">
     
    133137              {/if}
    134138              {/foreach}
    135               <script type="text/javascript" src="{$ROOT_URL}themes/{$themeconf.theme_dir}/js/rating.min.js"></script>
    136139              <script type="text/javascript">
    137140                makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}',
     
    145148          </form>
    146149        </dd>
     150        {/if}
    147151        {/if}
    148152      </dl>
  • extensions/simple_themes/simple/template/picture_nav_buttons.tpl

    r13546 r13549  
     1{if $DISPLAY_NAV_BUTTONS}
    12<div class="navButtons">
    23{if isset($U_SLIDESHOW_STOP)}
     
    3031{/if}
    3132</div>
     33{/if}
    3234
    3335<script type="text/javascript">// <![CDATA[
  • extensions/simple_themes/simple/theme.css

    r13548 r13549  
    11/* Grey theme for the simple template
    2    author: Saïmon <contact at saimon.org> */
     2   author: Saïmon <contact at saimon org>
     3*/
    34
    45body {
     
    2122  color: #999;
    2223}
     24a:hover, #menuswitcher:hover, #theComments h3:hover {
     25  color: #f0f0f0;
     26}
    2327
    2428.titrePage, .titrePage a {
     
    2832}
    2933
    30 h2, h3 {
    31   font-variant: small-caps;
     34h2, h3, #menubar dt {
     35  /* font-variant: small-caps; */
     36  text-transform: uppercase;
     37  font-weight: bold;
    3238}
    3339
     
    4349}
    4450.thumbnail {
    45   border: 2px #707070 solid;
     51  border: 2px #606060 solid;
    4652}
    4753.thumbnail:hover {
     
    5258}
    5359
    54 #menubar dt {
    55   font-variant: small-caps;
    56   font-weight: bold;
    57 }
    58 
    5960/* page content :  categories thumbnails */
    6061
    6162.illustration img {
    62   border: 1px #606060 solid;
     63  border: 2px #606060 solid;
    6364}
    6465
    6566.illustration img:hover {
    66   border: 1px #f0f0f0 solid;
     67  border: 2px #f0f0f0 solid;
    6768}
    6869
    6970.thumbCatDesc {
    70   border-top: 1px #606060 dotted;
     71  border-top: 1px #606060 solid;
    7172  text-align: justify;
    7273}
  • extensions/simple_themes/simple/themeconf.inc.php

    r13547 r13549  
    22/*
    33Theme Name: Simple Grey
    4 Version: 2.0
    5 Description: Simple Grey theme
     4Version: 2.3
     5Description: Simple Grey
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=308
    77Author: Saïmon
     
    2323
    2424global $user;
    25 $user['maxwidth'] = 680;
     25$user['maxwidth'] = 720;
     26
     27load_language('theme.lang', PHPWG_THEMES_PATH.'simple/');
     28
    2629?>
Note: See TracChangeset for help on using the changeset viewer.