From 839f3ca41dd39d37e870fc2cf57aa810315887fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Sep 2017 03:22:48 +0200 Subject: [PATCH] NEW Can use an url like $conf->global>-MYPARAM for menu urls --- htdocs/core/menus/standard/auguria.lib.php | 7 +++++++ htdocs/core/menus/standard/eldy.lib.php | 7 +++++++ htdocs/theme/eldy/style.css.php | 4 ++-- htdocs/theme/md/style.css.php | 4 ++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 5fc0ab2c516..9119afc7696 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -73,6 +73,13 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m $showmode=dol_auguria_showmenu($type_user,$newTabMenu[$i],$listofmodulesforexternal); if ($showmode == 1) { + // $menu_array[$i]['url'] can be a relative url, a full external url or a dynamic value like '$conf->global->APARAM) + if (preg_match('/^\$conf->global->([^\?]+)/', $newTabMenu[$i]['url'], $reg)) + { + $keyforsconst=$reg[1]; + $newTabMenu[$i]['url'] = $conf->global->$keyforsconst; + } + $url = $shorturl = $newTabMenu[$i]['url']; if (! preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url'])) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 8c03d0c1ffc..013b6ea74ae 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1598,6 +1598,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu } } + // $menu_array[$i]['url'] can be a relative url, a full external url or a dynamic value like '$conf->global->APARAM) + if (preg_match('/^\$conf->global->([^\?]+)/', $menu_array[$i]['url'], $reg)) + { + $keyforsconst=$reg[1]; + $menu_array[$i]['url'] = $conf->global->$keyforsconst; + } + $url = $shorturl = $menu_array[$i]['url']; if (! preg_match("/^(http:\/\/|https:\/\/)/i",$menu_array[$i]['url'])) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 2cf1f276d24..5226cb266e5 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -52,7 +52,7 @@ $colortexttitlenotab='100,60,20'; $colortexttitle='0,0,0'; $colortext='0,0,0'; $colortextlink='0,0,100'; -$fontsize='14'; +$fontsize='13'; $fontsizesmaller='12'; if (defined('THEME_ONLY_CONSTANT')) return; @@ -118,7 +118,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) $conf->global->THEME_ELDY_BACKTABCARD1='255,255,255'; // card $conf->global->THEME_ELDY_BACKTABACTIVE='234,234,234'; $conf->global->THEME_ELDY_TEXT='0,0,0'; - $conf->global->THEME_ELDY_FONT_SIZE1='14'; + $conf->global->THEME_ELDY_FONT_SIZE1='13'; $conf->global->THEME_ELDY_FONT_SIZE2='12'; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index a3bc638aec1..283f1aad16f 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -53,7 +53,7 @@ $colortexttitlenotab='90,90,90'; $colortexttitle='20,20,20'; $colortext='0,0,0'; $colortextlink='0,0,120'; -$fontsize='14'; +$fontsize='13'; $fontsizesmaller='11'; if (defined('THEME_ONLY_CONSTANT')) return; @@ -120,7 +120,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) $conf->global->THEME_ELDY_BACKTABCARD1='255,255,255'; // card $conf->global->THEME_ELDY_BACKTABACTIVE='234,234,234'; $conf->global->THEME_ELDY_TEXT='0,0,0'; - $conf->global->THEME_ELDY_FONT_SIZE1='14'; + $conf->global->THEME_ELDY_FONT_SIZE1='13'; $conf->global->THEME_ELDY_FONT_SIZE2='11'; }