Added option to disable context links in LogAnalyzer.

This commit is contained in:
Andre Lorbach 2011-04-12 15:38:42 +02:00
parent c41a99786d
commit 9d9d1fad8d
8 changed files with 27 additions and 0 deletions

View File

@ -142,6 +142,7 @@ if ( isset($_POST['op']) )
// Read checkboxes
if ( isset ($_POST['ViewUseTodayYesterday']) ) { $content['ViewUseTodayYesterday'] = 1; } else { $content['ViewUseTodayYesterday'] = 0; }
if ( isset ($_POST['ViewEnableDetailPopups']) ) { $content['ViewEnableDetailPopups'] = 1; } else { $content['ViewEnableDetailPopups'] = 0; }
if ( isset ($_POST['EnableContextLinks']) ) { $content['EnableContextLinks'] = 1; } else { $content['EnableContextLinks'] = 0; }
if ( isset ($_POST['EnableIPAddressResolve']) ) { $content['EnableIPAddressResolve'] = 1; } else { $content['EnableIPAddressResolve'] = 0; }
if ( isset ($_POST['MiscShowDebugMsg']) ) { $content['MiscShowDebugMsg'] = 1; } else { $content['MiscShowDebugMsg'] = 0; }
if ( isset ($_POST['MiscShowDebugGridCounter']) ) { $content['MiscShowDebugGridCounter'] = 1; } else { $content['MiscShowDebugGridCounter'] = 0; }
@ -201,6 +202,7 @@ if ( isset($_POST['op']) )
// Read checkboxes
if ( isset ($_POST['User_ViewUseTodayYesterday']) ) { $USERCFG['ViewUseTodayYesterday'] = 1; } else { $USERCFG['ViewUseTodayYesterday'] = 0; }
if ( isset ($_POST['User_ViewEnableDetailPopups']) ) { $USERCFG['ViewEnableDetailPopups'] = 1; } else { $USERCFG['ViewEnableDetailPopups'] = 0; }
if ( isset ($_POST['User_EnableContextLinks']) ) { $USERCFG['EnableContextLinks'] = 1; } else { $USERCFG['EnableContextLinks'] = 0; }
if ( isset ($_POST['User_EnableIPAddressResolve']) ) { $USERCFG['EnableIPAddressResolve'] = 1; } else { $USERCFG['EnableIPAddressResolve'] = 0; }
if ( isset ($_POST['User_MiscShowDebugMsg']) ) { $USERCFG['MiscShowDebugMsg'] = 1; } else { $USERCFG['MiscShowDebugMsg'] = 0; }
if ( isset ($_POST['User_MiscShowDebugGridCounter']) ) { $USERCFG['MiscShowDebugGridCounter'] = 1; } else { $USERCFG['MiscShowDebugGridCounter'] = 0; }
@ -242,6 +244,7 @@ if ( !isset($content['AdminChangeWaitTime']) ) { $content['AdminChangeWaitTime']
// Set checkbox States
if (isset($content['ViewUseTodayYesterday']) && $content['ViewUseTodayYesterday'] == 1) { $content['ViewUseTodayYesterday_checked'] = "checked"; } else { $content['ViewUseTodayYesterday_checked'] = ""; }
if (isset($content['ViewEnableDetailPopups']) && $content['ViewEnableDetailPopups'] == 1) { $content['ViewEnableDetailPopups_checked'] = "checked"; } else { $content['ViewEnableDetailPopups_checked'] = ""; }
if (isset($content['EnableContextLinks']) && $content['EnableContextLinks'] == 1) { $content['EnableContextLinks_checked'] = "checked"; } else { $content['EnableContextLinks_checked'] = ""; }
if (isset($content['EnableIPAddressResolve']) && $content['EnableIPAddressResolve'] == 1) { $content['EnableIPAddressResolve_checked'] = "checked"; } else { $content['EnableIPAddressResolve_checked'] = ""; }
if (isset($content['MiscShowDebugMsg']) && $content['MiscShowDebugMsg'] == 1) { $content['MiscShowDebugMsg_checked'] = "checked"; } else { $content['MiscShowDebugMsg_checked'] = ""; }
@ -332,6 +335,7 @@ if ( $content['ENABLEUSEROPTIONS'] )
// Set checkbox States
if ( GetConfigSetting('ViewUseTodayYesterday', $content['ViewUseTodayYesterday'], CFGLEVEL_USER) == 1) { $content['User_ViewUseTodayYesterday_checked'] = "checked"; } else { $content['User_ViewUseTodayYesterday_checked'] = ""; }
if ( GetConfigSetting('ViewEnableDetailPopups', $content['ViewEnableDetailPopups'], CFGLEVEL_USER) == 1) { $content['User_ViewEnableDetailPopups_checked'] = "checked"; } else { $content['User_ViewEnableDetailPopups_checked'] = ""; }
if ( GetConfigSetting('EnableContextLinks', $content['EnableContextLinks'], CFGLEVEL_USER) == 1) { $content['User_EnableContextLinks_checked'] = "checked"; } else { $content['User_EnableContextLinks_checked'] = ""; }
if ( GetConfigSetting('EnableIPAddressResolve', $content['EnableIPAddressResolve'], CFGLEVEL_USER) == 1) { $content['User_EnableIPAddressResolve_checked'] = "checked"; } else { $content['User_EnableIPAddressResolve_checked'] = ""; }
if ( GetConfigSetting('MiscShowDebugMsg', $content['MiscShowDebugMsg'], CFGLEVEL_USER) == 1) { $content['User_MiscShowDebugMsg_checked'] = "checked"; } else { $content['User_MiscShowDebugMsg_checked'] = ""; }

View File

@ -79,6 +79,7 @@ $CFG['ViewEnableAutoReloadSeconds'] = 0; // If "ViewEnableAutoReloadSeconds" is
$CFG['SearchCustomButtonCaption'] = "I'd like to feel sad"; // Default caption for the custom fast search button
$CFG['SearchCustomButtonSearch'] = "error"; // Default search string for the custom search button
$CFG['EnableContextLinks'] = 1; // if enabled, context links within the messages will automatically be created and added. Set this to 0 to disable all context links.
$CFG['EnableIPAddressResolve'] = 1; // If enabled, IP Addresses inline messages are automatically resolved and the result is added in brackets {} behind the IP Address
$CFG['SuppressDuplicatedMessages'] = 0; // If enabled, duplicated messages will be suppressed in the main display.
$CFG['TreatNotFoundFiltersAsTrue'] = 0; // If you filter / search for messages, and the fields you are filtering for is not found, the filter result is treaten as TRUE!

View File

@ -914,6 +914,10 @@ function InitConfigurationValues()
$content['HeaderDefaultEncoding'] = GetConfigSetting("HeaderDefaultEncoding", ENC_ISO_8859_1);
// ---
// --- Read ContextLinks Option, and set default!
$content['EnableContextLinks'] = GetConfigSetting("EnableContextLinks", 1);
// ---
// Init main langauge file now!
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/main.php' );
@ -1341,6 +1345,10 @@ function AddContextLinks(&$sourceTxt)
{
global $szTLDDomains;
// check if user disabled Context Links.
if ( GetConfigSetting("EnableContextLinks", 1, CFGLEVEL_USER) == 0 )
return;
// Return if not enabled!
if ( GetConfigSetting("EnableIPAddressResolve", 0, CFGLEVEL_USER) == 1 )
{
@ -1566,6 +1574,7 @@ function SaveGeneralSettingsIntoDB($bForceStripSlahes = false)
WriteConfigValue( "ViewUseTodayYesterday", true, null, null,$bForceStripSlahes );
WriteConfigValue( "ViewEnableDetailPopups", true, null, null,$bForceStripSlahes );
WriteConfigValue( "EnableContextLinks", true, null, null,$bForceStripSlahes );
WriteConfigValue( "EnableIPAddressResolve", true, null, null,$bForceStripSlahes );
WriteConfigValue( "MiscShowDebugMsg", true, null, null,$bForceStripSlahes );
WriteConfigValue( "MiscShowDebugGridCounter", true, null, null,$bForceStripSlahes );
@ -1613,6 +1622,7 @@ function SaveUserGeneralSettingsIntoDB()
WriteConfigValue( "ViewUseTodayYesterday", false, $content['SESSION_USERID'] );
WriteConfigValue( "ViewEnableDetailPopups", false, $content['SESSION_USERID'] );
WriteConfigValue( "EnableContextLinks", false, $content['SESSION_USERID'] );
WriteConfigValue( "EnableIPAddressResolve", false, $content['SESSION_USERID'] );
WriteConfigValue( "MiscShowDebugMsg", false, $content['SESSION_USERID'] );
WriteConfigValue( "MiscShowDebugGridCounter", false, $content['SESSION_USERID'] );

View File

@ -110,6 +110,7 @@ $content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allo
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
$content['LN_ADMIN_USEPROXYSERVER'] = "Leave empty if you do not want to use a proxy server! If set to valid proxy server (for example '127.0.0.1:8080'), LogAnalyzer will use this server for remote queries like the update check feature.";
$content['LN_ADMIN_DEFAULTENCODING'] = "Default character encoding";
$content['LN_GEN_CONTEXTLINKS'] = "Enable Contextlinks (Question marks)";
// User Center
$content['LN_USER_CENTER'] = "Benutzer Optionen";

View File

@ -110,6 +110,7 @@ $content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allo
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
$content['LN_ADMIN_USEPROXYSERVER'] = "Leave empty if you do not want to use a proxy server! If set to valid proxy server (for example '127.0.0.1:8080'), LogAnalyzer will use this server for remote queries like the update check feature.";
$content['LN_ADMIN_DEFAULTENCODING'] = "Default character encoding";
$content['LN_GEN_CONTEXTLINKS'] = "Enable Contextlinks (Question marks)";
// User Center
$content['LN_USER_CENTER'] = "User Options";

View File

@ -110,6 +110,7 @@ $content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allo
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
$content['LN_ADMIN_USEPROXYSERVER'] = "Leave empty if you do not want to use a proxy server! If set to valid proxy server (for example '127.0.0.1:8080'), LogAnalyzer will use this server for remote queries like the update check feature.";
$content['LN_ADMIN_DEFAULTENCODING'] = "Default character encoding";
$content['LN_GEN_CONTEXTLINKS'] = "Enable Contextlinks (Question marks)";
// User Center
$content['LN_USER_CENTER'] = "User Options";

View File

@ -110,6 +110,7 @@ $content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allo
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
$content['LN_ADMIN_USEPROXYSERVER'] = "Leave empty if you do not want to use a proxy server! If set to valid proxy server (for example '127.0.0.1:8080'), LogAnalyzer will use this server for remote queries like the update check feature.";
$content['LN_ADMIN_DEFAULTENCODING'] = "Default character encoding";
$content['LN_GEN_CONTEXTLINKS'] = "Enable Contextlinks (Question marks)";
// User Center
$content['LN_USER_CENTER'] = "User Options";

View File

@ -204,6 +204,14 @@
<td align="left" class="line1" ><input type="checkbox" name="User_ViewEnableDetailPopups" value="yes" {User_ViewEnableDetailPopups_checked}></td>
<!-- ENDIF ENABLEUSEROPTIONS="true" -->
</tr>
<tr>
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_CONTEXTLINKS}</b></td>
<td align="left" class="line1" ><input type="checkbox" name="EnableContextLinks" value="yes" {EnableContextLinks_checked} {DISABLE_GLOBALEDIT_FORMCONTROL}></td>
<!-- IF ENABLEUSEROPTIONS="true" -->
<td align="left" class="line1" ><input type="checkbox" name="User_EnableContextLinks" value="yes" {User_EnableContextLinks_checked}></td>
<!-- ENDIF ENABLEUSEROPTIONS="true" -->
</tr>
<tr>
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_IPADRRESOLVE}</b></td>
<td align="left" class="line1" ><input type="checkbox" name="EnableIPAddressResolve" value="yes" {EnableIPAddressResolve_checked} {DISABLE_GLOBALEDIT_FORMCONTROL}></td>