• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
      • Install/Upgrade
      • Admin Manual
      • User Manual
      • Style/Phrase Changes
      • Changelog
      • Security Issues
    • 
    • Wiki
    • Help
    • VaultWiki 3 Manual
    • VW3 Parser Extensions
    • Version History
    • Viewing Revision

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    • Main
    • Source
    • History

    Parser Extensions

    Viewing Revision
    This is an old revision of this page, as edited March 7, 2010, 1:18 PM by pegasus(contribs). It may differ significantly from the current revision.
    (diff)  Previous revision
    Current Revision (diff)
    Newer revision  (diff)
    If you have the Parser Extensions addon installed or are using the Premium version of VaultWiki 3, new functionality is added to the wiki code parser.

    Contents

    1. 1Template Conditionals
    2. 2Variables
      1. 2.1Current Time
      2. 2.2Article-related
      3. 2.3Counters
      4. 2.4Revision-related
      5. 2.5User-related
      6. 2.6Accessibility
      7. 2.7URL-related

    Template Conditionals

    The [if] code only works in Template pages. Using it, you can create Templates that produce different output depending on the input provided.
    Code:
    [if="{{{param}}}"]Param exists[else /]Param does not exist[/if]

    You can also use comparative operators (<, >, <=, >=, ==, !=, ===, !==) in the code:
    Code:
    [if="{{{number}}} < 4"]Number is small.[else /]I like big numbers.[/if]

    Whitespace is stripped from the following places: after the opening tag, around the [else /] tag, and before the closing tag. This allows you to create readable nested conditional code without worrying about the added whitespace. If you actually wanted to keep whitespace here, you need to break your code into multiple tags, or if HTML is enabled, you can use the appropriate entity code.

    Variables

    The [var] code allows editors to insert a lot of information that is only available behind-the-scenes. The value of the tag should be the name of the variable you wish to use. If the variable accepts any arguments, you can add those as well, separating them with the | separator.
    Code:
    [var]varname|args[/var]


    Current Time

    When a user visits a page, the following variables display the current time, formatted in various ways. The page is still eligible for caching, so the time may become out of sync.
    • CURRENT
    • CURRENTDAY
    • CURRENTDAY2
    • CURRENTDAYNAME
    • CURRENTDOW
    • CURRENTHOUR
    • CURRENTMONTH
    • CURRENTMONTHABBREV
    • CURRENTMONTHNAME
    • CURRENTMONTHNAMEGEN
    • CURRENTTIME
    • CURRENTTIMESTAMP
    • CURRENTWEEK
    • CURRENTYEAR
    Another one is called CURRENTVERSION, which is not time-related. Instead, it shows the current VaultWiki version.

    Article-related

    DISPLAYTITLE replaces the title of the current article with the provided argument.
    TYPE appends the provided argument to the end of the title, as a subtitle.
    Neither of these affect the article's URL.

    Counters

    NUMBEROFARTICLES returns the number of articles in the current namespace.
    NUMBEROFPAGES returns the number of articles in all namespaces.
    PAGESINNS and PAGESINNAMESPACE both accept a numerical Namespace ID as an argument, and they both return the number of pages in that namespace.
    NUMBEROFEDITS returns the number of edits for all articles in all namespaces.

    All of these variables accept the R argument, which returns the number without applying any formatting.

    Revision-related

    The following variables return information about the current revision of the page:
    • REVISIONID
    • REVISIONDAY
    • REVISIONDAY2
    • REVISIONMONTH
    • REVISIONYEAR
    • REVISIONTIMESTAMP
    • REVISIONUSER

    User-related

    USER returns information about the user currently viewing the page. A page that uses this variable cannot be added to the post cache. To return specific data, include the name of the field as the argument. Passwords and other sensitive fields cannot be returned with this code.

    Accessibility

    DIRMARK and DIRECTIONMARK return the current page's text-direction.
    CONTENTLANGUAGE returns the current page's language.

    URL-related

    URLENCODE prepares the argument for transmission via a URL or form data.

    PAGENAME returns the title of the current article.
    NAMESPACE returns the ID of the namespace containing the current article.
    FULLPAGENAME returns the namespace and title of the current article.
    FULLPAGENAMEE returns the encoded title of the article, as used in the article's URL.
    SITENAME returns the title of the wiki. This is usually the title of the default namespace.
    SERVER returns the path to your forums.
    SERVERNAME returns the domain name.
    SCRIPTPATH returns the relative path to the current page.

    Users Browsing This Page (0 members, 1 guests)

    Search the Wiki

    Show results of these types:

    Share This Page

    Click a button below to activate it. Click again to share. Privacy Information Keep in mind that simply activating a button will reveal some of your browsing data with the selected third-party service in accordance with their own Terms of Service and/or Privacy Policy.
    Like0
    Link here from this web site
    Link here from the web
    Submit to Digg Digg
    Submit to del.icio.us del.icio.us
    Submit to StumbleUpon StumbleUpon
    Submit to Google Google

    Recent Activity

    Filters

    VW3 User Manual

    Book Table of Contents
    • 1VW3 Introduction to Articles
      1. 1.1VW3 Creating Articles
    • 2VW3 Edit Tab
      1. 2.1VW3 Editing Sections of an Article
      2. 2.2VW3 Moderating Edits
    • 3VW3 Editing Syntax
      1. 3.1VW3 Wiki Links
      2. 3.2VW3 Auto Links
      3. 3.3VW3 Redirects
      4. 3.4VW3 Parser Extensions
    • 4VW3 Thread Prefixes
    • 5VW3 History Tab
      1. 5.1VW3 Viewing Previous Versions
      2. 5.2VW3 Comparing Versions
      3. 5.3VW3 Reverting Articles to Previous Versions
    • 6VW3 Protect Tab
    • 7VW3 Article Subscriptions
    • 8VW3 Special pages
    • 9VW3 Introduction to Books
      1. 9.1VW3 Creating Books
      2. 9.2VW3 Adding Chapters to Books
      3. 9.3VW3 Managing Chapters of Books
      4. 9.4VW3 Moving Chapters to Another Book
    • 10VW3 Introduction to Templates
      1. 10.1VW3 Creating Templates
      2. 10.2VW3 Using Templates
    • 11VW3 Introduction to Categories
      1. 11.1VW3 Using Categories
    • 12VW3 Introduction to Images
      1. 12.1VW3 Using Images
    • 13VW3 Introduction to Forum Headers
      1. 13.1VW3 Creating Forum Headers
      2. 13.2VW3 Moving Headers to Another Forum
    • 14VW3 Social Group Pages
      1. 14.1VW3 Creating Wiki-Enabled Groups
      2. 14.2VW3 Creating and Maintaining Group Pages
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 6:37 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.
    "Wiki" powered by VaultWiki v4.1.9.