Ignore:
Timestamp:
12/19/14 07:15:58 (5 years ago)
Author:
SergeD
Message:

version 1.1.19 - please refer to changelog for more details

Location:
extensions/greydragon
Files:
2 added
7 edited

Legend:

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

    r30730 r30783  
    3838  conf_update_param('greydragon', pwg_db_real_escape_string($conf['greydragon'])); 
    3939 
    40   if ($themeCore->getOption('p_lowertext') == "on"): 
    41     $css  = "/* Theme dynamic settings. Do not modify */\n" 
    42           . "html, body, input, select, textarea, file { text-transform: lowercase; }\n\n"; 
    43   else: 
    44     $css = ""; 
    45   endif; 
    46   $temp = $themeCore->getOption('p_customcss'); 
    47   if ($temp): 
    48     $css .= "/* Custom CSS. Do not modify */\n" . $temp; 
    49   endif; 
    50  
    51   $fileName = $themeroot . 'css/custom.css'; 
    52   if ($css): 
    53     $handle = fopen($fileName, "w"); 
    54     if ($handle): 
    55       fwrite($handle, $css); 
    56       fclose($handle); 
    57     endif; 
    58   else: 
    59     @unlink($fileName); 
    60   endif; 
     40  $themeCore->prepareCustomCSS(); 
    6141 
    6242  pwg_set_session_var( 'purge_template', 1 ); 
  • extensions/greydragon/changelog.txt

    r30754 r30783  
    1818 
    1919=== Changelog === 
     20version 1.1.19 
     21+ custom.css location moved to local/greydragon/ to comply with PWG guidelines. File should be automatically created when theme is updated. 
     22  Please make sure that migration is successful as it may require adjustment of "local" Folder permissions in some cases 
     23- Fix issue when Static menu would cause misalignment of the content in 3rd party plugins 
     24- Adjust min height of the content with Static menu to better fit the screen 
     25- Fixed issue when using SEO friendly URLs would cause logo not being visible in sub pages 
     26 
    2027version 1.0.18 
    2128- Added check for custom.css being present on new installations to prevent SMARTY error 
  • extensions/greydragon/css/styles.css

    r30741 r30783  
    116116/* Static */ 
    117117#menubar.static { background: none !important; bottom: auto; } 
     118body.static-menu .contentWithMenu, body.static-menu #the_page .contentWithMenu { margin-left: 200px; amargin-left: 0; } 
     119body.static-menu .contentWithMenu .titrePage { margin-left: -194px; } 
     120body.static-menu #mbCategories { margin-bottom: 1em; } 
     121 
     122/* 
    118123body.static-menu .contentWithMenu ul.thumbnails, 
    119124body.static-menu .contentWithMenu ul.thumbnailCategories, 
     
    122127body.static-menu .contentWithMenu form.filter, 
    123128body.static-menu .contentWithMenu .category_search_results { padding-left: 200px; margin-left: 0; } 
     129 
    124130body.static-menu .contentWithMenu .titrePage { padding-left: 6px; } 
    125131body.static-menu .contentWithMenu .calendarCalBar { margin-left: 210px; } 
     132*/ 
    126133 
    127134/* Static header bottom */ 
     
    306313 
    307314.content .additional_info { margin-top: 0.4em; margin-bottom: 0.4em; padding: .5em 1em; } 
    308 body.static-menu .contentWithMenu .additional_info { margin-left: 204px; } 
    309315#theImage .imageComment { margin: 1em 1em 0.4em 1em; padding: .5em 1em; } 
    310316 
  • extensions/greydragon/include/greydragon.class.php

    r30754 r30783  
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    44 
    5 define('GDTHEME_VERSION', '1.0.18'); 
     5define('GDTHEME_VERSION', '1.1.19'); 
    66 
    77define("QUOTES_NONE",   FALSE); 
     
    1717  private $themeConfig; 
    1818  private $themeConfigMin; 
     19  private $dir; 
     20  private $cssfile; 
    1921 
    2022  public static function Instance($ver = '') { 
     
    2628 
    2729  private function __construct($ver = ''){ 
     30    $this->dir  = PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'greydragon/'; 
     31 
    2832    self::loadConfig($ver); 
    2933  } 
     
    288292  public function getHeader() { 
    289293    $content = ""; 
     294    $root_base = get_root_url(); 
     295    if ($root_base): 
     296    else: 
     297      $root_base = '/'; 
     298    endif; 
     299 
    290300    if ($this->hasOption('p_logo_path')): 
    291       $content .= '<a title="Home" id="g-logo" href="' . PHPWG_ROOT_PATH . '"><img alt="Home" src="' . PHPWG_ROOT_PATH . $this->getOption('p_logo_path') . '"></a>'; 
     301      $content .= '<a title="Home" id="g-logo" href="' . $root_base . '"><img alt="Home" src="' . $root_base . $this->getOption('p_logo_path') . '"></a>'; 
    292302    endif; 
    293303    if ($this->hasOption('p_header')): 
    294       $content .= '<a title="Home" id="g-header-text" href="' . PHPWG_ROOT_PATH . '">' . $this->getOption('p_header') . '</a>'; 
     304      $content .= '<a title="Home" id="g-header-text" href="' . $root_base . '">' . $this->getOption('p_header') . '</a>'; 
    295305    elseif ($this->hasOption('page_banner', TRUE)): 
    296       $content .= '<a title="Home" id="g-header-text" href="' . PHPWG_ROOT_PATH . '">' . $this->getOption('page_banner', TRUE) . '</a>'; 
     306      $content .= '<a title="Home" id="g-header-text" href="' . $root_base . '">' . $this->getOption('page_banner', TRUE) . '</a>'; 
    297307    endif;                                                                                                               
    298308 
     
    300310  } 
    301311 
     312  public function prepareCustomCSS() { 
     313 
     314    $this->cssfile = dirname(dirname(dirname(dirname(__FILE__)))) . '/' . PWG_LOCAL_DIR . 'greydragon/custom.css'; 
     315 
     316    if ($this->getOption('p_lowertext') == "on"): 
     317      $css  = "/* Theme dynamic settings. Do not modify */\n" 
     318            . "html, body, input, select, textarea, file { text-transform: lowercase; }\n\n"; 
     319    else: 
     320      $css = ""; 
     321    endif; 
     322    $temp = $this->getOption('p_customcss'); 
     323    if ($temp): 
     324      $css .= "/* Custom CSS. Do not modify */\n" . $temp; 
     325    endif; 
     326 
     327    // create a local directory 
     328    if (!file_exists($this->dir)): 
     329      mkdir($this->dir, 0755); 
     330    endif; 
     331 
     332    if ($css): 
     333      $handle = fopen($this->cssfile, "w"); 
     334      if ($handle): 
     335        fwrite($handle, $css); 
     336        fclose($handle); 
     337      endif; 
     338    else: 
     339      @unlink($this->cssfile); 
     340    endif; 
     341  } 
     342 
     343  public function deleteCustomCSS() { 
     344 
     345    // delete local folder 
     346    foreach (scandir($this->dir) as $file): 
     347      if ($file == '.' or $file == '..') continue; 
     348      unlink($this->dir . $file); 
     349    endforeach; 
     350    rmdir($this->dir); 
     351  } 
     352 
    302353} 
    303354 
  • extensions/greydragon/js/theme.menu.js

    r30210 r30783  
    4242    if (p_main_menu == 'static') {  
    4343      var mh = jQuery('#menubar').height(); 
    44       jQuery('.contentWithMenu').css("min-height", mh + 20); 
     44      jQuery('.contentWithMenu').css("min-height", mh + 30); 
    4545      jQuery('#menubar').css("display", "block");  
    4646      return;  
  • extensions/greydragon/template/header.tpl

    r30754 r30783  
    3434{if isset($U_UP)          }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if} 
    3535{assign var=root value="themes/greydragon/css"} 
     36{assign var=local value="local/greydragon"} 
    3637{assign var=colorpack value=$root|cat:"/colorpack/"|cat:$greydragon.p_colorpack|cat:"/styles.css"} 
    3738{combine_css path="themes/greydragon/css/bootstrap.min.css" order=-100} 
     
    3940{combine_css path="$colorpack" order=101} 
    4041{if count($greydragon.p_customcss) > 0 || $greydragon.p_lowertext == "on"} 
    41   {if $root|cat:"/custom.css"|file_exists} 
    42   {combine_css path="themes/greydragon/css/custom.css" order=101} 
     42  {if $local|cat:"/custom.css"|file_exists} 
     43  {combine_css path="local/greydragon/custom.css" order=101} 
    4344  {/if} 
    4445{/if} 
  • extensions/greydragon/themeconf.inc.php

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