diff --git a/ActiveDirectoryProvider/ActiveDirectoryProvider.cs b/ActiveDirectoryProvider/ActiveDirectoryProvider.cs
index 238c5c0..0a9fa9a 100644
--- a/ActiveDirectoryProvider/ActiveDirectoryProvider.cs
+++ b/ActiveDirectoryProvider/ActiveDirectoryProvider.cs
@@ -357,7 +357,7 @@ namespace ScrewTurn.Wiki.Plugins.ActiveDirectory {
/// TODO return and complete
///
public ComponentInformation Information {
- get { return new ComponentInformation("ActiveDirectoryProvider", "ScrewTurn Software", "3.0.1.417", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/ActiveDirectoryProvider.txt"); }
+ get { return new ComponentInformation("ActiveDirectoryProvider", "Threeplicate Srl", "3.0.1.417", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/ActiveDirectoryProvider.txt"); }
}
///
diff --git a/Core/CacheProvider.cs b/Core/CacheProvider.cs
index dc565d9..b2babe3 100644
--- a/Core/CacheProvider.cs
+++ b/Core/CacheProvider.cs
@@ -12,7 +12,7 @@ namespace ScrewTurn.Wiki {
public class CacheProvider : ICacheProviderV30 {
private readonly ComponentInformation _info =
- new ComponentInformation("Local Cache Provider", "ScrewTurn Software", Settings.WikiVersion, "http://www.screwturn.eu", null);
+ new ComponentInformation("Local Cache Provider", "Threeplicate Srl", Settings.WikiVersion, "http://www.screwturn.eu", null);
private IHostV30 _host;
diff --git a/Core/Defaults.cs b/Core/Defaults.cs
index 35ec0b2..3d1e94c 100644
--- a/Core/Defaults.cs
+++ b/Core/Defaults.cs
@@ -51,7 +51,7 @@ The ##WIKITITLE## Team.";
/// The default content of the edit notice.
///
public const string EditNoticeContent = @"Please '''do not''' include contents covered by copyright without the explicit permission of the Author. Always preview the result before saving.{BR}
-If you are having trouble, please visit the [http://www.screwturn.eu/Help.aspx|Help section] at [http://www.screwturn.eu|ScrewTurn Software].";
+If you are having trouble, please visit the [http://www.screwturn.eu/Help.aspx|Help section] at the [http://www.screwturn.eu|ScrewTurn Wiki Website].";
///
/// The default content of the footer.
diff --git a/Core/FilesStorageProvider.cs b/Core/FilesStorageProvider.cs
index f044f89..fc15a15 100644
--- a/Core/FilesStorageProvider.cs
+++ b/Core/FilesStorageProvider.cs
@@ -13,7 +13,7 @@ namespace ScrewTurn.Wiki {
public class FilesStorageProvider : IFilesStorageProviderV30 {
private readonly ComponentInformation info = new ComponentInformation("Local Files Provider",
- "ScrewTurn Software", Settings.WikiVersion, "http://www.screwturn.eu", null);
+ "Threeplicate Srl", Settings.WikiVersion, "http://www.screwturn.eu", null);
// The following strings MUST terminate with DirectorySeparatorPath in order to properly work
// in BuildFullPath method
diff --git a/Core/PagesStorageProvider.cs b/Core/PagesStorageProvider.cs
index 54247b3..30c45a9 100644
--- a/Core/PagesStorageProvider.cs
+++ b/Core/PagesStorageProvider.cs
@@ -28,7 +28,7 @@ namespace ScrewTurn.Wiki {
private const string IndexMappingsFile = "IndexMappings.cs";
private readonly ComponentInformation info =
- new ComponentInformation("Local Pages Provider", "ScrewTurn Software", Settings.WikiVersion, "http://www.screwturn.eu", null);
+ new ComponentInformation("Local Pages Provider", "Threeplicate Srl", Settings.WikiVersion, "http://www.screwturn.eu", null);
private IHostV30 host;
// This cache is needed due to performance problems
diff --git a/Core/SettingsStorageProvider.cs b/Core/SettingsStorageProvider.cs
index 6be94c8..fd10786 100644
--- a/Core/SettingsStorageProvider.cs
+++ b/Core/SettingsStorageProvider.cs
@@ -49,7 +49,7 @@ namespace ScrewTurn.Wiki {
public static readonly string ProviderName = "Local Settings Provider";
private readonly ComponentInformation info =
- new ComponentInformation(ProviderName, "ScrewTurn Software", Settings.WikiVersion, "http://www.screwturn.eu", null);
+ new ComponentInformation(ProviderName, "Threeplicate Srl", Settings.WikiVersion, "http://www.screwturn.eu", null);
private IHostV30 host;
diff --git a/Core/UsersStorageProvider.cs b/Core/UsersStorageProvider.cs
index 3dac62b..c622bb0 100644
--- a/Core/UsersStorageProvider.cs
+++ b/Core/UsersStorageProvider.cs
@@ -17,7 +17,7 @@ namespace ScrewTurn.Wiki {
private const string GroupsFile = "Groups.cs";
private readonly ComponentInformation info = new ComponentInformation("Local Users Provider",
- "ScrewTurn Software", Settings.WikiVersion, "http://www.screwturn.eu", null);
+ "Threeplicate Srl", Settings.WikiVersion, "http://www.screwturn.eu", null);
private IHostV30 host;
diff --git a/PluginPack/DownloadCounter.cs b/PluginPack/DownloadCounter.cs
index 4e9775e..1e58840 100644
--- a/PluginPack/DownloadCounter.cs
+++ b/PluginPack/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", "ScrewTurn Software", "3.0.0.206", "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.471", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/PluginPack/DownloadCounter.txt");
private static readonly Regex XmlRegex = new Regex(@"\(.+?)\<\/countDownloads\>",
RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
diff --git a/PluginPack/Footnotes.cs b/PluginPack/Footnotes.cs
new file mode 100644
index 0000000..56145a3
--- /dev/null
+++ b/PluginPack/Footnotes.cs
@@ -0,0 +1,149 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using ScrewTurn.Wiki.PluginFramework;
+using System.Text.RegularExpressions;
+
+namespace ScrewTurn.Wiki.Plugins.PluginPack {
+
+ ///
+ /// Implements a footnotes plugin.
+ ///
+ 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/RssFeedDisplay.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);
+ private static readonly Regex RefRemovalRegex = new Regex("(<[ ]*ref[ ]*>|<[ ]*/[ ]*ref[ ]*>)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
+
+ private IHostV30 host = null;
+ private string config = "";
+
+ ///
+ /// 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) {
+ this.host = host;
+ this.config = config != null ? config : "";
+ }
+
+ // Replaces the first occurence of 'find' in 'input' with 'replace'
+ private static string ReplaceFirst(string input, string find, string replace) {
+ return input.Substring(0, input.IndexOf(find)) + replace + input.Substring(input.IndexOf(find) + find.Length);
+ }
+
+ ///
+ /// 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) {
+ // Match all *
+ MatchCollection mc = RefRegex.Matches(raw);
+
+ // No ref-tag found, nothing to do
+ if(mc.Count == 0) return raw;
+
+ // No references tag
+ if(ReferencesRegex.Matches(raw).Count == 0) {
+ return raw + " Reference Error! Missing element <references/>";
+ }
+
+ string output = raw;
+ string ref_string = "
";
+
+ int footnoteCounter = 0;
+
+ // For each ... replace it with Footnote, append it to ref-section
+ foreach(Match m in mc) {
+ footnoteCounter++;
+ output = ReplaceFirst(output, m.Value, "" + footnoteCounter.ToString() + "");
+
+ ref_string += "