BrowseAmp manual
version

 

back
2.2 HTML tags
BrowseAmp -> creating skins -> HTML tags

Any information provided by Winamp can be displayed with HTML-Tags. These little things are placed in any skin-file wherever you want. The file is parsed by BrowseAmp and the tags are replaced with the specific information the tags describe. Just try it!

Tagname syntax
<#Tagname parameter1=content1 parameter2="some content with blanks">

Some hints how to use the tags

If a parameter contains blanks you need some " "

Attention: Use &lt; and &gt; instead of < or >. If you don't replace the "<>" you could get access violations! The &lt; or &gt; is replaced with < or > by the parser so you get the correct character for your HTML output.

Tagname is NOT case sensitive. <#date> or <#DaTe> will do the same.

Example 1
<#Channels on_stereo="&lt;img src='gfx/stereo.gif'&gt;" on_mono="&lt;img src='gfx/mono.gif'&gt;">

Will be replaced with <img src='gfx/stereo.gif'> if the track has 2 channels.

Example 2
<img src="gfx/<#Channels on_stereo=stereo.gif on_mono=mono.gif>">

Does the same! I think you got the point.

 

adding a file at the tag position

<#include file=filename>

If you want to use some code snippets in more than one skin/page you can save this piece of code in a separate file and include it wherever you want. The given file is inserted and parsed at the current position.

Parameter
file: required, specifies a path/filename to include.

Example
<#include file=templates/playlist_template2.html>

 

URL encode a tag

<#tagname urlencoded=true>

Most XML parser really hate special characters. So you can URL-encode every tag. Just add this parameter to the html-tag.
You don't need to set its value to "true". Just don't leave it blank.

Examples
<#CurrentBrowserDirectory urlencoded=true>
<#CurrentBrowserDirectory urlencoded=1>
<#CurrentBrowserDirectory urlencoded=yes>
<#CurrentBrowserDirectory urlencoded=yeah>

does always the same ;-)

 

encode result to UFT-8

<#tagname utf8=true>

Some XML parsers are not even satisfied with the urlencoded strings (especially the Flash XML component). So I added a new modifier you can use to encode the result to UTF-8. Just add this parameter to the html-tag. Read more.

Examples
<#Metadata field=artist utf8=1>

 

escape some special characters

<#tagname escape=true>

This parameter makes BrowseAmp replace the \, ' and " with their JavaScript/HTML safe equivalent \\, \' and &quot;. Feel free to combine it with the urlencoded parameter. Just add this parameter to the html-tag. You don't need to set its value to "true". Just don't leave it blank.

Examples
<#SongTitle escape=true>
<#SongTitle escape=1>
<#SongTitle escape=yes>
<#SongTitle escape=yeah>

does always the same ;-)

 

limit tag output

<#tagname maxlength=#>

To prevent long strings to scramble you layout you have the option to set the length of a tag. All chars after maxlength are cut off.

Examples
<#SongTitle maxlength=32>

continue with global player values

last change: 2008-04-13 , Henry Thasler
www.browseamp.com