Search:
tqExpert Help
print
|
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pic

When you want to enable tqAdmins to upload photos, you use the pic tqTag.

pic - Syntax

<tqtag name="pic0type="pic" >
...
</tqtag>

pic - Parameters

Parameter Name Type Mandatory Strict | Transitional Case Sensitive Description
type Text + S + must be pic
name Text + S + should be unique tqtag name in the template. no spaces/commas/single quote/double quotes allowed
maxItems Number - S  
 

pic - Local Variables

Name Type Size Description
addDate datetime   The datetime the pic was uploaded. can be formated using 2009-01-09 15:01:58df:[format]!
albumID number 12 Album database id
albumName text 30 Album name
avgRate nubmer 6 Picture avarage rating
bigPic1
content text 65535 Picture content
id number 12 Picutre databse id
link text ~100 Link to big picutre
linkAddPicToFav
linkAddPicToFavAjax
linkRemovePicFromFav
linkRemovePicFromFavAjax
linkToAlbum text ~100 Link to the album page where the pic belongs
linkToRate text ~100 Url to rate the pic. (e.g mode?mode=rateContentItem&itemToRate=544 means rate this pic with the score 4)
linkToRateAjax text ~100 Ajax Url to rate the current pic (e.g @linkToRateAjax@4 means rate this pic with the score 4)
mainPic text 200 Url to the big pic
mainPicFileName text ~100 Big picture file name
mainPicFullPath text ~100 Big picture without the http://<domain>/
mainPicHeight
mainPicWidth
numPicsInAlbum number 5 Number of pics in the album that this pic belongs to
numRaters number 5 Number of users rated this pic
numResponses number 5 Number of talkbacks to this picture
numViews number 8 Number of time the current picture viewed
picInFavList
picPositionInAlbum number 5 The position of current picture in it's album. a running number between 1 and n
showOrder number 5 Represent the order number of the picture in the list of pictures in the album, this number is not a running number.
smallPic text 200 Url to the small pic
smallPicFileName text ~100 Small picture file name
smallPicFullPath text ~100 Small picture without the http://<domain>/
sumRaters number 8 The total sum of the raters scores. to get average rating use /
title number 30 Picture title / caption

pic - Examples

Example 1 - basic use of pic tqtag
<tqtag name="pic0type="picmaxItems="1" >
    <h2>@albumName@</h2>
    <div><a href="@linkToAlbum@&slideShow=1">Link to slide show</a></div>
    <div>
     <tqoption type="nextPic" alternative0="">{!<a href="@linkToNextPic@">Next Pic</a>!}0</tqoption>
     <span>file @picPositionInAlbum@ of @numPicsInAlbum@</span>
     <tqoption type="prevPic" alternative0="">{!<a href="@linkToPrevPic@">Prev Pic</a>!}0</tqoption>
     </div>
     <div>
         <img src="@mainPic@" width="400" height="299" alt="" onclick="window.open('@mainPic@','pop','location=0,status=0,scrollbars=0,width=600,height=450')" />
     </div>
    </div>
</tqtag>



Example 2 - use of pic tqtag with image rating
<tqtag name="pic0type="picmaxItems="1" >
    <h2>@albumName@</h2>
    <div><a href="@linkToAlbum@&slideShow=1">Link to slide show</a></div>
    <div>
     <tqoption type="nextPic" alternative0="">{!<a href="@linkToNextPic@">Next Pic</a>!}0</tqoption>
     <span>file @picPositionInAlbum@ of @numPicsInAlbum@</span>
     <tqoption type="prevPic" alternative0="">{!<a href="@linkToPrevPic@">Prev Pic</a>!}0</tqoption>
     </div>
     <div>
         <img src="@mainPic@" width="400" height="299" alt="" onclick="window.open('@mainPic@','pop','location=0,status=0,scrollbars=0,width=600,height=450')" />
     </div>
    </div>
    <div id="ranking">
        <span>rate this image</span>
        <div>
        <a href="javascript:reloadPage('@linkToRateAjax@1','','ranking1');changeText('ranking','text after rating');">1</a>
        <a href="javascript:reloadPage('@linkToRateAjax@2','','ranking1');changeText('ranking','text after rating');">2</a>
        <a href="javascript:reloadPage('@linkToRateAjax@3','','ranking1');changeText('ranking','text after rating');">3</a>
        <a href="javascript:reloadPage('@linkToRateAjax@4','','ranking1');changeText('ranking','text after rating');">4</a>
        <a href="javascript:reloadPage('@linkToRateAjax@5','','ranking1');changeText('ranking','text after rating');">5</a>
    </div>
    <span>current rating (by @numRaters@ users)</span>: @avgRate@
</tqtag>

pic - tqOptions

With the pic tqtag, you can use the following tqoptions: if, nextPic, prevPic.

pic - 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: pic