1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 17:39:46 +01:00

Time when editing event could be wrong. A few cosmetic improvements.

This commit is contained in:
SteveD 2013-06-23 18:13:25 +01:00
parent d2a0a5850e
commit a24bb07381
4 changed files with 16 additions and 10 deletions

View File

@ -169,7 +169,7 @@ for($cal_c = 1; $cal_c <= $numberdays; $cal_c++)
$cal_ins = " title='"; $cal_ins = " title='";
foreach ($cal_titles[$cal_c] as $cur_title) foreach ($cal_titles[$cal_c] as $cur_title)
{ // New line would be better, but doesn't get displayed { // New line would be better, but doesn't get displayed
$title .= $cal_ins.$cur_title; $title .= $cal_ins.trim($cur_title);
$cal_ins = ", "; $cal_ins = ", ";
} }
$title .= "'"; $title .= "'";

View File

@ -647,7 +647,12 @@ class event_calendar_shortcodes
} }
if($this->event['startofevent']) if($this->event['startofevent'])
{ {
return "<b><a title='{$this->event['event_title']}' href='".e_PLUGIN_ABS.'calendar_menu/event.php?'.$linkut.'.event.'.$this->event['event_id']."'><span class='mediumtext'>".$show_title."</span></a></b>"; $eTitle = $this->event['event_title'];
if ($this->event['event_allday'] == 0)
{
$eTitle .= ' ('.$this->ecalClass->time_string($this->event['event_start']).')';
}
return "<b><a title='{$eTitle}' href='".e_PLUGIN_ABS.'calendar_menu/event.php?'.$linkut.'.event.'.$this->event['event_id']."'><span class='mediumtext'>".$show_title."</span></a></b>";
} }
else else
{ {

View File

@ -319,11 +319,11 @@ class ecal_class
$opt = array( $opt = array(
'type' => 'date', 'type' => 'date',
'dateformat' => $this->dcal_format_string, 'format' => $this->dcal_format_string,
'firstDay' => $this->ec_first_day_of_week, // 0 = Sunday. 'firstDay' => $this->ec_first_day_of_week, // 0 = Sunday.
'size' => 12 'size' => 12
); );
return $frm->datepicker($boxname,$boxvalue,$opt); return $frm->datepicker($boxname, $boxvalue, $opt);
} }
@ -501,14 +501,15 @@ class ecal_class
/** /**
* Implements a version of getdate that expects a GMT date and doesn't do TZ/DST adjustments * Implements a version of getdate that expects a GMT date and doesn't do TZ/DST adjustments
* time() -date('Z') gives the correction to 'null out' the TZ and DST adjustments that getdate() does * time() -date('Z') gives the correction to 'null out' the TZ and DST adjustments that getdate() does
* (The difference needs to reflect DST for the specified date, not today)
*/ */
function gmgetdate($date) function gmgetdate($date)
{ {
$value = getdate($date-date('Z') + (date('I') ? 3600 : 0)); // $value = getdate($date-date('Z') + (date('I') ? 3600 : 0));
$value = getdate($date-date('Z', $date));
$value['month'] = $this->months[$value['mon'] - 1]; // Looks like getdate doesn't use the specified site language $value['month'] = $this->months[$value['mon'] - 1]; // Looks like getdate doesn't use the specified site language
return $value; return $value;

View File

@ -35,25 +35,25 @@ if (!$e107->isInstalled('calendar_menu'))
if (isset($_POST['viewallevents'])) if (isset($_POST['viewallevents']))
{ // Triggered from NAV_BUT_ALLEVENTS { // Triggered from NAV_BUT_ALLEVENTS
Header('Location: '.e_PLUGIN.'calendar_menu/calendar.php?'.$_POST['enter_new_val']); Header('Location: '.e_PLUGIN_ABS.'calendar_menu/calendar.php?'.$_POST['enter_new_val']);
exit(); exit();
} }
if (isset($_POST['doit'])) if (isset($_POST['doit']))
{ // Triggered from NAV_BUT_ENTEREVENT { // Triggered from NAV_BUT_ENTEREVENT
Header('Location: '.e_PLUGIN.'calendar_menu/event.php?ne.'.$_POST['enter_new_val']); Header('Location: '.e_PLUGIN_ABS.'calendar_menu/event.php?ne.'.$_POST['enter_new_val']);
exit(); exit();
} }
if (isset($_POST['subs'])) if (isset($_POST['subs']))
{ {
Header('Location: '.e_PLUGIN.'calendar_menu/subscribe.php'); Header('Location: '.e_PLUGIN_ABS.'calendar_menu/subscribe.php');
exit(); exit();
} }
if (isset($_POST['printlists'])) if (isset($_POST['printlists']))
{ {
Header("Location: " . e_PLUGIN . 'calendar_menu/ec_pf_page.php'); Header('Location: '.e_PLUGIN_ABS.'calendar_menu/ec_pf_page.php');
exit(); exit();
} }