diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs
index 058a661..0a0c000 100644
--- a/AssemblyVersion.cs
+++ b/AssemblyVersion.cs
@@ -16,5 +16,5 @@ using System.Reflection;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("3.0.2.504")]
-[assembly: AssemblyFileVersion("3.0.2.504")]
+[assembly: AssemblyVersion("3.0.2.505")]
+[assembly: AssemblyFileVersion("3.0.2.505")]
diff --git a/Core/Formatter.cs b/Core/Formatter.cs
index 07701c9..db9ac4d 100644
--- a/Core/Formatter.cs
+++ b/Core/Formatter.cs
@@ -1,14 +1,15 @@
using System;
-using System.Configuration;
using System.Collections;
using System.Collections.Generic;
+using System.Configuration;
+using System.Diagnostics;
using System.IO;
+using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.SessionState;
-using System.Diagnostics;
using ScrewTurn.Wiki.PluginFramework;
namespace ScrewTurn.Wiki {
@@ -36,7 +37,7 @@ namespace ScrewTurn.Wiki {
private static readonly Regex BoxRegex = new Regex(@"\(\(\(.+?\)\)\)", RegexOptions.Compiled | RegexOptions.Singleline);
private static readonly Regex ExtendedUpRegex = new Regex(@"\{up((\:|\().+?)?\}", RegexOptions.Compiled | RegexOptions.IgnoreCase);
//private static readonly Regex UpRegex = new Regex(@"\{up\}", RegexOptions.Compiled | RegexOptions.IgnoreCase);
- private static readonly Regex SpecialTagRegex = new Regex(@"\{(wikititle|wikiversion|mainurl|rsspage|themepath|clear|br|top|searchbox|pagecount|pagecount\(\*\)|cloud|orphans|wanted|namespacelist)\}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
+ private static readonly Regex SpecialTagRegex = new Regex(@"\{(wikititle|wikiversion|mainurl|rsspage|themepath|clear|br|top|searchbox|pagecount|pagecount\(\*\)|categories|cloud|orphans|wanted|namespacelist)\}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
//private static readonly Regex CloudRegex = new Regex(@"\{cloud\}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
//private static readonly Regex NamespaceRegex = new Regex(@"\{namespace\}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
//private static readonly Regex NamespaceListRegex = new Regex(@"\{namespacelist\}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
@@ -278,6 +279,7 @@ namespace ScrewTurn.Wiki {
}*/
if(!bareBones) {
+ NamespaceInfo ns = DetectNamespaceInfo(current);
match = SpecialTagRegex.Match(sb.ToString());
while(match.Success) {
if(!IsNoWikied(match.Index, noWikiBegin, noWikiEnd, out end)) {
@@ -316,12 +318,20 @@ namespace ScrewTurn.Wiki {
case "SEARCHBOX":
string textBoxId = "SB" + Guid.NewGuid().ToString("N");
- NamespaceInfo ns = DetectNamespaceInfo(current);
string nsstring = ns != null ? NameTools.GetFullName(ns.Name, "Search") + ".aspx" : "Search.aspx";
string doSearchFunction = "";
sb.Insert(match.Index, doSearchFunction +
@" »");
break;
+ case "CATEGORIES":
+ List cats = Pages.GetCategories(ns);
+ string pageName = ns != null ? NameTools.GetFullName(ns.Name, "AllPages") + ".aspx" : "AllPages.aspx";
+ pageName += "?Cat=";
+ string categories = "";
+ sb.Insert(match.Index, categories);
+ break;
case "CLOUD":
string cloud = BuildCloud(DetectNamespaceInfo(current));
sb.Insert(match.Index, cloud);