[%$foo|css%]
Creates a link to a given path to a CSS-Datei.
[%"default.css"|css%]
Output:
<link rel="stylesheet" type="text/css" href="default.css">
[%$foo|date%]
From a variable containing an UTC, this modifier creates a JavaScript statement, that outputs the current time using the correct time zone of the client browser.
Template created: [%$CTIME|date%]<br>
Template modified: [%$MTIME|date%]<br>
Template last accessed: [%$ATIME|date%]<br>
Output:
Template created: 1/12/2006
Template modified: 19/1/2007
Template last accessed 21/1/2007
[%$foo|embeddedTags%]
This modifier replaces all embedded tags in a variable by the appropriate tags, as prescribed by YANA's syntax.
$foo = "Text [b]Text[/b] Text"
Output:
Text <span style="font-weight: bold;">Text</span> Text
[%$foo|href%]
Generates a link to the file index.php including all required parameters. The string $foo is appended to the end of the URL The URL will automatically be embraced by double quotation marks (").
<a href=[%"action=myplugin_new_entry"|href%]>new entry</a>
Output:
<a href="index.php?sessid=foo&id=example&action=myplugin_new_entry">new entry</a>
[%$foo|smilies%]
Replaces all icon codes in a variable by the appropriate icons.
$foo = "Text :example: Text"
[%$foo|smilies%]
Output:
Text
<img border="0" hspace="2"
src="common_files/smilies/example.gif">
Text
[%$foo|url%]
Generates a link, just as the modifier "href", but outputs an absolute path without quotation marks.
<meta http-equiv="Refresh" content="2; URL=[%"action=myplugin_new_entry"|url%]">
Output:
<meta http-equiv="Refresh" content="2;
URL=http://.../index.php?sessid=foo&id=example&action=myplugin_new_entry">
Attention! The following will not work: <a href="[%"action=foo"|url%]">link</a>
Result: <a href="skins/default/http://.../index.php?...">link</a>
[%$foo|urlEncode%]
Encodes a text so that can safely be used as parameters in a URL. Therefore it will use the PHP function urlencode()
.
<a href="?bar1=foo1&bar2=[%$foo|urlEncode%]">
Output:
<a href="?bar1=foo1&bar2=foo%20bar">
Thomas Meyer, www.yanaframework.net