Parameter System

From TV-Browser Wiki
Revision as of 20:06, 17 June 2006 by Samv (talk | contribs) (Added link to german version)
Jump to: navigation, search

What is the "Parameter System"?

The Parameter System enables dynamic generated Text. This is used pass text-passages to create the EMails in the EMail-Plugin. In the Capture-Plugin it is used to pass the parameters to 3rd party applications like WinTV.

Assembly

The assembly of the Parameter System is quite simple. All text which is embedded by { and } will represent variables or function results.

For example the result of the following text will be:

The Title is {title}

when the name of the broadcast is "Hello, Spencer!"

The Title is Hello, Spencer!

You are also able to use functions to combine or split text.

For example:

The Title is {isset(original_title, title)}

in this case the original Title will be used, if this is not present the tilte of the broadcast is valid.

Also interleaving of functions or possible:

The Titel is {clean(isset(original_title, title))}

Now all special characters will be replaced by underscores "_" .

You can also use your own "Parameter-Text-BLocks":

The original Title is {isset(original_title, "not present!")}

Now the original title of the broadcast will be replaced by "not present" if it is not available

The original Title is not present!

The complete List of parameters and functions are placed in each Plugin you use. Why this? Because each Plugin can add functions and parameters.


Special Characters

If you want to use special characters like '\', '{' or '}' they have to be prefixed with a '\' (backslash).

This means:

Input Result
\\ \
\\\\ \\
\{ {
\} }