/// <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); }
public IEnumerable<SelectOption> Get() { var feeds = new List<SelectOption>(); var feedSets = ExtensionManager.GetSettings(_metaExtension, _galleryFeeds); var feedService = "http://dnbe.net/v01/nuget"; if (!string.IsNullOrEmpty(BlogSettings.Instance.GalleryFeedUrl)) feedService = BlogSettings.Instance.GalleryFeedUrl; if (feedSets == null) { var settings = new ExtensionSettings(_galleryFeeds); settings.AddParameter("OptionName", "Title", 150, true, true); settings.AddParameter("OptionValue"); settings.AddValues(new[] { "dnbe.net", feedService }); feedSets = ExtensionManager.InitSettings(_metaExtension, settings); ExtensionManager.SaveSettings(_metaExtension, feedSets); } var table = feedSets.GetDataTable(); foreach (DataRow row in table.Rows) { feeds.Add(new SelectOption { OptionName = row[0].ToString(), OptionValue = row[1].ToString() }); } return feeds; }
public IEnumerable <SelectOption> Get() { var feeds = new List <SelectOption>(); var feedSets = ExtensionManager.GetSettings(_metaExtension, _galleryFeeds); var feedService = "http://dnbe.net/v01/nuget"; if (!string.IsNullOrEmpty(BlogSettings.Instance.GalleryFeedUrl)) { feedService = BlogSettings.Instance.GalleryFeedUrl; } if (feedSets == null) { var settings = new ExtensionSettings(_galleryFeeds); settings.AddParameter("OptionName", "Title", 150, true, true); settings.AddParameter("OptionValue"); settings.AddValues(new[] { "dnbe.net", feedService }); feedSets = ExtensionManager.InitSettings(_metaExtension, settings); ExtensionManager.SaveSettings(_metaExtension, feedSets); } var table = feedSets.GetDataTable(); foreach (DataRow row in table.Rows) { feeds.Add(new SelectOption { OptionName = row[0].ToString(), OptionValue = row[1].ToString() }); } return(feeds); }
private void InitSettings() { // Create extensionSettings with Type Name ExtensionSettings settings = new ExtensionSettings(this.GetType().Name); // Define settings as Scalar settings.IsScalar = true; settings.AddParameter("ExcludeAuthenticatedViews", "Exclude Authenticated Views", 5, false, false, ParameterType.Boolean); settings.AddParameter("ExcludeViewsFromIPs", "<a href=\"https://www.google.com/support/googleanalytics/bin/answer.py?answer=55572\" target=\"_blank\">Execlude Views From IPs</a>", 255, false, false, ParameterType.String); // Add default values settings.AddValues(new string[] { "True", "" }); // Build Help text settings.Help = "<p>Check the <strong>Exclude Authenticated Views</strong> checkbox if you wish " + "<strong>exclude the authenticated users</strong> from accumulating post view count.<br/>" + "Set <strong>Execlude Views From IPs(regex)</strong> field if you wish to execlude range of IP addresses " + "from accumulating post view count. This is Regular Expression field.</p>" + "You can use <a href=\"https://www.google.com/support/googleanalytics/bin/answer.py?answer=55572\" target=\"_blank\">this tool</a> " + "to generate your range of IPs "; // Import Settings into BlogEngine ExtensionManager.ImportSettings(settings); // Retrieve settings from BlogEngine into local static field to be used later _settings = ExtensionManager.GetSettings(this.GetType().Name); }
public void InitSettings() { ExtensionSettings settings = new ExtensionSettings(this); settings.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 string[] { "red", "white", "blackglass", "clean" }, "white"); settings.Help = "\n<script language='javascript' type='text/javascript'>\n" + JScript + "\n</script>\n" + "You 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>"; _settings = ExtensionManager.InitSettings("Recaptcha", settings); ExtensionManager.SetStatus("Recaptcha", false); }
public PostViewCounter() { Post.Serving += new EventHandler <ServingEventArgs>(OnPostServing); ExtensionSettings settings = new ExtensionSettings("PostViewCounter"); settings.AddParameter( "MaxHitRecordCount", "最多保留筆數:"); settings.AddParameter( "HitRecordTTL", "最長保留天數:"); settings.AddValues(new string[] { "500", "90" }); //settings.ShowAdd = false; //settings.ShowDelete = false; //settings.ShowEdit = true; settings.IsScalar = true; settings.Help = "設定 counter hit records 保留筆數及時間。只有在筆數限制內且沒有超過保留期限的記錄才會被留下來。"; ExtensionManager.ImportSettings(settings); _settings = ExtensionManager.GetSettings("PostViewCounter"); }
private static ExtensionSettings LoadExtensionSettingsForBlogInstance() { ExtensionSettings initialSettings = new ExtensionSettings(_extensionName); initialSettings.Help = @" <ol> <li>Upload media files to your cloud storage</li> <li>Add short code to your media: [gviewer file=""yoururl/myfile.pdf""] for pdf or change the extension to other file that supported by Google Docs</li> <li>Customize with the following parameters: <ul> <li><b>width</b>: The exact width of the Document</li> <li><b>height</b>: The exact height of the Document</li> </ul> </li> </ol> <p>A complete example:<br /> [gviewer file=""yoururl/myfile.pdf"" width=""600"" height=""720""] </p> <h3>You must!</h3> <ul> <li>Enable ""Use raw HTML Editor"" in write post to make sure complete [gviewer argument]</li> </ul> "; initialSettings.IsScalar = true; initialSettings.AddParameter("width", "Default Width"); initialSettings.AddValue("width", _widthDefault.ToString()); initialSettings.AddParameter("height", "Default Height"); initialSettings.AddValue("height", _heightDefault.ToString()); return(ExtensionManager.InitSettings(_extensionName, initialSettings)); }
/// <summary> /// Inits the filters. /// </summary> private static void InitFilters() { var settings = new ExtensionSettings("BeCommentFilters"); settings.AddParameter("ID", "ID", 20, true, true, ParameterType.Integer); settings.AddParameter("Action"); settings.AddParameter("Subject"); settings.AddParameter("Operator"); settings.AddParameter("Filter"); filters = ExtensionManager.InitSettings("MetaExtension", settings); }
private static ExtensionSettings LoadExtensionSettingsForBlogInstance() { ExtensionSettings initialSettings = new ExtensionSettings(_extensionName); initialSettings.Help = @" <p>Build on <a href=""http://mediaelement.js.com/"">MediaElement.js</a>, the HTML5 video/audio player.</p> <ol> <li>Upload media files to your /media/ folder</li> <li>Add short code to your media: [video src=""myfile.mp4""] for video and [audio src=""myfile.mp3""] for audio</li> <li>Customize with the following parameters: <ul> <li><b>width</b>: The exact width of the video</li> <li><b>height</b>: The exact height of the video</li> <li><b>autoplay</b>: Plays the video as soon as the webpage loads</li> </ul> </li> <li>You can also specify multiple file formats and codecs <ul> <li><b>mp4</b>: H.264 encoded MP4 file</li> <li><b>webm</b>: VP8/WebM encoded file</li> <li><b>ogg</b>: Theora/Vorbis encoded file</li> </ul> </li> </ol> <p>A complete example:<br /> [code mp4=""myfile.mp4"" webm=""myfile.webm"" ogg=""myfile.ogg"" width=""480"" height=""360""] </p> <p>Supported formats</p> <ul> <li><b>MP4/MP3</b>: Native HTML5 for IE9, Safari, Chrome; Flash in IE8, Firefox, Opera</li> <li><b>WebM</b>: HTML5 for IE9, Chrome, Firefox, Opera; Flash in IE8 (coming in Flash 11)</li> <li><b>FLV</b>: Flash fallback</li> <li><b>WMV/WMA</b>: Silverlight fallback</li> </ul> "; initialSettings.IsScalar = true; initialSettings.AddParameter("width", "Default Width"); initialSettings.AddValue("width", _widthDefault.ToString()); initialSettings.AddParameter("height", "Default Height"); initialSettings.AddValue("height", _heightDefault.ToString()); initialSettings.AddParameter("folder", "Folder for Media (MP4, MP3, WMV, Ogg, WebM, etc.)"); initialSettings.AddValue("folder", _folderDefault); return(ExtensionManager.InitSettings(_extensionName, initialSettings)); }
public AudioStream() { //Comment.Serving += new EventHandler<ServingEventArgs>(Post_CommentServing); ExtensionSettings settings = new ExtensionSettings("AudioStream"); settings.AddParameter("HighStream", "HighStream.", 500, true, false, ParameterType.String); settings.AddParameter("LowStream", "LowStream.", 500, true, false, ParameterType.String); // settings.AddValue("HighStream", "Http://HighStreamVoorbeeld.nl"); //settings.AddValue("LowStream", "Http://lowstreamVoorbeeld.nl"); settings.IsScalar = true; ExtensionManager.ImportSettings(settings); }
private void InitSettings() { ExtensionSettings settings = new ExtensionSettings(this); settings.IsScalar = true; settings.AddParameter("SiteURL", "Site URL"); settings.AddParameter("ApiKey", "API Key"); settings.AddValue("SiteURL", "http://example.com/blog"); settings.AddValue("ApiKey", "123456789"); _settings = ExtensionManager.InitSettings("TypePadFilter", settings); ExtensionManager.SetStatus("TypePadFilter", false); }
protected void InitFeaturedPostsImages() { ExtensionSettings featuredPostsImages = new ExtensionSettings("FeaturedPostsImages"); featuredPostsImages.AddParameter("id", "id", 38, true, true, ParameterType.Integer); featuredPostsImages.AddParameter("PostID", "PostID", 38, true, false, ParameterType.DropDown); featuredPostsImages.AddParameter("PostTitle", "Post Title", 38, true, false, ParameterType.DropDown); featuredPostsImages.AddParameter("Image", "Image"); featuredPostsImages.AddParameter("ImageSize", "Size", 100, false, false, ParameterType.String); ExtensionManager.SetAdminPage("FeaturedPostsRotator", "~/Custom/Controls/FeaturedPostsRotator/Admin.aspx"); ExtensionManager.ImportSettings("FeaturedPostsRotator", featuredPostsImages); _featuredPostsImages = ExtensionManager.GetSettings("FeaturedPostsRotator", "FeaturedPostsImages"); }
public FacebookCompartilhar() { BlogEngine.Core.Post.Serving += new EventHandler <ServingEventArgs>(PrepareFacebookCompartilhar); ExtensionSettings settings = new ExtensionSettings(ExtensionName); settings.AddParameter("findImg", "Exibir imagem", 1, true, false, ParameterType.Boolean); settings.AddParameter("ondeExibir", "Onde exibir", 10, true, false, ParameterType.DropDown); settings.AddValue("findImg", true); settings.AddValue("ondeExibir", new string[] { "Topo", "Rodape" }, "Rodapé"); settings.Help = "<br />Botão de compartilhamento do post no facebook.<br /><a target=\"_blank\" href=\"http://www.acainfo.com.br\">ACA INFO</a>"; settings.IsScalar = true; _settings = ExtensionManager.InitSettings(ExtensionName, settings); }
public paypaldonatebutton() { Post.Serving += new EventHandler <ServingEventArgs>(Post_Serving); BlogEngine.Core.Page.Serving += new EventHandler <ServingEventArgs>(Post_Serving); ExtensionSettings initialSettings = new ExtensionSettings((GetType().Name)); initialSettings.Help = "Usage: Insert [donate:item_name] in your post to create paypal donate buttons with reference item_name. You need a paypal account. Change url to live server when ready to go live.(live url:https://www.paypal.com/cgi-bin/webscr, sandbox url:https://www.sandbox.paypal.com/us/cgi-bin/webscr)"; initialSettings.AddParameter("userName", "Company Name"); initialSettings.AddValue("userName", _userNameDefault.ToString()); initialSettings.AddParameter("serverUrl", "server Url"); initialSettings.AddValue("serverUrl", _serverUrlDefault.ToString()); initialSettings.AddParameter("buttonUrl", "Absolute Path Button Url"); initialSettings.AddValue("buttonUrl", _buttonUrlDefault.ToString()); initialSettings.AddParameter("currencyCode", "Currency Code (3 chars)"); initialSettings.AddValue("currencyCode", _currencyCodeDefault.ToString()); initialSettings.AddParameter("taxRate", "Tax Rate in Decimal"); initialSettings.AddValue("taxRate", _taxRateDefault.ToString()); initialSettings.AddParameter("shipping", "Shipping Charge"); initialSettings.AddValue("shipping", _shippingDefault.ToString()); initialSettings.AddParameter("businessEmail", "Pay pal email address"); initialSettings.AddValue("businessEmail", _businessEmailDefault.ToString()); initialSettings.IsScalar = true; ExtensionManager.ImportSettings(initialSettings); settings = ExtensionManager.GetSettings(GetType().Name); }
/// <summary> /// Builds the main settings, this creates the various locations /// </summary> private void buildSettings() { ExtensionSettings settings = new ExtensionSettings(this); settings.IsScalar = true; settings.AddParameter("MTImagePath", "Floating Move To Top Image Path", 2000, true, true, ParameterType.String); settings.AddValue("MTImagePath", "Custom/Extensions/MoveToTop/MovetoTop.png"); Settings = ExtensionManager.InitSettings(this.GetType().Name, settings); }
public Bovenhoek() { //Comment.Serving += new EventHandler<ServingEventArgs>(Post_CommentServing); ExtensionSettings settings = new ExtensionSettings("Bovenhoek"); /* TxtUrl.Text = Settings.GetSingleValue("PeelUrl"); TxtImageUrl.Text = Settings.GetSingleValue("PeelImage"); TxtTarget.Text = Settings.GetSingleValue("PeelTarget");*/ settings.AddParameter("PeelUrl", "PeelUrl.", 500, true, false, ParameterType.String); settings.AddParameter("PeelImage", "PeelImage.", 500, true, false, ParameterType.String); settings.AddParameter("PeelTarget", "PeelTarget.", 500, true, false, ParameterType.String); // settings.AddValue("HighStream", "Http://HighStreamVoorbeeld.nl"); //settings.AddValue("LowStream", "Http://lowstreamVoorbeeld.nl"); settings.IsScalar = true; ExtensionManager.ImportSettings(settings); }
public GoogleAsyncAnalytics() { BlogEngine.Core.Post.Serving += new EventHandler<ServingEventArgs>(PrepareGoogleAnalytics); BlogEngine.Core.Page.Serving += new EventHandler<ServingEventArgs>(PrepareGoogleAnalytics); ExtensionSettings settings = new ExtensionSettings(ExtensionName); settings.AddParameter("trackerID", "Google Tracking Code", 20, true); settings.AddParameter("isAsync", "Use new asynchronous script"); settings.AddParameter("disableForLoggedInUsers", "Disable when users are logged in"); // Load generic default value to illustrate the format settings.AddValue("trackerID", "UA-XXXXXXX-Y"); settings.AddValue("isAsync", true); settings.AddValue("disableForLoggedInUsers", false); settings.Help = "<br />Add Google Analytics to your website.<br />Generate a code for your site by going to https://www.google.com/analytics.<br /><br />The script will get generated at the top of the page, it is recommended that you use the asynchronous script, if you experience problems switch to the synchronous version. Using the synchronous script may delay start-up time for each page as it waits for a response from Google.<br /><br />Disable tracking for logged on users if only admins are logging in and updating posts and/or comments. This allows for more accurate tracking of real site usage."; settings.IsScalar = true; _settings = ExtensionManager.InitSettings(ExtensionName, settings); }
static BBCode() { Comment.Serving += new EventHandler<ServingEventArgs>(Post_CommentServing); // create settings object. You need to pass exactly your // extension class name (case sencitive) ExtensionSettings settings = new ExtensionSettings("BBCode"); //----------------------------------------------------- // 1. Simple //----------------------------------------------------- //settings.AddParameter("Code"); //settings.AddParameter("OpenTag"); //settings.AddParameter("CloseTag"); //----------------------------------------------------- // 2. Some more options //----------------------------------------------------- //settings.AddParameter("Code"); //settings.AddParameter("OpenTag", "Open Tag"); //settings.AddParameter("CloseTag", "Close Tag"); //// describe specific rules applied to entering parameters. overrides default wording. //settings.Help = "Converts BBCode to XHTML in the comments. Close tag is optional."; //----------------------------------------------------- // 3. More options including import defaults //----------------------------------------------------- settings.AddParameter("Code", "Code", 20, true); settings.AddParameter("OpenTag", "Open Tag", 150, true); settings.AddParameter("CloseTag", "Close Tag"); // describe specific rules for entering parameters settings.Help = "Converts BBCode to XHTML in the comments. Close tag is optional."; settings.AddValues(new string[] { "b", "strong", "" }); settings.AddValues(new string[] { "i", "em", "" }); settings.AddValues(new string[] { "u", "span style=\"text-decoration:underline\"", "span" }); settings.AddValues(new string[] { "quote", "cite title=\"Quote\"", "cite" }); //------------------------------------------------------ ExtensionManager.ImportSettings(settings); _settings = ExtensionManager.GetSettings("BBCode"); }
static BBCode() { Comment.Serving += new EventHandler <ServingEventArgs>(Post_CommentServing); // create settings object. You need to pass exactly your // extension class name (case sencitive) ExtensionSettings settings = new ExtensionSettings("BBCode"); //----------------------------------------------------- // 1. Simple //----------------------------------------------------- //settings.AddParameter("Code"); //settings.AddParameter("OpenTag"); //settings.AddParameter("CloseTag"); //----------------------------------------------------- // 2. Some more options //----------------------------------------------------- //settings.AddParameter("Code"); //settings.AddParameter("OpenTag", "Open Tag"); //settings.AddParameter("CloseTag", "Close Tag"); //// describe specific rules applied to entering parameters. overrides default wording. //settings.Help = "Converts BBCode to XHTML in the comments. Close tag is optional."; //----------------------------------------------------- // 3. More options including import defaults //----------------------------------------------------- settings.AddParameter("Code", "Code", 20, true); settings.AddParameter("OpenTag", "Open Tag", 150, true); settings.AddParameter("CloseTag", "Close Tag"); // describe specific rules for entering parameters settings.Help = "Converts BBCode to XHTML in the comments. Close tag is optional."; settings.AddValues(new string[] { "b", "strong", "" }); settings.AddValues(new string[] { "i", "em", "" }); settings.AddValues(new string[] { "u", "span style=\"text-decoration:underline\"", "span" }); settings.AddValues(new string[] { "quote", "cite title=\"Quote\"", "cite" }); //------------------------------------------------------ ExtensionManager.ImportSettings(settings); _settings = ExtensionManager.GetSettings("BBCode"); }
private static void EnsureSettings() { ExtensionSettings settings = new ExtensionSettings("DotNetShoutout"); settings.AddParameter("borderColor", "Border Color", 6, false, false, ParameterType.String); settings.AddParameter("textBackColor", "Shout It Backcolor", 6, false, false, ParameterType.String); settings.AddParameter("textForeColor", "Shout It Forecolor", 6, false, false, ParameterType.String); settings.AddParameter("countBackColor", "Count Backcolor", 6, false, false, ParameterType.String); settings.AddParameter("countForeColor", "Count Forcolor", 6, false, false, ParameterType.String); settings.AddValue("borderColor", DotNetShoutoutCounterGenerator.DefaultBorderColor); settings.AddValue("textBackColor", DotNetShoutoutCounterGenerator.DefaultTextBackColor); settings.AddValue("textForeColor", DotNetShoutoutCounterGenerator.DefaultTextForeColor); settings.AddValue("countBackColor", DotNetShoutoutCounterGenerator.DefaultCountBackColor); settings.AddValue("countForeColor", DotNetShoutoutCounterGenerator.DefaultCountForeColor); settings.Help = DotNetShoutoutCounterGenerator.Description; settings.IsScalar = true; ExtensionManager.ImportSettings(settings); }
private void InitSettings() { ExtensionSettings initialSettings = new ExtensionSettings(this); initialSettings.IsScalar = true; // define parameters initialSettings.AddParameter("guardingType", "Guarding Type: ", 50, false, false, ParameterType.RadioGroup); initialSettings.AddParameter("watermarkText", "Watermark Text"); initialSettings.AddParameter("watermarkImagePath", "Virtual Path Of Watermark Image"); initialSettings.AddParameter("blockImagePath", "Virtual Path Of Block Image"); initialSettings.AddValue("guardingType", new string[] { "Watermark", "Block", "Reject" }, "Watermark"); initialSettings.AddValue("watermarkText", "text"); initialSettings.AddValue("watermarkImagePath", ""); initialSettings.AddValue("blockImagePath", ""); initialSettings.Help = "Notice: There are 3 types of image guarding. Watermark is to add an watermark information(such as your blog url) to your images that is requested by other host; Block is to replace the requested image with a specific image, such as an image only shows Not Allowed information on it; Reject is not to respond to the requested image at all. <br />The Watermark Text and Virtual Path Of Watermark Image is for Watermark Guarding Type; Virtual Path Of Block Image for Block; and if you choose Reject Guarding Type, then there is no need to do other settings."; settings = ExtensionManager.InitSettings(this.GetType().Name, initialSettings); }
private static void InitSettings() { ExtensionSettings initialSettings = new ExtensionSettings(_extensionName); initialSettings.Help = @" <p>Build on <a href=""http://mediaelement.js.com/"">MediaElement.js</a>, the HTML5 video/audio player.</p> <ol> <li>Upload media files to your /media/ folder</li> <li>Add short code to your media: [video src=""myfile.mp4""] for video and [audio src=""myfile.mp3""] for audio</li> <li>Customize with the following parameters: <ul> <li><b>width</b>: The exact width of the video</li> <li><b>height</b>: The exact height of the video</li> <li><b>autoplay</b>: Plays the video as soon as the webpage loads</li> </ul> </li> <li>You can also specify multiple file formats and codecs <ul> <li><b>mp4</b>: H.264 encoded MP4 file</li> <li><b>webm</b>: VP8/WebM encoded file</li> <li><b>ogg</b>: Theora/Vorbis encoded file</li> </ul> </li> </ol> <p>A complete example:<br /> [code mp4=""myfile.mp4"" webm=""myfile.webm"" ogg=""myfile.ogg"" width=""480"" height=""360""] </p> <p>Supported formats</p> <ul> <li><b>MP4/MP3</b>: Native HTML5 for IE9, Safari, Chrome; Flash in IE8, Firefox, Opera</li> <li><b>WebM</b>: HTML5 for IE9, Chrome, Firefox, Opera; Flash in IE8 (coming in Flash 11)</li> <li><b>FLV</b>: Flash fallback</li> <li><b>WMV/WMA</b>: Silverlight fallback</li> </ul> "; initialSettings.IsScalar = true; initialSettings.AddParameter("width", "Default Width"); initialSettings.AddValue("width", _widthDefault.ToString()); initialSettings.AddParameter("height", "Default Height"); initialSettings.AddValue("height", _heightDefault.ToString()); initialSettings.AddParameter("folder", "Folder for Media (MP4, MP3, WMV, Ogg, WebM, etc.)"); initialSettings.AddValue("folder", _folderDefault); _settings = ExtensionManager.InitSettings(_extensionName, initialSettings); }
/// <summary> /// Adds a YouTube video player to the post and page. /// </summary> public YouTubePlayer() { Post.Serving += Post_Serving; BlogEngine.Core.Page.Serving += Page_Serving; ExtensionSettings initialSettings = new ExtensionSettings(GetType().Name); initialSettings.Help = "For Border, 0=No 1=Yes.<br>Border colors must be entered in Hexidecimal format (i.e. FF3300)"; initialSettings.AddParameter("width", "Width"); initialSettings.AddValue("width", "425"); initialSettings.AddParameter("height", "Height"); initialSettings.AddValue("height", "355"); initialSettings.AddParameter("border", "Show Border"); initialSettings.AddValue("border", "0"); initialSettings.AddParameter("color1", "Primary Color"); initialSettings.AddValue("color1", "000000"); initialSettings.AddParameter("color2", "Secondary Color"); initialSettings.AddValue("color2", "000000"); initialSettings.IsScalar = true; ExtensionManager.ImportSettings(initialSettings); settings = ExtensionManager.GetSettings(GetType().Name); }
protected void InitSettings() { var settings = new ExtensionSettings("Picasa"); 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("Picasa", "~/Custom/Controls/Picasa/Admin.aspx"); Settings = ExtensionManager.GetSettings("Picasa"); }
/// <summary> /// The init log settings. /// </summary> public void InitLogSettings() { var settings = new ExtensionSettings("RecaptchaLog"); settings.AddParameter("Response"); settings.AddParameter("Challenge"); settings.AddParameter("CommentID"); settings.AddParameter("TimeToComment"); settings.AddParameter("TimeToSolveCapcha"); settings.AddParameter("NumberOfAttempts"); settings.AddParameter("Enabled"); settings.AddParameter("Necessary"); settings.Hidden = true; ExtensionManager.InitSettings("Recaptcha", settings); }
public AdsenseInjector() { Post.Serving += new EventHandler <ServingEventArgs>(Serving); Page.Serving += new EventHandler <ServingEventArgs>(Serving); ExtensionSettings settings = new ExtensionSettings("AdsenseInjector"); settings.AddParameter("ad_Author", "Author (write \"" + _adForever + "\" to insert the ad always)", 50, true); settings.AddParameter("ad_PubID", "Publisher ID", 50, true); settings.AddParameter("ad_Desc", "Description", 200); settings.AddParameter("ad_ID", "ID Slot", 50, true, true); settings.AddParameter("ad_size_w", "Size (width)", 4, true); settings.AddParameter("ad_size_h", "Size (height)", 4, true); settings.AddParameter("ad_style", "Style code", 500, true); settings.AddParameter("ad_position", "Position ([T]op, [C]enter, [B]ottom, [R]andom)", 1, true); settings.AddParameter("ad_display", "Display ([A]lways, [R]eferrer, [S]earch engine)", 1, true); settings.AddParameter("ad_where", "Insert in [P]ost, P[A]ges, [B]oth", 1); settings.Help = "Inject Adsense Code in the posts and pages. All parameters are mandatory. The code can be added at the beginning, middle or end of the post (or page)"; ExtensionManager.ImportSettings(settings); _settings = ExtensionManager.GetSettings("AdsenseInjector"); }
public CopyCodeToClipboard() { Post.Serving += new EventHandler<ServingEventArgs>(Post_PostServing); Post.Saving += new EventHandler<SavedEventArgs>(Post_Saving); ExtensionSettings initialSettings = new ExtensionSettings(GetType().Name); initialSettings.Help = "This extension is written to work with the <a href=\"http://lvildosola.blogspot.com/2007/02/code-snippet-plugin-for-windows-live.html\">Code Snippet Plugin for Windows Live Writer</a> and will not work with other syntax highlighting tools."; initialSettings.AddParameter( "copyText", "Text for 'Copy to Clipboard' button?", 255, true ); initialSettings.AddValue( "copyText", "Copy To Clipboard" ); initialSettings.AddParameter( "popupText", "Text for 'View in Popup Window' button?", 255, true ); initialSettings.AddValue( "popupText", "View Plain" ); initialSettings.AddParameter("aboveBelow", "Display above or below code?", 5, true); initialSettings.AddValue("aboveBelow", "Below"); initialSettings.AddParameter( "style", "Any additional styling?", int.MaxValue, false ); initialSettings.AddValue( "style", "" ); initialSettings.AddParameter( "flashFile", "Path to '_clipboard.swf' Flash file?", 255, true ); initialSettings.AddValue( "flashFile", "~/_clipboard.swf" ); initialSettings.IsScalar = true; ExtensionManager.ImportSettings(initialSettings); settings = ExtensionManager.GetSettings(GetType().Name); }
// ---------------------------------------------------------------------- /// <summary> /// Loads the settings for this extension /// </summary> private static ExtensionSettings LoadSettings() { ExtensionSettings initialSettings = new ExtensionSettings(_ExtensionName); initialSettings.Help = @""; initialSettings.IsScalar = true; ExtensionSettings settings = null; initialSettings.AddParameter("MaxWidth"); initialSettings.AddValue("MaxWidth", _MaxWidth); initialSettings.AddParameter("ForceMaxWidth"); initialSettings.AddValue("ForceMaxWidth", _ForceMaxWidth); initialSettings.AddParameter("MaxHeight"); initialSettings.AddValue("MaxHeight", _MaxHeight); initialSettings.AddParameter("ForceMaxHeight"); initialSettings.AddValue("ForceMaxHeight", _ForceMaxHeight); initialSettings.AddParameter("InsertIntoContent"); initialSettings.AddValue("InsertIntoContent", _InsertIntoContent); initialSettings.AddParameter("ImageInlineStyle"); initialSettings.AddValue("ImageInlineStyle", _ImageInlineStyle); initialSettings.AddParameter("ImageCssClass"); initialSettings.AddValue("ImageCssClass", _ImageCssClass); initialSettings.AddParameter("UseDefaultImage"); initialSettings.AddValue("UseDefaultImage", _UseDefaultImage); initialSettings.AddParameter("DefaultImagePath"); initialSettings.AddValue("DefaultImagePath", _DefaultImagePath); settings = ExtensionManager.InitSettings(_ExtensionName, initialSettings); ExtensionManager.SetStatus(_ExtensionName, false); return(settings); }
protected void InitSettings() { ExtensionSettings settings = new ExtensionSettings("FeaturedPostsRotator"); settings.AddParameter("UseExtensionJQuery", "Use Extension JQuery file", 1, true, false, ParameterType.Boolean); settings.AddValue("UseExtensionJQuery", true); settings.IsScalar = true; // set page that extension manager will use // instead of default settings page ExtensionManager.SetAdminPage("FeaturedPostsRotator", "~/Custom/Controls/FeaturedPostsRotator/Admin.aspx"); ExtensionManager.ImportSettings(settings); _settings = ExtensionManager.GetSettings("FeaturedPostsRotator"); }
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); }
private static void InitializeSettings() { var settings = new ExtensionSettings(ExtensionName); settings.Help = @"<p>Adds an heyos advertisement in your posts where the [heyos] keyword is found in the body</p> <p>Place the [heyos] keyword on a line by itself in your blog. BlogEngine will automatically wrap the line with paragraph tags which will be replaced with your Heys code.</p> <ol> <li><b>User</b>: Enter the entire string for heyos_ad_user</li> <li><b>type</b>: Enter the entire string for heyos_ad_type</li> <li><b>format</b>: Enter the entire string for heyos_ad_format</li> <li><b>border</b>: Enter the entire string for heyos_color_border</li> <li><b>bg</b>: Enter the entire string for heyos_color_bg</li> <li><b>link</b>: Enter the entire string for heyos_color_link</li> <li><b>text</b>: Enter the entire string for heyos_color_text</li> <li><b>url</b>: Enter the entire string for heyos_color_url</li> </ol> <p> <a href='http://www.Informarea.it'>By Fabrizio Cannatelli</a> </p>"; settings.IsScalar = true; settings.AddParameter("user", "user"); settings.AddValue("user", string.Empty); settings.AddParameter("type", "type"); settings.AddValue("type", string.Empty); settings.AddParameter("format", "format"); settings.AddValue("format", string.Empty); settings.AddParameter("border", "border"); settings.AddValue("border", string.Empty); settings.AddParameter("bg", "bg"); settings.AddValue("bg", string.Empty); settings.AddParameter("link", "link"); settings.AddValue("link", string.Empty); settings.AddParameter("text", "text"); settings.AddValue("text", string.Empty); settings.AddParameter("url", "url"); settings.AddValue("url", string.Empty); _extensionSettings = ExtensionManager.InitSettings(ExtensionName, settings); }
private void InitializeSettings() { var settings = new ExtensionSettings(ExtensionName); settings.Help = "Enable facebook Like button on Post Home page and Post page"; settings.IsScalar = true; settings.AddParameter("ShowPostList", "Display Like button on featured list", 20, false, false, ParameterType.Boolean); settings.AddParameter("ShowFaces", "Show Faces (Show profile pictures below the button)", 20, false, false, ParameterType.Boolean); settings.AddParameter("Width", "Width (the width of the plugin in pixel)", 20, false, false, ParameterType.String); settings.AddParameter("Action", "Verb to display", 20, false, false, ParameterType.DropDown); settings.AddValue("Action", new string [] { "like", "recommend" }, "like"); settings.AddParameter("ColorScheme", "Color Scheme (color scheme of the plugin)", 20, false, false, ParameterType.DropDown); settings.AddValue("ColorScheme", new string[] { "light", "dark" }, "light"); settings.AddParameter("SelectedLayout", "Layout Style", 20, false, false, ParameterType.DropDown); settings.AddValue("SelectedLayout", new string[] { "standard", "button_count", "box_count" }, "standard"); settings.AddValue("ShowPostList", true); _extensionSettings = ExtensionManager.InitSettings(ExtensionName, settings); }
static void InitCustomFilters() { ExtensionSettings settings = new ExtensionSettings("BeCustomFilters"); settings.AddParameter("FullName", "Name", 100, true, true); settings.AddParameter("Name"); settings.AddParameter("Checked"); settings.AddParameter("Cought"); settings.AddParameter("Reported"); settings.AddParameter("Priority"); _customFilters = ExtensionManager.InitSettings("MetaExtension", settings); if (_customFilters != null) { DataTable dt = _customFilters.GetDataTable(); ArrayList codeAssemblies = Utils.CodeAssemblies(); foreach (Assembly a in codeAssemblies) { Type[] types = a.GetTypes(); foreach (Type type in types) { if (type.GetInterface("BlogEngine.Core.ICustomFilter") != null) { bool found = false; foreach (DataRow row in dt.Rows) { if (row[0].ToString() == type.Name) { found = true; break; } } if (!found) { _customFilters.AddValues(new string[] { type.FullName, type.Name, "0", "0", "0", "0" }); } } } } ExtensionManager.SaveSettings("MetaExtension", _customFilters); } }
/// <summary> /// The init custom filters. /// </summary> private static void InitCustomFilters() { var settings = new ExtensionSettings("BeCustomFilters"); settings.AddParameter("FullName", "Name", 100, true, true); settings.AddParameter("Name"); settings.AddParameter("Checked"); settings.AddParameter("Cought"); settings.AddParameter("Reported"); settings.AddParameter("Priority"); customFilters = ExtensionManager.InitSettings("MetaExtension", settings); if (customFilters == null) { return; } var dt = customFilters.GetDataTable(); var codeAssemblies = Utils.CodeAssemblies(); foreach (var type in codeAssemblies.Cast <Assembly>().Select(a => a.GetTypes()).SelectMany( types => (from type in types where type.GetInterface("BlogEngine.Core.ICustomFilter") != null let found = dt.Rows.Cast <DataRow>().Any(row => row[0].ToString() == type.Name) where !found select type))) { // if new filter found in the assembly, add it to settings if (!customFilters.IsKeyValueExists(type.FullName)) { customFilters.AddValues(new[] { type.FullName, type.Name, "0", "0", "0", "0" }); ExtensionManager.SaveSettings("MetaExtension", customFilters); } } }
public Sponsor() { //Comment.Serving += new EventHandler<ServingEventArgs>(Post_CommentServing); var settings = new ExtensionSettings("Sponsor"); settings.AddParameter("ID", labels.ID, 150, true, true, ParameterType.String); settings.AddParameter("Name", labels.name, 150, true, false, ParameterType.String); settings.AddParameter("URL", labels.website, 255); //SponsorType Can have values from the SponsorType Enum. The number wil be saved settings.AddParameter("SponsorPage_SponsorType", labels.sponsorType); #region Type Bools //Player Bools settings.AddParameter("Player_Switch", labels.Switch); settings.AddParameter("Player_Solid", labels.Solid); //Widget settings.AddParameter("Widget_Switch", labels.widget); //Mobiele app settings.AddParameter("Mobile_Switch", labels.Switch); settings.AddParameter("Mobile_Solid", labels.Solid); #endregion settings.AddParameter("Mobile_Frequency", labels.Frequency); settings.AddParameter("Logo", labels.sponsorlogo, 255); settings.AddParameter("Description", labels.description, int.MaxValue); settings.AddParameter("CreationDate", labels.setPublishDate); settings.AddParameter("EndDate", labels.endDate); settings.AddParameter("Active", labels.active); ExtensionManager.ImportSettings(settings); }
/// <summary> /// Initializes settings with default values /// </summary> public static void SetDefaultSettings() { var settings = new ExtensionSettings(Ext); settings.AddParameter(Width); settings.AddParameter(Height); settings.AddParameter(BgColor); settings.AddParameter(Bg); settings.AddParameter(Leftbg); settings.AddParameter(Lefticon); settings.AddParameter(Rightbg); settings.AddParameter(Rightbghover); settings.AddParameter(Righticon); settings.AddParameter(Righticonhover); settings.AddParameter(Text); settings.AddParameter(Slider); settings.AddParameter(Track); settings.AddParameter(Border); settings.AddParameter(Loader); settings.AddValue(Width, "290"); settings.AddValue(Height, "24"); settings.AddValue(BgColor, "ffffff"); settings.AddValue(Bg, "f8f8f8"); settings.AddValue(Leftbg, "eeeeee"); settings.AddValue(Lefticon, "666666"); settings.AddValue(Rightbg, "cccccc"); settings.AddValue(Rightbghover, "999999"); settings.AddValue(Righticon, "666666"); settings.AddValue(Righticonhover, "ffffff"); settings.AddValue(Text, "666666"); settings.AddValue(Slider, "666666"); settings.AddValue(Track, "ffffff"); settings.AddValue(Border, "666666"); settings.AddValue(Loader, "9FFFB8"); settings.IsScalar = true; ExtensionManager.ImportSettings(settings); Settings = ExtensionManager.GetSettings(Ext); }
private static ExtensionSettings LoadExtensionSettingsForBlogInstance() { ExtensionSettings initialSettings = new ExtensionSettings(_extensionName); initialSettings.Help = @" <ol> <li>Upload media files to your cloud storage</li> <li>Add short code to your media: [gviewer file=""yoururl/myfile.pdf""] for pdf or change the extension to other file that supported by Google Docs</li> <li>Customize with the following parameters: <ul> <li><b>width</b>: The exact width of the Document</li> <li><b>height</b>: The exact height of the Document</li> </ul> </li> </ol> <p>A complete example:<br /> [gviewer file=""yoururl/myfile.pdf"" width=""600"" height=""720""] </p> <h3>You must!</h3> <ul> <li>Enable ""Use raw HTML Editor"" in write post to make sure complete [gviewer argument]</li> </ul> "; initialSettings.IsScalar = true; initialSettings.AddParameter("width", "Default Width"); initialSettings.AddValue("width", _widthDefault.ToString()); initialSettings.AddParameter("height", "Default Height"); initialSettings.AddValue("height", _heightDefault.ToString()); return ExtensionManager.InitSettings(_extensionName, initialSettings); }
private static void InitSettings() { // options ExtensionSettings options = new ExtensionSettings("Options"); options.IsScalar = true; options.Help = OptionsHelp(); options.AddParameter("gutter", "Gutter"); options.AddParameter("smart-tabs", "Smart tabs"); options.AddParameter("auto-links", "Auto links"); options.AddParameter("collapse", "Collapse"); options.AddParameter("light", "Light"); options.AddParameter("tab-size", "Tab size"); options.AddParameter("toolbar", "Toolbar"); options.AddParameter("wrap-lines", "Wrap lines"); options.AddValue("gutter", true); options.AddValue("smart-tabs", true); options.AddValue("auto-links", true); options.AddValue("collapse", false); options.AddValue("light", false); options.AddValue("tab-size", 4); options.AddValue("toolbar", true); options.AddValue("wrap-lines", true); _options = ExtensionManager.InitSettings(ExtensionName, options); // brushes ExtensionSettings brushes = new ExtensionSettings("Brushes"); brushes.IsScalar = true; brushes.AddParameter("shBrushBash", "Bash (bash, shell)", 100, false); brushes.AddParameter("shBrushCpp", "C++ (cpp, c)", 100, false); brushes.AddParameter("shBrushCSharp", "C# (c-sharp, csharp)", 100, false); brushes.AddParameter("shBrushCss", "Css (css)", 100, false); brushes.AddParameter("shBrushDelphi", "Delphi (delphi, pas, pascal)", 100, false); brushes.AddParameter("shBrushDiff", "Diff (diff, patch)", 100, false); brushes.AddParameter("shBrushGroovy", "Groovy (groovy)", 100, false); brushes.AddParameter("shBrushJava", "Java (java)", 100, false); brushes.AddParameter("shBrushJScript", "JScript (js, jscript, javascript)", 100, false); brushes.AddParameter("shBrushPhp", "PHP (php)", 100, false); brushes.AddParameter("shBrushPlain", "Plain (plain, text)", 100, false); brushes.AddParameter("shBrushPython", "Python (py, python)", 100, false); brushes.AddParameter("shBrushRuby", "Ruby (rails, ror, ruby)", 100, false); brushes.AddParameter("shBrushScala", "Scala (scala)", 100, false); brushes.AddParameter("shBrushSql", "SQL (sql)", 100, false); brushes.AddParameter("shBrushVb", "VB (vb, vbnet)", 100, false); brushes.AddParameter("shBrushXml", "XML (xml, xhtml, xslt, html, xhtml)", 100, false); brushes.AddParameter("shBrushColdFusion", "Cold Fusion (cf, coldfusion)", 100, false); brushes.AddParameter("shBrushErlang", "Erlang (erlang, erl)", 100, false); brushes.AddParameter("shBrushJavaFX", "JavaFX (jfx, javafx)", 100, false); brushes.AddParameter("shBrushPerl", "Perl (perl, pl)", 100, false); brushes.AddParameter("shBrushPowerShell", "PowerSell (ps, powershell)", 100, false); brushes.AddParameter("shBrushFSharp", "FSharp (fs, fsharp)", 100, false); brushes.AddValue("shBrushBash", false); brushes.AddValue("shBrushCpp", true); brushes.AddValue("shBrushCSharp", true); brushes.AddValue("shBrushCss", true); brushes.AddValue("shBrushDelphi", false); brushes.AddValue("shBrushDiff", false); brushes.AddValue("shBrushGroovy", false); brushes.AddValue("shBrushJava", false); brushes.AddValue("shBrushJScript", true); brushes.AddValue("shBrushPhp", false); brushes.AddValue("shBrushPlain", true); brushes.AddValue("shBrushPython", false); brushes.AddValue("shBrushRuby", false); brushes.AddValue("shBrushScala", false); brushes.AddValue("shBrushSql", true); brushes.AddValue("shBrushVb", false); brushes.AddValue("shBrushXml", true); brushes.AddValue("shBrushColdFusion", false); brushes.AddValue("shBrushErlang", false); brushes.AddValue("shBrushJavaFX", false); brushes.AddValue("shBrushPerl", false); brushes.AddValue("shBrushPowerShell", true); brushes.AddValue("shBrushFSharp", true); _brushes = ExtensionManager.InitSettings(ExtensionName, brushes); // themes ExtensionSettings themes = new ExtensionSettings("Themes"); themes.IsScalar = true; themes.AddParameter("SelectedTheme", "Themes", 20, false, false, ParameterType.ListBox); themes.AddValue("SelectedTheme", new string[] { "Default", "Django", "Eclipse", "Emacs", "FadeToGrey", "MDUltra", "Midnight", "Dark" }, "Default"); _themes = ExtensionManager.InitSettings(ExtensionName, themes); }
private static void InitSettings() { // options ExtensionSettings options = new ExtensionSettings("Options"); options.IsScalar = true; options.Help = OptionsHelp(); options.AddParameter("gutter", "Gutter"); options.AddParameter("smart-tabs", "Smart tabs"); options.AddParameter("auto-links", "Auto links"); options.AddParameter("collapse", "Collapse"); options.AddParameter("light", "Light"); options.AddParameter("tab-size", "Tab size"); options.AddParameter("toolbar", "Toolbar"); options.AddParameter("wrap-lines", "Wrap lines"); options.AddValue("gutter", true); options.AddValue("smart-tabs", true); options.AddValue("auto-links", true); options.AddValue("collapse", false); options.AddValue("light", false); options.AddValue("tab-size", 4); options.AddValue("toolbar", true); options.AddValue("wrap-lines", true); _options = ExtensionManager.InitSettings(ExtensionName, options); // brushes ExtensionSettings brushes = new ExtensionSettings("Brushes"); brushes.IsScalar = true; brushes.AddParameter("shBrushBash", "Bash (bash, shell)", 100, false); brushes.AddParameter("shBrushCpp", "C++ (cpp, c)", 100, false); brushes.AddParameter("shBrushCSharp", "C# (c-sharp, csharp)", 100, false); brushes.AddParameter("shBrushCss", "Css (css)", 100, false); brushes.AddParameter("shBrushDelphi", "Delphi (delphi, pas, pascal)", 100, false); brushes.AddParameter("shBrushDiff", "Diff (diff, patch)", 100, false); brushes.AddParameter("shBrushGroovy", "Groovy (groovy)", 100, false); brushes.AddParameter("shBrushJava", "Java (java)", 100, false); brushes.AddParameter("shBrushJScript", "JScript (js, jscript, javascript)", 100, false); brushes.AddParameter("shBrushPhp", "PHP (php)", 100, false); brushes.AddParameter("shBrushPlain", "Plain (plain, text)", 100, false); brushes.AddParameter("shBrushPython", "Python (py, python)", 100, false); brushes.AddParameter("shBrushRuby", "Ruby (rails, ror, ruby)", 100, false); brushes.AddParameter("shBrushScala", "Scala (scala)", 100, false); brushes.AddParameter("shBrushSql", "SQL (sql)", 100, false); brushes.AddParameter("shBrushVb", "VB (vb, vbnet)", 100, false); brushes.AddParameter("shBrushXml", "XML (xml, xhtml, xslt, html, xhtml)", 100, false); brushes.AddParameter("shBrushColdFusion", "Cold Fusion (cf, coldfusion)", 100, false); brushes.AddParameter("shBrushErlang", "Erlang (erlang, erl)", 100, false); brushes.AddParameter("shBrushJavaFX", "JavaFX (jfx, javafx)", 100, false); brushes.AddParameter("shBrushPerl", "Perl (perl, pl)", 100, false); brushes.AddParameter("shBrushPowerShell", "PowerSell (ps, powershell)", 100, false); brushes.AddValue("shBrushBash", false); brushes.AddValue("shBrushCpp", false); brushes.AddValue("shBrushCSharp", true); brushes.AddValue("shBrushCss", true); brushes.AddValue("shBrushDelphi", false); brushes.AddValue("shBrushDiff", false); brushes.AddValue("shBrushGroovy", false); brushes.AddValue("shBrushJava", false); brushes.AddValue("shBrushJScript", true); brushes.AddValue("shBrushPhp", false); brushes.AddValue("shBrushPlain", true); brushes.AddValue("shBrushPython", false); brushes.AddValue("shBrushRuby", false); brushes.AddValue("shBrushScala", false); brushes.AddValue("shBrushSql", true); brushes.AddValue("shBrushVb", true); brushes.AddValue("shBrushXml", true); brushes.AddValue("shBrushColdFusion", false); brushes.AddValue("shBrushErlang", false); brushes.AddValue("shBrushJavaFX", false); brushes.AddValue("shBrushPerl", false); brushes.AddValue("shBrushPowerShell", false); _brushes = ExtensionManager.InitSettings(ExtensionName, brushes); // themes ExtensionSettings themes = new ExtensionSettings("Themes"); themes.IsScalar = true; themes.AddParameter("SelectedTheme", "Themes", 20, false, false, ParameterType.ListBox); themes.AddValue("SelectedTheme", new string[] { "Default", "Django", "Eclipse", "Emacs", "FadeToGrey", "MDUltra", "Midnight", "Dark" }, "Default"); _themes = ExtensionManager.InitSettings(ExtensionName, themes); }
static void InitFilters() { ExtensionSettings settings = new ExtensionSettings("BeCommentFilters"); settings.AddParameter("ID", "ID", 20, true, true, ParameterType.Integer); settings.AddParameter("Action"); settings.AddParameter("Subject"); settings.AddParameter("Operator"); settings.AddParameter("Filter"); _filters = ExtensionManager.InitSettings("MetaExtension", settings); }
static void InitCustomFilters() { ExtensionSettings settings = new ExtensionSettings("BeCustomFilters"); settings.AddParameter("FullName", "Name", 100, true, true); settings.AddParameter("Name"); settings.AddParameter("Checked"); settings.AddParameter("Cought"); settings.AddParameter("Reported"); settings.AddParameter("Priority"); _customFilters = ExtensionManager.InitSettings("MetaExtension", settings); if(_customFilters != null) { DataTable dt = _customFilters.GetDataTable(); ArrayList codeAssemblies = Utils.CodeAssemblies(); foreach (Assembly a in codeAssemblies) { Type[] types = a.GetTypes(); foreach (Type type in types) { if (type.GetInterface("BlogEngine.Core.ICustomFilter") != null) { bool found = false; foreach (DataRow row in dt.Rows) { if(row[0].ToString() == type.Name) { found = true; break; } } if(!found) { _customFilters.AddValues(new string[] { type.FullName, type.Name, "0", "0", "0", "0" }); } } } } ExtensionManager.SaveSettings("MetaExtension", _customFilters); } }