Changeset 30783
- Timestamp:
- Dec 19, 2014, 7:15:58 AM (9 years ago)
- Location:
- extensions/greydragon
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/greydragon/admin/admin.inc.php
r30730 r30783 38 38 conf_update_param('greydragon', pwg_db_real_escape_string($conf['greydragon'])); 39 39 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(); 61 41 62 42 pwg_set_session_var( 'purge_template', 1 ); -
extensions/greydragon/changelog.txt
r30754 r30783 18 18 19 19 === Changelog === 20 version 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 20 27 version 1.0.18 21 28 - Added check for custom.css being present on new installations to prevent SMARTY error -
extensions/greydragon/css/styles.css
r30741 r30783 116 116 /* Static */ 117 117 #menubar.static { background: none !important; bottom: auto; } 118 body.static-menu .contentWithMenu, body.static-menu #the_page .contentWithMenu { margin-left: 200px; amargin-left: 0; } 119 body.static-menu .contentWithMenu .titrePage { margin-left: -194px; } 120 body.static-menu #mbCategories { margin-bottom: 1em; } 121 122 /* 118 123 body.static-menu .contentWithMenu ul.thumbnails, 119 124 body.static-menu .contentWithMenu ul.thumbnailCategories, … … 122 127 body.static-menu .contentWithMenu form.filter, 123 128 body.static-menu .contentWithMenu .category_search_results { padding-left: 200px; margin-left: 0; } 129 124 130 body.static-menu .contentWithMenu .titrePage { padding-left: 6px; } 125 131 body.static-menu .contentWithMenu .calendarCalBar { margin-left: 210px; } 132 */ 126 133 127 134 /* Static header bottom */ … … 306 313 307 314 .content .additional_info { margin-top: 0.4em; margin-bottom: 0.4em; padding: .5em 1em; } 308 body.static-menu .contentWithMenu .additional_info { margin-left: 204px; }309 315 #theImage .imageComment { margin: 1em 1em 0.4em 1em; padding: .5em 1em; } 310 316 -
extensions/greydragon/include/greydragon.class.php
r30754 r30783 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 define('GDTHEME_VERSION', '1. 0.18');5 define('GDTHEME_VERSION', '1.1.19'); 6 6 7 7 define("QUOTES_NONE", FALSE); … … 17 17 private $themeConfig; 18 18 private $themeConfigMin; 19 private $dir; 20 private $cssfile; 19 21 20 22 public static function Instance($ver = '') { … … 26 28 27 29 private function __construct($ver = ''){ 30 $this->dir = PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'greydragon/'; 31 28 32 self::loadConfig($ver); 29 33 } … … 288 292 public function getHeader() { 289 293 $content = ""; 294 $root_base = get_root_url(); 295 if ($root_base): 296 else: 297 $root_base = '/'; 298 endif; 299 290 300 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>'; 292 302 endif; 293 303 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>'; 295 305 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>'; 297 307 endif; 298 308 … … 300 310 } 301 311 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 302 353 } 303 354 -
extensions/greydragon/js/theme.menu.js
r30210 r30783 42 42 if (p_main_menu == 'static') { 43 43 var mh = jQuery('#menubar').height(); 44 jQuery('.contentWithMenu').css("min-height", mh + 20);44 jQuery('.contentWithMenu').css("min-height", mh + 30); 45 45 jQuery('#menubar').css("display", "block"); 46 46 return; -
extensions/greydragon/template/header.tpl
r30754 r30783 34 34 {if isset($U_UP) }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if} 35 35 {assign var=root value="themes/greydragon/css"} 36 {assign var=local value="local/greydragon"} 36 37 {assign var=colorpack value=$root|cat:"/colorpack/"|cat:$greydragon.p_colorpack|cat:"/styles.css"} 37 38 {combine_css path="themes/greydragon/css/bootstrap.min.css" order=-100} … … 39 40 {combine_css path="$colorpack" order=101} 40 41 {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} 43 44 {/if} 44 45 {/if} -
extensions/greydragon/themeconf.inc.php
r30754 r30783 2 2 /* 3 3 Theme Name: GreyDragon 4 Version: 1. 0.184 Version: 1.1.19 5 5 Description: GreyDragon Theme 6 6 Theme URI: http://piwigo.org/ext/extension_view.php?eid=775
Note: See TracChangeset
for help on using the changeset viewer.