Made calendar block independent of other calendar block

This commit is contained in:
Marc Alexander
2011-04-17 12:44:36 +02:00
parent b17a77d152
commit 337adc1bbf
3 changed files with 117 additions and 92 deletions

View File

@@ -52,6 +52,11 @@ class portal_calendar_module
* file must be in "adm/style/portal/" * file must be in "adm/style/portal/"
*/ */
var $custom_acp_tpl = 'acp_portal_calendar'; var $custom_acp_tpl = 'acp_portal_calendar';
/**
* additional variables
*/
var $mini_cal_fdow;
function get_template_side($module_id) function get_template_side($module_id)
{ {
@@ -62,18 +67,18 @@ class portal_calendar_module
// 0 = Sunday first - 1 = Monday first. ;-) // 0 = Sunday first - 1 = Monday first. ;-)
if ($config['board3_sunday_first_' . $module_id]) if ($config['board3_sunday_first_' . $module_id])
{ {
define('MINI_CAL_FDOW', 0); $this->mini_cal_fdow = 0;
} }
else else
{ {
define('MINI_CAL_FDOW', 1); $this->mini_cal_fdow = 1;
} }
// get the calendar month // get the calendar month
$mini_cal_month = 0; $mini_cal_month = 0;
if(isset($_GET['m']) || isset($_POST['m'])) if(isset($_GET['m' . $module_id]) || isset($_POST['m' . $module_id]))
{ {
$mini_cal_month = request_var('m', 0); $mini_cal_month = request_var('m' . $module_id, 0);
} }
// initialise some variables // initialise some variables
@@ -81,19 +86,43 @@ class portal_calendar_module
$mini_cal_today = date('Ymd', time() + $user->timezone + $user->dst - date('Z')); $mini_cal_today = date('Ymd', time() + $user->timezone + $user->dst - date('Z'));
$s_cal_month = ($mini_cal_month != 0) ? $mini_cal_month . ' month' : $mini_cal_today; $s_cal_month = ($mini_cal_month != 0) ? $mini_cal_month . ' month' : $mini_cal_today;
$this->getMonth($s_cal_month); $this->getMonth($s_cal_month);
$mini_cal_count = MINI_CAL_FDOW; $mini_cal_count = $this->mini_cal_fdow;
$mini_cal_this_year = $this->dateYYYY; $mini_cal_this_year = $this->dateYYYY;
$mini_cal_this_month = $this->dateMM; $mini_cal_this_month = $this->dateMM;
$mini_cal_this_day = $this->dateDD; $mini_cal_this_day = $this->dateDD;
$mini_cal_month_days = $this->daysMonth; $mini_cal_month_days = $this->daysMonth;
// output our general calendar bits
$down = $mini_cal_month - 1;
$up = $mini_cal_month + 1;
$prev_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m$module_id=$down#minical$module_id") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_left_arrow.png' . '" title="' . $user->lang['VIEW_PREVIOUS_MONTH'] . '" height="16" width="16" alt="&lt;&lt;" /></a>';
$next_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m$module_id=$up#minical$module_id") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_right_arrow.png' . '" title="' . $user->lang['VIEW_NEXT_MONTH'] . '" height="16" width="16" alt="&gt;&gt;" /></a>';
$template->assign_block_vars('minical', array(
'S_SUNDAY_FIRST' => ($config['board3_sunday_first_' . $module_id]) ? true : false,
'L_MINI_CAL_MONTH' => (($config['board3_long_month_' . $module_id]) ? $user->lang['mini_cal']['long_month'][$this->day[0][1]] : $user->lang['mini_cal']['month'][$this->day[0][1]]) . " " . $this->day[0][2],
'L_MINI_CAL_SUN' => '<span style="color: ' . $config['board3_calendar_sunday_color_' . $module_id] . ';">' . $user->lang['mini_cal']['day'][1] . '</span>',
'L_MINI_CAL_MON' => $user->lang['mini_cal']['day'][2],
'L_MINI_CAL_TUE' => $user->lang['mini_cal']['day'][3],
'L_MINI_CAL_WED' => $user->lang['mini_cal']['day'][4],
'L_MINI_CAL_THU' => $user->lang['mini_cal']['day'][5],
'L_MINI_CAL_FRI' => $user->lang['mini_cal']['day'][6],
'L_MINI_CAL_SAT' => $user->lang['mini_cal']['day'][7],
'U_PREV_MONTH' => $prev_month,
'U_NEXT_MONTH' => $next_month,
'S_DISPLAY_EVENTS' => ($config['board3_display_events_' . $module_id]) ? true : false,
'MODULE_ID' => $module_id,
));
// output the days for the current month // output the days for the current month
for($i=0; $i < $mini_cal_month_days;) for($i=0; $i < $mini_cal_month_days;)
{ {
// is this the first day of the week? // is this the first day of the week?
if($mini_cal_count == MINI_CAL_FDOW) if($mini_cal_count == $this->mini_cal_fdow)
{ {
$template->assign_block_vars('mini_cal_row', array()); $template->assign_block_vars('minical.mini_cal_row', array(
'MODULE_ID' => $module_id,
));
} }
// is this a valid weekday? // is this a valid weekday?
@@ -104,7 +133,7 @@ class portal_calendar_module
$d_mini_cal_today = $mini_cal_this_year . (($mini_cal_this_month <= 9) ? '0' . $mini_cal_this_month : $mini_cal_this_month) . (($mini_cal_this_day <= 9) ? '0' . $mini_cal_this_day : $mini_cal_this_day); $d_mini_cal_today = $mini_cal_this_year . (($mini_cal_this_month <= 9) ? '0' . $mini_cal_this_month : $mini_cal_this_month) . (($mini_cal_this_day <= 9) ? '0' . $mini_cal_this_day : $mini_cal_this_day);
$mini_cal_day = ($mini_cal_today == $d_mini_cal_today) ? '<span style="font-weight: bold; color: ' . $config['board3_calendar_today_color_' . $module_id] . ';">' . $mini_cal_this_day . '</span>' : $mini_cal_this_day; $mini_cal_day = ($mini_cal_today == $d_mini_cal_today) ? '<span style="font-weight: bold; color: ' . $config['board3_calendar_today_color_' . $module_id] . ';">' . $mini_cal_this_day . '</span>' : $mini_cal_this_day;
$template->assign_block_vars('mini_cal_row.mini_cal_days', array( $template->assign_block_vars('minical.mini_cal_row.mini_cal_days', array(
'MINI_CAL_DAY' => ($mini_cal_count == 0) ? '<span style="color: ' . $config['board3_calendar_sunday_color_' . $module_id] . ';">' . $mini_cal_day . '</span>' : $mini_cal_day) 'MINI_CAL_DAY' => ($mini_cal_count == 0) ? '<span style="color: ' . $config['board3_calendar_sunday_color_' . $module_id] . ';">' . $mini_cal_day . '</span>' : $mini_cal_day)
); );
$i++; $i++;
@@ -112,7 +141,7 @@ class portal_calendar_module
// no day // no day
else else
{ {
$template->assign_block_vars('mini_cal_row.mini_cal_days', array( $template->assign_block_vars('minical.mini_cal_row.mini_cal_days', array(
'MINI_CAL_DAY' => ' ') 'MINI_CAL_DAY' => ' ')
); );
} }
@@ -130,27 +159,6 @@ class portal_calendar_module
} }
} }
// output our general calendar bits
$down = $mini_cal_month - 1;
$up = $mini_cal_month + 1;
$prev_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$down#minical") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_left_arrow.png' . '" title="' . $user->lang['VIEW_PREVIOUS_MONTH'] . '" height="16" width="16" alt="&lt;&lt;" /></a>';
$next_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$up#minical") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_right_arrow.png' . '" title="' . $user->lang['VIEW_NEXT_MONTH'] . '" height="16" width="16" alt="&gt;&gt;" /></a>';
$template->assign_vars(array(
'S_SUNDAY_FIRST' => ($config['board3_sunday_first_' . $module_id]) ? true : false,
'L_MINI_CAL_MONTH' => (($config['board3_long_month_' . $module_id]) ? $user->lang['mini_cal']['long_month'][$this->day[0][1]] : $user->lang['mini_cal']['month'][$this->day[0][1]]) . " " . $this->day[0][2],
'L_MINI_CAL_SUN' => '<span style="color: ' . $config['board3_calendar_sunday_color_' . $module_id] . ';">' . $user->lang['mini_cal']['day'][1] . '</span>',
'L_MINI_CAL_MON' => $user->lang['mini_cal']['day'][2],
'L_MINI_CAL_TUE' => $user->lang['mini_cal']['day'][3],
'L_MINI_CAL_WED' => $user->lang['mini_cal']['day'][4],
'L_MINI_CAL_THU' => $user->lang['mini_cal']['day'][5],
'L_MINI_CAL_FRI' => $user->lang['mini_cal']['day'][6],
'L_MINI_CAL_SAT' => $user->lang['mini_cal']['day'][7],
'U_PREV_MONTH' => $prev_month,
'U_NEXT_MONTH' => $next_month,
'S_DISPLAY_EVENTS' => ($config['board3_display_events_' . $module_id]) ? true : false,
));
/* /*
* Let's start displaying the events * Let's start displaying the events
* make sure we only display events in the future * make sure we only display events in the future
@@ -173,24 +181,26 @@ class portal_calendar_module
// current events // current events
if((($cur_event['start_time'] + 86400) >= $today_timestamp && $cur_event['all_day']) || ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp)) if((($cur_event['start_time'] + 86400) >= $today_timestamp && $cur_event['all_day']) || ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp))
{ {
$template->assign_block_vars('cur_events', array( $template->assign_block_vars('minical.cur_events', array(
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '', 'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
'EVENT_TITLE' => $cur_event['title'], 'EVENT_TITLE' => $cur_event['title'],
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'), 'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
'END_TIME' => (!empty($cur_event['end_time'])) ? $user->format_date($cur_event['end_time'], 'j. M Y, H:i') : false, 'END_TIME' => (!empty($cur_event['end_time'])) ? $user->format_date($cur_event['end_time'], 'j. M Y, H:i') : false,
'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '', 'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '',
'ALL_DAY' => ($cur_event['all_day']) ? true : false, 'ALL_DAY' => ($cur_event['all_day']) ? true : false,
'MODULE_ID' => $module_id,
)); ));
} }
else else
{ {
$template->assign_block_vars('upcoming_events', array( $template->assign_block_vars('minical.upcoming_events', array(
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '', 'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
'EVENT_TITLE' => $cur_event['title'], 'EVENT_TITLE' => $cur_event['title'],
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'), 'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
'END_TIME' => $user->format_date($cur_event['end_time'], 'j. M Y, H:i'), 'END_TIME' => $user->format_date($cur_event['end_time'], 'j. M Y, H:i'),
'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '', 'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '',
'ALL_DAY' => (($cur_event['start_time'] - $cur_event['end_time']) == 1) ? true : false, 'ALL_DAY' => (($cur_event['start_time'] - $cur_event['end_time']) == 1) ? true : false,
'MODULE_ID' => $module_id,
)); ));
} }
} }
@@ -570,6 +580,7 @@ class portal_calendar_module
$url = str_replace("\r\n", "\n", str_replace('\"', '"', trim($url))); $url = str_replace("\r\n", "\n", str_replace('\"', '"', trim($url)));
$url = str_replace(' ', '%20', $url); $url = str_replace(' ', '%20', $url);
$url = str_replace('&', '&amp;', $url);
// if there is no scheme, then add http schema // if there is no scheme, then add http schema
if (!preg_match('#^[a-z][a-z\d+\-.]*:/{2}#i', $url)) if (!preg_match('#^[a-z][a-z\d+\-.]*:/{2}#i', $url))

View File

@@ -1,52 +1,58 @@
<a name="minical"></a> <!-- BEGIN minical -->
<!-- IF minical.MODULE_ID eq $MODULE_ID -->
<a name="minical{minical.MODULE_ID}"></a>
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" />&nbsp;<!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R} {$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" />&nbsp;<!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
<tr> <tr>
<td align="left" colspan="2">{U_PREV_MONTH}</td> <td align="left" colspan="2">{minical.U_PREV_MONTH}</td>
<td colspan="3" align="center"><span class="genmed">{L_MINI_CAL_MONTH}</span></td> <td colspan="3" align="center"><span class="genmed">{minical.L_MINI_CAL_MONTH}</span></td>
<td align="right" colspan="2">{U_NEXT_MONTH}</td> <td align="right" colspan="2">{minical.U_NEXT_MONTH}</td>
</tr> </tr>
<tr> <tr>
<!-- IF S_SUNDAY_FIRST --> <!-- IF minical.S_SUNDAY_FIRST -->
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_SUN}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_SUN}</span></td>
<!-- ENDIF --> <!-- ENDIF -->
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_MON}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_MON}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_TUE}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_TUE}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_WED}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_WED}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_THU}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_THU}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_FRI}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_FRI}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_SAT}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_SAT}</span></td>
<!-- IF not S_SUNDAY_FIRST --> <!-- IF not minical.S_SUNDAY_FIRST -->
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_SUN}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_SUN}</span></td>
<!-- ENDIF --> <!-- ENDIF -->
</tr> </tr>
<!-- BEGIN mini_cal_row --> <!-- BEGIN mini_cal_row -->
<!-- IF minical.mini_cal_row.MODULE_ID eq $MODULE_ID -->
<tr> <tr>
<!-- BEGIN mini_cal_days --> <!-- BEGIN mini_cal_days -->
<td class="row1" align="center"><span class="gensmall">{mini_cal_row.mini_cal_days.MINI_CAL_DAY}</span></td> <td class="row1" align="center"><span class="gensmall">{minical.mini_cal_row.mini_cal_days.MINI_CAL_DAY}</span></td>
<!-- END mini_cal_days --> <!-- END mini_cal_days -->
</tr> </tr>
<!-- ENDIF -->
<!-- END mini_cal_row --> <!-- END mini_cal_row -->
</table> </table>
<!-- IF S_DISPLAY_EVENTS --> <!-- IF minical.S_DISPLAY_EVENTS -->
<hr class="dashed" /> <hr class="dashed" />
<div class="menutitle" style="font: bold 12px 'Trebuchet MS','Lucida Grande',Arial,sans-serif; text-decoration: underline;">{L_CURRENT_EVENTS}:</div> <div class="menutitle" style="font: bold 12px 'Trebuchet MS','Lucida Grande',Arial,sans-serif; text-decoration: underline;">{L_CURRENT_EVENTS}:</div>
<ul class="portal-events"> <ul class="portal-events">
<!-- BEGIN cur_events --> <!-- BEGIN cur_events -->
<li class="row"> <li class="row">
<dl class="icon"> <dl class="icon">
<dt style="width: 100%; padding-left: 0px; padding-bottom: 5px;"> <dt style="width: 100%; padding-left: 0px; padding-bottom: 5px;">
<!-- IF cur_events.EVENT_URL --><a href="{cur_events.EVENT_URL}" title="{cur_events.EVENT_TITLE}"><!-- ENDIF --> <!-- IF minical.cur_events.EVENT_URL --><a href="{minical.cur_events.EVENT_URL}" title="{minical.cur_events.EVENT_TITLE}"><!-- ENDIF -->
<span style="font-weight: bold;">{cur_events.EVENT_TITLE}:</span><br /> <span style="font-weight: bold;">{minical.cur_events.EVENT_TITLE}:</span><br />
<!-- IF cur_events.ALL_DAY -->{L_EVENT_START}:&nbsp;{cur_events.START_TIME}<br />{L_EVENT_ALL_DAY}<br /> <!-- IF minical.cur_events.ALL_DAY -->{L_EVENT_START}:&nbsp;{minical.cur_events.START_TIME}<br />{L_EVENT_ALL_DAY}<br />
<!-- ELSEIF not cur_events.ALL_DAY and cur_events.END_TIME -->{L_EVENT_START}:&nbsp;{cur_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{cur_events.END_TIME}<br /> <!-- ELSEIF not minical.cur_events.ALL_DAY and minical.cur_events.END_TIME -->{L_EVENT_START}:&nbsp;{minical.cur_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{minical.cur_events.END_TIME}<br />
<!-- ELSE -->{L_EVENT_ALL_DAY}<br /> <!-- ELSE -->{L_EVENT_ALL_DAY}<br />
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF cur_events.EVENT_DESC --><span style="font-style: italic;">{cur_events.EVENT_DESC}</span><!-- ENDIF --> <!-- IF minical.cur_events.EVENT_DESC --><span style="font-style: italic;">{minical.cur_events.EVENT_DESC}</span><!-- ENDIF -->
<!-- IF cur_events.EVENT_URL --></a><!-- ENDIF --> <!-- IF minical.cur_events.EVENT_URL --></a><!-- ENDIF -->
</dt> </dt>
</dl> </dl>
</li> </li>
<!-- BEGINELSE --> <!-- BEGINELSE -->
<li class="calendar-info"><span style="float:left;" class="gensmall"><strong>{L_NO_CUR_EVENTS}</strong></span><br /></li> <li class="calendar-info"><span style="float:left;" class="gensmall"><strong>{L_NO_CUR_EVENTS}</strong></span><br /></li>
<!-- END cur_events --> <!-- END cur_events -->
@@ -55,23 +61,27 @@
<div class="menutitle" style="font: bold 12px 'Trebuchet MS','Lucida Grande',Arial,sans-serif; text-decoration: underline;">{L_UPCOMING_EVENTS}:</div> <div class="menutitle" style="font: bold 12px 'Trebuchet MS','Lucida Grande',Arial,sans-serif; text-decoration: underline;">{L_UPCOMING_EVENTS}:</div>
<ul class="portal-events"> <ul class="portal-events">
<!-- BEGIN upcoming_events --> <!-- BEGIN upcoming_events -->
<li class="row"> <li class="row">
<dl class="icon"> <dl class="icon">
<dt style="width: 100%; padding-left: 0px; padding-bottom: 5px;"> <dt style="width: 100%; padding-left: 0px; padding-bottom: 5px;">
<!-- IF upcoming_events.EVENT_URL --><a href="{upcoming_events.EVENT_URL}" title="{upcoming_events.EVENT_TITLE}"><!-- ENDIF --> <!-- IF minical.upcoming_events.EVENT_URL --><a href="{minical.upcoming_events.EVENT_URL}" title="{minical.upcoming_events.EVENT_TITLE}"><!-- ENDIF -->
<span style="font-weight: bold;">{upcoming_events.EVENT_TITLE}:</span><br /> <span style="font-weight: bold;">{minical.upcoming_events.EVENT_TITLE}:</span><br />
<!-- IF upcoming_events.EVENT_DESC --><span style="font-style: italic;">{upcoming_events.EVENT_DESC}</span><br /><!-- ENDIF --> <!-- IF minical.upcoming_events.EVENT_DESC --><span style="font-style: italic;">{minical.upcoming_events.EVENT_DESC}</span><br /><!-- ENDIF -->
<!-- IF not upcoming_events.ALL_DAY and not upcoming_events.END_TIME -->{L_EVENT_TIME}:&nbsp;{upcoming_events.START_TIME}<br /> <!-- IF not minical.upcoming_events.ALL_DAY and not minical.upcoming_events.END_TIME -->{L_EVENT_TIME}:&nbsp;{minical.upcoming_events.START_TIME}<br />
<!-- ELSEIF not upcoming_events.ALL_DAY and upcoming_events.END_TIME -->{L_EVENT_START}:&nbsp;{upcoming_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{upcoming_events.END_TIME}<br /> <!-- ELSEIF not minical.upcoming_events.ALL_DAY and minical.upcoming_events.END_TIME -->{L_EVENT_START}:&nbsp;{minical.upcoming_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{minical.upcoming_events.END_TIME}<br />
<!-- ELSE -->{L_EVENT_TIME}:&nbsp;{upcoming_events.START_TIME}<br />{L_EVENT_ALL_DAY}<br /> <!-- ELSE -->{L_EVENT_TIME}:&nbsp;{minical.upcoming_events.START_TIME}<br />{L_EVENT_ALL_DAY}<br />
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF upcoming_events.EVENT_URL --></a><!-- ENDIF --> <!-- IF minical.upcoming_events.EVENT_URL --></a><!-- ENDIF -->
</dt> </dt>
</dl> </dl>
</li> </li>
<!-- BEGINELSE --> <!-- BEGINELSE -->
<li class="calendar-info"><span style="float:left;" class="gensmall"><strong>{L_NO_UPCOMING_EVENTS}</strong></span><br /></li> <li class="calendar-info"><span style="float:left;" class="gensmall"><strong>{L_NO_UPCOMING_EVENTS}</strong></span><br /></li>
<!-- END upcoming_events --> <!-- END upcoming_events -->
</ul> </ul>
<!-- ENDIF --> <!-- ENDIF -->
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R} {$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
<!-- ENDIF -->
<!-- END minical -->

View File

@@ -1,39 +1,41 @@
<a name="minical"></a> <!-- BEGIN minical -->
<!-- IF minical.MODULE_ID eq $MODULE_ID -->
<a name="minical{minical.MODULE_ID}"></a>
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" />&nbsp;<!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R} {$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" />&nbsp;<!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
<table class="tablebg" cellspacing="1" width="100%"> <table class="tablebg" cellspacing="1" width="100%">
<tr class="row1"> <tr class="row1">
<td> <td>
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
<tr> <tr>
<td align="left" colspan="2">{U_PREV_MONTH}</td> <td align="left" colspan="2">{minical.U_PREV_MONTH}</td>
<td colspan="3" align="center"><span class="genmed">{L_MINI_CAL_MONTH}</span></td> <td colspan="3" align="center"><span class="genmed">{minical.L_MINI_CAL_MONTH}</span></td>
<td align="right" colspan="2">{U_NEXT_MONTH}</td> <td align="right" colspan="2">{minical.U_NEXT_MONTH}</td>
</tr> </tr>
<tr> <tr>
<!-- IF S_SUNDAY_FIRST --> <!-- IF minical.S_SUNDAY_FIRST -->
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_SUN}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_SUN}</span></td>
<!-- ENDIF --> <!-- ENDIF -->
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_MON}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_MON}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_TUE}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_TUE}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_WED}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_WED}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_THU}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_THU}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_FRI}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_FRI}</span></td>
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_SAT}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_SAT}</span></td>
<!-- IF not S_SUNDAY_FIRST --> <!-- IF not minical.S_SUNDAY_FIRST -->
<td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{L_MINI_CAL_SUN}</span></td> <td style="width: 14%;"><span class="gensmall" style="font-weight: bold">{minical.L_MINI_CAL_SUN}</span></td>
<!-- ENDIF --> <!-- ENDIF -->
</tr> </tr>
<!-- BEGIN mini_cal_row --> <!-- BEGIN mini_cal_row -->
<tr> <tr>
<!-- BEGIN mini_cal_days --> <!-- BEGIN mini_cal_days -->
<td class="row1" align="center"><span class="gensmall">{mini_cal_row.mini_cal_days.MINI_CAL_DAY}</span></td> <td class="row1" align="center"><span class="gensmall">{minical.mini_cal_row.mini_cal_days.MINI_CAL_DAY}</span></td>
<!-- END mini_cal_days --> <!-- END mini_cal_days -->
</tr> </tr>
<!-- END mini_cal_row --> <!-- END mini_cal_row -->
</table> </table>
</td> </td>
</tr> </tr>
<!-- IF S_DISPLAY_EVENTS --> <!-- IF minical.S_DISPLAY_EVENTS -->
<tr class="row2"> <tr class="row2">
<td> <td>
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
@@ -44,14 +46,14 @@
<!-- BEGIN cur_events --> <!-- BEGIN cur_events -->
<tr> <tr>
<td style="width: 100%; padding-left: 0px; padding-bottom: 5px;"> <td style="width: 100%; padding-left: 0px; padding-bottom: 5px;">
<!-- IF cur_events.EVENT_URL --><a href="{cur_events.EVENT_URL}" title="{cur_events.EVENT_TITLE}"><!-- ENDIF --> <!-- IF minical.cur_events.EVENT_URL --><a href="{minical.cur_events.EVENT_URL}" title="{minical.cur_events.EVENT_TITLE}"><!-- ENDIF -->
<span style="font-weight: bold;">{cur_events.EVENT_TITLE}:</span><br /> <span style="font-weight: bold;">{minical.cur_events.EVENT_TITLE}:</span><br />
<!-- IF not cur_events.ALL_DAY and not cur_events.END_TIME -->{L_EVENT_TIME}:&nbsp;{cur_events.START_TIME}<br /> <!-- IF not minical.cur_events.ALL_DAY and not minical.cur_events.END_TIME -->{L_EVENT_TIME}:&nbsp;{minical.cur_events.START_TIME}<br />
<!-- ELSEIF not cur_events.ALL_DAY and cur_events.END_TIME -->{L_EVENT_START}:&nbsp;{cur_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{cur_events.END_TIME}<br /> <!-- ELSEIF not minical.cur_events.ALL_DAY and cur_events.END_TIME -->{L_EVENT_START}:&nbsp;{minical.cur_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{minical.cur_events.END_TIME}<br />
<!-- ELSE -->{L_EVENT_ALL_DAY}<br /> <!-- ELSE -->{L_EVENT_ALL_DAY}<br />
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF cur_events.EVENT_DESC --><span style="font-style: italic;">{cur_events.EVENT_DESC}</span><!-- ENDIF --> <!-- IF minical.cur_events.EVENT_DESC --><span style="font-style: italic;">{minical.cur_events.EVENT_DESC}</span><!-- ENDIF -->
<!-- IF cur_events.EVENT_URL --></a><!-- ENDIF --> <!-- IF minical.cur_events.EVENT_URL --></a><!-- ENDIF -->
</td> </td>
</tr> </tr>
<!-- BEGINELSE --> <!-- BEGINELSE -->
@@ -68,14 +70,14 @@
<!-- BEGIN upcoming_events --> <!-- BEGIN upcoming_events -->
<tr> <tr>
<td style="width: 100%; padding-left: 0px; padding-bottom: 5px;"> <td style="width: 100%; padding-left: 0px; padding-bottom: 5px;">
<!-- IF upcoming_events.EVENT_URL --><a href="{upcoming_events.EVENT_URL}" title="{upcoming_events.EVENT_TITLE}"><!-- ENDIF --> <!-- IF minical.upcoming_events.EVENT_URL --><a href="{minical.upcoming_events.EVENT_URL}" title="{minical.upcoming_events.EVENT_TITLE}"><!-- ENDIF -->
<span style="font-weight: bold;">{upcoming_events.EVENT_TITLE}:</span><br /> <span style="font-weight: bold;">{minical.upcoming_events.EVENT_TITLE}:</span><br />
<!-- IF not upcoming_events.ALL_DAY and not upcoming_events.END_TIME -->{L_EVENT_TIME}:&nbsp;{upcoming_events.START_TIME}<br /> <!-- IF not minical.upcoming_events.ALL_DAY and not minical.upcoming_events.END_TIME -->{L_EVENT_TIME}:&nbsp;{minical.upcoming_events.START_TIME}<br />
<!-- ELSEIF not upcoming_events.ALL_DAY and upcoming_events.END_TIME -->{L_EVENT_START}:&nbsp;{upcoming_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{upcoming_events.END_TIME}<br /> <!-- ELSEIF not minical.upcoming_events.ALL_DAY and minical.upcoming_events.END_TIME -->{L_EVENT_START}:&nbsp;{minical.upcoming_events.START_TIME}<br />{L_EVENT_END}:&nbsp;{minical.upcoming_events.END_TIME}<br />
<!-- ELSE -->{L_EVENT_TIME}:&nbsp;{upcoming_events.START_TIME}<br />{L_EVENT_ALL_DAY}<br /> <!-- ELSE -->{L_EVENT_TIME}:&nbsp;{minical.upcoming_events.START_TIME}<br />{L_EVENT_ALL_DAY}<br />
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF upcoming_events.EVENT_DESC --><span style="font-style: italic;">{upcoming_events.EVENT_DESC}</span><!-- ENDIF --> <!-- IF minical.upcoming_events.EVENT_DESC --><span style="font-style: italic;">{minical.upcoming_events.EVENT_DESC}</span><!-- ENDIF -->
<!-- IF upcoming_events.EVENT_URL --></a><!-- ENDIF --> <!-- IF minical.upcoming_events.EVENT_URL --></a><!-- ENDIF -->
</td> </td>
</tr> </tr>
<!-- BEGINELSE --> <!-- BEGINELSE -->
@@ -89,4 +91,6 @@
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
</table> </table>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R} {$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
<!-- ENDIF -->
<!-- END minical -->