tqExpert Help


The downloadVersions tqTag is used together with the downloads tqTag to support versions of files that can be downloaded by site visitors.  A tqAdmin (with suitable permissions) must specify at least one version.

downloadVersions - Syntax

<tqtag name="version2type="downloadVersionsmaxItems="999" [pageMainDownload] [pageMainDownloadVersion] >

downloadVersions - Parameters

Parameter Name Type Mandatory Strict | Transitional Case Sensitive Description
type Text + S + must be doanloadVersions
name Text + S + should be unique tqtag name in the template. no spaces/commas/single quote/double quotes allowed
title Alpha Numeric + S - The title of the tqtag. This title will be presented only at the back-end system.  no spaces/commas/single quote/double quotes allowed
maxItems Number - S   The max number of file versions to display in a page
pageMainDownload   - T + pageMainDownload is used to display the file received in the url.
pageMainDownloadVersion   - T + pageMainDownloadVersion is used to display the file version received via the url

downloadVersions - Local Variables

Name Type Size Description
addDate datetime   The datetime the version was created or last modified. can be formated using @addDate@df:[format]!
adminID number 5 The ezadmin3 user who created the version download file (this is not the user who uploaded the different versions of the file)
avgRate number 5 Average rating of all raters socres for this version
content text 65535  File version content
downloadID number 5 The file the current version file belongs to
fileSize number 5 The file size
id number 5 Database version id 
isLastVersion text 1 y | n
lastDownload datetime   The datetime this version was last downloaded. can be formated using @addDate@df:[format]!
lastVersionID number 5 Database id for last verion aviliable 
linkToFile text ~100 Url to current file version - start the download
linkToLastVersion text ~100 Url link to last version
linkToRate text ~50 Url to rate the version. (e.g @linkToRate@4 means rate this version with the score 4)
linkToRateAjax text ~100 Ajax Url to rate the current version (e.g @linkToRateAjax@4 means rate this version with the score 4)
linkToVersion text ~100 Url to version page
linkToVersionFile text ~100 Shortcut to linkToFile
mainPic text 65535 Current version screenshot
numDownloads number 6 Number of time this version was downloaded
numRaters number 6 Number of users rated this version 
numViews number 6 Number of time the current version viewed
showOrder int 5 Represent the order number of the version in the list of versions, this number is not a running number.
sumRaters number 6 the total sum of the raters scores. to get average rating use @sumRaters@ / @numRaters@
versionName text 100 The name / title of the version

downloadVersions - Examples

Example 1 - basic use of download versions
<tqtag name="version2type="downloadVersionsmaxItems="999" >
    <a href="@linkToVersion@">@versionName@</a><br />

Example 2- use of downloads version in current downloadVersion page
<tqtag name="version0type="downloadVersionsmaxItems="1pageMainDownload pageMainDownloadVersion >
            <li>Creation Date:@addDate@df:%d/%m/%Y!</li>
            <li>Creator / Author :@creator@</li>
            <li>File Size:@fileSize@MB</li>
            <li>Last Download:@lastDownload@df:%d/%m/%Y!</li>
            <li># of downloads:@numDownloads@</li>

downloadVersions - tqoptions

Within the downloadVersions tqtag you can use the following tqoptions: head, if, lastItemInRow, tail.

downloadVersions - Templates

The templates below implement this tqTag. After you click a link, use your browser commands to view the page source.

User Notes

  Add Note

Topic: downloadVersions