Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs for page function.displaygreeting.php

Procedural File: function.displaygreeting.php

Source Location: /Theme/plugins/function.displaygreeting.php

Classes:



Page Details:

Zikula Application Framework



Tags:

version:  $Id: function.displaygreeting.php 24383 2008-06-12 14:15:02Z markwest $
copyright:  (c) 2004, Zikula Development Team
link:  http://www.zikula.org
license:  GNU/GPL








smarty_function_displaygreeting [line 57]

string smarty_function_displaygreeting( array $params, object &$smarty, string 2, string 3, string 4, string 5)

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:

return:  the welcome message
author:  Mark West, Martin Stær Andersen
see:  function.displaygreeting.php::smarty_function_displaygreeting()
since:  19/10/2003


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).
[ Top ]


Packages:

Files:

Classes: