Name

iconlink — build a link around the icon for this set

Synopsis

use Wacs;
use Wacs::WacsUI;
scalar iconlink(...); 
 

Parameters

parameterdescription
typeset type value (I, V, etc)
setnoThe set number
srankThe set rank - P-Primary, S-Secondary, C-Continuation
sareaThe toplevel area of the set
scategoryThe middle level area of the set
sdirectoryThe lower level area of the set
sformatThe format of the file (JPG,MPG,WMV,etc)
modelThe model's name - used in the alt tag in the images
resizeWhether to resize or not - 0 is actual size, 1 is rescaled to standard size, 2 is rescaled to mini size
silentSet this to y or yes to suppress printed output
destloc

Which configuration variable or URL to use for location of link destination application - typically cgiurl for perl scripts, siteurl for php scripts, or wacsurl for wacs GUI elements (like glyphs, javascript files or stylesheets). If a full url starting http, it will be copied verbatim rather than looked up.

destappThe stem of the URL to link to around the icon, something like wacsindex/page, needs to include any parameter introducers like page or setid=
destext

The extension of the URL to link to, or null, ie .html or .php. From Wacs 0.9.0 onwards this can also be none to leave it empty.

prefer

Which icons to use for preference when both an official and a standard icon are available. Set prefer to "official" to use the official icon in the generated HTML. Introduced in Wacs 0.9.1, not available prior to that.

archiveThe name of the file to be linked to when offering a download link

Summary

The iconlink function displays the icon for a set at the requested size surrounded by an appropriate link to the set concerned. In WACS 0.9.1 it now returns the string that forms the link in the same style as contentlink and thumblink do. The default is still to print the output to standard out as well, but this can be suppressed with the silent option.

[Note]Note

It is a future direction to make silent output the default for this function, so it is strongly recommended that you specify the silent flag one way or the other whenever you're updating your code.

Availability

iconlink is available in both perl and php. The srank, sformat, silent and archive options are only available in 0.9.1 or later. The destloc, destapp and destext options are only available in 0.8.1 or later.