Latest Register Log In

+ Advanced Search

Article Variables

Article Variables
By
09/19/03 (Edited 11/26/18)

Main variables

{LINKIMAGE} - Displays an image representing the article -- an attached image file if present or a website thumbshot if there are no images attached but there is a website URL or a screenshot for software -- at a default size of whatever your default thumbnail size is (set at Admin -> Settings -> Files). Please note this is a fixed size, not proportional, so as to ensure that the thumbshots and the attached image thumbnails take up exactly the same area in the layout... for a proportional version use {LINKIMAGE[200 <,> 160 <,> false]}.
-- Optional parameters: Width and height. {LINKIMAGE[200 <,> 160 <,> false]} displays the image at a fixed 200x160 pixels and turns off aspect ratio distortion.
{LINKID} - The id number of the article.
{LINKTITLE} - The title of the article.
{LINKBOOKMARKTITLE} - A bookmarkable title (removes all characters like ' that mess up the bookmarking javascript). May also be of use for alt tags on images.
{LINKDETAILSURL} - The URL of the article's details page.
{LINKTHREADURL} - The URL of the associated comment thread.
{LINKTRACKURL} - Outgoing link URL which can be tracked for hits counting. For javascript hit counting use <a href="{LINKTRACKURL}" id="{LINKID}out" required="required" required="required" required="required" required="required" required="required" required="required" required="required" class="required required required required required required required loutlink">{LINKTITLE}</a>. Note: prior to version 8.1.0, this is {TRACKLINKURL} instead.
{LINKTAGS} - A linked list of tags associated with the article.
{LINKTAGSSTRIPPED} - A plain text list of tags.
{LINKDESCRIPTION} - Description of the article.
-- Optional paramater: {LINKDESCRIPTION[x]} will trim the description to x characters.
{LINKDESCRIPTIONSTRIPPED} - Description of the article with all WSN/HTML code removed.
-- Optional paramater: {LINKDESCRIPTIONSTRIPPED[x]} will trim the description to x characters.
{LINKSTRIPPED} - A stripped version of the text or description without HTML or codes.
-- Optional parameters: length, field. For example to get the stripped first 80 characters from the summary field, use {LINKSTRIPPED[80 <,> summary]}.
{LINKDESCRIPTIONSENTENCE} - The first sentence of the desciption.
{LINKSENTENCES[x]} - Up to x characters, but with any cutoff sentences at the end removed so it's in complete sentences.
{LINKSUMMARY} - If the summaries switch is on, this shows a short summary.
-- Optional parameter: {LINKSUMMARY[x]} will trim the summary to x characters (added in 6.1.0).
{LINKCATID} - The id number of the category which this article is in.
{LINKCATPARENTID} - The id number of the category's parent.
{LINKCATNAME} - The name of the category this article is in.
{LINKTOPCATNAME} - The name of the top level category at the root above this article.
{LINKTOPCATID} - The id number of the top level category at the root above this article.
{LINKORIGINALCATNAME} - The name of the original category of an aliased article (or just regular category name otherwise).
{LINKORIGINALCATURL} - The URL of the original category of an aliased article (or just regular category url otherwise). {LINKEMAIL} - The email address provided when the article was submitted.
{LINKHITS} - Number of hits out to this article.
{LINKHITSIN} - Number of hits in from this article.
{LINKOWNERID} - Member id number of the person who submitted the article.
{LINKUSERGROUP} - Usergroup id number of the submitter.
{LINKTYPE} - The official type of this article (regular, recip, etc)
{LINKTYPELANG} - The friendly language name of the link's type (reciprocal instead of recip for example), in the current language.
{LINKRECIPURL} - The url of the reciprocal link for this link.
{LINKRECIPWITH} - The URL which the link uses to reciprocate.
{LINKDATE} - The date on which this article was first submitted.
{LINKDATEVALIDATED} - The date on which this article was validated.
{LINKLASTEDITDATE} - The date on which this article was last edited. If never edited, this is blank.
{LINKLASTUPDATE} - The date on which this article was last edited, or if it hasn't been edited then the submission date.
{LINKNEW} - Contains the html to display the "new" image if the article is new, otherwise it's empty.
{LINKUPDATED} - Contains the html to display the "updated" image if the article is updated, otherwise it's empty.
{LINKHITSOUTTEMP} - Number of hits out over last admin-defined number of days.
{LINKHITSINTEMP} - Number of hits in over last admin-defined number of days.
{LINKHITSOUTPERDAY} - Number of hits out per day.
{LINKHITSINPERDAY} - Number of hits in per day.
{LINKHITSOUTPERMONTH} - Number of hits out per month.
{LINKHITSINPERMONTH} - Number of hits in per month.
{LINKDAYSOLD} - The number of days ago the link was submitted.
{LINKEXPIREDAYS} - Days until article expires, if it is set to expire.
{LINKEXPIREDATE} - The date the article will expire (accepts format parameter like all dates).
{LINKISEXPIRED} - Returns true if expired, false if not.
{LINKNUMALIASES} - The number of aliases the article has.
{LINKALIASEDIN} - A list of the categories the article is aliased to.
-- Optional parameter: valiadation status (defaults to yes)
-- Optional parameter: html or plain (defaults to html)
-- Optional parameter: separator (defaults to comma)
{LINKALLCATEGORIES} - A list of all categories (primary and secondary) the article is in.
-- Optional parameter: valiadation status (defaults to yes)
-- Optional parameter: html or plain (defaults to html)
-- Optional parameter: separator (defaults to comma)
{LINKPLAINCONTENT} - HTML-stripped plain text version of the message for WSN Forum or article text for WSN KB. N/A in other scripts.
{LINKVIEWERS} - List of people who've viewed the article [if activated]
{LINKADMIN} - If the viewer has permission to edit the article, contains the edit image/link... otherwise empty. {LINKADMINURL} - The URL to the edit article page. Useful for writing a custom edit button.
{LINKIMPORTANCE} - The importance of the link based on the formula defined in your admin panel.
{LINKIMPORTANCENUMBER} - The ranking of the link ordered by importance.
{LINKFILTERLINK[field <,> filtertype]} - Creates a filter link.
{LINKCANEDIT} - True if viewer has permission to edit, otherwise false.
{LINKPRICE} - Price of article, if applicable.
{LINKTHUMBSHOT} - When the thumbshots switch is on, the thumbshots.org thumbnail.
-- Optional parameters: width and height (this is html resizing only, so ugly)
{LINKENCODEDSITEURL} - The appropriate urlencode()ed URL from the url or realurl fields as you would need to pass for a thumbshots image.
{LINKLASTVOTEDATE} - The date on which the last rating vote was cast.
{LINKIP} - The IP address of the submitter.
{LINKIPCITY} - The city of the IP address, if geolocation is enabled.
{LINKIPCOUNTRY} - The country of the IP address of the submitter.
{LINKRELATEDURLS} - Websites related to a article.
{LINKLABEL} - A label, safe for use in a title attribute, consisting of the description or first section of text.
{LINKISPURCHASED} - Tests if the item has been purchased through the shopping cart system by the member viewing the page.
{LINKNATIONALFLAG} - Flag image of the country which the submitter IP is in.
{LINKNATIONALFLAGURL} - Direct URL to the flag image without the img tag.
{LINKISSPONSORED} - True if the article is presently sponsored, false if it's not.
{LINKSPONSORENDDATE} - The date the current sponsorship ends, if applicable.
{LINKLASTEDITBY} - The username of the last person to edit this article. Requires WSN 8.1.0+.
{LINKISNEWSINCELOGIN} - Determines if this has been added since the viewer logged in. Requires WSN 8.1.0+.
{LINKISINMYALBUMS} - Determines if the viewing member has used the old albums.php aliasing method to bookmark this article.
{LINKTEXTLENGTH} - The number of characters of text in a knowledge base article.
{LINKMESSAGELENGTH} - The number of characters of the first post in a forum thread.
{LINKDESCRIPTIONLENGTH} - The number of characters of the article description.

Website URL variables

{LINKURL} - The website URL of the article, if applicable.
{LINKBASEURL} - The base of the URL to the end of the domain, like http://www.site.com.
{LINKDOMAIN} - The domain name of the URL, by itself, no http:// and no www.
{LINKALEXAIMAGE} - An alexa graph of the popularity of the domain name over time. Includes full img tag.
-- Optional parameters: width and height in pixels for the graph image.
{LINKALEXAIMAGEURL} - The URL of the image of an alexa graph of the popularity of the domain name over time.
-- Optional parameters: width and height in pixels for the graph image.
{LINKALEXAPOPNUMBER} - A popularity rank from a worst of 1 to a best of 10, or 0 for unranked, based on alexa data.
{LINKALEXARANK} - Alexa's estimate of where the domain ranks on a list of most popular websites, where 1 is the most popular on the internet and
less popular sites can number into the millions.
{LINKALEXARANKIMAGE} - A simple bar image indicating the popularity of the domain on the 1-10 scale. If unknown/unranked, the image does not display.


Physical presence variables

{LINKADDRESS} - The street address of the article (ex: 123 Main Street).
{LINKCITY} - The city (ex: Los Angeles).
{LINKSTATE} - The state or province (ex: California).
{LINKCOUNTRY} - The country (ex: United States of America).
{LINKPHONE} - The phone number (ex: 555-555-5555).
{LINKGOOGLEMAP} - A map of the address.
-- Optional parameter: zoom level.

Software variables (when PAD switch is on for software repository sites)

{LINKPADFILE} - The PAD file url.
{LINKPROGRAM_VERSION} - Version number of the program.
{LINKPRIMARY_DOWNLOAD_URL} - Download link for the program.
{LINKAPPLICATION_SCREENSHOT_URL} - An application screenshot URL.
{LINKPROGRAM_SYSTEM_REQUIREMENTS} - System requirements.
{LINKFILE_SIZE_MB} - The download filesize, in megabytes.
{LINKPROGRAM_LANGUAGE} - The languages (spoken, not programming) the application is in.
{LINKPROGRAMOS} - Supported operating systems. Translateble with details_os_osnamehere.
{LINKRELEASE_STATUS} - Release status (major update, beta, etc).
{LINKPROGRAMTYPE} - Program type (shareware, freeware, commercial, etc). Translateble with details_programtype_typenamehere.
{LINKAUTHORNAME} - The name of the program author.
{LINKAFFILIATESREGNOWPRODUCTID} - regnow.com affiliate program product id.
{LINKAFFILIATESREGNOWVENDORID} - regnow.com affiliate program vendor id.
{LINKAFFILIATESPLIMUSPRODUCTID} - plimus.com affiliate program product id.
{LINKAFFILIATESPLIMUSVENDORID} - plimus.com affiliate program vendor id.

Voting variables

{LINKRATING} - The rating, as a decimal, of the link.
-- Optional parameter: number of decimal places.
{LINKVOTES} - Number of votes cast for the link.
{LINKSUMOFVOTES} - The sum of all vote values cast for this link.
{LINKSTARS} - displays a number of stars equivilant to the link's rating, clickable to rate.
-- Optional parameter: the name of a custom rating field.
{LINKOLDSTARS} - plain unclickable image of the rating stars
-- Optional parameter: the name of a custom rating field.
{LINKVOTERIPS} - List of IP addresses of the people who have voted for the link.
{LINKVOTERIDS} - Currently N/A, should be list of member ids numbers of people who've voted for the link.
{LINKMEDIANRATING} - The median rating of the link.
-- Optional parameter: field, to get median for custom rating fields. {LINKMEDIANRATING[stylerating]} gets the average style rating.

Comment-related variables

{LINKNUMCOMMENTS} - Number of comments posted about this article.
-- Optional parameter: comment type name, to get the number of comments of that type. For example, {LINKNUMCOMMENTS[regular]} to get the number of regular articles.
{LINKTHREADVIWERS} - List of people who've viewed the associated comments thread [if activated]

Attachment variables

These vars here will just pick one of the link's attachments. Use a distinct attachments area to handle each attachment if you want to handle each attached file. All of these template variables accept an optional parameter with which you can specify a file extension to look for. This way, instead of using a random attachment, you can use one of a particular file type. Examples: {LINKNUMBEROFATTACHMENTS[jpg]} will check only for files with that extension. {LINKFILENAME[jpg]} will give the name of an attached jpg file.
{LINKNUMATTACHMENTS} - The number of attached files. Use it in conditionals on submit/edit pages, will evaluate to false when there are none.
-- Optional parameter: file extension. For example, {LINKNUMATTACHMENTS[flv]} shows the number of flv flash video files attached.
{LINKNUMIMAGES} - The number of image attachments.
{LINKFILENAME} - The filename on disk of the attached file -- this will be a long randomized string.
{LINKFILETITLE} - The readable submitted file name of the attachment, suitable for display.
{LINKDOWNLOADURL} - The download URL for the attachment.
{LINKDOWNLOADS} - The number of times the attached file has been downloaded.
{LINKKB} - Size of attachment in KB.
{LINKXWIDTH} - The width of image attachments in pixels.
{LINKYHEIGHT} - The height of image attachements in pixels.
{LINKISIMAGE} - For custom attachment fields, a boolean to see if we can make a thumbnail.
{LINKISVIDEO} - For custom attachment fields, a boolean to see if the first attached file is a video.
{LINKTHUMBIMAGE} - The complete img tag for showing a thumbnail of an attached image.
-- Optional parameters: file extension, image width and image height, and the number of the image.
{LINKTHUMBIMAGE[width <,> height <,> number]} - Shows the numberthth attachment's thumbnail sized to width x height.
{LINKTHUMBIMAGEFLOAT} - Same as {LINKTHUMBIMAGE} except it automatically adds float: left to the css.
{LINKTHUMBURL} - The URL location of the thumbnail for an attached image.
-- Optional parameters: file extension, image width and image height, and the number of the image. Note: For custom attachment variables, insert the field name after LINK. For example, {LINKMYATTACHFIELDKB} would give the size in KB of a custom attachment field named myattach.
{LINKCAPTION} - Shows the caption of the first file, if available.
-- Optional parameter: the numberth file to get the caption of.
{LINKHASCAPTION} - Checks whether there's a file caption for the first file (for use in conditionals).
-- Optional parameter: the numberth file to check for a caption.
{LINKHASFILE[number]} - Checks whether there's a numberth file, for use in conditionals.
{LINKATTACHMENTFIELD[caption <,> number]} - Gets the numberth attachment caption. Change caption to another attachment field to get it.
{LINKTHUMBIMAGEX[number]} - Shows the numberth image's thumbnail.
{LINKTHUMBURLX[number]} - Shows the URL of the numberth image's thumbnail.


Misc.

{LINKNAV} - Contains the navigation path of the categories to get to the link.
{LINKCATNAMEWITHNAV} - Full navigation path including present category.
{LINKTYPESELECTOR} - The <option value...> content of the link type selector.
{LINKHIDESELECTOR} - Contains <option value...> content of the yes/no selector for hiding a link.
{LINKSUSPENDED} - False if the link is normal, true if the link is suspended.
{LINKVALIDATED} - False if link is unvalidated, true if it is validated.
{LINKVALIDATEDBYNAME} - Name of the admin who validated the article (if applicable). You can also get any other member info about that admin with {LINKVALIDATEDBY + member variable + }.
{LINKHIDE} - 0 (false) if link is hidden, 1 (true) is visible.
{LINKNOTIFY} - 0 if submitter does not want to be notified of comments on the link, 1 if they do.
{LINKSUSPECT} - False if the link is normal, true if the link is suspect.
{LINKISREAD} - False if the link has not been visitied by the user, true if it has.
{LINKCOMMENTSREAD} - 0 (false) if the most recent comment in the associated comments thread has not been read by the user, 1 (true) if it has.
{LINKISNEW} - True if article is now, false if it's old.
{LINKISUPDATEDBOOL} - 0 if article hasn't been recently updated, 1 if it has been.
{LINKCHECKED[field <,> value]} - checks if field is set for value
{LINKCANSAVE} - True if the viewing member can save the article (their usergroup must be allowed to, and they must not have already saved this article). Use this to conditionalize a save link.
{LINKISSAVED} - True if the article has been saved by the viewing member, otherwise false.
{LINKSAVEDBYCOUNT} - The number of people (members and guests) who've saved the article.
{LINKSAVEDBYMEMBERCOUNT} - The number of registered members who've saved the article.
{LINKSAVEDBYLIST} - A comma-separated list of the members who've saved the article.
-- Optional parameter: custom scheme for what HTML the list should consist of
{LINKLASTAVATARURL} - The URL of the avatar of the last poster in the comment thread. Note this increases server load slightly.
-- Optional parameters: maximum width and height of the avatar. Example: {LINKLASTAVATARURL[30 <,> 15]} Place these anywhere in a template within the scope of a article.
{LINKHITSOUTINLASTDAYS} - The number of hits or views in the last specified number of days, default one day. Requires that the statistics switch be on.
-- Optional paramemter: number of days. Example: {LINKHITSOUTINLASTDAYS[30]} gets the last 30 days.

Special Template Variables for Article Details Page Only

{PREVIOUSURL} - The URL of the previous article in the category.
{NEXTURL} - The URL of the next article in the category.
{PREVIOUSTITLE} - The title of the previous article in the category.
{NEXTTITLE} - The title of the next article in the category.
{PREVIOUSEXISTS} - For use in conditionals to check if there is a previous one.
{NEXTEXISTS} - For use in conditionals to check if there is a next one.

As of version 10.3.15, you can use {THISLINK instead of {LINK if you want to reference the active article's info in the wrapper. For example a toplist in the wrapper would normally give an unparsed template variable error if you used {LINK in the config line in the wrapper and then viewed any page other than article details. {THISLINK will evaluate to blank when not in the scope of a article, thus avoiding errors in the same way {THISCAT does for categories.





Description Summary of what each article template variable does when used in a template.
Rating
Views 13777 views. Averaging 2 views per day.