Category Variables
By Paul
3.33/5 based on 3 votes. The median rating is 3.
By Paul
{CATHASNEW} - If there's a new link in the category, returns the image code for the updated image... otherwise, empty.
{CATHASNEWBOOL} - A true/false for use in conditionals to replace {CATHASNEW}.
{CATADMIN} - If viewer can edit category, returns the edit article for it... otherwise, empty.
{CATNUMSUBCATS} - The number of subcategories in the category
{CATNUMSUBCATSALL} - The number of subcategories including personal link lists if applicable.
{CATNUMLINKS} - Number of links in the category plus all its subcategories.
{CATLINKSHERE} - Number of links in the category excluding subcategories.
{CATSUBCATS} - HTML for displaying the subcategories of the category.
-- Optional parameters: html to use for each category, maximum number to show. limits list to 5.
{CATPARENTNAME} - The name of this category's parent category.
{CATALIASEDIN} - A list of secondary locations of the category.
{CATORIGCATNAME} - The name of the primary category of an alias, otherwise just the category name.
{CATORIGCATURL} - The url of the primary category of an alias, otherwise just the category url.
{CATNUMBERRELATED} - The number of categories related to this category.
{CATDATE} - Date on which the category was added.
{CATLASTEDITDATE} - Date on which the category was last edited.
{CATLASTLINKDATE} - The date of the last link addition in the category.
{CATLASTLINKTIME} - The time (as number of seconds since 1970) of the last link addition in the category.
{CATNAV} - Navigation path to the category (link to parents)
-- Optional parameters: nospace (removes spaces), bookmarkable (removes html) and trimset (trims off the nav separator character).
{CATTITLENAV} - The navigation, but without HTML, suitable for use in the language item title_categories.
-- Optional parameters: navseperator, trimseparator
{CATTYPEOPTIONS} - The options for selecting the category type.
{CATLINKSELECTOR} - Options usable for maping a dropdown selector of all links in the category -- quick jump to a link using a selector.
{CATID} - The id number of the category.
{CATNAME} - Name of the category.
{CATPARENT} - The id number of the category's parent category.
{CATDESCRIPTION} - Description of the category.
-- Optional parameter: number of characters.
{CATDESCRIPTIONSTRIPPED} - The description with HTML removed.
{CATCUSTOM} - The custom template this category uses if applicable.
{CATHEADERINFO} - This category's header info (meta tags, etc)
{CATTYPE} - The category type of this category.
{CATTOTALCOMMENTS} - The total number of comments for all links in the category.
{CATISBENETH[x]} - This will return a true or false depending on if the current category is somewhere beneath the target category x in your directory structure. x needs to be the id number of the category you want to know if this is below. (This is useful for some conditionals.)
{CATLEVELSDEEP} - The number of levels deep the category is, 0 being a main category, 1 a subcategory, etc.
{CATRANDOMLINK} - Returns link to a randomly selected link from the category.
-- Optional paramater: template. Defaults to <a href="{TRACKLINKURL}">{ARTICLETITLE}</a>
{CATSTATICNAME} - The static file name (with path if applicable) that would be generated for this category if you're using HTML generation.
{CATTYPETOTAL[typename]} - The total number of articles in the category which are of the type typename. For example, 17 for regular articles.
{CATVIEWS} - The number of unique views of the category.
{CATLASTTHREADID} - The id of the most recently posted to thread in the category.
{CATLASTHREADTITLE} - The title of the most recently posted to thread in the category.
{CATLASTPOSTERID} - The id of the last poster in the most recently posted to thread in the category.
{CATLASTPOSTERNAME} - The name of the last poster in the most recently posted to thread in the category.
{CATLASTCOMMENTDATE} - The date/time of the most recent comment posted in the category.
{CATCHECKED[field <,> value]} - Test whether a checkbox field is checked for the specified value (if only one value, you can skip the value).
{CATTOPLEVELID} - The id of the top level ancestor of the category (if the category is at the top level, then its own id).
{CATNUMBER} - The position of the category's appearance in the category articles.
{NUMBER} and {LETTER} can also be used with categories to display the order of their appearance. Using {NUMBER} they'll be numbered from 1 on up, using {LETTER} they'll be labeled from a to z.
To show the total of each type within a category while on the display articles page, use {REGULARTOTAL}, {OTHERTYPETOTAL} etc. Elsewhere use CATTYPETOTAL as explained above.
To show the moderators of a category, use
When you want your category variable to be for the category page being viewed, even when you're in a smaller category scope (such as a toplist or similar categories), use {THISCAT instead of {CAT.
{CATHASNEWBOOL} - A true/false for use in conditionals to replace {CATHASNEW}.
{CATADMIN} - If viewer can edit category, returns the edit article for it... otherwise, empty.
{CATNUMSUBCATS} - The number of subcategories in the category
{CATNUMSUBCATSALL} - The number of subcategories including personal link lists if applicable.
{CATNUMLINKS} - Number of links in the category plus all its subcategories.
{CATLINKSHERE} - Number of links in the category excluding subcategories.
{CATSUBCATS} - HTML for displaying the subcategories of the category.
-- Optional parameters: html to use for each category, maximum number to show. limits list to 5.
{CATPARENTNAME} - The name of this category's parent category.
{CATALIASEDIN} - A list of secondary locations of the category.
{CATORIGCATNAME} - The name of the primary category of an alias, otherwise just the category name.
{CATORIGCATURL} - The url of the primary category of an alias, otherwise just the category url.
{CATNUMBERRELATED} - The number of categories related to this category.
{CATDATE} - Date on which the category was added.
{CATLASTEDITDATE} - Date on which the category was last edited.
{CATLASTLINKDATE} - The date of the last link addition in the category.
{CATLASTLINKTIME} - The time (as number of seconds since 1970) of the last link addition in the category.
{CATNAV} - Navigation path to the category (link to parents)
-- Optional parameters: nospace (removes spaces), bookmarkable (removes html) and trimset (trims off the nav separator character).
{CATTITLENAV} - The navigation, but without HTML, suitable for use in the language item title_categories.
-- Optional parameters: navseperator, trimseparator
{CATTYPEOPTIONS} - The options for selecting the category type.
{CATLINKSELECTOR} - Options usable for maping a dropdown selector of all links in the category -- quick jump to a link using a selector.
{CATID} - The id number of the category.
{CATNAME} - Name of the category.
{CATPARENT} - The id number of the category's parent category.
{CATDESCRIPTION} - Description of the category.
-- Optional parameter: number of characters.
{CATDESCRIPTIONSTRIPPED} - The description with HTML removed.
{CATCUSTOM} - The custom template this category uses if applicable.
{CATHEADERINFO} - This category's header info (meta tags, etc)
{CATTYPE} - The category type of this category.
{CATTOTALCOMMENTS} - The total number of comments for all links in the category.
{CATISBENETH[x]} - This will return a true or false depending on if the current category is somewhere beneath the target category x in your directory structure. x needs to be the id number of the category you want to know if this is below. (This is useful for some conditionals.)
{CATLEVELSDEEP} - The number of levels deep the category is, 0 being a main category, 1 a subcategory, etc.
{CATRANDOMLINK} - Returns link to a randomly selected link from the category.
-- Optional paramater: template. Defaults to <a href="{TRACKLINKURL}">{ARTICLETITLE}</a>
{CATSTATICNAME} - The static file name (with path if applicable) that would be generated for this category if you're using HTML generation.
{CATTYPETOTAL[typename]} - The total number of articles in the category which are of the type typename. For example, 17 for regular articles.
{CATVIEWS} - The number of unique views of the category.
{CATLASTTHREADID} - The id of the most recently posted to thread in the category.
{CATLASTHREADTITLE} - The title of the most recently posted to thread in the category.
{CATLASTPOSTERID} - The id of the last poster in the most recently posted to thread in the category.
{CATLASTPOSTERNAME} - The name of the last poster in the most recently posted to thread in the category.
{CATLASTCOMMENTDATE} - The date/time of the most recent comment posted in the category.
{CATCHECKED[field <,> value]} - Test whether a checkbox field is checked for the specified value (if only one value, you can skip the value).
{CATTOPLEVELID} - The id of the top level ancestor of the category (if the category is at the top level, then its own id).
{CATNUMBER} - The position of the category's appearance in the category articles.
{NUMBER} and {LETTER} can also be used with categories to display the order of their appearance. Using {NUMBER} they'll be numbered from 1 on up, using {LETTER} they'll be labeled from a to z.
To show the total of each type within a category while on the display articles page, use {REGULARTOTAL}, {OTHERTYPETOTAL} etc. Elsewhere use CATTYPETOTAL as explained above.
To show the moderators of a category, use
<IF {CATHASMODERATORS}><!-- BEGIN MODERATORS --><a href="memberlist.php?action=profile&id={MEMBERID}" class="{MEMBERGROUPNAMESTYLE}">{MEMBERNAME}</a >,
<!-- END MODERATORS --></IF>
<!-- END MODERATORS --></IF>
When you want your category variable to be for the category page being viewed, even when you're in a smaller category scope (such as a toplist or similar categories), use {THISCAT instead of {CAT.
Rating:
3.33/5 based on 3 votes. The median rating is 3.
Submitted: 09/25/03 (Edited 11/04/09)
Description: Summary of each category template variable.
Views:
4545 views. Averaging 2 views per day.
In the most recent 30 day period, there've been 9 views.

Print
E-Mail