WSN Knowledge Base
Member Variables
Member Variables
By Paul

In general usage, member template variables begin with {MEMBER. Sometimes however you may be within the scope of some other member yet want to use a variable which is for the person viewing the page. To accomplish this, use {THISMEMBER instead of {MEMBER. The {THIS prefix tells the script that you mean the viewer of the page, not the member whose profile or article we may be dealing with.

{MEMBERSUBMISSIONS} - Number of articles the member has submitted. This is script-neutral, so when used in a different WSN script it shows the appropriate value... useful if you share templates amongst the scripts.
-- Optional parameter: As of 6.0.17, {MEMBERSUBMISSIONS[live]} shows the number of live, non-expired active articles they have. This value isn't cached, so it will slow down the page -- use carefully!
-- Other optional parameters: type name, include unvalidated. {MEMBERSUBMISSIONS[regular]} will count only regular type articles. {MEMBERSUBMISSIONS[regular <,> true]} will count only regular articles, but include articles still pending validation in the count. {MEMBERSUBMISSIONS[false <,> true]} will include all types plus articles still pending validation.
{MEMBERPOSTCOUNT} - Number of comments the member has submitted. This is script-neutral, so when used in a different WSN script it shows the appropriate value... useful if you share templates amongst the scripts.
{MEMBERADMIN} - If viewer can edit this profile, contains the html for the article to do it, otherwise blank.
{MEMBERISADMIN} - Returns 1 (true) if member is an administrator, 0 (false) otherwise.
{MEMBERAVATARURL} - The URL of the member's avatar, for use in an img html tag.
-- Optional parameters: width and height, to make smaller thumbnails of avatars.
{MEMBERALLOWUSEREMAIL} - Returns 1 (true) if member allows emails from other users, 0 (false) otherwise.
{MEMBERALLOWEMAIL} - Returns 1 (true) if member allows emails from administrators, 0 (false) otherwise.
{MEMBERREGDATE} - Date that the member registered.
{MEMBERISGUEST} - Returns 1 (true) if member is an unregistered guest, 0 (false) otherwise.
{MEMBERISREGISTERED} - Returns 1 (true) if member is a registered member, 0 (false) otherwise.
{MEMBERID} - The id number of the member.
{MEMBERNAME} - The username of the member.
{MEMBERSAFENAME} - If emails are being used as names, this will hide the domain name part of the name to protect from spammers.
{MEMBERUSERGROUP} - The number of the member's usergroup.
{MEMBERPASSWORD} - DO NOT USE THIS, as it is the md5 hashed version of their password rather than their actual password.
{MEMBERIP} - The IP address of the member.
{MEMBERTOTALHITS} - Total hits out of sites submitted by this member.
{MEMBERTOTALHITSIN} - Total hits in of articles submitted by this member.
{MEMBEREMAIL} - Email address of this member.
{MEMBEREMAILDISGUISE} - Email address of the member disguised from spam spiders by using the form person at domain dot com.
{MEMBERSTYLE} - Theme name this member is using.
{MEMBERLANGUAGE} - Language this member is using.
{MEMBERSIGNATURE} - Member's signature.
{MEMBERAVATARNAME} - Name of avatar file on disk.
{MEMBERALBUMID} - Id number of member's personal link list.
{MEMBERFAILEDATTEMPTS} - Number of times in the last day that someone has attempted and failed to login to this member's account.
{MEMBERCOMMENTAPPROVAL} - The ratio of approvals out of total voters for comments posted by this member.
-- Optional paramater: round. Specify how many decimal places to round to, for example {MEMBERCOMMENTAPPROVAL[2]}
{MEMBERRATING} - The member's rating. Optionally pass the paramaters round and formula... see here for details.
{MEMBERRATINGNUMBER} - The ranking ordered by member rating of this member.
{MEMBERLINKSVIEWED} - The number of articles viewed by the member, if tracking of article viewer names is turned on.
{MEMBERLASTVISITDATE} - The date/time the member last visited. -- Optional parameter: date format, as with all date fields
{MEMBERFUNDSPROJECTION} - The date when the member's sponsorship funds can be expected to run out.
{MEMBERPOSITIVEPCT} - The percentage of trader ratings which have been positive.
{MEMBERIPLOCATION} - The city, region and country of the member's IP address, if database is loaded.
{MEMBERIPCOUNTRY} - The country of the member's IP address, if database is loaded.

Details of the member's usergroup can also be accessed through member variables:
{MEMBERGROUPID} - Id number of member's usergroup
{MEMBERGROUPTITLE} - The title of their usergroup as you've set it on your 'manage usergroups' page.
{MEMBERSECONDARYGROUPNAMES} - The titles of the user's secondary groups.
{MEMBERGROUPCANVOTE} - 1 if they can rate links, 0 if they can't.
{MEMBERGROUPISADMIN} - 1 if they're an admin, 0 if they aren't.

All other usergroup permissions can be accessed as well, just use {MEMBERGROUP + usergroup field + }.

Rating:


4.57/5 based on 7 votes. The median rating is 5.

Submitted: 09/23/03 (Edited 12/12/11)

Description: Summary of all member template variables.

Views: 3805 views. Averaging 1 views per day.
In the most recent 30 day period, there've been 4 views.

Previous Article | Next Article

Features Showcase Purchase Services Resources Support