User Tools

Site Tools


columns_ui:config:global_variables

This is an old revision of the document!


Global variables

About

Global variables were created as a way of speeding up playlist formatting, by separating the parts of formatting that is common to all your columns, and only processing it once instead of for each column. It works by defining variables which you can access in your column display strings.

Note: Information on the legacy format for global variables can be viewed here.

Global variables string

This string, in the globals configuration page, is where you define your variables.

Setting variables

Using TAGZ

You can set variables in your global variables string using the set_global function. The syntax is as follows:

$set_global(variable name,variable value)

Note: You can only define globals in the global string - i.e. you cannot access defined globals.

Using TagScript

In the script like language, it looks a bit different:

set_global(variable name,variable value);

where variable name and variable value are strings, enclosed in quotation marks.

Accessing global variables

Using TAGZ

You can access global variables in your display and color strings using the get_global function. The syntax is as follows:

$get_global(variable name)

where

  • variable name is the name of the variable as defined in the set_global function call
  • the return value is the variable value

Using TagScript

The syntax to access variable name is as follows:

get_global(variable name);

where

  • variable name is the name of the variable as defined in the set_global function call, and is enclosed in quotation marks
  • the return value is the variable value

Remember, to print the returned value of the function, use the print() function.

columns_ui/config/global_variables.1123786129.txt.gz · Last modified: 2007/08/25 22:58 (external edit) · Currently locked by: 18.236.230.40