diff --git a/Build/ScrewTurnWiki.msbuild b/Build/ScrewTurnWiki.msbuild index 1397002..9eb099e 100644 --- a/Build/ScrewTurnWiki.msbuild +++ b/Build/ScrewTurnWiki.msbuild @@ -66,7 +66,7 @@ - + diff --git a/DownloadCounterPlugin-Tests/DownloadCounterPlugin-Tests.csproj b/DownloadCounterPlugin-Tests/DownloadCounterPlugin-Tests.csproj new file mode 100644 index 0000000..16f0d73 --- /dev/null +++ b/DownloadCounterPlugin-Tests/DownloadCounterPlugin-Tests.csproj @@ -0,0 +1,78 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {DEA4E4AA-7452-4598-8277-A7F5D6DE4985} + Library + Properties + DownloadCounterPlugin_Tests + DownloadCounterPlugin-Tests + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\References\Tools\NUnit\framework\nunit.framework.dll + + + False + ..\References\Tools\Rhino.Mocks\Rhino.Mocks.dll + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + + + + + + + {C2F2722A-0B44-4E98-965C-CC1AD1DA511C} + DownloadCounterPlugin + + + {531A83D6-76F9-4014-91C5-295818E2D948} + PluginFramework + + + + + \ No newline at end of file diff --git a/DownloadCounterPlugin-Tests/DownloadCounterTests.cs b/DownloadCounterPlugin-Tests/DownloadCounterTests.cs new file mode 100644 index 0000000..7cfffe7 --- /dev/null +++ b/DownloadCounterPlugin-Tests/DownloadCounterTests.cs @@ -0,0 +1,100 @@ + +using System; +using System.Collections.Generic; +using System.Text; +using NUnit.Framework; +using Rhino.Mocks; +using RMC = Rhino.Mocks.Constraints; +using ScrewTurn.Wiki.PluginFramework; + +namespace ScrewTurn.Wiki.Plugins.PluginPack.Tests { + + [TestFixture] + public class DownloadCounterTests { + + [Test] + public void Format() { + MockRepository mocks = new MockRepository(); + + IFilesStorageProviderV30 prov = mocks.StrictMock(); + + string content = string.Format( +@"This is a test page. + + + + + + + + + + + + +", DateTime.Today.AddDays(-60), prov.GetType().FullName); + + // */file.zip was downloaded 13 times + // attn.zip was downloaded 56 times + // Expected output: 138-2-16-68 + + IHostV30 host = mocks.StrictMock(); + host.LogEntry(null, LogEntryType.Warning, null, null); + LastCall.On(host).IgnoreArguments().Repeat.Any(); + Expect.Call(host.GetSettingValue(SettingName.DefaultFilesStorageProvider)).Return( + prov.GetType().FullName).Repeat.Times(4); + Expect.Call(host.GetFilesStorageProviders(true)).Return( + new IFilesStorageProviderV30[] { prov }).Repeat.Times(8); + + StFileInfo[] myFiles = new StFileInfo[] { + new StFileInfo(1000, DateTime.Now, 13, "/my/File.zip", prov), + new StFileInfo(10000, DateTime.Now, 1000, "/my/other-file.zip", prov) + }; + StFileInfo[] myOtherFiles = new StFileInfo[] { + new StFileInfo(1000, DateTime.Now, 13, "/my/OTHER/file.zip", prov), + new StFileInfo(10000, DateTime.Now, 2000, "/my/OTHER/other-file.zip", prov) + }; + + StFileInfo[] attachments = new StFileInfo[] { + new StFileInfo(2000, DateTime.Now, 56, "aTTn.zip", prov), + new StFileInfo(20000, DateTime.Now, 1000, "other-attn.zip", prov) + }; + + // /my/* + Expect.Call(host.ListFiles(null)).IgnoreArguments().Constraints( + RMC.Is.Matching( + delegate(StDirectoryInfo dir) { + return dir.FullPath == "/my/"; + })).Return(myFiles).Repeat.Times(2); + + // /my/other/* + Expect.Call(host.ListFiles(null)).IgnoreArguments().Constraints( + RMC.Is.Matching( + delegate(StDirectoryInfo dir) { + return dir.FullPath == "/my/other/"; + })).Return(myOtherFiles).Repeat.Times(2); + + PageInfo page = new PageInfo("page", null, DateTime.Now); + + Expect.Call(host.FindPage("page")).Return(page).Repeat.Times(4); + Expect.Call(host.FindPage("inexistent-page")).Return(null).Repeat.Twice(); + + Expect.Call(host.ListPageAttachments(page)).Return(attachments).Repeat.Times(4); + + mocks.ReplayAll(); + + DownloadCounter counter = new DownloadCounter(); + counter.Init(host, ""); + + string output = counter.Format(content, null, FormattingPhase.Phase3); + + Assert.IsTrue(output == @"This is a test page. +138-2-16-68" || output == @"This is a test page. +138-2-16-69", "Wrong output"); + + mocks.VerifyAll(); + } + + } + +} diff --git a/DownloadCounterPlugin-Tests/Properties/AssemblyInfo.cs b/DownloadCounterPlugin-Tests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6f0c308 --- /dev/null +++ b/DownloadCounterPlugin-Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ScrewTurn Wiki Download Counter Plugin Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("acebd2f0-5ca9-4898-92f5-b9a523d10aa5")] diff --git a/PluginPack/DownloadCounter.cs b/DownloadCounterPlugin/DownloadCounter.cs similarity index 96% rename from PluginPack/DownloadCounter.cs rename to DownloadCounterPlugin/DownloadCounter.cs index 1e58840..c6cce7d 100644 --- a/PluginPack/DownloadCounter.cs +++ b/DownloadCounterPlugin/DownloadCounter.cs @@ -22,7 +22,7 @@ namespace ScrewTurn.Wiki.Plugins.PluginPack { private IHostV30 _host; private string _config; private bool _enableLogging = true; - private static readonly ComponentInformation Info = new ComponentInformation("Download Counter Plugin", "Threeplicate Srl", "3.0.1.471", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/DownloadCounter.txt"); + private static readonly ComponentInformation Info = new ComponentInformation("Download Counter Plugin", "Threeplicate Srl", "3.0.1.472", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/DownloadCounter2.txt"); private static readonly Regex XmlRegex = new Regex(@"\(.+?)\<\/countDownloads\>", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); diff --git a/DownloadCounterPlugin/DownloadCounterPlugin.csproj b/DownloadCounterPlugin/DownloadCounterPlugin.csproj new file mode 100644 index 0000000..0323176 --- /dev/null +++ b/DownloadCounterPlugin/DownloadCounterPlugin.csproj @@ -0,0 +1,73 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C2F2722A-0B44-4E98-965C-CC1AD1DA511C} + Library + Properties + ScrewTurn.Wiki.Plugins.PluginPack + DownloadCounterPlugin + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + bin\Debug\DownloadCounterPlugin.XML + + + none + true + bin\Release\ + TRACE + prompt + 4 + true + bin\Release\DownloadCounterPlugin.XML + + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + + + AssemblyVersion.cs + + + + + + + {531A83D6-76F9-4014-91C5-295818E2D948} + PluginFramework + + + + + \ No newline at end of file diff --git a/DownloadCounterPlugin/Properties/AssemblyInfo.cs b/DownloadCounterPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a9d672b --- /dev/null +++ b/DownloadCounterPlugin/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ScrewTurn Wiki Download Counter Plugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("104c716d-5ab2-45f0-9966-6ba0f2a3ef57")] diff --git a/PluginPack/Footnotes.cs b/FootnotesPlugin/Footnotes.cs similarity index 95% rename from PluginPack/Footnotes.cs rename to FootnotesPlugin/Footnotes.cs index 5f3b430..a95a0e3 100644 --- a/PluginPack/Footnotes.cs +++ b/FootnotesPlugin/Footnotes.cs @@ -13,7 +13,8 @@ namespace ScrewTurn.Wiki.Plugins.PluginPack { public class Footnotes : IFormatterProviderV30 { // Kindly contributed by Jens Felsner - private static readonly ComponentInformation info = new ComponentInformation("Footnotes Plugin", "Threeplicate Srl", "3.0.1.471", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/Footnotes.txt"); + + private static readonly ComponentInformation info = new ComponentInformation("Footnotes Plugin", "Threeplicate Srl", "3.0.1.472", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/Footnotes2.txt"); private static readonly Regex ReferencesRegex = new Regex("(<[ ]*references[ ]*/[ ]*>|<[ ]*references[ ]*>.*?<[ ]*/[ ]*references[ ]*>)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex RefRegex = new Regex("<[ ]*ref[ ]*>.*?<[ ]*/[ ]*ref[ ]*>", RegexOptions.Compiled | RegexOptions.IgnoreCase); diff --git a/FootnotesPlugin/FootnotesPlugin.csproj b/FootnotesPlugin/FootnotesPlugin.csproj new file mode 100644 index 0000000..434465c --- /dev/null +++ b/FootnotesPlugin/FootnotesPlugin.csproj @@ -0,0 +1,72 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B7EE7C86-5031-40EB-B06C-DF5B3564BE17} + Library + Properties + ScrewTurn.Wiki.Plugins.PluginPack + FootnotesPlugin + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + bin\Debug\FootnotesPlugin.XML + + + none + true + bin\Release\ + TRACE + prompt + 4 + true + bin\Release\FootnotesPlugin.XML + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + AssemblyVersion.cs + + + + + + + {531A83D6-76F9-4014-91C5-295818E2D948} + PluginFramework + + + + + \ No newline at end of file diff --git a/FootnotesPlugin/Properties/AssemblyInfo.cs b/FootnotesPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3e834d9 --- /dev/null +++ b/FootnotesPlugin/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ScrewTurn Wiki Footnotes Plugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f40e7384-f5cf-4ba4-b05e-a4efb5596a1f")] diff --git a/Help/ScrewTurnWiki.chm b/Help/ScrewTurnWiki.chm index a0c9418..8278a2a 100644 Binary files a/Help/ScrewTurnWiki.chm and b/Help/ScrewTurnWiki.chm differ diff --git a/Help/ScrewTurnWiki.shfbproj b/Help/ScrewTurnWiki.shfbproj index cf44811..dd5a3e2 100644 --- a/Help/ScrewTurnWiki.shfbproj +++ b/Help/ScrewTurnWiki.shfbproj @@ -17,24 +17,29 @@ ..\Help\ ScrewTurnWiki - - - - - - - - + + + + + + + + + + + + Namespace containing ACL Engine types. - -Namespace containing Plugin Framework types. -Namespace containing Active Directory Provider types. -Namespace containing Plugin Pack types. -Namespace containing SQL Common types. -Namespace containing SQL Server types. -Namespace containing Search Engine types. -Root ScrewTurn Wiki namespace. + + Namespace containing Plugin Framework types. + Namespace containing Active Directory Provider types. + Namespace containing Plugin Pack types. + Namespace containing SQL Common types. + Namespace containing SQL Server types. + Namespace containing Search Engine types. + Root ScrewTurn Wiki namespace. + API documentation for ScrewTurn Wiki version 3.0. http://www.screwturn.eu Copyright %28C%29 2006-2010 Threeplicate Srl. All rights reserved. diff --git a/PluginPack/MultilanguageContentPlugin.cs b/MultilanguageContentPlugin/MultilanguageContentPlugin.cs similarity index 95% rename from PluginPack/MultilanguageContentPlugin.cs rename to MultilanguageContentPlugin/MultilanguageContentPlugin.cs index 4aa9eff..53d11d4 100644 --- a/PluginPack/MultilanguageContentPlugin.cs +++ b/MultilanguageContentPlugin/MultilanguageContentPlugin.cs @@ -14,7 +14,7 @@ namespace ScrewTurn.Wiki.Plugins.PluginPack { private IHostV30 host; private string config; - private ComponentInformation info = new ComponentInformation("Multilanguage Content Plugin", "Threeplicate Srl", "3.0.1.471", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/Multilanguage.txt"); + private ComponentInformation info = new ComponentInformation("Multilanguage Content Plugin", "Threeplicate Srl", "3.0.1.472", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/Multilanguage2.txt"); private string defaultLanguage = "en-us"; private bool displayWarning = false; diff --git a/MultilanguageContentPlugin/MultilanguageContentPlugin.csproj b/MultilanguageContentPlugin/MultilanguageContentPlugin.csproj new file mode 100644 index 0000000..40b3bd7 --- /dev/null +++ b/MultilanguageContentPlugin/MultilanguageContentPlugin.csproj @@ -0,0 +1,72 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {94DDE3D4-0595-405C-9EA6-358B74EC6BC5} + Library + Properties + ScrewTurn.Wiki.Plugins.PluginPack + MultilanguageContentPlugin + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + bin\Debug\MultilanguageContentPlugin.XML + + + none + true + bin\Release\ + TRACE + prompt + 4 + true + bin\Release\MultilanguageContentPlugin.XML + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + AssemblyVersion.cs + + + + + + + {531A83D6-76F9-4014-91C5-295818E2D948} + PluginFramework + + + + + \ No newline at end of file diff --git a/MultilanguageContentPlugin/Properties/AssemblyInfo.cs b/MultilanguageContentPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..78a5724 --- /dev/null +++ b/MultilanguageContentPlugin/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ScrewTurn Wiki Multilanguage Content Plugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d39feb9c-97b6-4a10-b5fe-91c1eec36e55")] diff --git a/PluginPack/PagesSandbox.cs b/PluginPack/PagesSandbox.cs deleted file mode 100644 index 6c222c9..0000000 --- a/PluginPack/PagesSandbox.cs +++ /dev/null @@ -1,798 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ScrewTurn.Wiki.PluginFramework; -using ScrewTurn.Wiki.SearchEngine; - -namespace ScrewTurn.Wiki.Plugins.PluginPack { - - /// - /// Implements a sandbox plugin for pages. - /// - public class PagesSandbox { - - private IHostV30 host; - private string config; - private static readonly ComponentInformation info = new ComponentInformation("Pages Sandbox", "Threeplicate Srl", "3.0.1.471", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/PagesSandbox.txt"); - - private List allNamespaces = new List(5); - - private List allPages; - private Dictionary allContents; - private Dictionary> allBackups; - private Dictionary allDrafts; - - private List allCategories; - - private uint freeDocumentId = 1; - private uint freeWordId = 1; - private IInMemoryIndex index; - - /// - /// Gets a namespace. - /// - /// The name of the namespace (cannot be null or empty). - /// The , or null if no namespace is found. - public NamespaceInfo GetNamespace(string name) { - if(name == null) throw new ArgumentNullException("name"); - if(name.Length == 0) throw new ArgumentException("Name cannot be empty"); - - return allNamespaces.Find(n => n.Name == name); - } - - /// - /// Gets all the sub-namespaces. - /// - /// The sub-namespaces, sorted by name. - public NamespaceInfo[] GetNamespaces() { - lock(this) { - return allNamespaces.ToArray(); - } - } - - /// - /// Adds a new namespace. - /// - /// The name of the namespace. - /// The correct object. - public NamespaceInfo AddNamespace(string name) { - throw new NotImplementedException(); - /*if(name == null) throw new ArgumentNullException("name"); - if(name.Length == 0) throw new ArgumentException("Name cannot be empty", "name"); - - lock(this) { - if(GetNamespace(name) != null) return null; - - // This does not compile unless PagesSandbox implements IPagesStorageProviderV30 - NamespaceInfo newSpace = new NamespaceInfo(name, this, null); - - allNamespaces.Add(newSpace); - - return newSpace; - }*/ - } - - /// - /// Renames a namespace. - /// - /// The namespace to rename. - /// The new name of the namespace. - /// The correct object. - public NamespaceInfo RenameNamespace(NamespaceInfo nspace, string newName) { - if(nspace == null) throw new ArgumentNullException("nspace"); - if(newName == null) throw new ArgumentNullException("newName"); - if(newName.Length == 0) throw new ArgumentException("New Name cannot be empty", "newName"); - - lock(this) { - if(GetNamespace(newName) != null) return null; - - nspace.Name = newName; - - return nspace; - } - } - - /// - /// Sets the default page of a namespace. - /// - /// The namespace of which to set the default page. - /// The page to use as default page, or null. - /// The correct object. - public NamespaceInfo SetNamespaceDefaultPage(NamespaceInfo nspace, PageInfo page) { - if(nspace == null) throw new ArgumentNullException("nspace"); - - lock(this) { - nspace.DefaultPage = page; - - return nspace; - } - } - - /// - /// Removes a namespace. - /// - /// The namespace to remove. - /// true if the namespace is removed, false otherwise. - public bool RemoveNamespace(NamespaceInfo nspace) { - if(nspace == null) throw new ArgumentNullException("nspace"); - - lock(this) { - return allNamespaces.Remove(nspace); - } - } - - /// - /// Moves a page from its namespace into another. - /// - /// The page to move. - /// The destination namespace (null for the root). - /// A value indicating whether to copy the page categories in the destination - /// namespace, if not already available. - /// The correct instance of . - public PageInfo MovePage(PageInfo page, NamespaceInfo destination, bool copyCategories) { - throw new NotImplementedException(); - } - - /// - /// Gets a category. - /// - /// The full name of the category. - /// The , or null if no category is found. - public CategoryInfo GetCategory(string fullName) { - throw new NotImplementedException(); - } - - /// - /// Gets all the Categories in a namespace. - /// - /// The namespace. - /// All the Categories in the namespace, sorted by name. - public CategoryInfo[] GetCategories(NamespaceInfo nspace) { - throw new NotImplementedException(); - } - - /// - /// Gets all the categories of a page. - /// - /// The page. - /// The categories, sorted by name. - public CategoryInfo[] GetCategoriesForPage(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Adds a Category. - /// - /// The target namespace (null for the root). - /// The Category name. - /// The correct CategoryInfo object. - /// The moethod should set category's Pages to an empty array. - public CategoryInfo AddCategory(string nspace, string name) { - throw new NotImplementedException(); - } - - /// - /// Renames a Category. - /// - /// The Category to rename. - /// The new Name. - /// The correct CategoryInfo object. - public CategoryInfo RenameCategory(CategoryInfo category, string newName) { - throw new NotImplementedException(); - } - - /// - /// Removes a Category. - /// - /// The Category to remove. - /// True if the Category has been removed successfully. - public bool RemoveCategory(CategoryInfo category) { - throw new NotImplementedException(); - } - - /// - /// Merges two Categories. - /// - /// The source Category. - /// The destination Category. - /// The correct object. - /// The destination Category remains, while the source Category is deleted, and all its Pages re-bound - /// in the destination Category. - public CategoryInfo MergeCategories(CategoryInfo source, CategoryInfo destination) { - throw new NotImplementedException(); - } - - /// - /// Performs a search in the index. - /// - /// The search parameters. - /// The results. - public SearchResultCollection PerformSearch(SearchParameters parameters) { - throw new NotImplementedException(); - } - - /// - /// Rebuilds the search index. - /// - public void RebuildIndex() { - throw new NotImplementedException(); - } - - /// - /// Gets some statistics about the search engine index. - /// - /// The total number of documents. - /// The total number of unique words. - /// The total number of word-document occurrences. - /// The approximated size, in bytes, of the search engine index. - public void GetIndexStats(out int documentCount, out int wordCount, out int occurrenceCount, out long size) { - throw new NotImplementedException(); - } - - /// - /// Gets a value indicating whether the search engine index is corrupted and needs to be rebuilt. - /// - public bool IsIndexCorrupted { - get { throw new NotImplementedException(); } - } - - /// - /// Gets a page. - /// - /// The full name of the page. - /// The , or null if no page is found. - public PageInfo GetPage(string fullName) { - throw new NotImplementedException(); - } - - /// - /// Gets all the Pages in a namespace. - /// - /// The namespace (null for the root). - /// All the Pages in the namespace, sorted by name. - public PageInfo[] GetPages(NamespaceInfo nspace) { - throw new NotImplementedException(); - } - - /// - /// Gets all the pages in a namespace that are bound to zero categories. - /// - /// The namespace (null for the root). - /// The pages, sorted by name. - public PageInfo[] GetUncategorizedPages(NamespaceInfo nspace) { - throw new NotImplementedException(); - } - - /// - /// Gets the Content of a Page. - /// - /// The Page. - /// The Page Content object. - public PageContent GetContent(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Gets the content of a draft of a Page. - /// - /// The Page. - /// The draft, or null if no draft exists. - public PageContent GetDraft(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Deletes a draft of a Page. - /// - /// The page. - /// true if the draft is deleted, false otherwise. - public bool DeleteDraft(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Gets the Backup/Revision numbers of a Page. - /// - /// The Page to get the Backups of. - /// The Backup/Revision numbers. - public int[] GetBackups(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Gets the Content of a Backup of a Page. - /// - /// The Page to get the backup of. - /// The Backup/Revision number. - /// The Page Backup. - public PageContent GetBackupContent(PageInfo page, int revision) { - throw new NotImplementedException(); - } - - /// - /// Forces to overwrite or create a Backup. - /// - /// The Backup content. - /// The revision. - /// True if the Backup has been created successfully. - public bool SetBackupContent(PageContent content, int revision) { - throw new NotImplementedException(); - } - - /// - /// Adds a Page. - /// - /// The target namespace (null for the root). - /// The Page Name. - /// The creation Date/Time. - /// The correct PageInfo object or null. - /// This method should not create the content of the Page. - public PageInfo AddPage(string nspace, string name, DateTime creationDateTime) { - throw new NotImplementedException(); - } - - /// - /// Renames a Page. - /// - /// The Page to rename. - /// The new Name. - /// The correct object. - public PageInfo RenamePage(PageInfo page, string newName) { - throw new NotImplementedException(); - } - - /// - /// Modifies the Content of a Page. - /// - /// The Page. - /// The Title of the Page. - /// The Username. - /// The Date/Time. - /// The Comment of the editor, about this revision. - /// The Page Content. - /// The keywords, usually used for SEO. - /// The description, usually used for SEO. - /// The save mode for this modification. - /// true if the Page has been modified successfully, false otherwise. - /// If saveMode equals Draft and a draft already exists, it is overwritten. - public bool ModifyPage(PageInfo page, string title, string username, DateTime dateTime, string comment, string content, string[] keywords, string description, SaveMode saveMode) { - throw new NotImplementedException(); - } - - /// - /// Performs the rollback of a Page to a specified revision. - /// - /// The Page to rollback. - /// The Revision to rollback the Page to. - /// true if the rollback succeeded, false otherwise. - public bool RollbackPage(PageInfo page, int revision) { - throw new NotImplementedException(); - } - - /// - /// Deletes the Backups of a Page, up to a specified revision. - /// - /// The Page to delete the backups of. - /// The newest revision to delete (newer revision are kept) or -1 to delete all the Backups. - /// true if the deletion succeeded, false otherwise. - public bool DeleteBackups(PageInfo page, int revision) { - throw new NotImplementedException(); - } - - /// - /// Removes a Page. - /// - /// The Page to remove. - /// True if the Page is removed successfully. - public bool RemovePage(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Binds a Page with one or more Categories. - /// - /// The Page to bind. - /// The Categories to bind the Page with. - /// True if the binding succeeded. - /// After a successful operation, the Page is bound with all and only the categories passed as argument. - public bool RebindPage(PageInfo page, string[] categories) { - throw new NotImplementedException(); - } - - /// - /// Gets the Page Messages. - /// - /// The Page. - /// The list of the first-level Messages, containing the replies properly nested, sorted by date/time. - public Message[] GetMessages(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Gets the total number of Messages in a Page Discussion. - /// - /// The Page. - /// The number of messages. - public int GetMessageCount(PageInfo page) { - throw new NotImplementedException(); - } - - /// - /// Removes all messages for a page and stores the new messages. - /// - /// The page. - /// The new messages to store. - /// true if the messages are stored, false otherwise. - public bool BulkStoreMessages(PageInfo page, Message[] messages) { - throw new NotImplementedException(); - } - - /// - /// Adds a new Message to a Page. - /// - /// The Page. - /// The Username. - /// The Subject. - /// The Date/Time. - /// The Body. - /// The Parent Message ID, or -1. - /// True if the Message is added successfully. - public bool AddMessage(PageInfo page, string username, string subject, DateTime dateTime, string body, int parent) { - throw new NotImplementedException(); - } - - /// - /// Removes a Message. - /// - /// The Page. - /// The ID of the Message to remove. - /// A value specifying whether or not to remove the replies. - /// True if the Message is removed successfully. - public bool RemoveMessage(PageInfo page, int id, bool removeReplies) { - throw new NotImplementedException(); - } - - /// - /// Modifies a Message. - /// - /// The Page. - /// The ID of the Message to modify. - /// The Username. - /// The Subject. - /// The Date/Time. - /// The Body. - /// True if the Message is modified successfully. - public bool ModifyMessage(PageInfo page, int id, string username, string subject, DateTime dateTime, string body) { - throw new NotImplementedException(); - } - - /// - /// Gets all the Navigation Paths in a Namespace. - /// - /// The Namespace. - /// All the Navigation Paths, sorted by name. - public NavigationPath[] GetNavigationPaths(NamespaceInfo nspace) { - throw new NotImplementedException(); - } - - /// - /// Adds a new Navigation Path. - /// - /// The target namespace (null for the root). - /// The Name of the Path. - /// The Pages array. - /// The correct object. - public NavigationPath AddNavigationPath(string nspace, string name, PageInfo[] pages) { - throw new NotImplementedException(); - } - - /// - /// Modifies an existing navigation path. - /// - /// The navigation path to modify. - /// The new pages array. - /// The correct object. - public NavigationPath ModifyNavigationPath(NavigationPath path, PageInfo[] pages) { - throw new NotImplementedException(); - } - - /// - /// Removes a Navigation Path. - /// - /// The navigation path to remove. - /// true if the path is removed, false otherwise. - public bool RemoveNavigationPath(NavigationPath path) { - throw new NotImplementedException(); - } - - /// - /// Gets all the snippets. - /// - /// All the snippets, sorted by name. - public Snippet[] GetSnippets() { - throw new NotImplementedException(); - } - - /// - /// Adds a new snippet. - /// - /// The name of the snippet. - /// The content of the snippet. - /// The correct object. - public Snippet AddSnippet(string name, string content) { - throw new NotImplementedException(); - } - - /// - /// Modifies an existing snippet. - /// - /// The name of the snippet to modify. - /// The content of the snippet. - /// The correct object. - public Snippet ModifySnippet(string name, string content) { - throw new NotImplementedException(); - } - - /// - /// Removes a new Snippet. - /// - /// The Name of the Snippet to remove. - /// true if the snippet is removed, false otherwise. - public bool RemoveSnippet(string name) { - throw new NotImplementedException(); - } - - /// - /// Gets all the content templates. - /// - /// All the content templates, sorted by name. - public ContentTemplate[] GetContentTemplates() { - throw new NotImplementedException(); - } - - /// - /// Adds a new content template. - /// - /// The name of template. - /// The content of the template. - /// The correct object. - public ContentTemplate AddContentTemplate(string name, string content) { - throw new NotImplementedException(); - } - - /// - /// Modifies an existing content template. - /// - /// The name of the template to modify. - /// The content of the template. - /// The correct object. - public ContentTemplate ModifyContentTemplate(string name, string content) { - throw new NotImplementedException(); - } - - /// - /// Removes a content template. - /// - /// The name of the template to remove. - /// true if the template is removed, false otherwise. - public bool RemoveContentTemplate(string name) { - throw new NotImplementedException(); - } - - /// - /// Gets a value specifying whether the provider is read-only, i.e. it can only provide data and not store it. - /// - public bool ReadOnly { - get { throw new NotImplementedException(); } - } - - /// - /// Initializes the Storage Provider. - /// - /// The Host of the Component. - /// The Configuration data, if any. - /// If the configuration string is not valid, the methoud should throw a . - public void Init(IHostV30 host, string config) { - if(host == null) throw new ArgumentNullException("host"); - if(config == null) throw new ArgumentNullException("config"); - - this.host = host; - this.config = config; - - allPages = new List(50); - allContents = new Dictionary(50); - allBackups = new Dictionary>(50); - allDrafts = new Dictionary(5); - - allCategories = new List(10); - - // Prepare search index - index = new StandardIndex(); - index.SetBuildDocumentDelegate(BuildDocumentHandler); - index.IndexChanged += index_IndexChanged; - } - - private void index_IndexChanged(object sender, IndexChangedEventArgs e) { - lock(this) { - if(e.Change == IndexChangeType.DocumentAdded) { - List newWords = new List(e.ChangeData.Words.Count); - foreach(DumpedWord w in e.ChangeData.Words) { - newWords.Add(new WordId(w.Text, freeWordId)); - freeWordId++; - } - - e.Result = new IndexStorerResult(freeDocumentId, newWords); - freeDocumentId++; - } - else e.Result = null; - } - } - - /// - /// Handles the construction of an for the search engine. - /// - /// The input dumped document. - /// The resulting . - private IDocument BuildDocumentHandler(DumpedDocument dumpedDocument) { - if(dumpedDocument.TypeTag == PageDocument.StandardTypeTag) { - string pageName = PageDocument.GetPageName(dumpedDocument.Name); - - PageInfo page = GetPage(pageName); - - if(page == null) return null; - else return new PageDocument(page, dumpedDocument, TokenizeContent); - } - else if(dumpedDocument.TypeTag == MessageDocument.StandardTypeTag) { - string pageFullName; - int id; - MessageDocument.GetMessageDetails(dumpedDocument.Name, out pageFullName, out id); - - PageInfo page = GetPage(pageFullName); - if(page == null) return null; - else return new MessageDocument(page, id, dumpedDocument, TokenizeContent); - } - else return null; - } - - /// - /// Tokenizes page content. - /// - /// The content to tokenize. - /// The tokenized words. - private static WordInfo[] TokenizeContent(string content) { - WordInfo[] words = SearchEngine.Tools.Tokenize(content); - return words; - } - - /// - /// Indexes a page. - /// - /// The content of the page. - /// The number of indexed words, including duplicates. - private int IndexPage(PageContent content) { - lock(this) { - string documentName = PageDocument.GetDocumentName(content.PageInfo); - - DumpedDocument ddoc = new DumpedDocument(0, documentName, host.PrepareTitleForIndexing(content.PageInfo, content.Title), - PageDocument.StandardTypeTag, content.LastModified); - - // Store the document - // The content should always be prepared using IHost.PrepareForSearchEngineIndexing() - return index.StoreDocument(new PageDocument(content.PageInfo, ddoc, TokenizeContent), - content.Keywords, host.PrepareContentForIndexing(content.PageInfo, content.Content), null); - } - } - - /// - /// Removes a page from the search engine index. - /// - /// The content of the page to remove. - private void UnindexPage(PageContent content) { - lock(this) { - string documentName = PageDocument.GetDocumentName(content.PageInfo); - - DumpedDocument ddoc = new DumpedDocument(0, documentName, host.PrepareTitleForIndexing(content.PageInfo, content.Title), - PageDocument.StandardTypeTag, content.LastModified); - index.RemoveDocument(new PageDocument(content.PageInfo, ddoc, TokenizeContent), null); - } - } - - /// - /// Indexes a message. - /// - /// The page. - /// The message ID. - /// The subject. - /// The date/time. - /// The body. - /// The number of indexed words, including duplicates. - private int IndexMessage(PageInfo page, int id, string subject, DateTime dateTime, string body) { - lock(this) { - // Trim "RE:" to avoid polluting the search engine index - if(subject.ToLowerInvariant().StartsWith("re:") && subject.Length > 3) subject = subject.Substring(3).Trim(); - - string documentName = MessageDocument.GetDocumentName(page, id); - - DumpedDocument ddoc = new DumpedDocument(0, documentName, host.PrepareTitleForIndexing(null, subject), - MessageDocument.StandardTypeTag, dateTime); - - // Store the document - // The content should always be prepared using IHost.PrepareForSearchEngineIndexing() - return index.StoreDocument(new MessageDocument(page, id, ddoc, TokenizeContent), null, - host.PrepareContentForIndexing(null, body), null); - } - } - - /// - /// Indexes a message tree. - /// - /// The page. - /// The tree root. - private void IndexMessageTree(PageInfo page, Message root) { - IndexMessage(page, root.ID, root.Subject, root.DateTime, root.Body); - foreach(Message reply in root.Replies) { - IndexMessageTree(page, reply); - } - } - - /// - /// Removes a message from the search engine index. - /// - /// The page. - /// The message ID. - /// The subject. - /// The date/time. - /// The body. - /// The number of indexed words, including duplicates. - private void UnindexMessage(PageInfo page, int id, string subject, DateTime dateTime, string body) { - lock(this) { - // Trim "RE:" to avoid polluting the search engine index - if(subject.ToLowerInvariant().StartsWith("re:") && subject.Length > 3) subject = subject.Substring(3).Trim(); - - string documentName = MessageDocument.GetDocumentName(page, id); - - DumpedDocument ddoc = new DumpedDocument(0, documentName, host.PrepareTitleForIndexing(null, subject), - MessageDocument.StandardTypeTag, DateTime.Now); - index.RemoveDocument(new MessageDocument(page, id, ddoc, TokenizeContent), null); - } - } - - /// - /// Removes a message tree from the search engine index. - /// - /// The page. - /// The tree root. - private void UnindexMessageTree(PageInfo page, Message root) { - UnindexMessage(page, root.ID, root.Subject, root.DateTime, root.Body); - foreach(Message reply in root.Replies) { - UnindexMessageTree(page, reply); - } - } - - /// - /// Method invoked on shutdown. - /// - /// This method might not be invoked in some cases. - public void Shutdown() { - // Nothing do to - } - - /// - /// Gets the Information about the Provider. - /// - public ComponentInformation Information { - get { return info; } - } - - /// - /// Gets a brief summary of the configuration string format, in HTML. Returns null if no configuration is needed. - /// - public string ConfigHelpHtml { - get { return null; } - } - - } - -} diff --git a/PluginPack/PluginPack.csproj b/PluginPack/PluginPack.csproj index 042e78a..14be6f2 100644 --- a/PluginPack/PluginPack.csproj +++ b/PluginPack/PluginPack.csproj @@ -68,13 +68,8 @@ AssemblyVersion.cs - - - - - - + @@ -103,9 +98,6 @@ false - - - - -

Priority: Highest

-
- - - -

Priority: High

-
- - - -

Priority: Normal

-
- - - -

Priority: Low

-
- - - -

Priority: Lowest

-
- - - - - - - - - - - - - - - - - -
- # - - Summary - - Status - - Priority - - Milestone -
-
-
-
- - - - priority_{priority} tablerowalternate - - - priority_{priority} tablerow - - - - - - - - - - - - - - - - Highest - High - Normal - Low - Lowest - - - - - - None - - - - - - - - diff --git a/PluginPack/Updater.cs b/PluginPack/Updater.cs new file mode 100644 index 0000000..47b069f --- /dev/null +++ b/PluginPack/Updater.cs @@ -0,0 +1,172 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ScrewTurn.Wiki.PluginFramework; +using System.Net; +using System.IO; + +namespace ScrewTurn.Wiki.Plugins.PluginPack { + + /// + /// Plugin with the sole purpose of removing PluginPack.dll in favor of separate DLLs. + /// + public class Updater : IFormatterProviderV30 { + + private static bool AlreadyRun = false; + + private static readonly ComponentInformation _info = new ComponentInformation("Updater Plugin", "Threeplicate Srl", "3.0.2.538", "http://www.screwturn.eu", null); + + /// + /// Initializes the Storage Provider. + /// + /// The Host of the Component. + /// The Configuration data, if any. + /// If or are null. + /// If is not valid or is incorrect. + public void Init(IHostV30 host, string config) { + if(host == null) throw new ArgumentNullException("host"); + if(config == null) throw new ArgumentNullException("config"); + + if(AlreadyRun) return; + + // 1. Delete PluginPack.dll + // 2. Download all other DLLs + + string root = "http://www.screwturn.eu/Version/PluginPack/"; + + string[] dllNames = new string[] { + "DownloadCounterPlugin.dll", + "FootnotesPlugin.dll", + "MultilanguageContentPlugin.dll", + "RssFeedDisplayPlugin.dll", + "UnfuddleTicketsPlugin.dll" + }; + + string[] providerNames = new string[] { + "ScrewTurn.Wiki.Plugins.PluginPack.DownloadCounter", + "ScrewTurn.Wiki.Plugins.PluginPack.Footnotes", + "ScrewTurn.Wiki.Plugins.PluginPack.MultilanguageContentPlugin", + "ScrewTurn.Wiki.Plugins.PluginPack.RssFeedDisplay", + "ScrewTurn.Wiki.Plugins.PluginPack.UnfuddleTickets", + }; + + Dictionary assemblies = new Dictionary(dllNames.Length); + + try { + foreach(string dll in dllNames) { + host.LogEntry("Downloading " + dll, LogEntryType.General, null, this); + + HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(root + dll); + req.AllowAutoRedirect = true; + HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); + + if(resp.StatusCode == HttpStatusCode.OK) { + BinaryReader reader = new BinaryReader(resp.GetResponseStream()); + byte[] content = reader.ReadBytes((int)resp.ContentLength); + reader.Close(); + + assemblies.Add(dll, content); + } + else { + throw new InvalidOperationException("Response status code for " + dll + ":" + resp.StatusCode.ToString()); + } + } + + foreach(string dll in dllNames) { + host.GetSettingsStorageProvider().StorePluginAssembly(dll, assemblies[dll]); + } + + foreach(string dll in dllNames) { + LoadProvider(dll); + } + + host.GetSettingsStorageProvider().DeletePluginAssembly("PluginPack.dll"); + + AlreadyRun = true; + } + catch(Exception ex) { + host.LogEntry("Error occurred during automatic DLL updating with Updater Plugin\n" + ex.ToString(), LogEntryType.Error, null, this); + } + } + + private void LoadProvider(string dll) { + Type loader = Type.GetType("ScrewTurn.Wiki.ProviderLoader, ScrewTurn.Wiki.Core"); + var method = loader.GetMethod("LoadFromAuto"); + method.Invoke(null, new[] { dll }); + } + + /// + /// Method invoked on shutdown. + /// + /// This method might not be invoked in some cases. + public void Shutdown() { + } + + /// + /// Specifies whether or not to execute Phase 1. + /// + public bool PerformPhase1 { + get { return false; } + } + + /// + /// Specifies whether or not to execute Phase 2. + /// + public bool PerformPhase2 { + get { return false; } + } + + /// + /// Specifies whether or not to execute Phase 3. + /// + public bool PerformPhase3 { + get { return false; } + } + + /// + /// Gets the execution priority of the provider (0 lowest, 100 highest). + /// + public int ExecutionPriority { + get { return 50; } + } + + /// + /// Performs a Formatting phase. + /// + /// The raw content to Format. + /// The Context information. + /// The Phase. + /// The Formatted content. + public string Format(string raw, ContextInformation context, FormattingPhase phase) { + return raw; + } + + /// + /// Prepares the title of an item for display (always during phase 3). + /// + /// The input title. + /// The context information. + /// The prepared title (no markup allowed). + public string PrepareTitle(string title, ContextInformation context) { + return title; + } + + /// + /// Gets the Information about the Provider. + /// + public ComponentInformation Information { + get { return _info; } + } + + /// + /// Gets a brief summary of the configuration string format, in HTML. Returns null if no configuration is needed. + /// + public string ConfigHelpHtml { + get { return null; } + } + + } + +} diff --git a/RssFeedDisplayPlugin/Properties/AssemblyInfo.cs b/RssFeedDisplayPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9ae9d73 --- /dev/null +++ b/RssFeedDisplayPlugin/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ScrewTurn Wiki RSS Feed Display Plugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ca0250d7-23e9-478e-8e17-ae494b736919")] diff --git a/PluginPack/RssFeedDisplay.cs b/RssFeedDisplayPlugin/RssFeedDisplay.cs similarity index 96% rename from PluginPack/RssFeedDisplay.cs rename to RssFeedDisplayPlugin/RssFeedDisplay.cs index 44d028e..9f68ed0 100644 --- a/PluginPack/RssFeedDisplay.cs +++ b/RssFeedDisplayPlugin/RssFeedDisplay.cs @@ -18,7 +18,7 @@ namespace ScrewTurn.Wiki.Plugins.PluginPack { private IHostV30 _host; private string _config; private bool _enableLogging = true; - private static readonly ComponentInformation Info = new ComponentInformation("RSS Feed Display Plugin", "Threeplicate Srl", "3.0.2.528", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/RssFeedDisplay.txt"); + private static readonly ComponentInformation Info = new ComponentInformation("RSS Feed Display Plugin", "Threeplicate Srl", "3.0.2.528", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/RssFeedDisplay2.txt"); private static readonly Regex RssRegex = new Regex(@"{(RSS|Twitter):(.+?)(\|(.+?))?}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); diff --git a/RssFeedDisplayPlugin/RssFeedDisplayPlugin.csproj b/RssFeedDisplayPlugin/RssFeedDisplayPlugin.csproj new file mode 100644 index 0000000..bd055a7 --- /dev/null +++ b/RssFeedDisplayPlugin/RssFeedDisplayPlugin.csproj @@ -0,0 +1,73 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {83363183-7B84-43BF-885F-C728A721140B} + Library + Properties + RssFeedDisplayPlugin + RssFeedDisplayPlugin + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + bin\Debug\RssFeedDisplayPlugin.XML + + + none + true + bin\Release\ + TRACE + prompt + 4 + true + bin\Release\RssFeedDisplayPlugin.XML + + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + + + AssemblyVersion.cs + + + + + + + {531A83D6-76F9-4014-91C5-295818E2D948} + PluginFramework + + + + + \ No newline at end of file diff --git a/ScrewTurnWiki.sln b/ScrewTurnWiki.sln index 816f7f6..35b42d3 100644 --- a/ScrewTurnWiki.sln +++ b/ScrewTurnWiki.sln @@ -49,10 +49,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerProviders-Tests", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginPack", "PluginPack\PluginPack.csproj", "{88212C14-10A0-4D46-8203-D48534465181}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginPack-Tests", "PluginPack-Tests\PluginPack-Tests.csproj", "{C657F6C0-05E5-4873-97A4-B91ED1F51D85}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ActiveDirectoryProvider", "ActiveDirectoryProvider\ActiveDirectoryProvider.csproj", "{C7169CA4-9893-4361-96A8-09F87FCF5E8C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadCounterPlugin", "DownloadCounterPlugin\DownloadCounterPlugin.csproj", "{C2F2722A-0B44-4E98-965C-CC1AD1DA511C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadCounterPlugin-Tests", "DownloadCounterPlugin-Tests\DownloadCounterPlugin-Tests.csproj", "{DEA4E4AA-7452-4598-8277-A7F5D6DE4985}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FootnotesPlugin", "FootnotesPlugin\FootnotesPlugin.csproj", "{B7EE7C86-5031-40EB-B06C-DF5B3564BE17}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultilanguageContentPlugin", "MultilanguageContentPlugin\MultilanguageContentPlugin.csproj", "{94DDE3D4-0595-405C-9EA6-358B74EC6BC5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RssFeedDisplayPlugin", "RssFeedDisplayPlugin\RssFeedDisplayPlugin.csproj", "{83363183-7B84-43BF-885F-C728A721140B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnfuddleTicketsPlugin", "UnfuddleTicketsPlugin\UnfuddleTicketsPlugin.csproj", "{62EC7498-D82C-40FD-B153-5FC2F2FA6D72}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,16 +127,50 @@ Global {88212C14-10A0-4D46-8203-D48534465181}.Debug|Any CPU.Build.0 = Debug|Any CPU {88212C14-10A0-4D46-8203-D48534465181}.Release|Any CPU.ActiveCfg = Release|Any CPU {88212C14-10A0-4D46-8203-D48534465181}.Release|Any CPU.Build.0 = Release|Any CPU - {C657F6C0-05E5-4873-97A4-B91ED1F51D85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C657F6C0-05E5-4873-97A4-B91ED1F51D85}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C657F6C0-05E5-4873-97A4-B91ED1F51D85}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C657F6C0-05E5-4873-97A4-B91ED1F51D85}.Release|Any CPU.Build.0 = Release|Any CPU {C7169CA4-9893-4361-96A8-09F87FCF5E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C7169CA4-9893-4361-96A8-09F87FCF5E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU {C7169CA4-9893-4361-96A8-09F87FCF5E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU {C7169CA4-9893-4361-96A8-09F87FCF5E8C}.Release|Any CPU.Build.0 = Release|Any CPU + {C2F2722A-0B44-4E98-965C-CC1AD1DA511C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2F2722A-0B44-4E98-965C-CC1AD1DA511C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2F2722A-0B44-4E98-965C-CC1AD1DA511C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2F2722A-0B44-4E98-965C-CC1AD1DA511C}.Release|Any CPU.Build.0 = Release|Any CPU + {DEA4E4AA-7452-4598-8277-A7F5D6DE4985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEA4E4AA-7452-4598-8277-A7F5D6DE4985}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEA4E4AA-7452-4598-8277-A7F5D6DE4985}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEA4E4AA-7452-4598-8277-A7F5D6DE4985}.Release|Any CPU.Build.0 = Release|Any CPU + {B7EE7C86-5031-40EB-B06C-DF5B3564BE17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7EE7C86-5031-40EB-B06C-DF5B3564BE17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7EE7C86-5031-40EB-B06C-DF5B3564BE17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7EE7C86-5031-40EB-B06C-DF5B3564BE17}.Release|Any CPU.Build.0 = Release|Any CPU + {94DDE3D4-0595-405C-9EA6-358B74EC6BC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94DDE3D4-0595-405C-9EA6-358B74EC6BC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94DDE3D4-0595-405C-9EA6-358B74EC6BC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94DDE3D4-0595-405C-9EA6-358B74EC6BC5}.Release|Any CPU.Build.0 = Release|Any CPU + {83363183-7B84-43BF-885F-C728A721140B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83363183-7B84-43BF-885F-C728A721140B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83363183-7B84-43BF-885F-C728A721140B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83363183-7B84-43BF-885F-C728A721140B}.Release|Any CPU.Build.0 = Release|Any CPU + {62EC7498-D82C-40FD-B153-5FC2F2FA6D72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62EC7498-D82C-40FD-B153-5FC2F2FA6D72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62EC7498-D82C-40FD-B153-5FC2F2FA6D72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62EC7498-D82C-40FD-B153-5FC2F2FA6D72}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {88212C14-10A0-4D46-8203-D48534465181} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {617D5D30-97F9-48B2-903D-29D4524492E8} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {67590C3A-1A7C-4608-90CA-1C1632D2F643} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {ECB488D9-C8E9-41E0-BE27-27F41F76F8A0} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {F75DFFE1-A8CF-4CC2-B15F-3EC7EAADDCFC} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {C7169CA4-9893-4361-96A8-09F87FCF5E8C} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {C2F2722A-0B44-4E98-965C-CC1AD1DA511C} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {DEA4E4AA-7452-4598-8277-A7F5D6DE4985} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {B7EE7C86-5031-40EB-B06C-DF5B3564BE17} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {94DDE3D4-0595-405C-9EA6-358B74EC6BC5} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {83363183-7B84-43BF-885F-C728A721140B} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + {62EC7498-D82C-40FD-B153-5FC2F2FA6D72} = {F6E9DB23-D200-4CCE-B42D-7CD1D20FC92D} + EndGlobalSection EndGlobal diff --git a/UnfuddleTicketsPlugin/Properties/AssemblyInfo.cs b/UnfuddleTicketsPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..232ff86 --- /dev/null +++ b/UnfuddleTicketsPlugin/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ScrewTurn Wiki Unfuddle Tickets Plugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e64d84a3-1140-4545-abf2-35ea6d4c7651")] diff --git a/PluginPack/UnfuddleTickets.cs b/UnfuddleTicketsPlugin/UnfuddleTickets.cs similarity index 96% rename from PluginPack/UnfuddleTickets.cs rename to UnfuddleTicketsPlugin/UnfuddleTickets.cs index c3e69dc..06d602d 100644 --- a/PluginPack/UnfuddleTickets.cs +++ b/UnfuddleTicketsPlugin/UnfuddleTickets.cs @@ -22,7 +22,7 @@ namespace ScrewTurn.Wiki.Plugins.PluginPack { private const string ConfigHelpHtmlValue = "Config consists of three lines:
<Url> - The base url to the Unfuddle API (i.e. http://account_name.unfuddle.com/api/v1/projects/project_ID)
<Username> - The username to the unfuddle account to use for authentication
<Password> - The password to the unfuddle account to use for authentication
"; private const string LoadErrorMessage = "Unable to load ticket report at this time."; private static readonly Regex UnfuddleRegex = new Regex(@"{unfuddle}", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); - private static readonly ComponentInformation Info = new ComponentInformation("Unfuddle Tickets Plugin", "Threeplicate Srl", "3.0.1.471", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/UnfuddleTickets.txt"); + private static readonly ComponentInformation Info = new ComponentInformation("Unfuddle Tickets Plugin", "Threeplicate Srl", "3.0.1.472", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/UnfuddleTickets2.txt"); private string _config; private IHostV30 _host; diff --git a/UnfuddleTicketsPlugin/UnfuddleTicketsPlugin.csproj b/UnfuddleTicketsPlugin/UnfuddleTicketsPlugin.csproj new file mode 100644 index 0000000..360a675 --- /dev/null +++ b/UnfuddleTicketsPlugin/UnfuddleTicketsPlugin.csproj @@ -0,0 +1,76 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {62EC7498-D82C-40FD-B153-5FC2F2FA6D72} + Library + Properties + ScrewTurn.Wiki.Plugins.PluginPack + UnfuddleTicketsPlugin + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + bin\Debug\UnfuddleTicketsPlugin.XML + + + none + true + bin\Release\ + TRACE + prompt + 4 + true + bin\Release\UnfuddleTicketsPlugin.XML + + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + + + AssemblyVersion.cs + + + + + + + {531A83D6-76F9-4014-91C5-295818E2D948} + PluginFramework + + + + + + + + \ No newline at end of file