From 8eff09613ee783a1ef5581be44e777c4a72e16d5 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Wed, 17 Sep 2008 17:57:59 +0200 Subject: [PATCH] Added new ViewStringCharacterLimit option into admin center --- src/admin/index.php | 3 +++ src/include/functions_common.php | 2 ++ src/lang/de/admin.php | 1 + src/lang/en/admin.php | 1 + src/lang/pt_BR/admin.php | 1 + src/templates/admin/admin_index.html | 8 ++++++++ 6 files changed, 16 insertions(+) diff --git a/src/admin/index.php b/src/admin/index.php index 1b4b326..0caf8c8 100644 --- a/src/admin/index.php +++ b/src/admin/index.php @@ -139,6 +139,7 @@ if ( isset($_POST['op']) ) // Read Text number fields if ( isset ($_POST['ViewMessageCharacterLimit']) && is_numeric($_POST['ViewMessageCharacterLimit']) ) { $content['ViewMessageCharacterLimit'] = $_POST['ViewMessageCharacterLimit']; } + if ( isset ($_POST['ViewStringCharacterLimit']) && is_numeric($_POST['ViewStringCharacterLimit']) ) { $content['ViewStringCharacterLimit'] = $_POST['ViewStringCharacterLimit']; } if ( isset ($_POST['ViewEntriesPerPage']) && is_numeric($_POST['ViewEntriesPerPage']) ) { $content['ViewEntriesPerPage'] = $_POST['ViewEntriesPerPage']; } if ( isset ($_POST['ViewEnableAutoReloadSeconds']) && is_numeric($_POST['ViewEnableAutoReloadSeconds']) ) { $content['ViewEnableAutoReloadSeconds'] = $_POST['ViewEnableAutoReloadSeconds']; } @@ -184,6 +185,7 @@ if ( isset($_POST['op']) ) // Read Text number fields if ( isset ($_POST['User_ViewMessageCharacterLimit']) && is_numeric($_POST['User_ViewMessageCharacterLimit']) ) { $USERCFG['ViewMessageCharacterLimit'] = $_POST['User_ViewMessageCharacterLimit']; } + if ( isset ($_POST['User_ViewStringCharacterLimit']) && is_numeric($_POST['User_ViewStringCharacterLimit']) ) { $USERCFG['ViewStringCharacterLimit'] = $_POST['User_ViewStringCharacterLimit']; } if ( isset ($_POST['User_ViewEntriesPerPage']) && is_numeric($_POST['User_ViewEntriesPerPage']) ) { $USERCFG['ViewEntriesPerPage'] = $_POST['User_ViewEntriesPerPage']; } if ( isset ($_POST['User_ViewEnableAutoReloadSeconds']) && is_numeric($_POST['User_ViewEnableAutoReloadSeconds']) ) { $USERCFG['ViewEnableAutoReloadSeconds'] = $_POST['User_ViewEnableAutoReloadSeconds']; } @@ -291,6 +293,7 @@ if ( $content['ENABLEUSEROPTIONS'] ) // --- Set TextFields! $content['User_PrependTitle'] = GetConfigSetting('PrependTitle', $content['PrependTitle'], CFGLEVEL_USER); $content['User_ViewMessageCharacterLimit'] = GetConfigSetting('ViewMessageCharacterLimit', $content['ViewMessageCharacterLimit'], CFGLEVEL_USER); + $content['User_ViewStringCharacterLimit'] = GetConfigSetting('ViewStringCharacterLimit', $content['ViewStringCharacterLimit'], CFGLEVEL_USER); $content['User_ViewEntriesPerPage'] = GetConfigSetting('ViewEntriesPerPage', $content['ViewEntriesPerPage'], CFGLEVEL_USER); $content['User_ViewEnableAutoReloadSeconds'] = GetConfigSetting('ViewEnableAutoReloadSeconds', $content['ViewEnableAutoReloadSeconds'], CFGLEVEL_USER); $content['User_SearchCustomButtonCaption'] = GetConfigSetting('SearchCustomButtonCaption', $content['SearchCustomButtonCaption'], CFGLEVEL_USER); diff --git a/src/include/functions_common.php b/src/include/functions_common.php index effb495..fe4cfa2 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -1191,6 +1191,7 @@ function SaveGeneralSettingsIntoDB() WriteConfigValue( "TreatNotFoundFiltersAsTrue", true ); WriteConfigValue( "ViewMessageCharacterLimit", true ); + WriteConfigValue( "ViewStringCharacterLimit", true ); WriteConfigValue( "ViewEntriesPerPage", true ); WriteConfigValue( "ViewEnableAutoReloadSeconds", true ); @@ -1225,6 +1226,7 @@ function SaveUserGeneralSettingsIntoDB() WriteConfigValue( "TreatNotFoundFiltersAsTrue", false, $content['SESSION_USERID'] ); WriteConfigValue( "ViewMessageCharacterLimit", false, $content['SESSION_USERID'] ); + WriteConfigValue( "ViewStringCharacterLimit", false, $content['SESSION_USERID'] ); WriteConfigValue( "ViewEntriesPerPage", false, $content['SESSION_USERID'] ); WriteConfigValue( "ViewEnableAutoReloadSeconds", false, $content['SESSION_USERID'] ); diff --git a/src/lang/de/admin.php b/src/lang/de/admin.php index 0f2f780..7263d11 100644 --- a/src/lang/de/admin.php +++ b/src/lang/de/admin.php @@ -66,6 +66,7 @@ $content['LN_GEN_PREPENDTITLE'] = "Prepend this string in title"; $content['LN_GEN_USETODAY'] = "Use Today and Yesterday in timefields"; $content['LN_GEN_DETAILPOPUPS'] = "Use Popup to display the full messagedetails"; $content['LN_GEN_MSGCHARLIMIT'] = "Character limit of the message in main view"; +$content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields"; $content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page"; $content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds"; $content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS"; diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php index 2d57f84..437e751 100644 --- a/src/lang/en/admin.php +++ b/src/lang/en/admin.php @@ -65,6 +65,7 @@ $content['LN_GEN_PREPENDTITLE'] = "Prepend this string in title"; $content['LN_GEN_USETODAY'] = "Use Today and Yesterday in timefields"; $content['LN_GEN_DETAILPOPUPS'] = "Use Popup to display the full messagedetails"; $content['LN_GEN_MSGCHARLIMIT'] = "Character limit of the message in main view"; +$content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields"; $content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page"; $content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds"; $content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS"; diff --git a/src/lang/pt_BR/admin.php b/src/lang/pt_BR/admin.php index f26ee40..1b27f1c 100644 --- a/src/lang/pt_BR/admin.php +++ b/src/lang/pt_BR/admin.php @@ -72,6 +72,7 @@ $content['LN_GEN_PREPENDTITLE'] = "Prepend this string in title"; $content['LN_GEN_USETODAY'] = "Use Today and Yesterday in timefields"; $content['LN_GEN_DETAILPOPUPS'] = "Use Popup to display the full messagedetails"; $content['LN_GEN_MSGCHARLIMIT'] = "Character limit of the message in main view"; +$content['LN_GEN_STRCHARLIMIT'] = "Character display limit for all string type fields"; $content['LN_GEN_ENTRIESPERPAGE'] = "Number of entries per page"; $content['LN_GEN_AUTORELOADSECONDS'] = "Enable autoreload after seconds"; $content['LN_GEN_IPADRRESOLVE'] = "Resolve IP Addresses using DNS"; diff --git a/src/templates/admin/admin_index.html b/src/templates/admin/admin_index.html index 6a1a414..6ff3c18 100644 --- a/src/templates/admin/admin_index.html +++ b/src/templates/admin/admin_index.html @@ -123,6 +123,14 @@ + + {LN_GEN_STRCHARLIMIT} + + + + + + {LN_GEN_ENTRIESPERPAGE}