Reworked parts of calendar block
Fixed missing CSS for li-tags of calendar
This commit is contained in:
12
install.xml
12
install.xml
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
</author>
|
||||
</author-group>
|
||||
|
||||
<mod-version>2.0.0a1</mod-version>
|
||||
<mod-version>2.0.0a2</mod-version>
|
||||
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
@@ -111,10 +111,20 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
<changelog lang="en">
|
||||
<change>Added missing IF $S_BLOCK_ICON</change>
|
||||
<change>Fixed select for displaying events </change>
|
||||
<change>Add feature to disable modules without having to remove them</change>
|
||||
<change>Fixed typo in title of Latest Bots block</change>
|
||||
<change>Applied patch for folders with special characters (upload module)</change>
|
||||
<change>Reworked parts of calendar block</change>
|
||||
<change>Fixed missing CSS for li-tags of calendar</change>
|
||||
</changelog>
|
||||
<changelog lang="de">
|
||||
<change>Fehlendes IF $S_BLOCK_ICON hinzugefügt</change>
|
||||
<change>Auswahl für das Anzeigen von Events repariert</change>
|
||||
<change>Fähigkeit hinzugefügt um Module zu deaktivieren ohne sie zu entfernen</change>
|
||||
<change>Schreibfehler in "Letzte Bots" Block beseitigt</change>
|
||||
<change>Patch für Ordner mit Spezialcharaktern hinzugefügt (Upload Modul)</change>
|
||||
<change>Teile des Kalender Blocks überarbeitet</change>
|
||||
<change>Fehlendes CSS für li-tags des Kalenders hinzugefügt</change>
|
||||
</changelog>
|
||||
</entry>
|
||||
<entry>
|
||||
|
||||
@@ -116,11 +116,11 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CALENDAR_END_INCORRECT' => 'Die eingegebene End-Zeit ist nicht korrekt. Bitte folge genau den Anweisungen.',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_PAST' => 'Die Start-zeit der Veranstaltung muss in der Zukunft liegen.',
|
||||
'ACP_PORTAL_EVENT_START_DAY' => 'Start-Datum der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung beginnt. Das Datum muss in folgendem Format sein: JJJJ-MM-TT',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung beginnt. Das Datum muss in folgendem Format sein: TT-MM-JJJJ',
|
||||
'ACP_PORTAL_EVENT_START_TIME' => 'Start-Zeit der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_START_TIME_EXP' => 'Gebe die Zeit ein, zu der die Veranstaltung beginnt. Die Zeit muss im 24 Stunden Format sein, z.B. 23:12',
|
||||
'ACP_PORTAL_EVENT_END_DAY' => 'End-Datum der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung endet. Das Datum muss in folgendem Format sein: JJJJ-MM-TT',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung endet. Das Datum muss in folgendem Format sein: TT-MM-JJJJ',
|
||||
'ACP_PORTAL_EVENT_END_TIME' => 'End-Zeit der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_END_TIME_EXP' => 'Gebe die Zeit ein, zu der die Veranstaltung endet. Die Zeit muss im 24 Stunden Forrmat sein, z.B. 23:12',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_START_FIRST' => 'Das Ende der Veranstaltung muss nach dem Beginn der Veranstaltung liegen.',
|
||||
|
||||
@@ -116,11 +116,11 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CALENDAR_END_INCORRECT' => 'The end time you entered was incorrect. Please follow the instructions carefully.',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_PAST' => 'The event start time needs to be in the future.',
|
||||
'ACP_PORTAL_EVENT_START_DAY' => 'Event start date',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Enter the date when the event starts. The date has to be in this format: YYYY-MM-DD',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Enter the date when the event starts. The date has to be in this format: DD-MM-YYYY',
|
||||
'ACP_PORTAL_EVENT_START_TIME' => 'Event start time',
|
||||
'ACP_PORTAL_EVENT_START_TIME_EXP' => 'Enter the time when the event starts. The time has to be in a 24 hour format, i.e. 23:12',
|
||||
'ACP_PORTAL_EVENT_END_DAY' => 'Event end date',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Enter the date when the event starts. The date has to be in this format: YYYY-MM-DD',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Enter the date when the event starts. The date has to be in this format: DD-MM-YYYY',
|
||||
'ACP_PORTAL_EVENT_END_TIME' => 'Event end time',
|
||||
'ACP_PORTAL_EVENT_END_TIME_EXP' => 'Enter the time when the event starts. The time has to be in a 24 hour format, i.e. 23:12',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_START_FIRST' => 'The end of the event has to be after the start of the event.',
|
||||
|
||||
@@ -157,7 +157,7 @@ class portal_calendar_module
|
||||
*/
|
||||
$events = $this->utf_unserialize($portal_config['board3_calendar_events_' . $module_id]);
|
||||
|
||||
if(!empty($events))
|
||||
if(!empty($events) && $config['board3_display_events_' . $module_id])
|
||||
{
|
||||
// we sort the $events array by the start time
|
||||
foreach($events as $key => $cur_event)
|
||||
@@ -168,18 +168,18 @@ class portal_calendar_module
|
||||
|
||||
foreach($events as $key => $cur_event)
|
||||
{
|
||||
if($cur_event['start_time'] >= $today_timestamp || $cur_event['end_time'] >= $today_timestamp)
|
||||
if($cur_event['start_time'] >= time() || ($cur_event['end_time'] + $user->timezone + $user->dst) >= time() || (($cur_event['start_time'] + 86400) >= $today_timestamp && $cur_event['all_day']))
|
||||
{
|
||||
// current events
|
||||
if(($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] <= $cur_event['start_time']) || ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp))
|
||||
if((($cur_event['start_time'] + 86400) >= time() && $cur_event['all_day']) || ($cur_event['start_time'] <= time() && ($cur_event['end_time'] + $user->timezone + $user->dst) >= time()))
|
||||
{
|
||||
$template->assign_block_vars('cur_events', array(
|
||||
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&', $cur_event['url'])) : '',
|
||||
'EVENT_TITLE' => $cur_event['title'],
|
||||
'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' => (!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'] : '',
|
||||
'ALL_DAY' => (($cur_event['start_time'] - $cur_event['end_time']) == 1) ? true : false,
|
||||
'ALL_DAY' => ($cur_event['all_day']) ? true : false,
|
||||
));
|
||||
}
|
||||
else
|
||||
@@ -187,7 +187,6 @@ class portal_calendar_module
|
||||
$template->assign_block_vars('upcoming_events', array(
|
||||
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&', $cur_event['url'])) : '',
|
||||
'EVENT_TITLE' => $cur_event['title'],
|
||||
'CUR_EVENT' => ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp) ? true : false,
|
||||
'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'),
|
||||
'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '',
|
||||
@@ -296,7 +295,7 @@ class portal_calendar_module
|
||||
* parse the event time
|
||||
* first check for obvious errors, we don't want to waste server resources
|
||||
*/
|
||||
if(strlen($event_start_day) < 9 || strlen($event_start_day) > 10 || strlen($event_start_time) < 4 || strlen($event_start_time) > 5)
|
||||
if(strlen($event_start_day) < 9 || strlen($event_start_day) > 10 || (strlen($event_start_time) < 4 && !$event_all_day) || strlen($event_start_time) > 5)
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_CALENDAR_START_INCORRECT']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -310,9 +309,9 @@ class portal_calendar_module
|
||||
$start_colon_pos = strpos($event_start_time, ':', 0);
|
||||
$start_day_length = strlen($event_start_day);
|
||||
$start_time_length = strlen($event_start_time);
|
||||
$start_year = (int) substr($event_start_day, 0, $first_start_hyphen);
|
||||
$start_day = (int) substr($event_start_day, 0, $first_start_hyphen);
|
||||
$start_month = (int) substr($event_start_day, $first_start_hyphen + 1, ($second_start_hyphen - $first_start_hyphen - 1));
|
||||
$start_day = (int) substr($event_start_day, $second_start_hyphen + 1, $start_day_length - $second_start_hyphen);
|
||||
$start_year = (int) substr($event_start_day, $second_start_hyphen + 1, $start_day_length - $second_start_hyphen);
|
||||
$start_hour = (int) substr($event_start_time, 0, $start_colon_pos);
|
||||
$start_minute = (int) substr($event_start_time, $start_colon_pos + 1, ($start_time_length - $start_colon_pos) - 1);
|
||||
|
||||
@@ -323,17 +322,18 @@ class portal_calendar_module
|
||||
$end_colon_pos = strpos($event_end_time, ':', 0);
|
||||
$end_day_length = strlen($event_end_day);
|
||||
$end_time_length = strlen($event_end_time);
|
||||
$end_year = (int) substr($event_end_day, 0, 4);
|
||||
$end_month = (int) substr($event_end_day, 5, 2);
|
||||
$end_day = (int) substr($event_end_day, 8, 2);
|
||||
$end_hour = (int) substr($event_end_time, 0, 2);
|
||||
$end_minute = (int) substr($event_end_time, 3, 2);
|
||||
$end_day = (int) substr($event_end_day, 0, $first_end_hyphen);
|
||||
$end_month = (int) substr($event_end_day, $first_end_hyphen + 1, ($second_end_hyphen - $first_end_hyphen - 1));
|
||||
$end_year = (int) substr($event_end_day, $second_end_hyphen + 1, $end_day_length - $second_end_hyphen);
|
||||
$end_hour = (int) substr($event_end_time, 0, $end_colon_pos);
|
||||
$end_minute = (int) substr($event_end_time, $end_colon_pos + 1, ($end_time_length - $end_colon_pos) - 1);
|
||||
}
|
||||
|
||||
// UNIX timestamps
|
||||
$start_time = mktime($start_hour, $start_minute, 0, $start_month, $start_day, $start_year);
|
||||
$end_time = (!$event_all_day) ? mktime($end_hour, $end_minute, 0, $end_month, $end_day, $end_year) : ($start_time - 1);
|
||||
if($start_time <= time())
|
||||
$start_time = mktime($start_hour, $start_minute, 0, $start_month, $start_day, $start_year) - $user->timezone - $user->dst;
|
||||
$end_time = (!$event_all_day) ? mktime($end_hour, $end_minute, 0, $end_month, $end_day, $end_year) - $user->timezone - $user->dst : '';
|
||||
|
||||
if(($end_time + $user->timezone + $user->dst) <= time() && !(($start_time + 86400) >= time() && $event_all_day))
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_CALENDAR_EVENT_PAST']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -377,6 +377,7 @@ class portal_calendar_module
|
||||
'desc' => $event_desc,
|
||||
'start_time' => $start_time,
|
||||
'end_time' => $end_time,
|
||||
'all_day' => $event_all_day,
|
||||
'permission' => $event_permission,
|
||||
'url' => htmlspecialchars_decode($event_url),
|
||||
);
|
||||
@@ -392,6 +393,7 @@ class portal_calendar_module
|
||||
'desc' => $event_desc,
|
||||
'start_time' => $start_time,
|
||||
'end_time' => $end_time,
|
||||
'all_day' => $event_all_day,
|
||||
'permission' => $event_permission,
|
||||
'url' => $event_url, // optional
|
||||
);
|
||||
@@ -444,14 +446,16 @@ class portal_calendar_module
|
||||
// Edit or add menu item
|
||||
case 'edit':
|
||||
case 'add':
|
||||
$event_all_day = (isset($events[$link_id]['all_day']) && $events[$link_id]['all_day'] == true) ? true : false;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'EVENT_TITLE' => (isset($events[$link_id]['title']) && $action != 'add') ? $events[$link_id]['title'] : '',
|
||||
'EVENT_DESC' => (isset($events[$link_id]['desc']) && $action != 'add') ? $events[$link_id]['desc'] : '',
|
||||
'EVENT_START_DAY' => ($action != 'add') ? $user->format_date($events[$link_id]['start_time'], 'Y-m-d') : '',
|
||||
'EVENT_START_TIME' => ($action != 'add') ? $user->format_date($events[$link_id]['start_time'], 'G:i') : '',
|
||||
'EVENT_END_DAY' => ($action != 'add' && ($events[$link_id]['start_time'] - $events[$link_id]['end_time']) != true) ? $user->format_date($events[$link_id]['end_time'], 'Y-m-d') : '',
|
||||
'EVENT_END_TIME' => ($action != 'add' && ($events[$link_id]['start_time'] - $events[$link_id]['end_time']) != true) ? $user->format_date($events[$link_id]['end_time'], 'G:i') : '',
|
||||
'EVENT_ALL_DAY' => (isset($events[$link_id]['start_time']) && ($events[$link_id]['start_time'] - $events[$link_id]['end_time'])) ? true : false,
|
||||
'EVENT_START_DAY' => ($action != 'add') ? $user->format_date($events[$link_id]['start_time'] + $user->timezone + $user->dst, 'd-m-Y') : '',
|
||||
'EVENT_START_TIME' => ($action != 'add') ? $user->format_date($events[$link_id]['start_time'] + $user->timezone + $user->dst, 'G:i') : '',
|
||||
'EVENT_END_DAY' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$link_id]['end_time'] + $user->timezone + $user->dst, 'd-m-Y') : '',
|
||||
'EVENT_END_TIME' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$link_id]['end_time'] + $user->timezone + $user->dst, 'G:i') : '',
|
||||
'EVENT_ALL_DAY' => (isset($events[$link_id]['all_day']) && $events[$link_id]['all_day'] == true) ? true : false,
|
||||
'EVENT_URL' => (isset($events[$link_id]['url']) && $action != 'add') ? $events[$link_id]['url'] : '',
|
||||
|
||||
//'U_BACK' => $u_action,
|
||||
@@ -484,15 +488,19 @@ class portal_calendar_module
|
||||
|
||||
for ($i = 0; $i < sizeof($events); $i++)
|
||||
{
|
||||
$event_all_day = ($events[$i]['all_day'] == true) ? true : false;
|
||||
$start_time_format = (!intval($user->format_date($events[$i]['start_time'] + $user->timezone + $user->dst, 'H')) && !intval($user->format_date($events[$i]['start_time'] + $user->timezone + $user->dst, 'i'))) ? 'j. M Y' : 'j. M Y, H:i';
|
||||
$end_time_format = (!intval($user->format_date($events[$i]['end_time'] + $user->timezone + $user->dst, 'H')) && !intval($user->format_date($events[$i]['end_time'] + $user->timezone + $user->dst, 'i'))) ? 'j. M Y' : 'j. M Y, H:i';
|
||||
|
||||
$template->assign_block_vars('events', array(
|
||||
'EVENT_TITLE' => ($action != 'add') ? ((isset($user->lang[$events[$i]['title']])) ? $user->lang[$events[$i]['title']] : $events[$i]['title']) : '',
|
||||
'EVENT_DESC' => ($action != 'add') ? $events[$i]['desc'] : '',
|
||||
'EVENT_START' => ($action != 'add') ? $user->format_date($events[$i]['start_time'], 'j. M Y, H:i') : '',
|
||||
'EVENT_END' => ($action != 'add' && ($events[$i]['start_time'] - $events[$i]['end_time']) != 1) ? $user->format_date($events[$i]['end_time'], 'j. M Y, H:i') : '',
|
||||
'EVENT_START' => ($action != 'add') ? $user->format_date($events[$i]['start_time'] + $user->timezone + $user->dst, $start_time_format) : '',
|
||||
'EVENT_END' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$i]['end_time'] + $user->timezone + $user->dst, $end_time_format) : '',
|
||||
'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? str_replace('&', '&', $events[$i]['url']) : '',
|
||||
'U_EDIT' => $u_action . '&action=edit&id=' . $i,
|
||||
'U_DELETE' => $u_action . '&action=delete&id=' . $i,
|
||||
'EVENT_ALL_DAY' => ($events[$i]['end_time'] - $events[$i]['start_time']) ? true : false,
|
||||
'EVENT_ALL_DAY' => $event_all_day,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<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 -->
|
||||
<span style="font-weight: bold;">{cur_events.EVENT_TITLE}:</span><br />
|
||||
<!-- IF not cur_events.ALL_DAY and not cur_events.END_TIME -->{L_EVENT_TIME}: {cur_events.START_TIME}<br />
|
||||
<!-- IF cur_events.ALL_DAY -->{L_EVENT_START}: {cur_events.START_TIME}<br />{L_EVENT_ALL_DAY}<br />
|
||||
<!-- ELSEIF not cur_events.ALL_DAY and cur_events.END_TIME -->{L_EVENT_START}: {cur_events.START_TIME}<br />{L_EVENT_END}: {cur_events.END_TIME}<br />
|
||||
<!-- ELSE -->{L_EVENT_ALL_DAY}<br />
|
||||
<!-- ENDIF -->
|
||||
@@ -48,7 +48,7 @@
|
||||
</dl>
|
||||
</li>
|
||||
<!-- BEGINELSE -->
|
||||
<li><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 -->
|
||||
</ul>
|
||||
<hr style="margin: 10px 0; border-top: 0;" />
|
||||
@@ -70,7 +70,7 @@
|
||||
</dl>
|
||||
</li>
|
||||
<!-- BEGINELSE -->
|
||||
<li><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 -->
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -20,33 +20,37 @@ span.portal-corners-top-inner, span.portal-corners-bottom-inner{
|
||||
/* main menu, user menu and the links */
|
||||
|
||||
.portal-navigation{
|
||||
width: auto;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.portal-navigation ul{
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-bottom: 8px; /*bottom spacing between each UL and rest of content*/
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-bottom: 8px; /*bottom spacing between each UL and rest of content*/
|
||||
}
|
||||
|
||||
.portal-navigation ul li{
|
||||
padding-bottom: 2px; /*bottom spacing between menu items*/
|
||||
padding-bottom: 2px; /*bottom spacing between menu items*/
|
||||
}
|
||||
|
||||
.portal-navigation ul li a{
|
||||
background-image: url("{T_THEME_PATH}/images/portal/arrowbullet.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center left; /*custom bullet list image*/
|
||||
display: block;
|
||||
padding: 2px 0;
|
||||
padding-left: 19px; /*link text is indented 19px*/
|
||||
font-weight: bold;
|
||||
font-size: 90%;
|
||||
background-image: url("{T_THEME_PATH}/images/portal/arrowbullet.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center left; /*custom bullet list image*/
|
||||
display: block;
|
||||
padding: 2px 0;
|
||||
padding-left: 19px; /*link text is indented 19px*/
|
||||
font-weight: bold;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.portal-navigation div.menutitle{
|
||||
padding: 1px 0;
|
||||
font: bold 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding: 1px 0;
|
||||
font: bold 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.calendar-info {
|
||||
list-style-type: none;
|
||||
}
|
||||
Reference in New Issue
Block a user