Click here to Skip to main content
15,886,518 members
Articles / Desktop Programming / MFC

Using a Wiki for knowledge sharing and SQL Server database documentation

Rate me:
Please Sign up or sign in to vote.
4.89/5 (63 votes)
7 Feb 200423 min read 423.4K   2.7K   194  
This article describes using a Wiki for knowledge sharing and database schema documentation.
<%

Const OPENWIKI_VERSION     = "0.78"
Const OPENWIKI_REVISION    = "$Revision: 1.2 $"
Const OPENWIKI_XMLVERSION  = "0.91"
Const OPENWIKI_NAMESPACE   = "http://openwiki.com/2001/OW/Wiki"

' possible values for OPENWIKI_DB_SYNTAX
Const DB_ACCESS      = 0
Const DB_SQLSERVER   = 0
Const DB_ORACLE      = 1
Const DB_MYSQL       = 2
Const DB_POSTGRESQL  = 3

' declare 'constants'
Dim OPENWIKI_DB, OPENWIKI_DB_SYNTAX
Dim OPENWIKI_ICONPATH, OPENWIKI_IMAGEPATH, OPENWIKI_ENCODING, OPENWIKI_TITLE, OPENWIKI_FRONTPAGE
Dim OPENWIKI_SCRIPTNAME, OPENWIKI_STYLESHEETS, OPENWIKI_MAXTEXT, OPENWIKI_MAXINCLUDELEVEL
Dim OPENWIKI_RCNAME, OPENWIKI_RCDAYS, OPENWIKI_MAXTRAIL, OPENWIKI_TEMPLATES
Dim OPENWIKI_TIMEZONE, OPENWIKI_MAXNROFAGGR, OPENWIKI_MAXWEBGETS, OPENWIKI_SCRIPTTIMEOUT
Dim OPENWIKI_DAYSTOKEEP
Dim OPENWIKI_STOPWORDS
Dim OPENWIKI_UPLOADDIR, OPENWIKI_MAXUPLOADSIZE, OPENWIKI_UPLOADTIMEOUT

Dim MSXML_VERSION

' declare options
Dim gReadPassword, gEditPassword, gDefaultBookmarks
Dim cReadOnly, cNakedView, cUseSubpage, cFreeLinks, cWikiLinks, cAcronymLinks, cTemplateLinking, cRawHtml, cMathML, cHtmlTags, cCacheXSL, cCacheXML, cDirectEdit, cEmbeddedMode
Dim cSimpleLinks, cNonEnglish, cNetworkFile, cBracketText, cBracketIndex, cHtmlLinks, cBracketWiki, cFreeUpper, cLinkImages, cUseHeadings, cUseLookup, cStripNTDomain, cMaskIPAddress, cOldSkool, cNewSkool, cNumTOC, cAllowCharRefs, cWikifyHeaders
Dim cEmoticons, cUseLinkIcons, cPrettyLinks, cExternalOut
Dim cAllowRSSExport, cAllowNewSyndications, cAllowAggregations, cNTAuthentication, cShowBrackets
Dim cAllowAttachments

' global variables
Dim gLinkPattern, gSubpagePattern, gStopWords, gTimestampPattern, gUrlProtocols, gUrlPattern, gMailPattern, gInterSitePattern, gInterLinkPattern, gFreeLinkPattern, gImageExtensions, gImagePattern, gDocExtensions, gNotAcceptedExtensions, gISBNPattern, gHeaderPattern, gMacros
Dim gFS, gIndentLimit
gFS = Chr(179)           ' The FS character is a superscript "3"
gIndentLimit = 20        ' maximum indent level for bulleted/numbered items

' incoming parameters
Dim gPage                ' page to be worked on
Dim gRevision            ' revision of page to be worked on
Dim gAction              ' action
Dim gTxt                 ' text value passed to input boxes

Dim gServerRoot          ' URL path to script
Dim gScriptName          ' Name of this script
Dim gTransformer         ' transformer of XML data
Dim gNamespace           ' namespace data
Dim gRaw                 ' vector or raw data used by Wikify function
Dim gBracketIndices      ' keep track of the bracketed indices
Dim gTOC                 ' table of contents
Dim gIncludeLevel        ' recursive level of included pages
Dim gCurrentWorkingPages ' stack of pages currently working on when including pages
Dim gIncludingAsTemplate ' including subpages as template
Dim gNrOfRSSRetrievals   ' nr of remote calls performed to retrieve an RSS feed
Dim gAggregateURLs       ' URL's to RSS feeds that need to be aggregated for this page
Dim gCookieHash          ' Hash value to use in cookie names
Dim gTemp                ' temporary value that may be used at all times
Dim gActionReturn        ' return value used by actions
Dim gMacroReturn         ' return value used by macros

If (ScriptEngineMajorVersion < 5) Or (ScriptEngineMajorVersion = 5 And ScriptEngineMinorVersion < 5) Then
    Response.Write("<h2>Error: Missing VBScript v5.5</h2>")
    Response.Write("In order for this script to work correctly the component " _
                 & "VBScript v5.5 " _
                 & "or a higher version needs to be installed on the server. You can download this component from " _
                 & "<a href=""http://msdn.microsoft.com/scripting/"">http://msdn.microsoft.com/scripting/</a>.")
    Response.End
End If

'Dim c, i
'c = Request.ServerVariables.Count
'For i = 1 To c
'    Response.Write(Request.ServerVariables.Key(i) & " ==> " & Request.ServerVariables.Item(i) & "<br>")
'Next
'Response.End

%>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
Jonathan Hodgson works as Software Developer in London, UK.

He started programming in the '80s on a trusty 48k Spectrum before moving to PC development in the early 90s. During the working week most of his time is spent involved in application development both Windows and Web-based; .NET, C#, ASP.NET, SQL Server.

He is a Microsoft Certified Software Developer (MCSD) and MCP for developing web applications using ASP.NET in C# and is always looking for new projects and challenges to work on.

http://www.jonathanhodgson.co.uk/

Comments and Discussions