Documentation
Helper
The helper plugin gives you access to two handy functions for language and time.
The helper plugin's slug is helper, so it can be used like so:
{pyro:helper:function}
Functions
{pyro:helper:lang}
Displays a language line in the language of the current language.
Attributes
| Name | Default | Required | Description |
|---|---|---|---|
| line | None | Yes | The slug for the language line you want to display. |
Example:
{pyro:helper:lang line="error_message"}
Error!
{pyro:helper:date}
Displays a formatted date for the current time or a timestamp you specify.
Attributes
| Name | Default | Required | Description |
|---|---|---|---|
| format | None | Yes | Format for the output. This plugin uses PHP's date or strftime formatting syntax. |
| timestamp | Current Time | No | UNIX timestamp to use instead of the current date. |
Example:
{pyro:helper:date format="Y"}
2011
{pyro:helper:gravatar}
Displays an avatar using gravatar API.
Attributes
| Name | Default | Required | Description |
|---|---|---|---|
| None | Yes | The Email address used to generate the gravatar. | |
| size | 50 | No | The size of the gravatar in pixels. A size of 50 would return a gravatar with a width and height of 50px. |
| rating | g | No | The rating of the gravatar. Possible values are g, pg, r or x. |
| url_only* | false | No | *Deprecated in v1.3.0 Replaced by url-only |
| url-only | false | No | true or false. Set this to TRUE if you want the plugin to only return the gravatar URL instead of the HTML. |
Example:
{pyro:helper:gravatar email="user@example.com" size="20"}
<img src='http://www.gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af?s=20&r=g' alt='Gravatar' class='gravatar' />
