WSN Knowledge Base
Featuresspacer Showcasespacer Reviewsspacer Demosspacer Purchasespacer Manualspacer Support
Global Variables
Global Variables
By Paul

{AREA} - The title of the current section of the knowledge base.
{ALLVARS} - A suitable-for-URL-inclusion list of all values submitted to the current page. Example use: <a href="search.php?{ALLVARS}&refine=bla h">refine by blah</a>
-- Optional parameter: a comma delimited list of vars to exclude.
{TID} - The name of the template being used on the current page.
{CURRENTURL} - The full URL of the page being viewed.
{CATOPTIONS} - Gives the options data for a dropdown menu of categories, for use within a selector.
-- Optional parameter: a category number to limit results to children of.
{TEMPLATEOPTIONS} - Gives the options data for a dropdown menu of template sets for use in a selector.
{TOTALLINKS} - Total number of articles in the knowledge base.
{UNIQUETOTAL} - Total articles not counting aliased copies.
{TOTALCATEGORIES} - Total number of top level categories in the knowledge base.
{TOTALSUBCATS} - Total number of categories including subcategories.
{TOTALHITS} - Total hits out from the knowledge base.
{TOTALHITSIN} - Total hits in to the knowledge base.
{LASTUPDATE} - Date on which knowledge base was last updated.
{UNVALIDATEDITEMS} - The number of items pending validation.
{HITSTEMPDATE} - The date when the temporary hits was last reset.
{VISITORLANGUAGE} - The name of the language the person viewing the page has selected (for example, English).
{IMAGESURL} - The url to the images directory. Use this in showing an image, like <img src="{IMAGESURL}/myimage.png">.
{REALIP} - The IP address of the person viewing the page.
{LOADSTATS} - When any debug level is on, place this where you want the total execution time listed. If you don't use it, the info will just be appended to the bottom of your page.

If the online users feature is activated, you may also use the global online variables listed here.

{THISMEMBER - You can use all member variables globally as applying to the person currently viewing, by using {THISMEMBER instead of {MEMBER but otherwise using member template variables as normal.

You can display the total number of items of any type globally by using this syntax: {TOTAL + type name + ARTICLES/CATEGORIES/COMMENTS + }
As an example, to show the number of articles of type 'regular' you would use {TOTALREGULARARTICLES}

All language can also be used anywhere with a template variable of the form {LANG_NAME}, where NAME is the upcase version of the name of that language. For example, {LANG_TITLE_VOTE}.

All settings work globally by using { + the name of the setting + }.

Any variable which is attached to a URL (x.php?var1=x&var2=y) can be accessed using {VARNAME}... any variable submitted by a form or contained in a cookie is available the same way.

Toplists, as well, are global.

Rating: 44444
4.67/5 based on 3 votes. The median rating is 5.

Rate this article:

Submitted: 09/25/03 (Edited 07/10/08)

Description: Template variables that work everywhere.

Views: 3763 views. Averaging 2 per day.
In the most recent 30 day period, there've been 2 views.

Previous Article | Next Article


Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support