From 731df0ca93c1b45fe568a5d20b1ab0ee706b8609 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 6 Nov 2012 03:35:44 +0530 Subject: [PATCH 1/2] Added a config entry ShowHostAdminLink with the required changes in BlogConfigurationSetting class and the frontend BlogNotActive.aspx page --- .../BlogConfigurationSettings.cs | 18 +++++++++++ src/Subtext.Web/Web.config | 4 +++ .../aspx/SystemMessages/BlogNotActive.aspx | 2 +- .../aspx/SystemMessages/BlogNotActive.aspx.cs | 1 + .../BlogNotActive.aspx.designer.cs | 30 +++++++++++-------- 5 files changed, 42 insertions(+), 13 deletions(-) diff --git a/src/Subtext.Framework/Configuration/BlogConfigurationSettings.cs b/src/Subtext.Framework/Configuration/BlogConfigurationSettings.cs index 9a795d044..3733e2395 100644 --- a/src/Subtext.Framework/Configuration/BlogConfigurationSettings.cs +++ b/src/Subtext.Framework/Configuration/BlogConfigurationSettings.cs @@ -97,6 +97,24 @@ public Tracking Tracking public int GalleryImageThumbnailWidth { get; set; } public int GalleryImageThumbnailHeight { get; set; } + public bool HostAdminLinkEnabled + { + get + { + if (String.IsNullOrEmpty(ConfigurationManager.AppSettings["ShowHostAdminLink"])) + { + return true; + } + + bool enabled; + if (bool.TryParse(ConfigurationManager.AppSettings["ShowHostAdminLink"], out enabled)) + { + return enabled; + } + return true; + } + } + /// /// Gets a value indicating whether invisible captcha enabled. This is /// configured within the "InvisibleCaptchaEnabled" app setting. It is not diff --git a/src/Subtext.Web/Web.config b/src/Subtext.Web/Web.config index f4e8bae25..ed77c7d18 100644 --- a/src/Subtext.Web/Web.config +++ b/src/Subtext.Web/Web.config @@ -214,6 +214,10 @@ + + - + @@ -57,6 +58,15 @@ + + + + + + - +