Procedural File: function.displaygreeting.php
Source Location: /Theme/plugins/function.displaygreeting.phpClasses:
Page Details:
Zikula Application FrameworkTags:
smarty_function_displaygreeting [line 57]
|
Smarty function to display a greeting to the user with the number of private messages received.
This function displays a welcome message: welcome and the number of private messages for a registered user or welcome and a signup link for an anonymous user.
Examples (with Admin having 5 messages total, 1 unread): <!--[displaygreeting]--> or <!--[displaygreeting displayMsgs=true]--> Returns Welcome [username]! You have 1 new message. or Welcome [username]! You have no new messages.
<!--[displaygreeting class="welcome" displayMsgs=false]--> Returns Welcome [username]! styled with the class "welcome"
<!--[displaygreeting multiline=true displayAllMsgs=true]--> Returns Welcome [username]! You have 5 private messages, 1 unread.
<!--[displaygreeting displayAllMsgs=false class="messages"]--> Returns Welcome [username]! You have 1 unread message. or Welcome [username]! You have no unread messages.
If not logged in, returns Unregistered? <a href="user.php">Register for a user account</a>.
Tags:
Parameters
| array | $params | All attributes passed to this function from the template |
| object | &$smarty | Reference to the Smarty object |
| string | 2 | class CSS class for string |
| string | 3 | displayMsgs Set to false (or any value) to turn off display of Private Messages |
| string | 4 | displayAllMsgs Set to false (or any value) to only display unread Messages |
| string | 5 | multiline Set to true to show Welcome and Messages on two lines (with Break). |
