/// <summary> /// The init settings. /// </summary> private void InitSettings() { var settings = new ExtensionSettings(this) { IsScalar = true }; settings.AddParameter("CaptchaLabel", "Your captcha's label", 30, true, true, ParameterType.String); settings.AddValue("CaptchaLabel", "5+5 = "); settings.AddParameter( "CaptchaAnswer", "Your captcha's expected value", MaxCaptchaLength, true, true, ParameterType.String); settings.AddValue("CaptchaAnswer", "10"); settings.AddParameter( "ShowForAuthenticatedUsers", "Show Captcha For Authenticated Users", 1, true, false, ParameterType.Boolean); settings.AddValue("ShowForAuthenticatedUsers", false); settings.Help = @"To get started with SimpleCaptcha, just provide some captcha instructions for your users in the <b>CaptchaLabel</b> field and the value you require from your users in order to post a comment in the <b>CaptchaAnswer</b> field."; Settings = ExtensionManager.InitSettings("SimpleCaptcha", settings); ExtensionManager.SetStatus("SimpleCaptcha", false); }
/// <summary> /// The init settings. /// </summary> public void InitSettings() { var settings = new ExtensionSettings(this) { IsScalar = true }; settings.AddParameter("PublicKey", "Public Key", 50, true, true, ParameterType.String); settings.AddValue("PublicKey", "YOURPUBLICKEY"); settings.AddParameter("PrivateKey", "Private Key", 50, true, true, ParameterType.String); settings.AddValue("PrivateKey", "YOURPRIVATEKEY"); settings.AddParameter( "ShowForAuthenticatedUsers", "Show Captcha For Authenticated Users", 1, true, false, ParameterType.Boolean); settings.AddValue("ShowForAuthenticatedUsers", false); settings.AddParameter( "MaxLogEntries", "Logging: Maximum successful recaptcha attempts to store (set to 0 to disable logging)", 4, true, false, ParameterType.Integer); settings.AddValue("MaxLogEntries", 50); settings.AddParameter("Theme", "Theme", 20, true, false, ParameterType.DropDown); settings.AddValue("Theme", new[] { "red", "white", "blackglass", "clean" }, "white"); settings.AddParameter("Language", "Language", 5, true, false, ParameterType.DropDown); settings.AddValue("Language", new[] { "en|English", "nl|Dutch", "fr|French", "de|German", "pt|Portuguese", "ru|Russian", "es|Spanish", "tr|Turkish" }, "en"); settings.Help = string.Format( "\n<script type='text/javascript'>\n{0}\n</script>\nYou can create your own public key at <a href='http://www.Recaptcha.net'>http://www.Recaptcha.net</a>. This is used for communication between your website and the recapcha server.<br /><br />Please rememeber you need to <span style=\"color:red\">enable extension</span> for reCaptcha to show up on the comments form.<br /><br />You can see some statistics on Captcha solving by storing successful attempts. If you're getting spam, this should also confirm that the spammers are at least solving the captcha.<br /><br /><a href='../Pages/RecaptchaLogViewer.aspx' target='_blank' onclick='return showRecaptchaLog()'>Click here to view the log</a>", this.JScript); Settings = ExtensionManager.InitSettings("Recaptcha", settings); ExtensionManager.SetStatus("Recaptcha", false); }
private void Initialize() { ExtensionSettings settings = new ExtensionSettings(this); settings.IsScalar = true; settings.AddParameter("BaseUrl", "Feed Provider"); string[] providers = { "http://api.brafton.com/", "http://api.contentlead.com/", "http://api.castleford.com.au/" }; settings.AddValue("BaseUrl", providers, providers[0]); settings.AddParameter("ApiKey", "API Key", 36); settings.AddParameter("Interval", "Upload Interval (minutes)", 6, true); settings.AddValue("Interval", 180); settings.AddParameter("ImportedDate", "Imported Date"); settings.SetParameterType("ImportedDate", ParameterType.DropDown); string[] sortOptions = { "Published Date", "Created Date", "Last Modified Date" }; settings.AddValue("ImportedDate", sortOptions, sortOptions[0]); settings.AddParameter("LastUpload", "Time of last upload"); settings.AddValue("LastUpload", DateTime.MinValue.ToString("u")); settings.AddParameter("ImportContent", "Import Content"); settings.SetParameterType("ImportContent", ParameterType.DropDown); string[] contentTypes = { "Articles Only", "Videos Only", "Articles and Video" }; settings.AddValue("ImportContent", contentTypes, contentTypes[0]); settings.AddParameter("VideoPublicKey", "Public Key"); settings.AddParameter("VideoSecretKey", "Secret Key"); settings.AddParameter("VideoFeedNumber", "Feed Number"); settings.SetParameterType("VideoFeedNumber", ParameterType.Integer); _settings = ExtensionManager.InitSettings("BraftonArticleImporter", settings); }
/// <summary> /// The init settings. /// </summary> private void InitSettings() { var extensionSettings = new ExtensionSettings(this) { IsScalar = true }; extensionSettings.AddParameter("SiteURL", "Site URL"); extensionSettings.AddParameter("ApiKey", "API Key"); extensionSettings.AddValue("SiteURL", "http://example.com/blog"); extensionSettings.AddValue("ApiKey", "123456789"); settings = ExtensionManager.InitSettings("AkismetFilter", extensionSettings); ExtensionManager.SetStatus("AkismetFilter", false); }
protected void InitSettings() { var settings = new ExtensionSettings("Picasa2"); settings.AddParameter("Account"); settings.AddParameter("Password"); settings.AddParameter("ShowWidth"); settings.AddParameter("PicWidth"); settings.AddParameter("AutoPlay"); settings.AddValue("Account", ""); settings.AddValue("Password", "secret"); settings.AddValue("ShowWidth", "400"); settings.AddValue("PicWidth", "72"); settings.AddValue("AutoPlay", true); settings.IsScalar = true; ExtensionManager.ImportSettings(settings); ExtensionManager.SetAdminPage("Picasa2", "~/User controls/Picasa/Admin.aspx"); Settings = ExtensionManager.GetSettings("Picasa2"); }