History of function_biticon
Version 13 | Current version | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
biticon is availible to smarty templates to support two things:
biticon is used in your templates to replace the hard coded image tags that are used for icons through out Tiki, very similar to an image tag in usage. The image file used for the icon is selected by searching a defined set of folders including the current icon theme from the admin-general panel, the current site theme, and a default set of core Tiki icons. Each icon is treated seperately, so icon themes or site themes can overide only the individual icons they want to change. Tikicon will automatically fall back to the defaults if there is no override. Search PathThis is the search path used by biticon. The 1st match found is used.
If the file is not found in any of these locations an image tage with a src of broken.<ipackage>/<iname> will be output. Parameters
note: to use variables within parameters you will have to 'escape' the variables with '`' These are the only four attributes specific to biticon. Any other attributes, such as class above, are pased through to the HTML tag unaltered. Sample
If you want to use variables within biticon parameters, use this notation:
If your flag icons are stored in users/icons/flags, use this:
It works much like the template override system that allows themes. So the above command might generate: if the icon theme is loveandkisses and it overides that icon.
if the site theme is classicarcade and it overides that icon.
if the neithier the icon theme or site theme override the admin icons.
See also
| The function biticon is used in Smarty templates. It allows icons to be overidden in the same way as templates can be over ridden. This allows a site to mix and match themes with icon sets for a more customized look with less effort. Biticon generates all (accessible) HTML needed. It replaces hard coded image tags. The image file used for the icon is selected by searching a defined set of folders: the current icon theme set by the admin, the current custom style, a default set of core icons, and more. If the file is not found in any of these locations, the src-attribute of the image is set to "broken.path/icon". Parameters
Other attributes, such as class, are passed through to the HTML tag unaltered. To use variables within parameters, escape the variables with back ticks '`' Examples
If you want to use variables within biticon parameters, use this notation:
If your flag icons are stored in users/icons/flags, use this:
It works much like the template override system that allows themes. So the above command might generate: if the icon theme is loveandkisses and it overides that icon.
if the site theme is classicarcade and it overides that icon.
if neither the icon theme or site theme override the admin icons.
|