iconlink — build a link around the icon for this set
use Wacs;
use Wacs::WacsUI;
scalar iconlink( | ...) ; |
parameter | description |
---|---|
type | set type value (I, V, etc) |
setno | The set number |
srank | The set rank - P-Primary, S-Secondary, C-Continuation |
sarea | The toplevel area of the set |
scategory | The middle level area of the set |
sdirectory | The lower level area of the set |
sformat | The format of the file (JPG,MPG,WMV,etc) |
model | The model's name - used in the alt tag in the images |
resize | Whether to resize or not - 0 is actual size, 1 is rescaled to standard size, 2 is rescaled to mini size, 3 is rescaled to large size. (Support for 3 is added in WACS 1.0.0) |
silent | Set 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. |
destapp | The 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 |
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. |
archive | The name of the file to be linked to when offering a download link |
download | If set to y adds the download flag
to the generated link causing the video file to be downloaded rather than viewed
(for supported media types). |
The iconlink
function displays the icon for
a set at the requested size surrounded by an appropriate link to the
set concerned. Since 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 | |
---|---|
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. |