mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Event calendar updates from 1.0
This commit is contained in:
@@ -521,7 +521,7 @@ if($action == 'cat')
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>".EC_ADLAN_A94."</td>
|
<td>".EC_ADLAN_A94."</td>
|
||||||
<td>".$uc->uc_dropdown('event_cat_addclass', $event_cat_addclass, 'public, nobody, member, admin, classes')."</td>
|
<td>".$uc->uc_dropdown('event_cat_addclass', $event_cat_addclass, 'public, nobody, member, admin, classes, no-excludes')."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>".EC_ADLAN_A219."</td>
|
<td>".EC_ADLAN_A219."</td>
|
||||||
@@ -562,7 +562,7 @@ if($action == 'cat')
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>".EC_ADLAN_A82."</td>
|
<td>".EC_ADLAN_A82."</td>
|
||||||
<td>".$uc->uc_dropdown('event_cat_force_class', $event_cat_force_class, 'nobody, member, admin, classes')."</td>
|
<td>".$uc->uc_dropdown('event_cat_force_class', $event_cat_force_class, 'nobody, member, admin, classes, no-excludes')."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>".EC_ADLAN_A83."</td>
|
<td>".EC_ADLAN_A83."</td>
|
||||||
@@ -936,14 +936,14 @@ if($action == 'config')
|
|||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td>".EC_ADLAN_A208." </td>
|
<td>".EC_ADLAN_A208." </td>
|
||||||
<td>". $uc->uc_dropdown('eventpost_admin', $calPref['eventpost_admin'], 'public, nobody, member, admin, classes')."
|
<td>". $uc->uc_dropdown('eventpost_admin', $calPref['eventpost_admin'], 'public, nobody, member, admin, classes, no-excludes')."
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
$text .= "
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td>".EC_ADLAN_A211." </td>
|
<td>".EC_ADLAN_A211." </td>
|
||||||
<td>". $uc->uc_dropdown('eventpost_super', $calPref['eventpost_super'], 'public, nobody, member, admin, classes')."
|
<td>". $uc->uc_dropdown('eventpost_super', $calPref['eventpost_super'], 'public, nobody, member, admin, classes, no-excludes')."
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@@ -123,10 +123,10 @@ if (!isset($ec_qs[0]) || !isset($ec_qs[1]))
|
|||||||
$cal_text .= "<tr>
|
$cal_text .= "<tr>
|
||||||
<td class='forumheader3'>".EC_LAN_153."</td>
|
<td class='forumheader3'>".EC_LAN_153."</td>
|
||||||
<td class='forumheader3' style='text_align:center'>";
|
<td class='forumheader3' style='text_align:center'>";
|
||||||
$cal_text .= gen_drop(FALSE)."</td>
|
$cal_text .= gen_drop(FALSE, $ecal_class)."</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td class='forumheader3'>".EC_LAN_154."</td>
|
<td class='forumheader3'>".EC_LAN_154."</td>
|
||||||
<td class='forumheader3' style='text_align:center'>".gen_drop(TRUE)."</td>
|
<td class='forumheader3' style='text_align:center'>".gen_drop(TRUE, $ecal_class)."</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td class='forumheader3'>".EC_LAN_155."</td>
|
<td class='forumheader3'>".EC_LAN_155."</td>
|
||||||
<td class='forumheader3' style='text_align:center'>";
|
<td class='forumheader3' style='text_align:center'>";
|
||||||
@@ -438,7 +438,7 @@ function decode_date($date_string, $last_day = FALSE)
|
|||||||
// Generate monthly drop-down - FALSE = first, TRUE = last
|
// Generate monthly drop-down - FALSE = first, TRUE = last
|
||||||
// For the first date we want beginning of previous year to end of current year
|
// For the first date we want beginning of previous year to end of current year
|
||||||
// For the last date we want end of next
|
// For the last date we want end of next
|
||||||
function gen_drop($drop_type)
|
function gen_drop($drop_type, $ecal_class)
|
||||||
{
|
{
|
||||||
$text = "<select name='".($drop_type ? 'end_date' : 'start_date')."' class='tbox' style='width:140px;' >\n";
|
$text = "<select name='".($drop_type ? 'end_date' : 'start_date')."' class='tbox' style='width:140px;' >\n";
|
||||||
if ($drop_type)
|
if ($drop_type)
|
||||||
@@ -454,15 +454,15 @@ function gen_drop($drop_type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get date to be 1st of month
|
// Get date to be 1st of month
|
||||||
$date = getdate($match_date);
|
$date = $ecal_class->gmgetdate($match_date);
|
||||||
$match_date = mktime(0,0,0,$date['mon'],1,$date['year'],FALSE);
|
$match_date = gmmktime(0,0,0,$date['mon'],1,$date['year'],FALSE);
|
||||||
|
|
||||||
for ($i = 0; $i < 24; $i++)
|
for ($i = 0; $i < 24; $i++)
|
||||||
{
|
{
|
||||||
$sel_text = (($match_date == $start_date) ? "selected='selected'" : "");
|
$sel_text = (($match_date == $start_date) ? "selected='selected'" : "");
|
||||||
$date = getdate($start_date);
|
$date = $ecal_class->gmgetdate($start_date);
|
||||||
$text .= "<option value = '{$date['year']}{$date['mon']}' {$sel_text}>{$date['month']} {$date['year']} </option>\n";
|
$text .= "<option value = '{$date['year']}{$date['mon']}' {$sel_text}>{$date['month']} {$date['year']} </option>\n";
|
||||||
$start_date = mktime(0,0,0,$date['mon']+1,1,$date['year'],FALSE);
|
$start_date = gmmktime(0,0,0,$date['mon']+1,1,$date['year'],FALSE);
|
||||||
}
|
}
|
||||||
$text .= "</select>\n";
|
$text .= "</select>\n";
|
||||||
return $text;
|
return $text;
|
||||||
|
@@ -65,7 +65,7 @@ $sc_style['EC_PR_LIST_TITLE']['post'] = "</h3>";
|
|||||||
$EVENT_CAL_PDF_NAMES['default'] = EC_LAN_165;
|
$EVENT_CAL_PDF_NAMES['default'] = EC_LAN_165;
|
||||||
$EVENT_CAL_PDF_HEADER['default'] = "{EC_PR_LIST_TITLE}<br />{EC_PR_CAT_LIST}<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br />";
|
$EVENT_CAL_PDF_HEADER['default'] = "{EC_PR_LIST_TITLE}<br />{EC_PR_CAT_LIST}<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br />";
|
||||||
$EVENT_CAL_PDF_BODY['default'] = "{EC_PR_CHANGE_YEAR}{EC_PR_CHANGE_MONTH}{EC_MAIL_SHORT_DATE} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />\n";
|
$EVENT_CAL_PDF_BODY['default'] = "{EC_PR_CHANGE_YEAR}{EC_PR_CHANGE_MONTH}{EC_MAIL_SHORT_DATE} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />\n";
|
||||||
$EVENT_CAL_PDF_FOOTER['default'] = "---End of List---<br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME}<br />{EC_PRINT_BUTTON}";
|
$EVENT_CAL_PDF_FOOTER['default'] = EC_LAN_138."<br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME}<br />{EC_PRINT_BUTTON}";
|
||||||
|
|
||||||
|
|
||||||
// - A simple tabular style
|
// - A simple tabular style
|
||||||
|
@@ -73,6 +73,8 @@ class ecal_class
|
|||||||
|
|
||||||
var $ec_first_day_of_week = 0; // First day of the week
|
var $ec_first_day_of_week = 0; // First day of the week
|
||||||
public $days = array(EC_LAN_25, EC_LAN_19, EC_LAN_20, EC_LAN_21, EC_LAN_22, EC_LAN_23, EC_LAN_24); // Array Sunday..Saturday
|
public $days = array(EC_LAN_25, EC_LAN_19, EC_LAN_20, EC_LAN_21, EC_LAN_22, EC_LAN_23, EC_LAN_24); // Array Sunday..Saturday
|
||||||
|
private $months = array(EC_LAN_0, EC_LAN_1, EC_LAN_2, EC_LAN_3, EC_LAN_4, EC_LAN_5, EC_LAN_6,
|
||||||
|
EC_LAN_7, EC_LAN_8, EC_LAN_9, EC_LAN_10, EC_LAN_11); // 'Long' month names
|
||||||
public $recur_type = array(
|
public $recur_type = array(
|
||||||
'0' => EC_LAN_RECUR_00, // 'no'
|
'0' => EC_LAN_RECUR_00, // 'no'
|
||||||
'1' => EC_LAN_RECUR_01, //'annual'
|
'1' => EC_LAN_RECUR_01, //'annual'
|
||||||
@@ -497,7 +499,9 @@ class ecal_class
|
|||||||
*/
|
*/
|
||||||
function gmgetdate($date)
|
function gmgetdate($date)
|
||||||
{
|
{
|
||||||
return getdate($date-date('Z'));
|
$value = getdate($date-date('Z'));
|
||||||
|
$value['month'] = $this->months[$value['mon'] - 1]; // Looks like getdate doesn't use the specified site language
|
||||||
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -180,7 +180,7 @@ define('EC_LAN_100', "Invalid Category Selection");
|
|||||||
define('EC_LAN_105', "* Required Field");
|
define('EC_LAN_105', "* Required Field");
|
||||||
define('EC_LAN_106', "Events");
|
define('EC_LAN_106', "Events");
|
||||||
//define('EC_LAN_107', "This plugin is a fully featured event calendar with calendar menu.");
|
//define('EC_LAN_107', "This plugin is a fully featured event calendar with calendar menu.");
|
||||||
define('EC_LAN_108', "Event Calendar Upgraded. See the 'readme.pdf' file for detailed information.");
|
define('EC_LAN_108', "Event Calendar Upgraded. See the e107 wiki file for detailed information.");
|
||||||
define('EC_LAN_109', "Unable to delete this event.");
|
define('EC_LAN_109', "Unable to delete this event.");
|
||||||
define('EC_LAN_110', "Event Number ");
|
define('EC_LAN_110', "Event Number ");
|
||||||
define('EC_LAN_111', "All the events on ");
|
define('EC_LAN_111', "All the events on ");
|
||||||
@@ -210,6 +210,7 @@ define('EC_LAN_134', "You have to provide a category name");
|
|||||||
define('EC_LAN_135', "Event");
|
define('EC_LAN_135', "Event");
|
||||||
define('EC_LAN_136', "Category Description");
|
define('EC_LAN_136', "Category Description");
|
||||||
define('EC_LAN_137', "Future Events");
|
define('EC_LAN_137', "Future Events");
|
||||||
|
define('EC_LAN_138', '---End of List---');
|
||||||
|
|
||||||
define('EC_LAN_140', "Forthcoming Events");
|
define('EC_LAN_140', "Forthcoming Events");
|
||||||
define('EC_LAN_141', "No forthcoming events");
|
define('EC_LAN_141', "No forthcoming events");
|
||||||
@@ -298,7 +299,7 @@ define('NT_LAN_EC_8', 'Event Calendar - Event modified');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Prefs - language defines can be used in various places where text is set through the admin screens
|
// Prefs - language defines can be used in various places where text is set through the admin screens
|
||||||
define('EC_MAILOUT_SUBJECT', "Advice of calendar event"); // Use shortcode EC_MAIL_SUBJECT
|
define('EC_MAILOUT_SUBJECT', 'Advice of calendar event'); // Use shortcode EC_MAIL_SUBJECT
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user