WARNING:You've configured your OpenWiki to use the MSXML v4 component, but you don't appear to have this installed. The application now falls back to use the MSXML v3 component. Please update your config file (usually file owconfig_default.asp) or install MSXML v4.
Morrien Wiki - Help On Macros
HomeRecent ChangesFind PageTitle IndexSand BoxUser PreferencesHelp
Help On Macros

Help On Macros

Edit this pagePrint this page Last edited undefined , (diff)

Help on: Editing | Formatting | Emoticons | Headers | Linking | Macros | Processing Instructions | Tables
[goto Help Menu]

OpenWiki includes special operations called "macros" which are recognized if the name appears between a pair of left and right angle bracket <...> characters. For instance, <TableOfContents>.

Some macros accept one or more parameters. These are given directly following the macro name and are enclosed between a pair of left and right parenthesis (...) characters, separated by commas. For instance, <FullSearch("^Help")>, <RecentChanges(10,30)>.

Table of contents:
  • Custom macros
  • Including images in your pages
  • Progress bar
  • Built-in macros
  • Table Of Contents
  • Line Break
  • Including Pages
  • Anchors
  • Footnotes
  • Searches
  • Indexes
  • Random Pages
  • Syndication
  • Aggregation
  • User Preferences
  • Inter Wiki
  • System Info
  • Glossary
  • Nowiki

  • Custom macros

    Before we describe the built-in macros (of which there are quite a few) we'll first describe a few additions we've made (of which there are not very many!) to customise this particular wiki for our own needs.

    Including images in your pages

    Although wiki sites are mainly text-based, there are times when you'll want to include an image or two to help explain your point. To do this you first need to copy the image file onto the "images" folder on the wiki server. This is located at the following address:

     \\...\wwwroot\wiki\images\
    

    To then include the image in your page simply use the following macro:

    <Image(ImageName.gif)>
    

    You can obviously create subdirectories within the images folder if you want to group together a collection of images. For example:

    <Image(photos/jo_bloggs.jpg)>
    <Image(photos/fred_bloggs.jpg)>
    


    Progress bar

    To display a progress bar use the following macro (contributed by Per Nilsson to the Open Wiki project).

    A 200 pts wide progress bar filled 30%:<br>
    <ProgressBar(200,30)>
    


    Built-in macros

    The following macros are built-in as part of the Open Wiki product.


    Table Of Contents

    To show a table of contents for a page use the macro <TableOfContents>. This is created by looking at all the headers used within a page. You can see an example of this macro's output at the top of this page.


    Line Break

    By default Open Wiki ignores linebreaks - actually it's a feature of all web browsers which Open Wiki simply inherits. If you want a line directly followed by a new line then you can use the macro <br>.
    this is line one.
    is this line two?
    
    this is line one. <br>
    is this line two?
    
    this is line one. is this line two?

    this is line one.
    is this line two?


    Including Pages

    One of the more powerful macros is <Include>. With this you can include another wiki page into the current wiki page. This is great if, for example, you want to use a common menu structure for a subset of your wiki. See the help menu at the top of this page for an example.

    Pass the name of the WikiPage you want to include, e.g.:
    <Include(HelpMenu)>
    
    Help on: Editing | Formatting | Emoticons | Headers | Linking | Macros | Processing Instructions | Tables
    [goto Help Menu]


    Anchors

    You can put invisible anchors in your page by using the <Anchor> macro. Pass the name of the anchor as a parameter:
    <Anchor(MyAnchor)>This piece of text is anchored.
    

    To link to an anchor in another wiki page use:
    PageName#AnchorName
    
    or
    
    [PageName#AnchorName some nice link text]
    


    Footnotes

    You can include footnotes in text by using the following macro:
    <Footnote(This is the footnote text)>
    

    This will add a superscript numbered link at the point where the macro appears, and the footnote itself will be deferred to the bottom of the wiki page. A short dividing line separates the footnotes from the rest of the article text.


    Searches

    To show an input box that will perform a search through all the titles of the pages in this wiki use the macro <TitleSearch>:
    Title search: 
    <TitleSearch>
    
    Title search:

    The <TitleSearch> macro also accepts a parameter - instead of showing an input box it will then show a list of page titles that match the pattern of the parameter:
    List of all the help pages (assuming all these start with the letters "Help"):
    <TitleSearch(^Help)>
    
    List of all the help pages (assuming all these start with the letters "Help"):

    To show an input box that will do a full text search through all the pages in the wiki use the macro <FullSearch>:
    Full text search: 
    <FullSearch>
    
    Full text search:

    The <FullSearch> macro also accepts a parameter - instead of showing an input box it will do a full text search through all the pages and show a list of the pages that match the pattern of the parameter:
    List of pages containing the word "Text Search":
    <FullSearch("Text Search")>
    
    List of pages containing the word "Text Search":

    To show an input box that will allow you to go to a page or create a new page by entering its name in the editbox use the macro <GoTo>.
    <GoTo>
    


    Indexes

    To view a list of all the pages in this wiki use the macro <TitleIndex>. See Title Index for an example.

    To view a list of all the words used in the titles of wiki pages use the macro <WordIndex>. See Word Index for an example.

    To view a list of recently changed pages use the macro <RecentChanges>. When no parameters are provided all pages changed in the last 30 days will be shown. See Recent Changes for an example.

    One or two parameters are accepted. The first parameter is the maximum number of days that should be shown in the list. The second parameter is the maximum number of page titles that should be shown in the list. When a parameter is not a number or less or equal than zero, then a default value is taken.

    The example below will show all recently changed pages in the last 24 hours.
    <RecentChanges(1)/>
    

    The example below will show a maximum of 10 recently changed pages.
    <RecentChanges(0,10)/>
    


    Random Pages

    To show a random page link use the macro <RandomPage>:
    <RandomPage>
    
    Analysis Services

    To show a number of random page links, pass the number as a parameter to the macro:
    <RandomPage(5)>
    


    Syndication

    News-related sites often offer a so-called RSS? feed, which is available through a URL?. For instance, the latest news headlines from Slashdot are retrievable through the URL? http://slashdot.org/slashdot.rdf.

    It's possible to syndicate these news headlines into Open Wiki. To do this use the macro <Syndicate>. This macro needs at least one parameter, the second parameter is optional. The first parameter must be the URL? to the RSS? feed enclosed by quotes. The second parameter must be a number (in minutes) which tells how often to refresh the news, where the default is 120 minutes or 2 hours. Retrieving the news headlines is a costly operation so you don't want to set the refresh rate too low.

    Example:
    <Syndicate("http://slashdot.org/slashdot.rdf", 120)> 
    

    Use of this macro can be disabled by the system administrator.


    Aggregation

    Just as you can syndicate RSS? feeds into a wiki page, it's possible to aggregate multiple RSS? feeds into one list. Define all the RSS? feeds you want to aggregate using the Syndicate macro, put all these definitions in one wiki page, and then use the macro Aggregate in any wiki page to aggregate the RSS? feeds defined in the wiki page with the Syndicate macro's.

    This macro needs one parameter, which must be the name of the wiki page containing the Syndicate macro's.

    Example:
    <Aggregate("AllTheNews")> 
    

    Again, use of this macro can be disabled by the system administrator.


    User Preferences

    To show the user preferences use the macro <UserPreferences>. See the User Preferences page for an example.


    Inter Wiki

    To show the list of known InterWiki?'s use the macro <InterWiki>. InterWiki?'s are affiliated Web sites which can be referenced by a simple name and one-word query. See the examples below.

    <InterWiki>
    

    We currently have the following InterWiki?'s defined:
  • Acronym
  •   
    http://www.acronymfinder.com/af-query.asp?String=exact&amp;Acronym=
  • Dictionary
  •   
    http://www.dictionary.com/cgi-bin/dict.pl?term=
  • Google
  •   
    http://www.google.co.uk/search?q=
  • StreetMap
  •   
    http://www.streetmap.co.uk/newmap.srf?x=521138&y=176005&z=0&sv=sw148sl&st=2&mapp=newmap.srf&searchp=newsearch.srf&pc=
  • Wikipedia
  •   
    http://www.wikipedia.org/wiki/

    Examples:


    System Info

    The <SystemInfo> macro will display certain internal information about the wiki:
    <SystemInfo>
    
    OpenWiki Version:0.78 rev.1.2
    XML Schema Version:0.91
    Namespace:http://openwiki.com/2001/OW/Wiki
    VBScript Version:5.8.18817
    ADO Version:6.1
    Nr Of Pages:192
    Nr Of Revisions:398

    The <PageCount> macro will display the total number of pages within the wiki:
    <PageCount>
    
    This wiki contains 192 WikiPages.

    The following three macros can be used to show the current date and time:
    <Date> <Time> <DateTime>
    
    The date on this server is Oktober 22, 2017

    The time on this server is 06:29

    The datetime on this server is Oktober 22, 2017 06:29


    Glossary

    <Glossary(kudos)>
    
    H

    H
    Help On Macros


    Nowiki

    This is a tag-like macro which prevents the text inside it being interpreted by the wiki:
    
    <script>alert(document.cookie)</script> 
    
    

    <script>alert(document.cookie)</script>
    Find page by browsing, searching or an index
    This page last edited undefined , (diff)Edit this pagePrint this page