diff --git a/src/admin/index.php b/src/admin/index.php index c0b9482..d33e0e5 100644 --- a/src/admin/index.php +++ b/src/admin/index.php @@ -83,8 +83,9 @@ else } -// Init Fontlist +// Init Fonts and sizes InitFontList(); +InitFontSizeList(); // --- First thing to do is to check the op get parameter! // Check for changes first | Abort if Edit is not allowed @@ -141,8 +142,9 @@ if ( isset($_POST['op']) ) // Read default SOURCES | Check if Source exists as well! if ( isset ($_POST['DefaultSourceID']) && isset($content['Sources'][$_POST['DefaultSourceID']] )) { $content['DefaultSourceID'] = $_POST['DefaultSourceID']; } - // Read default FONT + // Read default FONT Settings if ( isset ($_POST['DefaultFont']) ) { $content['DefaultFont'] = $_POST['DefaultFont']; } + if ( isset ($_POST['DefaultFontSize']) ) { $content['DefaultFontSize'] = $_POST['DefaultFontSize']; } // Read checkboxes if ( isset ($_POST['ViewUseTodayYesterday']) ) { $content['ViewUseTodayYesterday'] = 1; } else { $content['ViewUseTodayYesterday'] = 0; } @@ -206,6 +208,7 @@ if ( isset($_POST['op']) ) // Read default FONT if ( isset ($_POST['User_DefaultFont']) ) { $USERCFG['DefaultFont'] = $_POST['User_DefaultFont']; } + if ( isset ($_POST['User_DefaultFontSize']) ) { $USERCFG['DefaultFontSize'] = $_POST['User_DefaultFontSize']; } // Read checkboxes if ( isset ($_POST['User_ViewUseTodayYesterday']) ) { $USERCFG['ViewUseTodayYesterday'] = 1; } else { $USERCFG['ViewUseTodayYesterday'] = 0; } @@ -334,6 +337,19 @@ foreach ( $content['FONTS'] as &$myFont ) } // --- +// --- Init for DefaultFontSize field! +// copy Fontsizes Array +$content['FONTSIZES'] = $content['fontsizes']; +if ( !isset($content['DefaultFontSize']) ) { $content['DefaultFontSize'] = 100; } +foreach ( $content['FONTSIZES'] as $myFontKey => &$myFontSize ) +{ + if ( $myFontKey == $content['DefaultFontSize'] ) + $myFontSize['selected'] = "selected"; + else + $myFontSize['selected'] = ""; +} +// --- + // --- Init for DefaultEncoding field! // copy Sources Array $content['ENCODINGS'] = $encodings; @@ -445,6 +461,19 @@ if ( $content['ENABLEUSEROPTIONS'] ) } // --- + // --- Init for DefaultFontSize field! + // copy Fontsizes Array + $content['USER_FONTSIZES'] = $content['fontsizes']; + $DefaultFontSize = GetConfigSetting('DefaultFontSize', $content['DefaultFontSize'], CFGLEVEL_USER); + foreach ( $content['USER_FONTSIZES'] as $myFontKey => &$myFontSize ) + { + if ( $myFontKey == $DefaultFontSize ) + $myFontSize['selected'] = "selected"; + else + $myFontSize['selected'] = ""; + } + // --- + } // --- BEGIN CREATE TITLE diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 930cc8d..ae59d43 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -986,10 +986,22 @@ function InitConfigurationValues() // --- Set dynamic stylesheet options like Font Type and Sizes $userdefaultfont = GetConfigSetting("DefaultFont", "Tahoma", CFGLEVEL_USER); - ; + $userdefaultfontsize = GetConfigSetting("DefaultFontSize", "100", CFGLEVEL_USER); + + $content['DYN_STYLESHEET'] = ''; // --- @@ -1747,6 +1759,7 @@ function SaveGeneralSettingsIntoDB($bForceStripSlahes = false) WriteConfigValue( "DefaultViewsID", true, null, null,$bForceStripSlahes ); WriteConfigValue( "DefaultSourceID", true, null, null,$bForceStripSlahes ); WriteConfigValue( "DefaultFont", true, null, null,$bForceStripSlahes ); + WriteConfigValue( "DefaultFontSize", true, null, null,$bForceStripSlahes ); // GLOBAL ONLY WriteConfigValue( "DebugUserLogin", true, null, null,$bForceStripSlahes ); @@ -1796,6 +1809,8 @@ function SaveUserGeneralSettingsIntoDB() WriteConfigValue( "DefaultViewsID", false, $content['SESSION_USERID'] ); WriteConfigValue( "DefaultSourceID", false, $content['SESSION_USERID'] ); WriteConfigValue( "DefaultFont", false, $content['SESSION_USERID'] ); + WriteConfigValue( "DefaultFontSize", false, $content['SESSION_USERID'] ); + } @@ -2087,8 +2102,24 @@ function InitFontList() $content["fonts"]["Times New Roman"]["Name"]= "Times New Roman"; $content["fonts"]["Trebuchet MS"]["Name"] = "Trebuchet MS"; $content["fonts"]["Verdana"]["Name"] = "Verdana"; - } +// Creates a list of supported available fonts! +function InitFontSizeList() +{ + global $content; + + $content["fontsizes"]["50"]["Name"] = "50%"; + $content["fontsizes"]["60"]["Name"] = "60%"; + $content["fontsizes"]["70"]["Name"] = "70%"; + $content["fontsizes"]["80"]["Name"] = "80%"; + $content["fontsizes"]["90"]["Name"] = "90%"; + $content["fontsizes"]["100"]["Name"] = "100%"; + $content["fontsizes"]["110"]["Name"] = "110%"; + $content["fontsizes"]["120"]["Name"] = "120%"; + $content["fontsizes"]["130"]["Name"] = "130%"; + $content["fontsizes"]["140"]["Name"] = "140%"; + $content["fontsizes"]["150"]["Name"] = "150%"; +} // --- ?> \ No newline at end of file diff --git a/src/lang/de/admin.php b/src/lang/de/admin.php index 0600cc6..816610b 100644 --- a/src/lang/de/admin.php +++ b/src/lang/de/admin.php @@ -94,6 +94,7 @@ $content['LN_GEN_ACCESSDENIED'] = "Der Zugriff auf diese Funktion wurde verweige $content['LN_GEN_DEFVIEWS'] = "Standard-Anzeige"; $content['LN_GEN_DEFSOURCE'] = "Standard-Quelle"; $content['LN_GEN_DEFFONT'] = "Standard-Schriftart"; +$content['LN_GEN_DEFFONTSIZE'] = "Standard-Schriftgröße"; $content['LN_GEN_SUPPRESSDUPMSG'] = "Doppelte Meldungen nur einmal anzeigen"; $content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true"; $content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields"; diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php index 35ab659..cd4421a 100644 --- a/src/lang/en/admin.php +++ b/src/lang/en/admin.php @@ -94,6 +94,7 @@ $content['LN_GEN_ACCESSDENIED'] = "Access denied to this function"; $content['LN_GEN_DEFVIEWS'] = "Default selected view"; $content['LN_GEN_DEFSOURCE'] = "Default selected source"; $content['LN_GEN_DEFFONT'] = "Default Font"; +$content['LN_GEN_DEFFONTSIZE'] = "Default FontSize"; $content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages"; $content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true"; $content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields"; diff --git a/src/templates/admin/admin_index.html b/src/templates/admin/admin_index.html index 704cc31..36177e9 100644 --- a/src/templates/admin/admin_index.html +++ b/src/templates/admin/admin_index.html @@ -142,6 +142,25 @@ +
@@ -142,6 +142,10 @@ + | +
diff --git a/src/templates/include_menu.html b/src/templates/include_menu.html index f8628a3..1ca4feb 100644 --- a/src/templates/include_menu.html +++ b/src/templates/include_menu.html @@ -18,7 +18,7 @@ - + diff --git a/src/templates/index.html b/src/templates/index.html index 244e950..822faea 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -363,7 +363,7 @@ - |