1{* $Id$ *}
2
3{tikimodule error="{if isset($module_params.error)}{$module_params.error}{/if}" title=$tpl_module_title name="last_visitors" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle}
4	{if ($nonums eq 'y') or ($showavatars eq 'y')}<ul style="padding-left:0; list-style:none;">{else}<ol>{/if}
5		{if !$user}
6			<li>
7				{if $showavatars eq 'y'}
8					<table class="table">
9						<tr class="odd">
10							<td width="50">
11								<img src="img/icons/gradient.gif" width="48" height="48" alt="{tr}No profile picture{/tr}">
12							</td>
13							<td>
14				{/if}
15				{if $prefs.allowRegister eq 'y'}
16							<a class="linkmodule" href="tiki-register.php{if !empty($prefs.registerKey)}?key={$prefs.registerKey|escape:'url'}{/if}" title="{tr}Register{/tr}">{/if}{tr}You{/tr}{if $prefs.allowRegister eq 'y'}</a>
17				{/if}
18							<div align="right">{$currentLogin|tiki_short_datetime}</div>
19				{if $showavatars eq 'y'}
20							</td>
21						</tr>
22					</table>
23				{/if}
24			</li>
25		{/if}
26
27		{capture assign='noAvatar'}<img src="img/icons/gradient.gif" width="48" height="48" alt="{tr}No profile picture{/tr}">{/capture}
28		{foreach from=$modLastVisitors key=key item=item}
29			<li>
30				{if $showavatars eq 'y'}
31					<table class="table">
32						<tr class="{cycle advance=true}">
33							<td width="50">
34								{$item.user|avatarize|default:$noAvatar}
35							</td>
36						<td>
37				{/if}
38				{if $maxlen > 0}{* 0 is default value for maxlen eq to 'no truncate' *}
39					{$ustring = "{$item.user|userlink:'userlink':'not_set':'':$maxlen}"}
40				{else}
41					{$ustring = "{$item.user|userlink}"}
42				{/if}
43				{if $ustring|substring:0:2 == '<a'}
44					{$ustring}
45				{else}
46					<a class="tips" href="tiki-user_information.php?view_user={$item.user|escape:"url"}" title="{tr}User:{/tr}{$item.user}">
47						{$ustring}
48					</a>
49				{/if}
50				{if $nodate neq 'y'}
51					{if $item.currentLogin}
52						<div class="date">{$item.currentLogin|tiki_short_datetime}</div>
53					{else}
54						<div class="date">{tr}Never logged in{/tr}</div>
55					{/if}
56				{/if}
57				{if $showavatars eq 'y'}
58							</td>
59						</tr>
60					</table>
61				{/if}
62			</li>
63		{/foreach}
64	{if ($nonums eq 'y') or ($showavatars eq 'y')}</ul>{else}</ol>{/if}
65{/tikimodule}
66