Changeset 32863


Ignore:
Timestamp:
Oct 31, 2022, 12:35:43 AM (19 months ago)
Author:
SergeD
Message:

Version 1.3.8 - see changelog for details

Location:
extensions/greydragon
Files:
11 edited

Legend:

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

    r32639 r32863  
    2020  $themeCore->saveSettingsFromPost();
    2121
    22   if ($themeCore->getOption('p_rootpage') == 'on'):
    23     global $prefixeTable, $conf;
    24     $ap_conf = @unserialize($conf['additional_pages']);
    25     if ($ap_conf['homepage']):
     22        // Prepare Root Page
     23  global $prefixeTable, $conf;
     24        if (array_key_exists('additional_pages', $conf)):
     25          $ap_conf = @unserialize($conf['additional_pages']);
     26        if (array_key_exists('homepage', $ap_conf) && ($ap_conf['homepage'])):
    2627      $config_temp = $themeCore->getConfig();
    27       if ($themeCore->prepareHomePage($prefixeTable, $ap_conf['homepage'])):
    28         array_push($page['infos'], l10n('Home Page Content for "Additional Pages" plugin has been updated'));
    29       endif;
    30     else:
     28                  if ($themeCore->getOption('p_rootpage') == 'on'):
     29              if ($themeCore->prepareHomePage($prefixeTable, $ap_conf['homepage'], false)):
     30                            array_push($page['infos'], l10n('Home Page Content for "Additional Pages" plugin has been updated'));
     31                                else:
     32                array_push($page['infos'], l10n('Home Page Content for "Additional Pages" plugin was not updated. No new content detected.'));
     33        endif;
     34            else:
     35              $themeCore->prepareHomePage($prefixeTable, $ap_conf['homepage'], true);
     36                    array_push($page['infos'], l10n('Home Page Content for "Additional Pages" plugin has been removed'));
     37                        endif;
     38                else:
    3139      array_push($page['infos'], l10n('Please Create Home Page in "Additional Pages" Plugin'));
    3240    endif;
     41        else:
     42    array_push($page['infos'], l10n('Please Create Home Page in "Additional Pages" Plugin'));
    3343  endif;
    3444
  • extensions/greydragon/admin/admin.tpl

    r32639 r32863  
    77{if isset($options.p_debug) and ($options.p_debug == "on")}
    88{debug}
     9{$options|@print_r}
    910{/if}
    1011
     
    2930        <label>
    3031          <i class="gd-checkbox fas {if $options.hasMinVer=="yes"}fa-check-square success{else}fa-ban error{/if}"></i>&nbsp;
    31           <input name="vercheck" disabled="1" type="checkbox" checked="checked" value="1">{$pwg->sprintf({'Piwigo %s Core Installed (min required 11.0+)'|@translate}, {$options.pwgVer})}
     32          <input name="vercheck" disabled="1" type="checkbox" checked="checked" value="1">{$pwg->sprintf({'Piwigo %s Core Installed (min required %s)'|@translate}, {$options.pwgVer}, 'PIWIGO 11')}
    3233        </label>
    3334      </li>
     
    110111        <label for="p_credits">{'Show Site Credits'|@translate}</label>
    111112      </li>
    112       <li><label><i class="gd-checkbox fas {if $options.p_nogenerator=="on"}fa-check-square{else}fa-square{/if}"></i>&nbsp;<input name="p_nogenerator" id="p_nogenerator" type="checkbox" value="on" {if $options.p_nogenerator=="on"}checked="checked"{/if}>{'Remove Piwigo Generator Meta Tag'|@translate}</label></li>
     113      <li><label><i class="gd-checkbox fas {if isset($options.p_nogenerator) and ($options.p_nogenerator=="on")}fa-check-square{else}fa-square{/if}"></i>&nbsp;<input name="p_nogenerator" id="p_nogenerator" type="checkbox" value="on" {if isset($options.p_nogenerator) and ($options.p_nogenerator=="on")}checked="checked"{/if}>{'Remove Piwigo Generator Meta Tag'|@translate}</label></li>
    113114      <li><label><i class="gd-checkbox fas {if $options.p_lowertext=="on"}fa-check-square{else}fa-square{/if}"></i>&nbsp;<input name="p_lowertext" id="p_lowertext" type="checkbox" value="on" {if $options.p_lowertext=="on"}checked="checked"{/if}>{'Use Lowercase Text'|@translate}</label></li>
    114115      <li><label><i class="gd-checkbox fas {if $options.p_hideabout=="on"}fa-check-square{else}fa-square{/if}"></i>&nbsp;<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>
  • extensions/greydragon/admin/help.inc.tpl

    r31979 r32863  
    2626      <p>{'Few examples:'|@translate}</p>
    2727      <ul>
    28         <li>{'Remove fixed width'|@translate}:<br>&nbsp;&nbsp;&nbsp;body { width: auto; }</li>
     28        <li>{'Remove fixed width'|@translate}:<br>&nbsp;&nbsp;&nbsp;body.gd-no-fullscreen { width: auto; }</li>
    2929        <li>{'Remove fixed width but keep min-width'|@translate}:<br>&nbsp;&nbsp;&nbsp;body { width: auto; min-width: 1270px; }</li>
    3030        <li>{'Add Thumb shadow for gdThumb: Set margin between thumbs to 10-14px. Modify shadow color to match your theme'|@translate}:<br>&nbsp;&nbsp;&nbsp;.gdthumb { box-shadow: 6px 6px 3px #888888; }</li>
  • extensions/greydragon/changelog.txt

    r32639 r32863  
    11=== Grey Dragon Theme ===
    2 Grey Dragon Theme - a custom theme for Piwigo 2
     2Grey Dragon Theme - a custom theme for Piwigo
    33
    44Tags: HTML 5, Bootstrap, Open Sans
     
    1818
    1919=== Changelog ===
     20version 1.3.8
     21+ Verified compatibility with PIWIGO 13.x
     22+ Added detection for Home Page when settings need to be updated.
     23+ Added removal of home page content when feature is turned off.
     24+ Adjusted help for improved full width CSS
     25+ TR: Improved translation string to make PIWIGO version reference dynamic
     26+ HELP: Adjusted Full body width suggestion to reflect current style references
     27
    2028version 1.3.7
    21 - Removed snarty reference in prefilter function
     29- Removed smarty reference in prefilter function
    2230+ Removed compatibility with older versions of PIWIGO. Min required version is now 11.x
    23 + Minor changes to lang files to reflect small change in the label in admin area
     31+ Minor changes to lang files to reflect the small changes in the label in admin area
    2432
    2533version 1.3.6
  • extensions/greydragon/css/styles.css

    r32637 r32863  
    323323
    324324#the_page .content .stuffs    { margin: 0!important}
    325 .categoryActions .theme_menuf   { display: none;}
     325.categoryActions .theme_menuf { display: none; }
     326#theHomePage .additional_info { display: none; }
     327#theCategoryPage .additional_info { display: none; }
    326328
    327329/* custom */
  • extensions/greydragon/include/greydragon.class.php

    r32639 r32863  
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    44
    5 define('GDTHEME_VERSION', '1.3.7');
     5define('GDTHEME_VERSION', '1.3.8');
    66
    77define("QUOTES_NONE",   FALSE);
     
    9494    $this->themeConfigMin["version"] = $ver;
    9595    $this->themeConfigMin["hasUserTags"] = isset($pwg_loaded_plugins['user_tags']);
    96 
     96   
    9797    $this->themeConfig = $this->validateDefault($this->themeConfigMin);
    9898  }
     
    286286  }
    287287
    288   public function prepareHomePage($prefix, $pageId) {
     288  public function prepareHomePage($prefix, $pageId, $remove) {
    289289
    290290    $r_desc    = $this->getOption('p_rootpage_desc');
     
    321321    endif;
    322322    $content .= '
    323 <!--
    324 <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
    325   <ol class="carousel-indicators">
    326     <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
    327     <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
    328     <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
    329   </ol>
    330   <div class="carousel-inner">
    331     <div class="carousel-item active">
    332       <img class="d-block w-100" src="..." alt="First slide">
    333     </div>
    334     <div class="carousel-item">
    335       <img class="d-block w-100" src="..." alt="Second slide">
    336     </div>
    337     <div class="carousel-item">
    338       <img class="d-block w-100" src="..." alt="Third slide">
    339     </div>
    340   </div>
    341   <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
    342     <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    343     <span class="sr-only">Previous</span>
    344   </a>
    345   <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
    346     <span class="carousel-control-next-icon" aria-hidden="true"></span>
    347     <span class="sr-only">Next</span>
    348   </a>
    349 </div>
    350 -->
    351 
    352323      <div style="width: 800px; min-height: 500px; display: inline-block; overflow: hidden;">
    353324';
     
    370341</div>';
    371342
    372     $query = 'UPDATE ' . $prefix . 'additionalpages '
    373            . 'SET content = "' . pwg_db_real_escape_string($content) . '" '
    374            . ' , standalone = FALSE '
    375            . 'WHERE (id = ' . $pageId . ') AND (content <> "' . pwg_db_real_escape_string($content) . '");';
    376     pwg_query($query);
    377     return (pwg_db_changes() > 0);
     343    if ($remove):
     344      $query = 'UPDATE ' . $prefix . 'additionalpages '
     345             . 'SET content = "" '
     346             . 'WHERE (id = ' . $pageId . ') AND (content = "' . pwg_db_real_escape_string($content) . '");';
     347      pwg_query($query);
     348      return (pwg_db_changes() > 0);
     349    else:
     350      $query = 'UPDATE ' . $prefix . 'additionalpages '
     351             . 'SET content = "' . pwg_db_real_escape_string($content) . '" '
     352             . ' , standalone = FALSE '
     353             . 'WHERE (id = ' . $pageId . ') AND (content <> "' . pwg_db_real_escape_string($content) . '");';
     354      pwg_query($query);
     355      return (pwg_db_changes() > 0);
     356    endif;
     357    return false;
    378358  }
    379359
  • extensions/greydragon/js/theme.photo.js

    r31043 r32863  
    7070          if ((classMeta.length == 2) && (classMeta[0] == "meta")) {
    7171            var metaTag = classMeta[1];
     72            var _height = false;
    7273            if (metaTag == "info")    { var _href = "div#tab-meta"; } else { var _href = "div#tab-" + metaTag; }
    7374            if (metaTag == "comment") { var _width = "1200px"; } else if (metaTag == "cart") { _width = "600px"; } else { var _width = false; }
    74            
    75             el.colorbox({ inline:true, href: _href, className:"image-metadata-overlay", speed:200, opacity:0.6, width: _width });
     75            if (metaTag == "map") { var _width = "600px"; _height = "350px"; }
     76
     77            el.colorbox({ inline:true, href: _href, className:"image-metadata-overlay", speed:200, opacity:0.6, width: _width, height: _height });
    7678          }
    7779        }
  • extensions/greydragon/template/picture_tab_content.tpl

    r32472 r32863  
    147147    <dd>
    148148      <div id="map"></div>
    149       <script type="text/javascript">{$OSMJS}</script>
    150       <div id="osm_attrib" style="visibility: hidden; display: none;">
    151         <ul>
    152           <li>{"PLUGIN_BY"|@translate}</li>
    153           <li><a href="http://leafletjs.com/" target="_blank">Leaflet</a></li>
    154           <li>&copy; {"OSM_CONTRIBUTORS"|@translate}</li>
    155         </ul>
    156       </div>
     149      <script type="text/javascript">
     150        {$OSMJS}
     151      </script>
     152{footer_script}
     153        jQuery('#map').on('cbox_complete', function(){ map.invalidateSize(); });
     154{/footer_script}
     155
    157156      {if $SHOWOSM}
    158157      <a href="{$OSMLINK}" target="_blank">{"VIEW_OSM"|@translate}</a>
  • extensions/greydragon/template/picture_tab_ico.tpl

    r32472 r32863  
    1   {if isset( $COMMENT_IMG )}<li class="meta-desc{if $ico_mode=="on"} fas fa-eye{/if}{if $def_tab == "desc"} active{/if}"{if $ico_mode=="on"} title="{"Description"|@translate}"{/if}>{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if}
    2   <li class="meta-info {if $ico_mode=="on"} fas fa-info-circle{/if}{if $def_tab == "info"} active{/if}"{if $ico_mode=="on"} title="{"Info"|@translate}"{/if}>{if $ico_mode=="off"}{"Info"|@translate}{/if}</li>
    3   {if isset($metadata)}<li class="meta-exif{if $ico_mode=="on"} fas fa-camera{/if}{if $def_tab == "exif"} active{/if}"{if $ico_mode=="on"} title="{"Exif"|@translate}"{/if}>{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>{/if}
    4 <!--  {if isset($OSMJS)}<li class="meta-map{if $ico_mode=="on"} fas fa-map-marked{/if}{if $def_tab == "map"} active{/if}"{if $ico_mode=="on"} title="{"Map"|@translate}"{/if}>{if $ico_mode=="off"}{"Map"|@translate}{/if}</li>{/if}
    5 -->
    6   {if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="meta-tags{if $ico_mode=="on"} fas fa-tags{/if}{if $def_tab == "tags"} active{/if}"{if $ico_mode=="on"} title="{"Tags"|@translate}"{/if}>{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if}
    7   {if isset($COMMENT_COUNT)}<li class="meta-comment{if $ico_mode=="on"} fas fa-comment{/if}{if $def_tab == "comments"} active{/if}"{if $ico_mode=="on"} title="{"Comments"|@translate}"{/if}>{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if}
    8   {if isset($ppppp_e_mail)}<li class="meta-cart{if $ico_mode=="on"} fas fa-shopping-cart{/if}{if $def_tab == "cart"} active{/if}"{if $ico_mode=="on"} title="{"Cart"|@translate}"{/if}>{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if}
     1{if isset( $COMMENT_IMG )}<li class="meta-desc{if $ico_mode=="on"} fas fa-eye{/if}{if $def_tab == "desc"} active{/if}"{if $ico_mode=="on"} title="{"Description"|@translate}"{/if}>{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if}
     2<li class="meta-info {if $ico_mode=="on"} fas fa-info-circle{/if}{if $def_tab == "info"} active{/if}"{if $ico_mode=="on"} title="{"Info"|@translate}"{/if}>{if $ico_mode=="off"}{"Info"|@translate}{/if}</li>
     3{if isset($metadata)}<li class="meta-exif{if $ico_mode=="on"} fas fa-camera{/if}{if $def_tab == "exif"} active{/if}"{if $ico_mode=="on"} title="{"Exif"|@translate}"{/if}>{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>
     4  {if isset($OSMJS)}
     5    {foreach from=$metadata item=meta}
     6      {foreach from=$meta.lines item=value key=key}
     7        {if ($key == 'latitude')}{assign var='gd_has_map' value=1}{/if}
     8      {/foreach}
     9    {/foreach}
     10    {if isset($gd_has_map)}
     11      <li class="meta-map{if $ico_mode=="on"} fas fa-map-marked{/if}{if $def_tab == "map"} active{/if}"{if $ico_mode=="on"} title="{"Map"|@translate}"{/if}>{if $ico_mode=="off"}{"Map"|@translate}{/if}</li>
     12    {/if}
     13  {/if}
     14{/if}
     15{if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="meta-tags{if $ico_mode=="on"} fas fa-tags{/if}{if $def_tab == "tags"} active{/if}"{if $ico_mode=="on"} title="{"Tags"|@translate}"{/if}>{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if}
     16{if isset($COMMENT_COUNT)}<li class="meta-comment{if $ico_mode=="on"} fas fa-comment{/if}{if $def_tab == "comments"} active{/if}"{if $ico_mode=="on"} title="{"Comments"|@translate}"{/if}>{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if}
     17{if isset($ppppp_e_mail)}<li class="meta-cart{if $ico_mode=="on"} fas fa-shopping-cart{/if}{if $def_tab == "cart"} active{/if}"{if $ico_mode=="on"} title="{"Cart"|@translate}"{/if}>{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if}
  • extensions/greydragon/template/picture_tab_txt.tpl

    r32472 r32863  
    1   {if isset( $COMMENT_IMG )}<li class="{if $ico_mode=="on"}fas fa-eye{/if}{if $def_tab == "desc"} active{/if}" rel="tab-desc"{if $ico_mode=="on"} title="{"Description"|@translate}"{/if}>{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if}
    2   <li class="{if $ico_mode=="on"}fas fa-info-circle{/if}{if $def_tab == "info"} active{/if}" rel="tab-meta"{if $ico_mode=="on"} title="{"Info"|@translate}"{/if}>{if $ico_mode=="off"}{"Info"|@translate}{/if}</li>
    3   {if isset($metadata)}<li class="{if $ico_mode=="on"}fas fa-camera{/if}{if $def_tab == "exif"} active{/if}" rel="tab-exif"{if $ico_mode=="on"} title="{"Exif"|@translate}"{/if}>{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>{/if}
    4 <!--  {if isset($OSMJS)}<li class="{if $ico_mode=="on"}fas fa-map-marked{/if}{if $def_tab == "map"} active{/if}" rel="tab-map"{if $ico_mode=="on"} title="{"Map"|@translate}"{/if}>{if $ico_mode=="off"}{"Map"|@translate}{/if}</li>{/if}
    5 -->
    6   {if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="{if $ico_mode=="on"}fas fa-tags{/if}{if $def_tab == "tags"} active{/if}" rel="tab-tags"{if $ico_mode=="on"} title="{"Tags"|@translate}"{/if}>{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if}
    7   {if isset($COMMENT_COUNT)}<li class="{if $ico_mode=="on"}fas fa-comment{/if}{if $def_tab == "comments"} active{/if}" rel="tab-comment"{if $ico_mode=="on"} title="{"Comments"|@translate}"{/if}>{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if}
    8   {if isset($ppppp_e_mail)}<li class="{if $ico_mode=="on"}fas fa-shopping-cart{/if}{if $def_tab == "cart"} active{/if}" rel="tab-cart"{if $ico_mode=="on"} title="{"Cart"|@translate}"{/if}>{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if}
     1{if isset( $COMMENT_IMG )}<li class="{if $ico_mode=="on"}fas fa-eye{/if}{if $def_tab == "desc"} active{/if}" rel="tab-desc"{if $ico_mode=="on"} title="{"Description"|@translate}"{/if}>{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if}
     2<li class="{if $ico_mode=="on"}fas fa-info-circle{/if}{if $def_tab == "info"} active{/if}" rel="tab-meta"{if $ico_mode=="on"} title="{"Info"|@translate}"{/if}>{if $ico_mode=="off"}{"Info"|@translate}{/if}</li>
     3{if isset($metadata)}<li class="{if $ico_mode=="on"}fas fa-camera{/if}{if $def_tab == "exif"} active{/if}" rel="tab-exif"{if $ico_mode=="on"} title="{"Exif"|@translate}"{/if}>{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>
     4  {if isset($OSMJS)}
     5    {foreach from=$metadata item=meta}
     6      {foreach from=$meta.lines item=value key=key}
     7        {if ($key == 'latitude')}{assign var='gd_has_map' value=1}{/if}
     8      {/foreach}
     9    {/foreach}
     10    {if isset($gd_has_map)}<li class="{if $ico_mode=="on"}fas fa-map-marked{/if}{if $def_tab == "map"} active{/if}" rel="tab-map"{if $ico_mode=="on"} title="{"Map"|@translate}"{/if}>{if $ico_mode=="off"}{"Map"|@translate}{/if}</li>{/if}
     11  {/if}
     12{/if}
     13{if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="{if $ico_mode=="on"}fas fa-tags{/if}{if $def_tab == "tags"} active{/if}" rel="tab-tags"{if $ico_mode=="on"} title="{"Tags"|@translate}"{/if}>{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if}
     14{if isset($COMMENT_COUNT)}<li class="{if $ico_mode=="on"}fas fa-comment{/if}{if $def_tab == "comments"} active{/if}" rel="tab-comment"{if $ico_mode=="on"} title="{"Comments"|@translate}"{/if}>{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if}
     15{if isset($ppppp_e_mail)}<li class="{if $ico_mode=="on"}fas fa-shopping-cart{/if}{if $def_tab == "cart"} active{/if}" rel="tab-cart"{if $ico_mode=="on"} title="{"Cart"|@translate}"{/if}>{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if}
  • extensions/greydragon/themeconf.inc.php

    r32639 r32863  
    22/*
    33Theme Name: GreyDragon
    4 Version: 1.3.7
     4Version: 1.3.8
    55Description: GreyDragon Theme
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=775
Note: See TracChangeset for help on using the changeset viewer.