<commit_before>{* $Header$ *}

{if $feature_calendar eq 'y'}
{if !isset($tpl_module_title)}
	{if $nonums eq 'y'}
		{eval var="{tr}Upcoming `$module_rows` events{/tr}" assign="tpl_module_title"}
	{else}
		{eval var="{tr}Upcoming events{/tr}" assign="tpl_module_title"}
	{/if}
{/if}
	{tikimodule title=$tpl_module_title name="upcoming_events" flip=$module_params.flip decorations=$module_params.decorations}
   		<table  border="0" cellpadding="0" cellspacing="0">
		{section name=ix loop=$modUpcomingEvents}
		<tr>
			{if $nonums != 'y'}
				<td class="module" valign="top">{$smarty.section.ix.index_next})</td>
			{/if}
			<td class="module">&nbsp;{$modUpcomingEvents[ix].start|tiki_short_datetime}<br />
				<a class="linkmodule" href="tiki-calendar.php?editmode=details&calitemId={$modUpcomingEvents[ix].calitemId}" title="{$modUpcomingEvents[ix].lastModif|tiki_short_datetime}, {tr}by{/tr} {if $modUpcomingEvents[ix].user ne ''}{$modUpcomingEvents[ix].user}{else}{tr}Anonymous{/tr}{/if}">
					{if $maxlen > 0}{* 0 is default value for maxlen eq to 'no truncate' *}
						{$modUpcomingEvents[ix].name|truncate:$maxlen:"...":true}
					{else}
						{$modUpcomingEvents[ix].name}
					{/if}
				</a>
			</td>
		</tr>
    {/section}
	</table>
	{/tikimodule}
{/if}<commit_msg>[MOD] upcoming_events module: new param 'date_format' to be able to change the date format (e.g. 'date_format=%A %e %B' for long date without year and hours) + new params 'cellpadding' and 'cellspacing' to control those table attributes for the module main table. Now, the module displays only once the same date (and all events with the same date are listed below this date). Note that date_format will have an impact on this, because it compares date after applying date_format (i.e. using a date_format without hours will group events by day). + wider use of the userlink modifier.<commit_after>{* $Header$ *}

{if $feature_calendar eq 'y'}
{if !isset($tpl_module_title)}
	{if $nonums eq 'y'}
		{eval var="{tr}Upcoming `$module_rows` events{/tr}" assign="tpl_module_title"}
	{else}
		{eval var="{tr}Upcoming events{/tr}" assign="tpl_module_title"}
	{/if}
{/if}
{tikimodule title=$tpl_module_title name="upcoming_events" flip=$module_params.flip decorations=$module_params.decorations}
	{if isset($module_params.date_format)}
		{assign var=date_format value=$module_params.date_format}
	{else}
		{assign var=date_format value="$short_date_format $short_time_format"}
	{/if}
	<table border="0" cellpadding="{if isset($module_params.cellpadding)}{$module_params.cellpadding}{else}0{/if}" cellspacing="{if isset($module_params.cellspacing)}{$module_params.cellspacing}{else}0{/if}">
	{assign var=old_date_value value=""}
	{section name=ix loop=$modUpcomingEvents}
		{assign var=date_value value=$modUpcomingEvents[ix].start|tiki_date_format:$date_format}
		{if $date_value neq $old_date_value}
			{if $smarty.section.ix.first}<tr>{else}</td></tr><tr>{/if}
			{if $nonums != 'y'}<td class="module" valign="top">{$smarty.section.ix.index_next})&nbsp;</td>{/if}
			<td class="module">{if $date_value eq ''}&nbsp;{else}{$date_value}{/if}
		{/if}
				<br />&nbsp;
				<a class="linkmodule" href="tiki-calendar_edit_item.php?viewcalitemId={$modUpcomingEvents[ix].calitemId}" title="{if $module_params.tooltip_infos neq 'n'}{$modUpcomingEvents[ix].lastModif|tiki_short_datetime}, {tr}by{/tr} {if $modUpcomingEvents[ix].user ne ''}{$modUpcomingEvents[ix].user|userlink|strip_tags|trim}{else}{tr}Anonymous{/tr}{/if}{else}{tr}click to view{/tr}{/if}">
					{if $maxlen > 0}{* 0 is default value for maxlen eq to 'no truncate' *}
						{$modUpcomingEvents[ix].name|truncate:$maxlen:"...":true}
					{else}
						{$modUpcomingEvents[ix].name}
					{/if}
				</a>
		{assign var=old_date_value value=$date_value}
		{if $smarty.section.ix.last}
			</td>
		</tr>
		{/if}
	{/section}
	</table>
{/tikimodule}
{/if}
{'fraction_non_alphanumeric': 0.17674418604651163, 'fraction_numerical': 0.002583979328165375, 'mean_word_length': 5.8513274336283185, 'pattern_counts': {'":': 2, '<': 28, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6948409', 'n_tokens_mistral': 1517, 'n_tokens_neox': 1395, 'n_words': 289}