Changeset 30484


Ignore:
Timestamp:
11/14/14 05:20:26 (5 years ago)
Author:
SergeD
Message:

version 1.0.14 - please refer to changelog for details

Location:
extensions/greydragon
Files:
1 added
17 edited

Legend:

Unmodified
Added
Removed
  • extensions/greydragon/admin/admin.inc.php

    r30210 r30484  
    22 
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
     4 
     5define('GDTHEME_VERSION', '1.0.14'); 
    46 
    57require_once( PHPWG_THEMES_PATH . 'greydragon/include/greydragon.class.php'); 
     
    810load_language('theme.lang', PHPWG_THEMES_PATH.'greydragon/'); 
    911 
    10 $themeCore = greyDragonCore::Instance('1.0.13'); 
     12$themeCore = greyDragonCore::Instance(GDTHEME_VERSION); 
    1113$themeroot = './themes/' . basename(dirname(dirname(__FILE__))) . '/'; 
    1214 
  • extensions/greydragon/admin/admin.tpl

    r30210 r30484  
    11{combine_css path="themes/default/js/ui/theme/jquery.ui.button.css"} 
     2{combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 
    23{combine_css path="themes/greydragon/admin/css/styles.css"} 
    3 {combine_script id='greydragon.admin' load='footer' require='jquery,jquery.ui.button' path='themes/greydragon/admin/js/admin.js' } 
     4{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js' } 
     5{combine_script id='greydragon.admin' load='footer' require='jquery,jquery.ui.button,jquery.colorbox' path='themes/greydragon/admin/js/admin.js' } 
    46{if $options.p_debug == "on"} 
    57{debug} 
     
    911  <h2>{'GreyDragon Theme'|@translate} - {$options.version}</h2> 
    1012  <div class="left-links"> 
    11     <ul><li><a href="http://blog.dragonsoft.us/piwigo/" target="_blank">{'Home'|@translate}</a>&nbsp;|&nbsp;</li> 
     13    <ul><li><a href="http://blog.dragonsoft.us/piwigo/" target="_blank">{'Blog'|@translate}</a>&nbsp;|&nbsp;</li> 
     14      <li><a class="ajax cboxElement" href="themes/greydragon/changelog.php?version={$options.version}" >{'Changelog'|@translate}</a>&nbsp;|&nbsp;</li> 
    1215      <li><a href="http://piwigo.org/forum/viewtopic.php?pid=154192" target="_blank">{'Support'|@translate}</a>&nbsp;|&nbsp;</li> 
    1316      <li><a title="Follow me on Twitter" href="http://twitter.com/greydragon_th" target="_blank">{'Follow'|@translate}</a>&nbsp;|&nbsp;</li> 
     
    115118      <li><label><span class="graphicalCheckbox {if $options.p_hideabout=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_hideabout" id="p_hideabout" type="checkbox" value="on" {if $options.p_hideabout=="on"}checked="checked"{/if}>{'Hide About Link'|@translate}</label></li> 
    116119      <li><label><span class="graphicalCheckbox {if $options.p_adminemail=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_adminemail" id="p_adminemail" type="checkbox" value="on" {if $options.p_adminemail=="on"}checked="checked"{/if}>{'Include Contact Webmaster Email in the Footer for Members'|@translate}</label></li> 
    117       <li><label><span class="graphicalCheckbox {if $options.p_nocounter=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_nocounter" id="p_nocounter" type="checkbox" value="on" {if $options.p_nocounter=="on"}checked="checked"{/if}>{'Remove photo counter in breadcrumbs'|@translate}</label></li> 
     120      <li><label><span class="graphicalCheckbox {if $options.p_nocounter=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_nocounter" id="p_nocounter" type="checkbox" value="on" {if $options.p_nocounter=="on"}checked="checked"{/if}>{'Remove photo counter in breadcrumbs and categories menu'|@translate}</label></li> 
    118121    </ul> 
    119122  </fieldset> 
     
    121124    <legend>{'Advanced Options - Photo Page'|@translate}</legend> 
    122125    <ul> 
     126      <li> 
     127        <select id="p_pict_tab_mode" name="p_pict_tab_mode"> 
     128          <option {if $options.p_pict_tab_mode=="txt-tab-open"}selected="selected"{/if} value="txt-tab-open">{'Text Tabs Expanded'|@translate}</option> 
     129          <option {if $options.p_pict_tab_mode=="txt-tab-close"}selected="selected"{/if} value="txt-tab-close">{'Text Tabs Collapsed'|@translate}</option> 
     130          <option {if $options.p_pict_tab_mode=="ico-tab-open"}selected="selected"{/if} value="ico-tab-open">{'Icon Tabs Expanded'|@translate}</option> 
     131          <option {if $options.p_pict_tab_mode=="ico-tab-close"}selected="selected"{/if} value="ico-tab-close">{'Icon Tabs Collapsed'|@translate}</option> 
     132          <option {if $options.p_pict_tab_mode=="txt-with-overlay"}selected="selected"{/if} value="txt-with-overlay">{'Text With Overlay'|@translate}</option> 
     133          <option {if $options.p_pict_tab_mode=="ico-with-overlay"}selected="selected"{/if} value="ico-with-overlay">{'Icon With Overlay'|@translate}</option> 
     134          <option {if $options.p_pict_tab_mode=="hide"}selected="selected"{/if} value="hide">{'Hide'|@translate}</option> 
     135        </select> 
     136        <label for="p_pict_tab_mode">{'Metadata Display Mode'|@translate}</label> 
     137      </li> 
    123138      <li> 
    124139        <select id="p_pict_tab_default" name="p_pict_tab_default"> 
     
    128143          <option {if $options.p_pict_tab_default=="tags"}selected="selected"{/if} value="tags">{'Tags'|@translate}</option> 
    129144          <option {if $options.p_pict_tab_default=="comments"}selected="selected"{/if} value="comments">{'Comments'|@translate}</option> 
    130           <option {if $options.p_pict_tab_default=="hide"}selected="selected"{/if} value="hide">{'Hide'|@translate}</option> 
    131         </select> 
    132         <label for="p_pict_tab_default">{'Default tab to be displayed'|@translate}</label> 
     145        </select> 
     146        <label for="p_pict_tab_default">{'Default Tab to be displayed in Tabbed Mode'|@translate}</label> 
    133147      </li> 
    134148      <li><label><span class="graphicalCheckbox {if $options.p_pict_tab_anim=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_pict_tab_anim" id="p_pict_tab_anim" type="checkbox" value="on" {if $options.p_pict_tab_anim=="on"}checked="checked"{/if}>{'Animate Tabs'|@translate}</label></li> 
  • extensions/greydragon/admin/css/styles.css

    r30210 r30484  
    9494#helpContent li { margin-top: 2px; margin-bottom: 2px; } 
    9595#helpContent ul ul { margin-top: 0; list-style: square outside; padding-left: 3em; } 
     96 
     97#cboxContent { background-color: #FFF; } 
     98#cboxLoadedContent { margin-bottom: 1em; margin-top: 1em; background-color: #FFF; } 
     99.changelog { text-align: left; padding: 0 1em; } 
     100.changelog ul { padding-left: 1em; } 
     101.changelog li { list-style-type: none; } 
     102.changelog h3 { padding: 4px 0.6em; color: #000; } 
  • extensions/greydragon/admin/js/admin.js

    r30210 r30484  
    77    $(this).addClass('menu-focused'); 
    88  }); 
     9  $(".ajax").colorbox({ scrolling: true, maxWidth: '90%', maxHeight: '90%' }); 
    910}); 
  • extensions/greydragon/admin/upgrade.inc.php

    r30210 r30484  
    99if (!isset($conf['greydragon'])): 
    1010  // Only need to ensure that there is a record in DB. Theme supports self initialization 
    11   $query = "INSERT INTO " . CONFIG_TABLE . " (param, value, comment) VALUES ('greydragon' , '" . pwg_db_real_escape_string(serialize(array())) . "' , 'GreyDragon Theme Options');"; 
    12   pwg_query($query); 
    13   load_conf_from_db(); 
     11  $conf['greydragon'] = array(); 
     12  conf_update_param('greydragon', $conf['greydragon'], true); 
    1413else: 
    1514  // Nothing to upgrade 
    16   // conf_update_param('greydragon', pwg_db_real_escape_string(serialize($config))); 
    17   // load_conf_from_db(); 
    1815endif; 
    1916?> 
  • extensions/greydragon/changelog.txt

    r30215 r30484  
    1818 
    1919=== Changelog === 
     20version 1.0.14 
     21+ Hiding of photo counters extended to category menu 
     22+ Infos, Warnings and Errors message area moved into popup overlay. For Infos and Warnings message would be removed after 8 seconds. "Errors" is closed on click. 
     23+ ADMIN: Photo Metadata display mode can be switched between tabs with text/icon expanded or collapsed, text/icon with overlay, or hidden 
     24+ ADMIN: Added ChangeLog link in toolbar 
     25- ContactForm plugin: Fixed form styles to make page better aligned 
     26- ADMIN: Fixed issue when under some conditions config info could become corrupted 
     27- Deprecated events to populate page header - code moved into header template 
     28- Fixed missing div in photo page 
     29- Page layout HTML 5 validation of photo page 
     30                                                                   
    2031version 1.0.13 
    2132+ New colorpack - GreyDragon 
    22 + ADMIN: Added support for horizontal menu - "Static Menu - Header Bottom". When used with Additional Pages Plugin, pages except Root Page would be embedded  
    23   into menu bar instead of drop down menu. 
     33+ ADMIN: Added support for horizontal menu - "Static Menu - Header Bottom". When used with Additional Pages Plugin, pages except Root Page would be embeded into menu bar instead of drop down menu. 
    2434+ ADMIN: Added option "Display navigation arrows" for Root page 
    2535+ ADMIN: Added option "Display navigation controls" for Root page 
    26 + Added support for thumb shadow space - custom CSS is required (please refer to help section in admin area). Latest gdThumb is recommended. 
     36+ Added support for thumb shadow space - custom CSS is required (please refer to help section in admin area). Latest gdThumb is recomended. 
    2737+ CSS: cleanup 
    28 - Removed hardcoded height for root page slideshow to accommodate navigation controls 
     38- Removed hardcoded height for root page slideshow to accomodate navigation controls 
    2939- Fixed issues with Categories List overlapping when Static menu is enabled 
    30 - In Photo page, hide overflow photo when huge size is used 
     40- In Phote page, hide overflow photo when huge size is used 
    3141 
    3242version 1.0.12 
  • extensions/greydragon/css/colorpack/blackhawk/styles.css

    r30210 r30484  
    6464.image-metadata-tabs { background: #222; } 
    6565 
     66#cboxLoadedContent { background: #222 !important; } 
  • extensions/greydragon/css/colorpack/greydragon/styles.css

    r30210 r30484  
    6464.image-metadata-tabs { background: #222; } 
    6565 
     66#cboxLoadedContent { background: #222 !important; } 
  • extensions/greydragon/css/colorpack/slateblue/styles.css

    r30210 r30484  
    6363.image-metadata-tabs { background: #1a1e27; } 
    6464 
     65#cboxLoadedContent { background: #1a1e27 !important; } 
  • extensions/greydragon/css/colorpack/whitehawk/styles.css

    r30210 r30484  
    6666 
    6767ul.image-metadata { border-bottom: 1px solid #bbb; } 
    68 ul.image-metadata li { abackground: #EEEEEE; } 
     68ul.image-metadata li { } 
    6969ul.image-metadata li:hover { color: #666; background: #ccc; }  
    7070ul.image-metadata li.active{ color: #666; background: #eee; border: solid 0 #bbb; border-width: 1px 1px 0 1px; } 
    7171.image-metadata-tabs { background: #eee; border: solid 0 #bbb; border-width: 0 1px 0 1px; } 
    7272 
     73#cboxLoadedContent { background: #eee !important; } 
  • extensions/greydragon/css/styles.css

    r30210 r30484  
    106106#menubar dl dt { padding-left: 12px; } 
    107107#menubar ul { list-style-type: disc; margin-top: 0; } 
     108#menubar #menuTagCloud { font-size: 92%; text-align: left; } 
     109#menubar #mbCategories li { margin-right: 0.3em; } 
     110.no-b-counter #menubar #mbCategories .menuInfoCatByChild, .no-b-counter #menubar #mbCategories .menuInfoCat, .no-b-counter #menubar #mbCategories .totalImages { display: none; } 
    108111 
    109112/* Menu Styles */ 
     
    219222#imageInfos .nextThumbHover:hover   { background: transparent url(../icon/img_next.png) no-repeat center center;} 
    220223 
    221 #imageInfos dl.imageInfoTable   { display: block; padding: 0 15px; margin: 12px auto;} 
    222 #imageInfos .imageInfo        { display: block; line-height: 16px;} 
    223 #imageInfos .imageInfo dt       { display: block; font-weight: bold; text-align: left; padding: 0;} 
    224 #imageInfos .imageInfo dd     { display: block; text-align: left; margin: 0 0 5px 20px;} 
     224ul.image-metadata { margin: 0.5em 0 0; padding: 0; float: left; list-style: none; height: 30px; width: 100%; } 
     225ul.image-metadata li { float: left; margin: 0; cursor: pointer; padding: 0px 20px; height: 30px; line-height: 30px; font-weight: bold; overflow: hidden; position: relative; } 
     226 
     227#image-metadata-ico { text-align: center; margin-bottom: 1em; } 
     228ul.image-metadata-ico    { display: inline-block; margin: 0 auto; padding: 0; list-style: none; height: 30px; } 
     229ul.image-metadata-ico li { float: left; margin: 0; cursor: pointer; padding: 0px 20px; height: 30px; line-height: 30px; font-weight: bold; overflow: hidden; position: relative; } 
     230 
     231.image-metadata-tabs { clear: both; float: left; width: 100%; } 
     232.image-metadata-tab  { padding: 20px; display: none; } 
     233.image-metadata-tab .imageInfo dt { text-align: left; padding-right: 2em; } 
     234.image-metadata-tab ul { margin: 0 0 1em 0; padding: 0; list-style-type: none; } 
     235.image-metadata-tab blockquote { padding: 0; margin: 0; border-left: none; font-size: 1em; } 
     236.image-metadata-tab #commentAdd, #pictureCommentList { padding: 0; width: 50%; } 
     237.image-metadata-tab .commentElement { border-radius: 0; margin: 5px 0 0 0; } 
     238.image-metadata .glyphicon-chevron-up, .image-metadata .glyphicon-chevron-down { float: right; padding-right: 10px; font-size: 0.8em; } 
     239 
     240#cboxLoadedContent .image-metadata-tab { display: block; } 
     241 
     242dl.imageInfoTable   { display: block; padding: 0 15px; margin: 0;} 
     243dl.imageInfoTable.dl-horizontal dt { text-align: left; } 
     244dl.imageInfoTable ul { margin-bottom: 0; } 
     245 
    225246#imageInfos h3            { margin: 20px 0 10px;} 
    226247 
     
    267288.static-menu .calendarTitle, .static-menu .calendarBar { margin-left: 196px; } 
    268289 
    269 .infos, .errors, .warnings { border-width: 0; border-left: 10px solid transparent; margin: 0; margin-top: 1em; padding: 10px; } 
    270 .infos ul, .errors ul, .warnings ul { list-style: none; magin: 0; padding: 0; } 
     290.infos, .errors, .warnings { position: fixed; z-index: 10; right: 1em; top: 3em; border-width: 0; border-left: 0.8em solid transparent; margin: 0; padding: 1em; white-space: nowrap; } 
     291.infos ul, .errors ul, .warnings ul { list-style: none; margin: 0; padding: 0; overflow: hidden; } 
    271292.infos  { border-left-color: #0F0; } 
    272 .errors { border-left-color: #F00; } 
     293.errors { border-left-color: #F00; cursor: pointer; } 
    273294.warnings { border-left-color: #FFD800; } 
    274295 
     
    288309#ato_header > ul ul { top: 26px; } 
    289310 
    290 ul.image-metadata { margin: 0.5em 0 0; padding: 0; float: left; list-style: none; height: 30px; width: 100%; } 
    291 ul.image-metadata li { float: left; margin: 0; cursor: pointer; padding: 0px 20px; height: 30px; line-height: 30px; font-weight: bold; overflow: hidden; position: relative; } 
    292 ul.image-metadata li:hover { }  
    293 ul.image-metadata li.active{ } 
    294 .image-metadata-tabs { clear: both; float: left; width: 100%; } 
    295 .image-metadata-tab  { padding: 20px; display: none; } 
    296 .image-metadata-tab .imageInfoTable { margin-left: 2em; } 
    297 .image-metadata-tab .imageInfo dt { text-align: left; padding-right: 2em; } 
    298 .image-metadata-tab ul { margin: 0 0 1em 0; padding: 0; list-style-type: none; } 
    299 .image-metadata-tab blockquote { padding: 0; margin: 0; border-left: none; font-size: 1em; } 
    300 .image-metadata-tab #commentAdd, #pictureCommentList { padding: 0; width: 50%; } 
    301 .image-metadata-tab .commentElement { border-radius: 0; margin: 5px 0 0 0; } 
    302  
    303 #menubar #menuTagCloud { font-size: 92%; text-align: left; } 
     311.contact table td:first-child { padding-right: 1.5em; } 
     312.contact input[name="send_mail"] { margin-right: 1.5em; } 
  • extensions/greydragon/include/greydragon.class.php

    r30210 r30484  
    5050 
    5151      // Advanced Options - Photo Page  
     52      "p_pict_tab_mode"    => array("value" => "txt-tab-open", "quotes" => QUOTES_NONE), 
    5253      "p_pict_tab_default" => array("value" => "desc",   "quotes" => QUOTES_NONE), 
    5354      "p_pict_tab_anim"    => array("value" => "off",    "quotes" => QUOTES_NONE), 
     
    293294  } 
    294295 
    295   public function getHead($content) { 
    296  
    297     if ($favicon_name = $this->getOption('p_favicon_path')): 
    298       $search = '#<link rel="shortcut icon".*?favicon.ico">#'; 
    299       $replacement = '<link rel="shortcut icon" type="image/x-icon" href="' . PHPWG_ROOT_PATH . $favicon_name . '">'; 
    300       $content = preg_replace($search, $replacement, $content); 
    301     endif; 
    302  
    303     if ($this->getOption('p_nogenerator') == "on"): 
    304       $search = '#<meta name="generator" .*see piwigo.org">#'; 
    305       $replacement = ''; 
    306       $content = preg_replace($search, $replacement, $content); 
    307     endif; 
    308  
    309     return $content; 
    310   } 
    311  
    312296} 
    313297 
  • extensions/greydragon/js/theme.photo.js

    r30210 r30484  
    3030 
    3131  function switchTab(tab) { 
     32    if ($(tab).is("#image-metadata-toggle")) { 
     33      $(".image-metadata-tabs").slideToggle("fast");       
     34      if ($("#image-metadata-toggle").is(".glyphicon-chevron-down")) { 
     35        $("#image-metadata-toggle").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); 
     36      }else{ 
     37        $("#image-metadata-toggle").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down"); 
     38      } 
     39      return; 
     40    } 
    3241    $("ul.image-metadata li").removeClass("active"); 
    3342    $(tab).addClass("active"); 
     
    4150    } 
    4251    normalizeComments(activeTab); 
     52    $("#image-metadata-toggle").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); 
     53    $(".image-metadata-tabs").show("fast"); 
    4354  } 
    4455 
    4556  jQuery(function(){ 
    46     setCurrentTab(); 
    47  
    48     $("ul.image-metadata li").click(function() { switchTab(this); }); 
     57    if ($('#image-metadata-ico').length) { 
     58      $("#image-metadata-ico .meta-desc").colorbox({ inline:true, href:"div#tab-desc", className:"image-metadata-overlay", speed:200, opacity:0.3 }); 
     59      $("#image-metadata-ico .meta-info").colorbox({ inline:true, href:"div#tab-meta", className:"image-metadata-overlay", speed:200, opacity:0.3 }); 
     60      $("#image-metadata-ico .meta-exif").colorbox({ inline:true, href:"div#tab-exif", className:"image-metadata-overlay", speed:200, opacity:0.3 }); 
     61      $("#image-metadata-ico .meta-tags").colorbox({ inline:true, href:"div#tab-tags", className:"image-metadata-overlay", speed:200, opacity:0.3 }); 
     62      $("#image-metadata-ico .meta-comment").colorbox({ inline:true, href:"div#tab-comment", className:"image-metadata-overlay", speed:200, opacity:0.3, width: "1200px" }); 
     63    }else{ 
     64      setCurrentTab(); 
     65      $("ul.image-metadata li").click(function() { switchTab(this); }); 
     66    } 
    4967  }); 
    5068}()); 
  • extensions/greydragon/template/header.tpl

    r30210 r30484  
    33<head> 
    44<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}"> 
     5<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
     6{if $greydragon.p_nogenerator !== "on"} 
    57<meta name="generator" content="Piwigo (aka PWG), see piwigo.org"> 
    6 {if isset($meta_ref) }  
     8{/if} 
     9{if isset($meta_ref)} 
    710{if isset($INFO_AUTHOR)} 
    811<meta name="author" content="{$INFO_AUTHOR|@strip_tags:false|@replace:'"':' '}"> 
     
    1821{/if} 
    1922<title>{if $PAGE_TITLE!=l10n('Home') && $PAGE_TITLE!=$GALLERY_TITLE}{$PAGE_TITLE} | {/if}{$GALLERY_TITLE}</title> 
     23{if $greydragon.p_favicon_path} 
     24<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$greydragon.p_favicon_path}"> 
     25{else} 
    2026<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico"> 
    21  
     27{/if} 
    2228<link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" > 
    2329<link rel="search" title="{'Search'|@translate}" href="{$ROOT_URL}search.php" > 
     
    2733{if isset($last.U_IMG)    }<link rel="last" title="{'Last'|@translate}" href="{$last.U_IMG}" >{/if} 
    2834{if isset($U_UP)          }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if} 
    29  
    3035{assign var=root value="themes/greydragon/css"} 
    3136{assign var=colorpack value=$root|cat:"/colorpack/"|cat:$greydragon.p_colorpack|cat:"/styles.css"} 
    32  
    3337{combine_css path="themes/greydragon/css/bootstrap.min.css" order=-100} 
    3438{combine_css path="themes/greydragon/css/styles.css" order=100} 
    3539{combine_css path="$colorpack" order=101} 
    36  
    3740{if count($greydragon.p_customcss) > 0 || $greydragon.p_lowertext == "on"} 
    3841  {combine_css path="themes/greydragon/css/custom.css" order=101} 
     
    4043{combine_script id='greydragon.bootstrap' load='footer' require='jquery' path='themes/greydragon/js/bootstrap.min.js' order=98} 
    4144{combine_script id='greydragon.cookie' load='footer' require='jquery' path='themes/greydragon/js/jquery.cockie.js' order=99} 
    42  
    4345{if $SCRIPT_NAME|strstr:"picture.php"}  
    4446{assign var=includeMenu value="off" scope=root nocache} 
     
    5658{assign var=includeMenu value="on" scope=root nocache} 
    5759{/if} 
    58  
    5960{footer_script} 
     61  jQuery("div.infos").delay(8000).animate({ 'width': 'hide' }, 500, function(){ jQuery(this).hide(); }); 
     62  jQuery("div.warnings").delay(8000).animate({ 'width': 'hide' }, 500, function(){ jQuery(this).hide(); }); 
     63  jQuery("div.errors").click(function() { jQuery(this).animate({ 'width': 'hide' }, 500, function(){ jQuery(this).hide(); }); }); 
    6064{if $includeMenu=="on"}  
    6165  {combine_script id='greydragon.scripts' load='footer' require='jquery' path='themes/greydragon/js/theme.menu.js' order=100} 
    62  
    6366  {if isset({$greydragon.p_main_menu})} 
    6467    var p_main_menu = "{$greydragon.p_main_menu}"; 
     
    6972  var p_hideabout = "{$greydragon.p_hideabout}"; 
    7073{/if} 
    71  
    7274  var p_pict_descr = "{$greydragon.p_pict_descr}"; 
    7375  var p_pict_comment = "{$greydragon.p_pict_comment}"; 
    7476  var p_pict_tab_anim = "{$greydragon.p_pict_tab_anim}"; 
    75  
    7677  jQuery("#ato_header .parent:eq(0) ul").append('<li><a class="icon-brush" href="{$greydragon.U_SITE_ADMIN}theme&theme=greydragon">{'Theme Config'|translate}</a></li>'); 
    7778{/footer_script} 
    78  
    7979{get_combined_css} 
    8080{foreach from=$themes item=theme} 
     
    102102{/if} 
    103103</head> 
    104 <body id="{$BODY_ID}" class="{if $includeMenu=="on"}{$greydragon.p_main_menu}-menu{else}hide-menu{/if}{if $PAGE_BANNER}{else} no-header{/if}"> 
     104<body id="{$BODY_ID}" class="{if $includeMenu=="on"}{$greydragon.p_main_menu}-menu{else}hide-menu{/if}{if $PAGE_BANNER}{else} no-header{/if}{if $greydragon.p_nocounter == "on"} no-b-counter{/if}"> 
    105105<div id="the_page"> 
    106106{if not empty($header_msgs)} 
  • extensions/greydragon/template/menubar.tpl

    r30210 r30484  
    44  <dl id="{$id}"> 
    55    {if not empty($block->template)} 
    6     {include file=$block->template|@get_extent:$id } 
     6      {include file=$block->template|@get_extent:$id } 
    77    {else} 
    88    {$block->raw_content} 
  • extensions/greydragon/template/picture.tpl

    r30210 r30484  
    11{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'} 
    2 {combine_script id='picture-js' load='async' require='jquery' path='themes/greydragon/js/theme.photo.js'} 
     2{combine_script id='picture-js' load='async' require='jquery,core.switchbox' path='themes/greydragon/js/theme.photo.js'} 
     3{assign var=overlay_mode value="off"} 
     4{if $greydragon.p_pict_tab_mode == "txt-with-overlay" || $greydragon.p_pict_tab_mode == "ico-with-overlay"}{$overlay_mode="on"}{/if} 
     5{assign var=ico_mode value="off"} 
     6{if $greydragon.p_pict_tab_mode == "ico-tab-open" || $greydragon.p_pict_tab_mode == "ico-tab-close" || $greydragon.p_pict_tab_mode == "ico-with-overlay"}{$ico_mode="on"}{/if} 
    37 
    48{if isset($MENUBAR)}{$MENUBAR}{/if} 
     9 
    510<div id="content"{if isset($MENUBAR)} class="contentWithMenu"{/if}> 
    6  
    711{if isset($errors) or not empty($infos)} 
    812{include file='infos_errors.tpl'} 
     
    9195{strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} 
    9296{footer_script} 
    93 {literal}function addToCadie(aElement, rootUrl, id) 
    94 { 
    95 if (aElement.disabled) return; 
    96 aElement.disabled=true; 
    97 var y = new PwgWS(rootUrl); 
    98 y.callService( 
    99   "pwg.caddie.add", {image_id: id} , 
    100   { 
    101     onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, 
    102     onSuccess: function(result) { aElement.disabled = false; } 
    103   } 
    104   ); 
     97{literal}function addToCadie(aElement, rootUrl, id) { 
     98  if (aElement.disabled) return; 
     99  aElement.disabled=true; 
     100  var y = new PwgWS(rootUrl); 
     101  y.callService("pwg.caddie.add", {image_id: id}, { onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, onSuccess: function(result) { aElement.disabled = false; }}); 
    105102}{/literal} 
    106103{/footer_script} 
     
    149146</div> 
    150147{/if} *} 
    151 </div> 
     148{if $greydragon.p_pict_tab_mode !== "hide" && $overlay_mode == "on"} 
     149<div id="image-metadata-ico"> 
     150  <ul class="image-metadata-ico">  
     151    {if isset($COMMENT_IMG)}<li class="meta-desc{if $ico_mode=="on"} glyphicon glyphicon-eye-open{/if}{if $def_tab == 'desc'} active{/if}">{if $ico_mode=="off"}{'Description'|@translate}{/if}</li>{/if} 
     152    <li class="meta-info {if $ico_mode=="on"} glyphicon glyphicon-info-sign{/if}{if $def_tab == 'info'} active{/if}">{if $ico_mode=="off"}{'Info'|@translate}{/if}</li> 
     153    {if isset($metadata)}<li class="meta-exif{if $ico_mode=="on"} glyphicon glyphicon-camera{/if}{if $def_tab == 'exif'} active{/if}">{if $ico_mode=="off"}{'Exif'|@translate}{/if}</li>{/if} 
     154    <li class="meta-tags{if $ico_mode=="on"} glyphicon glyphicon-tags{/if}{if $def_tab == 'tags'} active{/if}" >{if $ico_mode=="off"}{'Tags'|@translate}{/if}</li> 
     155    {if isset($COMMENT_COUNT)}<li class="meta-comment{if $ico_mode=="on"} glyphicon glyphicon-comment{/if}{if $def_tab == 'comments'} active{/if}">{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if} 
     156  </ul> 
     157</div> 
     158{/if} 
     159 
     160</div> 
     161 
    152162{assign var=def_tab value="{$greydragon.p_pict_tab_default}"} 
    153163{if !isset($metadata) && $def_tab == 'exif'}{$def_tab="desc"}{/if} 
    154164{if !isset($COMMENT_COUNT) && $def_tab == 'comments'}{$def_tab="desc"}{/if} 
    155165{if !isset($COMMENT_IMG) && $def_tab == 'desc'}{$def_tab="info"}{/if} 
    156 {if $def_tab !== "hide"} 
     166{if $greydragon.p_pict_tab_mode !== "hide" && $overlay_mode == "off"} 
    157167<ul class="image-metadata">  
    158   {if isset($COMMENT_IMG)}<li {if $def_tab == 'desc'}class="active"{/if} rel="tab-desc">{'Description'|@translate}</li>{/if} 
    159   <li {if $def_tab == 'info'}class="active"{/if} rel="tab-meta">{'Info'|@translate}</li> 
    160   {if isset($metadata)}<li {if $def_tab == 'exif'}class="active"{/if} rel="tab-exif">{'Exif'|@translate}</li>{/if} 
    161   <li {if $def_tab == 'tags'}class="active"{/if} rel="tab-tags">{'Tags'|@translate}</li> 
    162   {if isset($COMMENT_COUNT)}<li {if $def_tab == 'comments'}class="active"{/if} rel="tab-comment">{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}</li>{/if} 
     168  {if isset($COMMENT_IMG)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-eye-open{/if}{if $def_tab == 'desc'} active{/if}" rel="tab-desc">{if $ico_mode=="off"}{'Description'|@translate}{/if}</li>{/if} 
     169  <li class="{if $ico_mode=="on"}glyphicon glyphicon-info-sign{/if}{if $def_tab == 'info'} active{/if}" rel="tab-meta">{if $ico_mode=="off"}{'Info'|@translate}{/if}</li> 
     170  {if isset($metadata)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-camera{/if}{if $def_tab == 'exif'} active{/if}" rel="tab-exif">{if $ico_mode=="off"}{'Exif'|@translate}{/if}</li>{/if} 
     171  <li class="{if $ico_mode=="on"}glyphicon glyphicon-tags{/if}{if $def_tab == 'tags'} active{/if}" rel="tab-tags">{if $ico_mode=="off"}{'Tags'|@translate}{/if}</li> 
     172  {if isset($COMMENT_COUNT)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-comment{/if}{if $def_tab == 'comments'} active{/if}" rel="tab-comment">{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if} 
     173  <li id="image-metadata-toggle" class="glyphicon {if $greydragon.p_pict_tab_mode == "txt-tab-close" || $greydragon.p_pict_tab_mode == "ico-tab-close"}glyphicon-chevron-down{else}glyphicon-chevron-up{/if}" ></li> 
    163174</ul> 
    164  
    165 <div class="image-metadata-tabs">  
     175{/if} 
     176{if $greydragon.p_pict_tab_mode !== "hide"} 
     177<div class="image-metadata-tabs{if $overlay_mode=="on"} overlay{/if}" {if $greydragon.p_pict_tab_mode == "txt-tab-close" || $greydragon.p_pict_tab_mode == "ico-tab-close" || $overlay_mode=="on"}style="display: none;"{/if}>  
    166178  {if isset($COMMENT_IMG)} 
    167179  <div id="tab-desc" class="image-metadata-tab">  
     
    171183 
    172184  <div id="tab-meta" class="image-metadata-tab">  
    173     <dl id="standard" class="imageInfoTable"> 
     185    <dl id="standard" class="imageInfoTable dl-horizontal"> 
    174186    {strip} 
    175187      {if $display_info.author and isset($INFO_AUTHOR)} 
    176       <div id="Author" class="imageInfo"> 
    177         <dt>{'Author'|@translate}</dt> 
    178         <dd>{$INFO_AUTHOR}</dd> 
    179       </div> 
     188      <dt id="Author" class="imageInfo">{'Author'|@translate}</dt> 
     189      <dd>{$INFO_AUTHOR}</dd> 
    180190      {/if} 
    181191      {if $display_info.created_on and isset($INFO_CREATION_DATE)} 
    182       <div id="datecreate" class="imageInfo"> 
    183         <dt>{'Created on'|@translate}</dt> 
    184         <dd>{$INFO_CREATION_DATE}</dd> 
    185       </div> 
     192      <dt id="datecreate">{'Created on'|@translate}</dt> 
     193      <dd>{$INFO_CREATION_DATE}</dd> 
    186194      {/if} 
    187195      {if $display_info.posted_on} 
    188       <div id="datepost" class="imageInfo"> 
    189         <dt>{'Posted on'|@translate}</dt> 
    190         <dd>{$INFO_POSTED_DATE}</dd> 
    191       </div> 
     196      <dt id="datepost">{'Posted on'|@translate}</dt> 
     197      <dd>{$INFO_POSTED_DATE}</dd> 
    192198      {/if} 
    193199      {if $display_info.dimensions and isset($INFO_DIMENSIONS)} 
    194       <div id="Dimensions" class="imageInfo"> 
    195         <dt>{'Dimensions'|@translate}</dt> 
    196         <dd>{$INFO_DIMENSIONS}</dd> 
    197       </div> 
     200      <dt id="Dimensions">{'Dimensions'|@translate}</dt> 
     201      <dd>{$INFO_DIMENSIONS}</dd> 
    198202      {/if} 
    199203      {if $display_info.file} 
    200       <div id="File" class="imageInfo"> 
    201         <dt>{'File'|@translate}</dt> 
    202         <dd>{$INFO_FILE}</dd> 
    203       </div> 
     204      <dt id="File">{'File'|@translate}</dt> 
     205      <dd>{$INFO_FILE}</dd> 
    204206      {/if} 
    205207      {if $display_info.filesize and isset($INFO_FILESIZE)} 
    206       <div id="Filesize" class="imageInfo"> 
    207         <dt>{'Filesize'|@translate}</dt> 
    208         <dd>{$INFO_FILESIZE}</dd> 
    209       </div> 
     208      <dt id="Filesize">{'Filesize'|@translate}</dt> 
     209      <dd>{$INFO_FILESIZE}</dd> 
    210210      {/if} 
    211211      {if $display_info.categories and isset($related_categories)} 
    212       <div id="Categories" class="imageInfo"> 
    213         <dt>{'Albums'|@translate}</dt> 
    214         <dd> 
    215           <ul> 
    216             {foreach from=$related_categories item=cat} 
    217             <li>{$cat}</li> 
    218             {/foreach} 
    219           </ul> 
    220         </dd> 
    221       </div> 
     212      <dt id="Categories">{'Albums'|@translate}</dt> 
     213      <dd> 
     214        <ul> 
     215          {foreach from=$related_categories item=cat} 
     216          <li>{$cat}</li> 
     217          {/foreach} 
     218        </ul> 
     219      </dd> 
    222220      {/if} 
    223221      {if $display_info.visits} 
    224       <div id="Visits" class="imageInfo"> 
    225         <dt>{'Visits'|@translate}</dt> 
    226         <dd>{$INFO_VISITS}</dd> 
    227       </div> 
    228       {/if} 
    229  
     222      <dt id="Visits">{'Visits'|@translate}</dt> 
     223      <dd>{$INFO_VISITS}</dd> 
     224      {/if} 
    230225      {if $display_info.rating_score and isset($rate_summary)} 
    231       <div id="Average" class="imageInfo"> 
    232         <dt>{'Rating score'|@translate}</dt> 
    233         <dd> 
    234           {if $rate_summary.count} 
    235           <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$rate_summary.count|@translate_dec:'%d rate':'%d rates'})</span> 
    236           {else} 
    237           <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> 
    238           {/if} 
    239         </dd> 
    240       </div> 
     226      <dt id="Average">{'Rating score'|@translate}</dt> 
     227      <dd> 
     228        {if $rate_summary.count} 
     229        <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$rate_summary.count|@translate_dec:'%d rate':'%d rates'})</span> 
     230        {else} 
     231        <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> 
     232        {/if} 
     233      </dd> 
    241234      {/if} 
    242235 
    243236      {if isset($rating)} 
    244       <div id="rating" class="imageInfo"> 
    245         <dt> 
    246           <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> 
    247         </dt> 
    248         <dd> 
    249           <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> 
    250           <div> 
    251             {foreach from=$rating.marks item=mark name=rate_loop} 
    252               {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} 
    253               <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> 
    254               {else} 
    255               <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> 
    256               {/if} 
    257             {/foreach} 
    258             {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} 
     237      <dt id="rating" > 
     238        <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> 
     239      </dt> 
     240      <dd> 
     241        <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> 
     242          {foreach from=$rating.marks item=mark name=rate_loop} 
     243            {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} 
     244            <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> 
     245            {else} 
     246            <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> 
     247            {/if} 
     248          {/foreach} 
     249          {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} 
    259250            {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} 
    260251            {footer_script} 
     
    276267              {rdelim}{rdelim} ); 
    277268            {/footer_script} 
    278             {/strip} 
    279           </div> 
    280           </form> 
    281         </dd> 
    282       </div> 
     269          {/strip} 
     270        </form> 
     271      </dd> 
    283272      {/if} 
    284273 
    285274      {if $display_info.privacy_level and isset($available_permission_levels)} 
    286       <div id="Privacy" class="imageInfo"> 
    287         <dt>{'Who can see this photo?'|@translate}</dt> 
    288         <dd> 
    289           <div> 
    290             <a id="privacyLevelLink" href>{$available_permission_levels[$current.level]}</a> 
    291           </div> 
     275      <dt id="Privacy">{'Who can see this photo?'|@translate}</dt> 
     276      <dd> 
     277        <a id="privacyLevelLink" href>{$available_permission_levels[$current.level]}</a> 
    292278{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} 
    293279{footer_script require='jquery'}{strip} 
     
    308294  (SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox"); 
    309295{/strip}{/footer_script} 
    310           <div id="privacyLevelBox" class="switchBox" style="display:none"> 
    311             {foreach from=$available_permission_levels item=label key=level} 
     296        <div id="privacyLevelBox" class="switchBox" style="display:none"> 
     297          {foreach from=$available_permission_levels item=label key=level} 
    312298            <span class="switchCheck"{if $level != $current.level} style="visibility:hidden"{/if}>&#x2714; </span> 
    313299            <a id="switchLevel{$level}" href="javascript:setPrivacyLevel({$current.id},{$level})">{$label}</a><br> 
    314             {/foreach} 
    315           </div> 
    316         </dd> 
    317       </div> 
    318       {/if} 
    319       {/strip} 
     300          {/foreach} 
     301        </div> 
     302      </dd> 
     303      {/if} 
     304    {/strip} 
    320305    </dl> 
    321   </div>  
     306  </div> 
    322307 
    323308  {if isset($metadata)} 
    324309  <div id="tab-exif" class="image-metadata-tab">  
    325     <dl id="Metadata" class="imageInfoTable"> 
     310    <dl id="metadata" class="imageInfoTable dl-horizontal"> 
    326311    {foreach from=$metadata item=meta} 
    327312      {foreach from=$meta.lines item=value key=label} 
    328       <div class="imageInfo"> 
    329313        <dt>{$label}</dt> 
    330314        <dd>{$value}</dd> 
    331       </div> 
    332315      {/foreach} 
    333316    {/foreach} 
     
    338321  <div id="tab-tags" class="image-metadata-tab">  
    339322    {if $display_info.tags and isset($related_tags)} 
    340     <div> 
    341       <dd> 
     323    <dd> 
    342324      {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach} 
    343       </dd> 
    344     </div> 
     325    </dd> 
     326    {else} 
     327    ... 
    345328    {/if} 
    346329  </div> 
     
    390373</div> 
    391374{/if} 
     375</div> 
    392376{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} 
  • extensions/greydragon/themeconf.inc.php

    r30215 r30484  
    22/* 
    33Theme Name: GreyDragon 
    4 Version: 1.0.13 
     4Version: 1.0.14 
    55Description: Dark, slate, white background, grayscale. 
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=775 
     
    1111if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    1212 
    13 define('GDTHEME_VERSION', '1.0.13'); 
     13define('GDTHEME_VERSION', '1.0.14'); 
    1414 
    1515require_once( PHPWG_THEMES_PATH . 'greydragon/include/greydragon.class.php'); 
     
    2525 
    2626add_event_handler('init', 'greydragon_init'); 
    27 add_event_handler('loc_begin_page_header', 'greydragon_set_header', 55); 
    2827 
    2928pwg_set_session_var('show_metadata', 1); 
     
    4645// Render custom header content 
    4746function greydragon_render_header() { 
    48  
    4947  return greyDragonCore::Instance()->getHeader(); 
    50 } 
    51  
    52 // Add custom favicon or custom meta if provided 
    53 function greydragon_set_header() { 
    54   global $template; 
    55  
    56   $themeCore = greyDragonCore::Instance(); 
    57   if (($themeCore->hasOption("p_favicon_path")) || ($themeCore->getOption("p_nogenerator"))): 
    58     $template->set_prefilter('header', "greydragon_head"); 
    59   endif; 
    60 } 
    61  
    62 // Render head content 
    63 function greydragon_head($content, &$smarty) { 
    64   return greyDragonCore::Instance()->getHead($content); 
    6548} 
    6649 
Note: See TracChangeset for help on using the changeset viewer.