1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Event calendar - move prefs out of core, with update option. Fix a few things and generally tidy up. Needs attention from the theme experts in patches.

This commit is contained in:
SteveD
2012-12-13 22:26:37 +00:00
parent dd4d38e128
commit cad45d4179
31 changed files with 7531 additions and 7465 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
@@ -17,6 +17,8 @@
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* Event calendar plugin - large calendar display
*
* @package e107_plugins * @package e107_plugins
* @subpackage event_calendar * @subpackage event_calendar
* @version $Id$; * @version $Id$;
@@ -47,7 +49,7 @@ if (isset($_POST['printlists']))
exit(); exit();
} }
//e107::getScParser();
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php'); require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
$calSc = new event_calendar_shortcodes(); $calSc = new event_calendar_shortcodes();
@@ -102,10 +104,6 @@ $calSc->ecalClass = &$ecal_class;
$calSc->setCalDate($dateArray); $calSc->setCalDate($dateArray);
$calSc->catFilter = $cat_filter; $calSc->catFilter = $cat_filter;
//setScVar('event_calendar_shortcodes', 'ecalClass', &$ecal_class); // Give shortcodes a pointer to calendar class
//callScFunc('event_calendar_shortcodes','setCalDate', $dateArray); // Tell shortcodes the date to display
//setScVar('event_calendar_shortcodes', 'catFilter', $cat_filter); // Category filter
//------------------------------------------------- //-------------------------------------------------
// Start calculating text to display // Start calculating text to display
@@ -191,7 +189,6 @@ $text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER_START, FALSE, $calSc
for ($i = 0; $i < 7; $i++) for ($i = 0; $i < 7; $i++)
{ {
$calSc->headerDay = $ecal_class->day_offset_string($i); $calSc->headerDay = $ecal_class->day_offset_string($i);
//setScVar('event_calendar_shortcodes', 'headerDay', $ecal_class->day_offset_string($i));
$text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER, FALSE, $calSc); $text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER, FALSE, $calSc);
} }
$text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER_END, FALSE, $calSc); $text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER_END, FALSE, $calSc);
@@ -212,8 +209,6 @@ for ($c = 1; $c <= $numberdays; $c++)
{ // Loop through the number of days in this month { // Loop through the number of days in this month
$calSc->todayStart = $start; // Start of current day $calSc->todayStart = $start; // Start of current day
$calSc->curDay = $c; // Current day of month $calSc->curDay = $c; // Current day of month
//setScVar('event_calendar_shortcodes', 'todayStart', $start); // Start of current day
//setScVar('event_calendar_shortcodes', 'curDay', $c); // Current day of month
$got_ev = array_key_exists($c, $events) && is_array($events[$c]) && count($events[$c]) > 0; // Flag set if events on this day $got_ev = array_key_exists($c, $events) && is_array($events[$c]) && count($events[$c]) > 0; // Flag set if events on this day
@@ -232,24 +227,24 @@ for ($c = 1; $c <= $numberdays; $c++)
} }
if ($got_ev) if ($got_ev)
{ {
foreach($events[$c] as $ev) foreach($events[$c] as $ev)
{
if ($ev['startofevent'])
{ {
$ev['indicat'] = ''; if ($ev['startofevent'])
$ev['imagesize'] = '8'; {
$ev['fulltopic'] = TRUE; $ev['indicat'] = '';
} $ev['imagesize'] = '8';
else $ev['fulltopic'] = TRUE;
{ }
$ev['indicat'] = ''; else
$ev['imagesize'] = '4'; {
$ev['fulltopic'] = FALSE; $ev['indicat'] = '';
} $ev['imagesize'] = '4';
//setScVar('event_calendar_shortcodes', 'event', $ev); // Give shortcodes the event data $ev['fulltopic'] = FALSE;
$calSc->event = $ev; }
$text .= $e107->tp->parseTemplate($CALENDAR_SHOWEVENT, FALSE, $calSc); //setScVar('event_calendar_shortcodes', 'event', $ev); // Give shortcodes the event data
} $calSc->event = $ev;
$text .= $e107->tp->parseTemplate($CALENDAR_SHOWEVENT, FALSE, $calSc);
}
} }
$text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_DAY_END, FALSE, $calSc); $text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_DAY_END, FALSE, $calSc);

View File

@@ -1,227 +1,233 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2010 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar plugin - calendar menu display * Event calendar plugin - calendar menu display
* *
* $URL$ * $URL$
* $Id$ * $Id$
* *
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar plugin - calendar menu display
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
$e107 = e107::getInstance();
if (!$e107->isInstalled('calendar_menu')) return '';
if (!defined('e107_INIT')) { exit; }
if (!isset($ecal_class)) $e107 = e107::getInstance();
{ if (!$e107->isInstalled('calendar_menu')) return '';
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
$ecal_class = new ecal_class; if (!isset($ecal_class))
} {
// See if the page is already in the cache require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
$cache_tag = 'nq_event_cal_cal'; $ecal_class = new ecal_class;
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time)) }
{
echo $cacheData; // See if the page is already in the cache
return; $cache_tag = 'nq_event_cal_cal';
} if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
global $pref; {
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php'); echo $cacheData;
return;
// Doesn't use shortcodes - rather a specific format for that }
//e107::getScParser(); include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
//require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
if (is_readable(THEME.'calendar_template.php')) // Doesn't use shortcodes - rather a specific format for that
{ // Has to be require if (is_readable(THEME.'calendar_template.php'))
require(THEME.'calendar_template.php'); { // Has to be require
} require(THEME.'calendar_template.php');
else }
{ else
require(e_PLUGIN.'calendar_menu/calendar_template.php'); {
} require(e_PLUGIN.'calendar_menu/calendar_template.php');
}
$show_recurring = TRUE; // Could be pref later
$cat_filter = '*'; // Could be another pref later. $show_recurring = TRUE; // Could be pref later
$cal_datearray = $ecal_class->cal_date; $cat_filter = '*'; // Could be another pref later.
$cal_current_month = $cal_datearray['mon']; $cal_datearray = $ecal_class->cal_date;
$cal_current_year = $cal_datearray['year']; $cal_current_month = $cal_datearray['mon'];
$numberdays = date("t", $ecal_class->cal_timedate); // number of days in this month $cal_current_year = $cal_datearray['year'];
$cal_monthstart = gmmktime(0, 0, 0, $cal_current_month, 1, $cal_current_year); // Time stamp for first day of month $numberdays = date("t", $ecal_class->cal_timedate); // number of days in this month
$cal_firstdayarray = getdate($cal_monthstart); $cal_monthstart = gmmktime(0, 0, 0, $cal_current_month, 1, $cal_current_year); // Time stamp for first day of month
$cal_monthend = gmmktime(0, 0, 0, $cal_current_month + 1, 1, $cal_current_year) -1; // Time stamp for last day of month $cal_firstdayarray = getdate($cal_monthstart);
//$cal_thismonth = $cal_datearray['mon']; $cal_monthend = gmmktime(0, 0, 0, $cal_current_month + 1, 1, $cal_current_year) -1; // Time stamp for last day of month
$cal_thisday = $cal_datearray['mday']; // Today //$cal_thismonth = $cal_datearray['mon'];
$cal_events = array(); $cal_thisday = $cal_datearray['mday']; // Today
$cal_titles = array(); $cal_events = array();
$cal_recent = array(); $cal_titles = array();
$cal_totev = 0; $cal_recent = array();
$cal_totev = 0;
$ev_list = $ecal_class->get_events($cal_monthstart, $cal_monthend, TRUE, $cat_filter, $show_recurring,
'event_start, event_thread, event_title, event_recurring, event_allday', 'event_cat_icon'); $ev_list = $ecal_class->get_events($cal_monthstart, $cal_monthend, TRUE, $cat_filter, $show_recurring,
$cal_totev = count($ev_list); 'event_start, event_thread, event_title, event_recurring, event_allday', 'event_cat_icon');
$cal_totev = count($ev_list);
// Generate an array, one element per day of the month, and assign events to them
foreach ($ev_list as $cal_row) // Generate an array, one element per day of the month, and assign events to them
{ foreach ($ev_list as $cal_row)
if (is_array($cal_row['event_start'])) $temp = $cal_row['event_start']; else $temp = array($cal_row['event_start']); {
foreach ($temp as $ts) if (is_array($cal_row['event_start'])) $temp = $cal_row['event_start']; else $temp = array($cal_row['event_start']);
{ // Split up any recurring events foreach ($temp as $ts)
$cal_start_day = date('j',$ts); // Day of month for start { // Split up any recurring events
// Mark start day of each event $cal_start_day = date('j',$ts); // Day of month for start
$cal_events[$cal_start_day][] = $cal_row['event_cat_icon']; // Only first is actually used // Mark start day of each event
if (isset($cal_row['is_recent'])) $cal_recent[$cal_start_day] = TRUE; $cal_events[$cal_start_day][] = $cal_row['event_cat_icon']; // Only first is actually used
$cal_titles[$cal_start_day][] = $cal_row['event_title']; // In case titles displayed on mouseover if (isset($cal_row['is_recent'])) $cal_recent[$cal_start_day] = TRUE;
} $cal_titles[$cal_start_day][] = $cal_row['event_title']; // In case titles displayed on mouseover
} }
}
// set up month array for calendar display
$cal_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); // set up month array for calendar display
if ($pref['eventpost_dateformat'] == 'my') $cal_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);
{ if ($this->ecal_class->pref['eventpost_dateformat'] == 'my')
$calendar_title = $cal_months[$cal_current_month-1] .' '. $cal_current_year; {
} $calendar_title = $cal_months[$cal_current_month-1] .' '. $cal_current_year;
else }
{ else
$calendar_title = $cal_current_year .' '. $cal_months[$cal_current_month-1]; {
} $calendar_title = $cal_current_year .' '. $cal_months[$cal_current_month-1];
switch ($pref['eventpost_menulink']) }
{
case 0 : $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/event.php' >".$calendar_title."</a>"; switch ($this->ecal_class->pref['eventpost_menulink'])
break; {
case 1 : $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/calendar.php' >".$calendar_title."</a>"; case 0 :
break; $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/event.php' >".$calendar_title."</a>";
default : ; break;
} case 1 :
$cal_text = $CALENDAR_MENU_START; $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/calendar.php' >".$calendar_title."</a>";
if ($pref['eventpost_showeventcount']=='1') break;
{ default : ;
if ($cal_totev) }
{
$cal_text .= EC_LAN_26 . ": " . $cal_totev; $cal_text = $CALENDAR_MENU_START;
} if ($this->ecal_class->pref['eventpost_showeventcount']=='1')
else {
{ if ($cal_totev)
$cal_text .= EC_LAN_27; {
} $cal_text .= EC_LAN_26 . ": " . $cal_totev;
$cal_text .= "<br /><br />"; }
} else
$cal_start = $cal_monthstart; // First day of month as time stamp {
// Start the table $cal_text .= EC_LAN_27;
$cal_text .= $CALENDAR_MENU_TABLE_START; }
// Open header row $cal_text .= "<br /><br />";
$cal_text .= $CALENDAR_MENU_HEADER_START; }
// Now do the headings (days of week)
for ($i = 0; $i < 7; $i++) $cal_start = $cal_monthstart; // First day of month as time stamp
{ // Start the table
$cal_day = $ecal_class->day_offset_string($i); $cal_text .= $CALENDAR_MENU_TABLE_START;
$cal_text .= $CALENDAR_MENU_HEADER_FRONT; // Open header row
$cal_text .= $e107->tp->text_truncate($cal_day, 1, ''); // Unlikely to have room for more than 1 letter $cal_text .= $CALENDAR_MENU_HEADER_START;
$cal_text .= $CALENDAR_MENU_HEADER_BACK; // Now do the headings (days of week)
} for ($i = 0; $i < 7; $i++)
$cal_text .= $CALENDAR_MENU_HEADER_END; // Close off header row, open first date row {
// Calculate number of days to skip before 'real' days on first line of calendar $cal_day = $ecal_class->day_offset_string($i);
$firstdayoffset = date('w',$cal_start) - $ecal_class->ec_first_day_of_week; $cal_text .= $CALENDAR_MENU_HEADER_FRONT;
if ($firstdayoffset < 0) $firstdayoffset+= 7; $cal_text .= $e107->tp->text_truncate($cal_day, 1, ''); // Unlikely to have room for more than 1 letter
for ($cal_c = 0; $cal_c < $firstdayoffset; $cal_c++) $cal_text .= $CALENDAR_MENU_HEADER_BACK;
{ }
$cal_text .= $CALENDAR_MENU_DAY_NON; $cal_text .= $CALENDAR_MENU_HEADER_END; // Close off header row, open first date row
} // Calculate number of days to skip before 'real' days on first line of calendar
$cal_loop = $firstdayoffset; $firstdayoffset = date('w',$cal_start) - $ecal_class->ec_first_day_of_week;
// Now do the days of the month if ($firstdayoffset < 0) $firstdayoffset+= 7;
for($cal_c = 1; $cal_c <= $numberdays; $cal_c++) for ($cal_c = 0; $cal_c < $firstdayoffset; $cal_c++)
{ // Six cases to decode: {
// 1 - Today, no events $cal_text .= $CALENDAR_MENU_DAY_NON;
// 2 - Some other day, no events }
// 3 - Today with events $cal_loop = $firstdayoffset;
// 4 - Some other day with events // Now do the days of the month
// 5 - Today with recently added events for($cal_c = 1; $cal_c <= $numberdays; $cal_c++)
// 6 - Some other day with recently added events { // Six cases to decode:
$cal_css = 2; // The default - not today, no events // 1 - Today, no events
$cal_img = $cal_c; // Default 'image' is the day of the month // 2 - Some other day, no events
$cal_event_count = 0; // 3 - Today with events
$title = ""; // 4 - Some other day with events
if ($cal_thisday == $cal_c) $cal_css = 1; // 5 - Today with recently added events
$cal_linkut = gmmktime(0 , 0 , 0 , $cal_current_month, $cal_c, $cal_current_year).".one"; // Always need "one" // 6 - Some other day with recently added events
if (array_key_exists($cal_c, $cal_events)) $cal_css = 2; // The default - not today, no events
{ // There are events today $cal_img = $cal_c; // Default 'image' is the day of the month
$cal_event_count = count($cal_events[$cal_c]); // See how many events today $cal_event_count = 0;
if ($cal_event_count) $title = "";
{ // Show icon if it exists if ($cal_thisday == $cal_c) $cal_css = 1;
$cal_css += 2; // Gives 3 for today, 4 for other day $cal_linkut = gmmktime(0 , 0 , 0 , $cal_current_month, $cal_c, $cal_current_year).".one"; // Always need "one"
if (isset($pref['eventpost_showmouseover']) && ($pref['eventpost_showmouseover'] == 1)) if (array_key_exists($cal_c, $cal_events))
{ { // There are events today
$cal_ins = " title='"; $cal_event_count = count($cal_events[$cal_c]); // See how many events today
foreach ($cal_titles[$cal_c] as $cur_title) if ($cal_event_count)
{ // New line would be better, but doesn't get displayed { // Show icon if it exists
$title .= $cal_ins.$cur_title; $cal_css += 2; // Gives 3 for today, 4 for other day
$cal_ins = ", "; if (isset($this->ecal_class->pref['eventpost_showmouseover']) && ($this->ecal_class->pref['eventpost_showmouseover'] == 1))
} {
$title .= "'"; $cal_ins = " title='";
} foreach ($cal_titles[$cal_c] as $cur_title)
else { // New line would be better, but doesn't get displayed
{ $title .= $cal_ins.$cur_title;
if ($cal_event_count == 1) $cal_ins = ", ";
{ }
$title = " title='1 ".EC_LAN_135."' "; $title .= "'";
} }
else else
{ {
$title = " title='{$cal_event_count} " . EC_LAN_106 . "' "; if ($cal_event_count == 1)
} {
} $title = " title='1 ".EC_LAN_135."' ";
if (isset($cal_recent[$cal_c]) && $cal_recent[$cal_c]) }
{ else
$cal_css += 2; {
} $title = " title='{$cal_event_count} " . EC_LAN_106 . "' ";
}
if (!empty($cal_events[$cal_c]['0'])) }
{ if (isset($cal_recent[$cal_c]) && $cal_recent[$cal_c])
$cal_event_icon = 'calendar_menu/images/'.$cal_events[$cal_c]['0']; // Icon file could be NULL {
if (is_readable(e_PLUGIN.$cal_event_icon)) $cal_css += 2;
{ }
$cal_img = "<img src='".e_PLUGIN_ABS.$cal_event_icon."' alt='' />";
} if (!empty($cal_events[$cal_c]['0']))
} {
} $cal_event_icon = 'calendar_menu/images/'.$cal_events[$cal_c]['0']; // Icon file could be NULL
} if (is_readable(e_PLUGIN.$cal_event_icon))
$cal_text .= $CALENDAR_MENU_DAY_START[$cal_css]."<a {$title} href='" . e_PLUGIN_ABS."calendar_menu/event.php?{$cal_linkut}'>{$cal_img}</a>"; {
$cal_text .= $CALENDAR_MENU_DAY_END[$cal_css]; $cal_img = "<img src='".e_PLUGIN_ABS.$cal_event_icon."' alt='' />";
$cal_loop++; }
if ($cal_loop == 7) }
{ // Start next row }
$cal_loop = 0; }
if ($cal_c != $numberdays) $cal_text .= $CALENDAR_MENU_DAY_START[$cal_css]."<a {$title} href='" . e_PLUGIN_ABS."calendar_menu/event.php?{$cal_linkut}'>{$cal_img}</a>";
{ $cal_text .= $CALENDAR_MENU_DAY_END[$cal_css];
$cal_text .= $CALENDAR_MENU_WEEKSWITCH; $cal_loop++;
} if ($cal_loop == 7)
} { // Start next row
} $cal_loop = 0;
if ($cal_loop != 0) if ($cal_c != $numberdays)
{ {
for($cal_a = ($cal_loop + 1); $cal_a <= 7; $cal_a++) $cal_text .= $CALENDAR_MENU_WEEKSWITCH;
{ }
$cal_text .= $CALENDAR_MENU_DAY_NON; }
} }
} if ($cal_loop != 0)
// Close table {
$cal_text .= $CALENDAR_MENU_END; for($cal_a = ($cal_loop + 1); $cal_a <= 7; $cal_a++)
// Now handle the data, cache as well {
ob_start(); // Set up a new output buffer $cal_text .= $CALENDAR_MENU_DAY_NON;
$ns->tablerender($calendar_title, $cal_text, 'calendar_menu'); }
$cache_data = ob_get_flush(); // Get the page content, and display it }
$e107->ecache->set($cache_tag, $cache_data); // Save to cache // Close table
unset($ev_list); $cal_text .= $CALENDAR_MENU_END;
unset($cal_text); // Now handle the data, cache as well
ob_start(); // Set up a new output buffer
$ns->tablerender($calendar_title, $cal_text, 'calendar_menu');
$cache_data = ob_get_flush(); // Get the page content, and display it
$e107->ecache->set($cache_tag, $cache_data); // Save to cache
unset($ev_list);
unset($cal_text);
?> ?>

View File

@@ -1,90 +1,174 @@
<?php <?php
/* /*
+ ----------------------------------------------------------------------------+ * e107 website system
| e107 website system *
| * Copyright (C) 2008-2013 e107 Inc (e107.org)
| (c) e107 Inc 2008-2009 * Released under the terms and conditions of the
| http://e107.org * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
| *
| * Installation and update handler for event calendar plugin
| Released under the terms and conditions of the *
| GNU General Public License (http://gnu.org). * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_admin_calendar_menu.php,v $
| * $Revision$
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_setup.php,v $ * $Date$
| $Revision$ * $Author$
| $Date$ */
| $Author$
| /**
+----------------------------------------------------------------------------+ * e107 Event calendar plugin
*/ *
* Plugin file - installation and update handling
/** *
* e107 Event calendar plugin * @package e107_plugins
* * @subpackage event_calendar
* @package e107_plugins * @version $Id$;
* @subpackage event_calendar */
* @version $Id$;
*/ if (!defined('e107_INIT')) { exit; }
if (!defined('e107_INIT')) { exit; }
class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup
{ {
function install_post($param) function install_post($param)
{ {
$mes = eMessage::getInstance(); $somethingFailed = FALSE;
if($this->insertDefaultCategory(FALSE))
{ $mes = eMessage::getInstance();
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS); if ($this->insertDefaultCategory(FALSE, $mes) == FALSE)
} {
else $somethingFailed = TRUE;
{ }
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
}
if ($somethingFailed)
$mes->add(EC_ADINST_LAN_04, E_MESSAGE_SUCCESS); {
$mes->add(EC_ADINST_LAN_04, E_MESSAGE_SUCCESS);
} }
else
{
function install_pre($param) }
{
// echo "Calendar uninstall routine<br />"; }
}
function install_pre($param)
function upgrade_post($param) {
{ // echo "Calendar uninstall routine<br />";
$mes = eMessage::getInstance(); }
if($this->insertDefaultCategory(TRUE))
{
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
} /**
else * Called to see if plugin upgrade is required
{ *
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR); * @param $param mixed - no purpose currently
} * @return boolean TRUE if upgrade required, FALSE otherwise
} */
function upgrade_required($param = FALSE)
{
function insertDefaultCategory($isUpgrade = FALSE) // Insert the text for the default category into the DB here $required = FALSE;
{
$sql = e107::getDb(); $data = e107::pref('calendar_menu');
if (count($data) == 0)
require_once('ecal_class.php'); // Gets the define for the 'Default' category {
if ($isUpgrade && $sql->db_Select('event_cat','event_cat_name',"event_cat_name='".EC_DEFAULT_CATEGORY."' ", TRUE)) $required = TRUE;
{ }
return EC_ADINST_LAN_08.'<br />'; //print_a($data);
} return $required;
$ec_insert_entries = "INSERT INTO `#event_cat` (event_cat_name, event_cat_description, event_cat_ahead, event_cat_msg1, event_cat_msg2, event_cat_lastupdate) }
VALUES ('".EC_DEFAULT_CATEGORY."', '".EC_ADINST_LAN_03."', 5,
'".EC_ADINST_LAN_01."', '".EC_ADINST_LAN_02."',
'".intval(time())."') ";
/**
return $sql->db_Select_gen($ec_insert_entries); * Upgrade stage 1
} *
} * @param $param mixed - no purpose currently
* @return - none
*/
function upgrade_pre($param = FALSE)
{
$mes = eMessage::getInstance();
$calPref = e107::pref('calendar_menu');
if (count($calPref) == 0)
{ // Need to move prefs over
unset($calPref);
$calNew = e107::getPlugConfig('calendar_menu'); // Initialize calendar_menu prefs.
$corePrefs = e107::getConfig('core'); // Core Prefs Object.
$pref = e107::pref('core'); // Core Prefs Array.
foreach($pref as $k=>$v)
{
if(substr($k, 0, 10) == 'eventpost_')
{
$calNew->add($k, $v);
$corePrefs->remove($k);
}
}
$calNew->save();
$corePrefs->save();
$calPref = e107::pref('calendar_menu'); // retrieve calendar_menu pref array.
//print_a($calPref);
$mes->add(EC_ADINST_LAN_10, E_MESSAGE_SUCCESS);
}
else
{
$mes->add(EC_ADINST_LAN_09, E_MESSAGE_INFO); // Nothing to do - prefs already moved
}
}
/**
* Upgrade final stage - add default category
*
* @param $param mixed - no purpose currently
* @return - none
*/
function upgrade_post($param)
{
$this->insertDefaultCategory(TRUE);
}
/**
* Make sure default category is in calendar database; add it if not.
*
* Adds an appropriate message to the passed message handler.
* Returns TRUE if the call can be deemed a success (category present or added); FALSE on error
*/
function insertDefaultCategory($isUpgrade) // Insert the text for the default category into the DB here
{
$mes = eMessage::getInstance();
$sql = e107::getDb();
require_once(e_PLUGIN.'calendar_menu/ecal_class.php'); // Gets the define for the 'Default' category
if ($isUpgrade && $sql->db_Select('event_cat','event_cat_name',"event_cat_name='".EC_DEFAULT_CATEGORY."' "))
{
$mes->add(EC_ADINST_LAN_08, E_MESSAGE_INFO); // Nothing to do - default category already present
return TRUE;
}
$ec_insert_entries = "INSERT INTO `#event_cat` (event_cat_name, event_cat_description, event_cat_ahead, event_cat_msg1, event_cat_msg2, event_cat_lastupdate)
VALUES ('".EC_DEFAULT_CATEGORY."', '".EC_ADINST_LAN_03."', 5,
'".EC_ADINST_LAN_01."', '".EC_ADINST_LAN_02."',
'".intval(time())."') ";
if ($result = $sql->db_Select_gen($ec_insert_entries))
{
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
}
else
{
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
}
return $result;
}
}
?> ?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,320 +1,322 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Templates for event calendar displays * Templates for event calendar displays
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_template.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_template.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Templates for event calendar displays
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
* * @subpackage event_calendar
*/ * @version $Id$;
*
*/
if (!defined('e107_INIT')) { exit; }
if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
if (!defined('e107_INIT')) { exit; }
//global $sc_style; if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
$ec_images_path = e_IMAGE; //global $sc_style;
$ec_images_path_abs = e_IMAGE_ABS;
if (!defined('EC_RECENT_ICON')) $ec_images_path = e_IMAGE;
{ $ec_images_path_abs = e_IMAGE_ABS;
define('EC_RECENT_ICON',e_IMAGE.'generic/new.png'); if (!defined('EC_RECENT_ICON'))
define('EC_RECENT_ICON_ABS',e_IMAGE_ABS.'generic/new.png'); {
} // Filename of icon used to flag recent events define('EC_RECENT_ICON',e_IMAGE.'generic/new.png');
define('EC_RECENT_ICON_ABS',e_IMAGE_ABS.'generic/new.png');
} // Filename of icon used to flag recent events
// TIME SWITCH BUTTONS ------------------------------------------------------------
$sc_style['EC_PREV_MONTH']['pre'] = "<span class='defaulttext'>";
$sc_style['EC_PREV_MONTH']['post'] = "</span>"; // TIME SWITCH BUTTONS ------------------------------------------------------------
$sc_style['EC_PREV_MONTH']['pre'] = "<span class='defaulttext'>";
$sc_style['EC_CURRENT_MONTH']['pre'] = "<b>"; $sc_style['EC_PREV_MONTH']['post'] = "</span>";
$sc_style['EC_CURRENT_MONTH']['post'] = "</b>";
$sc_style['EC_CURRENT_MONTH']['pre'] = "<b>";
$sc_style['EC_NEXT_MONTH']['pre'] = "<span class='defaulttext'>"; $sc_style['EC_CURRENT_MONTH']['post'] = "</b>";
$sc_style['EC_NEXT_MONTH']['post'] = "</span>";
$sc_style['EC_NEXT_MONTH']['pre'] = "<span class='defaulttext'>";
$sc_style['EC_PREV_YEAR']['pre'] = ''; $sc_style['EC_NEXT_MONTH']['post'] = "</span>";
$sc_style['EC_PREV_YEAR']['post'] = '';
$sc_style['EC_PREV_YEAR']['pre'] = '';
$sc_style['EC_MONTH_LIST']['pre'] = ''; $sc_style['EC_PREV_YEAR']['post'] = '';
$sc_style['EC_MONTH_LIST']['post'] = '';
$sc_style['EC_MONTH_LIST']['pre'] = '';
$sc_style['EC_NEXT_YEAR']['pre'] = ''; $sc_style['EC_MONTH_LIST']['post'] = '';
$sc_style['EC_NEXT_YEAR']['post'] = '';
$sc_style['EC_NEXT_YEAR']['pre'] = '';
$sc_style['EC_NEXT_YEAR']['post'] = '';
$CALENDAR_TIME_TABLE = "
<table cellpadding='0' cellspacing='1' class='fborder' style='width:100%'>
<tr> $CALENDAR_TIME_TABLE = "
<td class='forumheader' style='width:18%; text-align:left'>{EC_PREV_MONTH}</td> <table cellpadding='0' cellspacing='1' class='fborder' style='width:100%'>
<td class='fcaption' style='width:64%; text-align:center'>{EC_CURRENT_MONTH}</td> <tr>
<td class='forumheader' style='width:18%; text-align:right'>{EC_NEXT_MONTH}</td> <td class='forumheader' style='width:18%; text-align:left'>{EC_PREV_MONTH}</td>
</tr>\n <td class='fcaption' style='width:64%; text-align:center'>{EC_CURRENT_MONTH}</td>
<tr> <td class='forumheader' style='width:18%; text-align:right'>{EC_NEXT_MONTH}</td>
<td class='forumheader3' style='text-align:left'>{EC_PREV_YEAR}</td> </tr>\n
<td class='fcaption' style='text-align:center; vertical-align:middle'>{EC_MONTH_LIST}</td> <tr>
<td class='forumheader3' style='text-align:right'>{EC_NEXT_YEAR}</td> <td class='forumheader3' style='text-align:left'>{EC_PREV_YEAR}</td>
</tr>\n <td class='fcaption' style='text-align:center; vertical-align:middle'>{EC_MONTH_LIST}</td>
</table>"; <td class='forumheader3' style='text-align:right'>{EC_NEXT_YEAR}</td>
</tr>\n
</table>";
// NAVIGATION BUTTONS
//$sc_style['NAV_LINKCURRENTMONTH']['pre'] = "<span class='button' style='width:120px; '>";
//$sc_style['NAV_LINKCURRENTMONTH']['post'] = "</span>"; // NAVIGATION BUTTONS
$sc_style['EC_NAV_LINKCURRENTMONTH']['pre'] = ""; //$sc_style['NAV_LINKCURRENTMONTH']['pre'] = "<span class='button' style='width:120px; '>";
$sc_style['EC_NAV_LINKCURRENTMONTH']['post'] = ""; //$sc_style['NAV_LINKCURRENTMONTH']['post'] = "</span>";
$sc_style['EC_NAV_LINKCURRENTMONTH']['pre'] = "";
$CALENDAR_NAVIGATION_TABLE = " $sc_style['EC_NAV_LINKCURRENTMONTH']['post'] = "";
<div style='text-align:center; margin-bottom:20px;'>
<form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='calform'> $CALENDAR_NAVIGATION_TABLE = "
<table border='0' cellpadding='0' cellspacing='0' style='width:100%;'> <div style='text-align:center; margin-bottom:20px;'>
<tr> <form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='calform'>
<td style='text-align:center;'>{EC_NAV_CATEGORIES} {EC_NAV_BUT_ALLEVENTS} {EC_NAV_BUT_VIEWCAT} {EC_NAV_BUT_ENTEREVENT} {EC_NAV_BUT_SUBSCRIPTION} {EC_NAV_BUT_PRINTLISTS} {EC_NAV_LINKCURRENTMONTH}</td> <table border='0' cellpadding='0' cellspacing='0' style='width:100%;'>
</tr>\n <tr>
</table> <td style='text-align:center;'>{EC_NAV_CATEGORIES} {EC_NAV_BUT_ALLEVENTS} {EC_NAV_BUT_VIEWCAT} {EC_NAV_BUT_ENTEREVENT} {EC_NAV_BUT_SUBSCRIPTION} {EC_NAV_BUT_PRINTLISTS} {EC_NAV_LINKCURRENTMONTH}</td>
</form> </tr>\n
</div>"; </table>
</form>
</div>";
// EVENT LIST ------------------------------------------------------------
$sc_style['EC_EVENTLIST_CAPTION']['pre'] = "<tr><td class='fcaption' colspan='2'>";
$sc_style['EC_EVENTLIST_CAPTION']['post'] = ":<br /><br /></td></tr>\n"; // EVENT LIST ------------------------------------------------------------
$sc_style['EC_EVENTLIST_CAPTION']['pre'] = "<tr><td class='fcaption' colspan='2'>";
$EVENT_EVENTLIST_TABLE_START = "<table style='width:100%' class='fborder'>{EC_EVENTLIST_CAPTION}"; $sc_style['EC_EVENTLIST_CAPTION']['post'] = ":<br /><br /></td></tr>\n";
$EVENT_EVENTLIST_TABLE_END = "</table>";
$EVENT_EVENTLIST_TABLE_START = "<table style='width:100%' class='fborder'>{EC_EVENTLIST_CAPTION}";
$EVENT_EVENTLIST_TABLE_END = "</table>";
// EVENT ARCHIVE ------------------------------------------------------------
$sc_style['EC_EVENTARCHIVE_CAPTION']['pre'] = "<tr><td colspan='2' class='fcaption'>";
$sc_style['EC_EVENTARCHIVE_CAPTION']['post'] = "</td></tr>\n"; // EVENT ARCHIVE ------------------------------------------------------------
$sc_style['EC_EVENTARCHIVE_CAPTION']['pre'] = "<tr><td colspan='2' class='fcaption'>";
$EVENT_ARCHIVE_TABLE_START = "<br /><table style='width:100%' class='fborder'>{EC_EVENTARCHIVE_CAPTION}"; $sc_style['EC_EVENTARCHIVE_CAPTION']['post'] = "</td></tr>\n";
$EVENT_ARCHIVE_TABLE = "
<tr> $EVENT_ARCHIVE_TABLE_START = "<br /><table style='width:100%' class='fborder'>{EC_EVENTARCHIVE_CAPTION}";
<td style='width:35%; vertical-align:top' class='forumheader3'>{EC_EVENT_RECENT_ICON}{EC_EVENTARCHIVE_DATE}</td> $EVENT_ARCHIVE_TABLE = "
<td style='width:65%' class='forumheader3'>{EC_EVENTARCHIVE_HEADING}</td> <tr>
</tr>\n"; <td style='width:35%; vertical-align:top' class='forumheader3'>{EC_EVENT_RECENT_ICON}{EC_EVENTARCHIVE_DATE}</td>
//<br />{EVENTARCHIVE_DETAILS} <td style='width:65%' class='forumheader3'>{EC_EVENTARCHIVE_HEADING}</td>
$EVENT_ARCHIVE_TABLE_EMPTY = "<tr><td colspan='2' class='forumheader3'>{EC_EVENTARCHIVE_EMPTY}</td></tr>\n"; </tr>\n";
$EVENT_ARCHIVE_TABLE_END = "</table>"; //<br />{EVENTARCHIVE_DETAILS}
$EVENT_ARCHIVE_TABLE_EMPTY = "<tr><td colspan='2' class='forumheader3'>{EC_EVENTARCHIVE_EMPTY}</td></tr>\n";
$EVENT_ARCHIVE_TABLE_END = "</table>";
// EVENT SHOW EVENT ------------------------------------------------------------
$EVENT_EVENT_TABLE_START = "<table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'>";
$EVENT_EVENT_TABLE_END = "</table>"; // EVENT SHOW EVENT ------------------------------------------------------------
$EVENT_EVENT_TABLE_START = "<table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'>";
$sc_style['EC_EVENT_HEADING_DATE']['pre'] = ""; $EVENT_EVENT_TABLE_END = "</table>";
$sc_style['EC_EVENT_HEADING_DATE']['post'] = "";
$sc_style['EC_EVENT_HEADING_DATE']['pre'] = "";
$sc_style['EC_EVENT_DETAILS']['pre'] = "<tr><td colspan='2' class='forumheader3'>"; $sc_style['EC_EVENT_HEADING_DATE']['post'] = "";
$sc_style['EC_EVENT_DETAILS']['post'] = "</td></tr>\n";
$sc_style['EC_EVENT_DETAILS']['pre'] = "<tr><td colspan='2' class='forumheader3'>";
$sc_style['EC_EVENT_LOCATION']['pre'] = "<tr><td colspan='2' class='forumheader3'><b>".EC_LAN_32."</b> "; $sc_style['EC_EVENT_DETAILS']['post'] = "</td></tr>\n";
$sc_style['EC_EVENT_LOCATION']['post'] = "</td></tr>";
$sc_style['EC_EVENT_LOCATION']['pre'] = "<tr><td colspan='2' class='forumheader3'><b>".EC_LAN_32."</b> ";
$sc_style['EC_EVENT_AUTHOR']['pre'] = "<b>".EC_LAN_31."</b> "; $sc_style['EC_EVENT_LOCATION']['post'] = "</td></tr>";
$sc_style['EC_EVENT_AUTHOR']['post'] = "&nbsp;";
$sc_style['EC_EVENT_AUTHOR']['pre'] = "<b>".EC_LAN_31."</b> ";
$sc_style['EC_EVENT_CONTACT']['pre'] = "<b>".EC_LAN_33."</b> "; $sc_style['EC_EVENT_AUTHOR']['post'] = "&nbsp;";
$sc_style['EC_EVENT_CONTACT']['post'] = "&nbsp;";
$sc_style['EC_EVENT_CONTACT']['pre'] = "<b>".EC_LAN_33."</b> ";
$sc_style['EC_EVENT_THREAD']['pre'] = "<tr><td colspan='2' class='forumheader3'><span class='smalltext'>"; $sc_style['EC_EVENT_CONTACT']['post'] = "&nbsp;";
$sc_style['EC_EVENT_THREAD']['post'] = "</span></td></tr>\n";
$sc_style['EC_EVENT_THREAD']['pre'] = "<tr><td colspan='2' class='forumheader3'><span class='smalltext'>";
$sc_style['EC_EVENT_CATEGORY']['pre'] = "<b>".EC_LAN_30."</b> "; $sc_style['EC_EVENT_THREAD']['post'] = "</span></td></tr>\n";
$sc_style['EC_EVENT_CATEGORY']['post'] = "&nbsp;";
$sc_style['EC_EVENT_CATEGORY']['pre'] = "<b>".EC_LAN_30."</b> ";
$sc_style['EC_EVENT_DATE_START']['pre'] = ''; $sc_style['EC_EVENT_CATEGORY']['post'] = "&nbsp;";
$sc_style['EC_EVENT_DATE_START']['post'] = '';
$sc_style['EC_EVENT_DATE_START']['pre'] = '';
$sc_style['EC_EVENT_TIME_START']['pre'] = ''; $sc_style['EC_EVENT_DATE_START']['post'] = '';
$sc_style['EC_EVENT_TIME_START']['post'] = '';
$sc_style['EC_EVENT_TIME_START']['pre'] = '';
$sc_style['EC_EVENT_DATE_END']['pre'] = ''; $sc_style['EC_EVENT_TIME_START']['post'] = '';
$sc_style['EC_EVENT_DATE_END']['post'] = '';
$sc_style['EC_EVENT_DATE_END']['pre'] = '';
$sc_style['EC_EVENT_TIME_END']['pre'] = ''; $sc_style['EC_EVENT_DATE_END']['post'] = '';
$sc_style['EC_EVENT_TIME_END']['post'] = '';
$sc_style['EC_EVENT_TIME_END']['pre'] = '';
$sc_style['EC_EVENT_EVENT_DATE_TIME']['pre'] = "<b>".EC_LAN_29."</b> "; $sc_style['EC_EVENT_TIME_END']['post'] = '';
$sc_style['EC_EVENT_EVENT_DATE_TIME']['post'] = '';
$sc_style['EC_EVENT_EVENT_DATE_TIME']['pre'] = "<b>".EC_LAN_29."</b> ";
$sc_style['EC_IFNOT_ALLDAY']['pre'] = EC_LAN_144; $sc_style['EC_EVENT_EVENT_DATE_TIME']['post'] = '';
$sc_style['EC_IFNOT_ALLDAY']['post'] = "";
$sc_style['EC_IFNOT_ALLDAY']['pre'] = EC_LAN_144;
// The $EVENT_EVENT_DATETIME strings are used with the EC_EVENT_EVENT_DATE_TIME shortcode. $sc_style['EC_IFNOT_ALLDAY']['post'] = "";
// There are four cases, each with a corresponding index into $EVENT_EVENT_DATETIME:
// 0 - Normal event, starting and finishing on different dates (the 'original' default) // The $EVENT_EVENT_DATETIME strings are used with the EC_EVENT_EVENT_DATE_TIME shortcode.
// 1 - Normal event, starting and finishing on the same day // There are four cases, each with a corresponding index into $EVENT_EVENT_DATETIME:
// 2 - All-day event, starting and finishing on different days // 0 - Normal event, starting and finishing on different dates (the 'original' default)
// 3 - All-day event, starting and finishing on the same day // 1 - Normal event, starting and finishing on the same day
$EVENT_EVENT_DATETIME[0] = "{EC_EVENT_DATE_START}".EC_LAN_144."{EC_EVENT_TIME_START}<b> ".EC_LAN_69."</b> {EC_EVENT_DATE_END}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_END}"; // 2 - All-day event, starting and finishing on different days
$EVENT_EVENT_DATETIME[1] = "{EC_EVENT_DATE_START} ".EC_LAN_84." {EC_EVENT_TIME_START}".EC_LAN_85."{EC_EVENT_TIME_END}"; // 3 - All-day event, starting and finishing on the same day
$EVENT_EVENT_DATETIME[2] = "{EC_EVENT_DATE_START} <b>".EC_LAN_69."</b> {EC_EVENT_DATE_END}"; $EVENT_EVENT_DATETIME[0] = "{EC_EVENT_DATE_START}".EC_LAN_144."{EC_EVENT_TIME_START}<b> ".EC_LAN_69."</b> {EC_EVENT_DATE_END}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_END}";
$EVENT_EVENT_DATETIME[3] = "{EC_EVENT_DATE_START}"; $EVENT_EVENT_DATETIME[1] = "{EC_EVENT_DATE_START} ".EC_LAN_84." {EC_EVENT_TIME_START}".EC_LAN_85."{EC_EVENT_TIME_END}";
$EVENT_EVENT_DATETIME[2] = "{EC_EVENT_DATE_START} <b>".EC_LAN_69."</b> {EC_EVENT_DATE_END}";
$EVENT_EVENT_DATETIME[3] = "{EC_EVENT_DATE_START}";
$EVENT_EVENT_TABLE = "
<tr>
<td > $EVENT_EVENT_TABLE = "
<a href='#{EC_EVENT_ID}' class='e-show-if-js e-expandit fcaption' style='display:inline-block; cursor:pointer; text-align:left; border:0px solid #000; width:100%' title='".EC_LAN_132."'>{EC_EVENT_RECENT_ICON}{EC_EVENT_CAT_ICON}{EC_EVENT_HEADING_DATE}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_START}&nbsp;-&nbsp;{EC_EVENT_TITLE}</a> <tr>
<div id='{EC_EVENT_ID}' {EC_EVENT_DISPLAYCLASS} style='padding-top:10px; padding-bottom:10px; text-align:left;'> <td >
<table style='width:100%;' cellspacing='0' cellpadding='0'> <a href='#{EC_EVENT_ID}' class='e-show-if-js e-expandit fcaption' style='display:inline-block; cursor:pointer; text-align:left; border:0px solid #000; width:100%' title='".EC_LAN_132."'>{EC_EVENT_RECENT_ICON}{EC_EVENT_CAT_ICON}{EC_EVENT_HEADING_DATE}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_START}&nbsp;-&nbsp;{EC_EVENT_TITLE}</a>
<tr><td colspan='2' class='forumheader3'>{EC_EVENT_AUTHOR} {EC_EVENT_CAT_ICON} {EC_EVENT_CATEGORY} {EC_EVENT_CONTACT} {EC_EVENT_OPTIONS}</td></tr> <div id='{EC_EVENT_ID}' {EC_EVENT_DISPLAYCLASS} style='padding-top:10px; padding-bottom:10px; text-align:left;'>
<tr><td colspan='2' class='forumheader3'>{EC_EVENT_EVENT_DATE_TIME}</td></tr>\n <table style='width:100%;' cellspacing='0' cellpadding='0'>
{EC_EVENT_LOCATION} <tr><td colspan='2' class='forumheader3'>{EC_EVENT_AUTHOR} {EC_EVENT_CAT_ICON} {EC_EVENT_CATEGORY} {EC_EVENT_CONTACT} {EC_EVENT_OPTIONS}</td></tr>
{EC_EVENT_DETAILS} <tr><td colspan='2' class='forumheader3'>{EC_EVENT_EVENT_DATE_TIME}</td></tr>\n
{EC_EVENT_THREAD} {EC_EVENT_LOCATION}
</table> {EC_EVENT_DETAILS}
</div> {EC_EVENT_THREAD}
</td> </table>
</tr>\n </div>
"; </td>
</tr>\n
//------------------------------------------ ";
// CALENDAR CALENDAR - 'Big' calendar
//------------------------------------------ //------------------------------------------
$CALENDAR_CALENDAR_START = " // CALENDAR CALENDAR - 'Big' calendar
<div style='text-align:center'> //------------------------------------------
<table cellpadding='0' cellspacing='1' class='fborder' style='background-color:#DDDDDD; width:100%'> $CALENDAR_CALENDAR_START = "
<colgroup> <div style='text-align:center'>
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' /> <table cellpadding='0' cellspacing='1' class='fborder' style='background-color:#DDDDDD; width:100%'>
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' /> <colgroup>
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' /> <col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' /> <col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' /> <col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' /> <col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' /> <col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
</colgroup>"; <col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
$CALENDAR_CALENDAR_END = " </colgroup>";
</tr>\n</table></div>";
$CALENDAR_CALENDAR_END = "
// 'Empty' cells where there's not a day at all </tr>\n</table></div>";
$CALENDAR_CALENDAR_DAY_NON = "<td style='width:14%;height:90px;'></td>";
// 'Empty' cells where there's not a day at all
//header row $CALENDAR_CALENDAR_DAY_NON = "<td style='width:14%;height:90px;'></td>";
$CALENDAR_CALENDAR_HEADER_START = "<tr>";
$CALENDAR_CALENDAR_HEADER = "<td class='fcaption' style='z-index: -1; background-color:#000; color:#FFF; width:90px; height:20px; text-align:center; vertical-align:middle;'>{EC_CALENDAR_CALENDAR_HEADER_DAY}</td>"; //header row
$CALENDAR_CALENDAR_HEADER_END = "</tr>\n<tr>"; $CALENDAR_CALENDAR_HEADER_START = "<tr>";
$CALENDAR_CALENDAR_HEADER = "<td class='fcaption' style='z-index: -1; background-color:#000; color:#FFF; width:90px; height:20px; text-align:center; vertical-align:middle;'>{EC_CALENDAR_CALENDAR_HEADER_DAY}</td>";
$CALENDAR_CALENDAR_HEADER_END = "</tr>\n<tr>";
$CALENDAR_CALENDAR_WEEKSWITCH = "</tr>\n<tr>";
//today $CALENDAR_CALENDAR_WEEKSWITCH = "</tr>\n<tr>";
$CALENDAR_CALENDAR_DAY_TODAY = "
<td class='forumheader3' style='vertical-align:top;height:90px;'> //today
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>{EC_CALENDAR_CALENDAR_DAY_TODAY_HEADING}</span>"; $CALENDAR_CALENDAR_DAY_TODAY = "
<td class='forumheader3' style='vertical-align:top;height:90px;'>
//day has events <span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>{EC_CALENDAR_CALENDAR_DAY_TODAY_HEADING}</span>";
$CALENDAR_CALENDAR_DAY_EVENT = "
<td class='forumheader3' style='z-index: 1;vertical-align:top;height:90px;'> //day has events
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EVENT_HEADING}</b></span>"; $CALENDAR_CALENDAR_DAY_EVENT = "
<td class='forumheader3' style='z-index: 1;vertical-align:top;height:90px;'>
// no events and not today <span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EVENT_HEADING}</b></span>";
$CALENDAR_CALENDAR_DAY_EMPTY = "
<td class='forumheader2' style='z-index: 1;vertical-align:top;height:90px;'> // no events and not today
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EMPTY_HEADING}</b></span>"; $CALENDAR_CALENDAR_DAY_EMPTY = "
<td class='forumheader2' style='z-index: 1;vertical-align:top;height:90px;'>
$CALENDAR_CALENDAR_DAY_END = "</td>"; <span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EMPTY_HEADING}</b></span>";
// CALENDAR SHOW EVENT $CALENDAR_CALENDAR_DAY_END = "</td>";
$sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['pre'] = "<td style='vertical-align:top; color: #0; background-color: #ff00; width:10px;'>";
$sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['post'] = "</td>"; // CALENDAR SHOW EVENT
$CALENDAR_SHOWEVENT = "<table cellspacing='0' cellpadding='0' style='width:100%;'><tr>{EC_CALENDAR_CALENDAR_RECENT_ICON}<td style='vertical-align:top; width:10px;'>{EC_SHOWEVENT_IMAGE}</td><td style='vertical-align:top; width:2%;'>{EC_SHOWEVENT_INDICAT}</td><td style='vertical-align:top;'>{EC_SHOWEVENT_HEADING}</td></tr>\n</table>"; $sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['pre'] = "<td style='vertical-align:top; color: #0; background-color: #ff00; width:10px;'>";
$sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['post'] = "</td>";
$CALENDAR_SHOWEVENT = "<table cellspacing='0' cellpadding='0' style='width:100%;'><tr>{EC_CALENDAR_CALENDAR_RECENT_ICON}<td style='vertical-align:top; width:10px;'>{EC_SHOWEVENT_IMAGE}</td><td style='vertical-align:top; width:2%;'>{EC_SHOWEVENT_INDICAT}</td><td style='vertical-align:top;'>{EC_SHOWEVENT_HEADING}</td></tr>\n</table>";
//------------------------------------------
// Calendar menu - 'Small' calendar
//------------------------------------------ //------------------------------------------
$CALENDAR_MENU_HDG_LINK_CLASS = "class='forumlink'"; // Class, and optional style, for menu heading if its a clickable link // Calendar menu - 'Small' calendar
$CALENDAR_MENU_START = "<div style='text-align:center'>"; //------------------------------------------
$CALENDAR_MENU_TABLE_START = "<table cellpadding='0' cellspacing='1' style='width:100%;' class='fborder'>"; // colgroup doesn't work! $CALENDAR_MENU_HDG_LINK_CLASS = "class='forumlink'"; // Class, and optional style, for menu heading if its a clickable link
$CALENDAR_MENU_START = "<div style='text-align:center'>";
$CALENDAR_MENU_END = "</tr></table></div>"; $CALENDAR_MENU_TABLE_START = "<table cellpadding='0' cellspacing='1' style='width:100%;' class='fborder'>"; // colgroup doesn't work!
// Blank cells at beginning and end $CALENDAR_MENU_END = "</tr></table></div>";
$CALENDAR_MENU_DAY_NON = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '><br /></td>";
// Blank cells at beginning and end
//header row $CALENDAR_MENU_DAY_NON = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '><br /></td>";
$CALENDAR_MENU_HEADER_START = "<tr>\n";
$CALENDAR_MENU_HEADER_FRONT = "<td class='forumheader' style='text-align:center; vertical-align:middle;'><span class='smalltext'>"; //header row
$CALENDAR_MENU_HEADER_BACK = "</span></td>"; $CALENDAR_MENU_HEADER_START = "<tr>\n";
$CALENDAR_MENU_HEADER_END = "</tr>\n<tr>"; $CALENDAR_MENU_HEADER_FRONT = "<td class='forumheader' style='text-align:center; vertical-align:middle;'><span class='smalltext'>";
$CALENDAR_MENU_HEADER_BACK = "</span></td>";
$CALENDAR_MENU_HEADER_END = "</tr>\n<tr>";
$CALENDAR_MENU_WEEKSWITCH = "</tr>\n<tr>";
// Start and end CSS for date cells - six cases to decode, determined by array index: $CALENDAR_MENU_WEEKSWITCH = "</tr>\n<tr>";
// 1 - Today, no events
// 2 - Some other day, no events // Start and end CSS for date cells - six cases to decode, determined by array index:
// 3 - Today with events // 1 - Today, no events
// 4 - Some other day with events // 2 - Some other day, no events
// 5 - today with events, one or more of which has recently been added/updated // 3 - Today with events
// 6 - Some other day with events, one or more of which has recently been added/updated // 4 - Some other day with events
// 5 - today with events, one or more of which has recently been added/updated
// 6 - Some other day with events, one or more of which has recently been added/updated
//today, no events
$CALENDAR_MENU_DAY_START['1'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
//today, no events
// no events and not today $CALENDAR_MENU_DAY_START['1'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
$CALENDAR_MENU_DAY_START['2'] = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '>";
// no events and not today
//day has events - same whether its today or not $CALENDAR_MENU_DAY_START['2'] = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '>";
$CALENDAR_MENU_DAY_START['3'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
$CALENDAR_MENU_DAY_START['4'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>"; //day has events - same whether its today or not
// day has events, one which is recently added/updated $CALENDAR_MENU_DAY_START['3'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>"; $CALENDAR_MENU_DAY_START['4'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>"; // day has events, one which is recently added/updated
// Example highlight using background colour: $CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
//$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF8000;'>"; $CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
//$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF0000; '>"; // Example highlight using background colour:
//$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF8000;'>";
//$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF0000; '>";
$CALENDAR_MENU_DAY_END['1'] = "</td>";
$CALENDAR_MENU_DAY_END['2'] = "</td>";
$CALENDAR_MENU_DAY_END['3'] = "</td>"; $CALENDAR_MENU_DAY_END['1'] = "</td>";
$CALENDAR_MENU_DAY_END['4'] = "</td>"; $CALENDAR_MENU_DAY_END['2'] = "</td>";
$CALENDAR_MENU_DAY_END['5'] = "</td>"; $CALENDAR_MENU_DAY_END['3'] = "</td>";
$CALENDAR_MENU_DAY_END['6'] = "</td>"; $CALENDAR_MENU_DAY_END['4'] = "</td>";
$CALENDAR_MENU_DAY_END['5'] = "</td>";
//============================================================================ $CALENDAR_MENU_DAY_END['6'] = "</td>";
// Next event menu template
$sc_style['EC_NEXT_EVENT_TIME']['pre'] = EC_LAN_144; //============================================================================
$sc_style['EC_NEXT_EVENT_TIME']['post'] = ""; // Next event menu template
// Following are original styles $sc_style['EC_NEXT_EVENT_TIME']['pre'] = EC_LAN_144;
//$sc_style['NEXT_EVENT_ICON']['pre'] = "<img style='border:0px' src='"; $sc_style['EC_NEXT_EVENT_TIME']['post'] = "";
//$sc_style['NEXT_EVENT_ICON']['post'] = "' alt='' />&nbsp;"; // Following are original styles
// Following to 'float right' on a larger icon //$sc_style['NEXT_EVENT_ICON']['pre'] = "<img style='border:0px' src='";
$sc_style['EC_NEXT_EVENT_ICON']['pre'] = "<img style='clear: right; float: left; margin: 0px 3px 0px 0px; padding:1px; border: 0px;' src='"; //$sc_style['NEXT_EVENT_ICON']['post'] = "' alt='' />&nbsp;";
$sc_style['EC_NEXT_EVENT_ICON']['post'] = "' alt='' />"; // Following to 'float right' on a larger icon
$sc_style['EC_NEXT_EVENT_ICON']['pre'] = "<img style='clear: right; float: left; margin: 0px 3px 0px 0px; padding:1px; border: 0px;' src='";
$sc_style['EC_NEXT_EVENT_ICON']['post'] = "' alt='' />";
if (!isset($EVENT_CAL_FE_LINE))
{
$EVENT_CAL_FE_LINE = "{EC_NEXT_EVENT_RECENT_ICON}{EC_NEXT_EVENT_ICON}{EC_NEXT_EVENT_DATE}{EC_NEXT_EVENT_TIME}<br /><strong>{EC_NEXT_EVENT_TITLE}</strong>{EC_NEXT_EVENT_GAP}"; if (!isset($EVENT_CAL_FE_LINE))
} {
$EVENT_CAL_FE_LINE = "{EC_NEXT_EVENT_RECENT_ICON}{EC_NEXT_EVENT_ICON}{EC_NEXT_EVENT_DATE}{EC_NEXT_EVENT_TIME}<br /><strong>{EC_NEXT_EVENT_TITLE}</strong>{EC_NEXT_EVENT_GAP}";
}
?> ?>

View File

@@ -1,35 +1,37 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* BBCode template for calendar menu (pretend we're custom page) * BBCode template for calendar menu (pretend we're custom page)
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_bb.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_bb.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * BBCode template
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
$temp['event'] = " */
{BB_HELP=ec_event}<br />
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right} $temp['event'] = "
{BB=bq}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes} {BB_HELP=ec_event}<br />
{BB_PREIMAGEDIR=".e_IMAGE."newspost_images/} {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
{BB=preimage}{BB=prefile} {BB=bq}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
"; {BB_PREIMAGEDIR=".e_IMAGE."newspost_images/}
{BB=preimage}{BB=prefile}
";
?> ?>

View File

@@ -1,413 +1,411 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2001-2010 e107 Inc (e107.org) * Copyright (C) 2001-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar plugin - cron task * Event calendar plugin - cron task
* *
* $URL$ * $URL$
* $Id$ * $Id$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar plugin - cron task
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
if (!defined('e107_INIT')) { exit; }
include_lan(e_PLUGIN.'/calendar_menu/languages/English_mailer.php');
class calendar_menu_cron // include plugin-folder in the name. include_lan(e_PLUGIN.'/calendar_menu/languages/English_mailer.php');
{
private $logRequirement = 0; // Flag to determine logging level class calendar_menu_cron // include plugin-folder in the name.
private $debugLevel = 0; // Used for internal debugging {
private $logHandle = NULL; private $logRequirement = 0; // Flag to determine logging level
private $ecalClass; // Calendar library routines private $debugLevel = 0; // Used for internal debugging
private $e107; private $logHandle = NULL;
private $defaultMessage = array(); // Used where nothing special defined private $ecalClass; // Calendar library routines
private $startTime; // Start date for processing private $e107;
private $mailManager; private $defaultMessage = array(); // Used where nothing special defined
private $ourDB; // Used for some things private $startTime; // Start date for processing
private $mailManager;
private $ourDB; // Used for some things
public function __construct()
{
$this->e107 = e107::getInstance(); public function __construct()
//$this->debugLevel = 2; {
} $this->e107 = e107::getInstance();
//$this->debugLevel = 2;
}
/**
* Cron configuration
* /**
* Defines one or more cron tasks to be performed * Cron configuration
* *
* @return array of task arrays * Defines one or more cron tasks to be performed
*/ *
public function config() * @return array of task arrays
{ */
$cron = array(); public function config()
$cron[] = array('name' => LAN_EC_MAIL_04, 'category' => 'plugin', 'function' => 'processSubs', 'description' => LAN_EC_MAIL_05); {
return $cron; $cron = array();
} $cron[] = array('name' => LAN_EC_MAIL_04, 'category' => 'plugin', 'function' => 'processSubs', 'description' => LAN_EC_MAIL_05);
return $cron;
}
private function checkDB()
{
if ($this->ourDB == NULL) private function checkDB()
{ {
$this->ourDB = new db; if ($this->ourDB == NULL)
} {
} $this->ourDB = new db;
}
}
/**
* Logging routine - writes lines to a text file
* /**
* Auto-opens log file (if necessary) on first call * Logging routine - writes lines to a text file
* *
* @param string $logText - body of text to write * Auto-opens log file (if necessary) on first call
* @param boolean $closeAfter - if TRUE, log file closed before exit; otherwise left open *
* * @param string $logText - body of text to write
* @return none * @param boolean $closeAfter - if TRUE, log file closed before exit; otherwise left open
*/ *
function logLine($logText, $closeAfter = FALSE, $addTimeDate = FALSE) * @return none
{ */
if ($this->logRequirement == 0) return; function logLine($logText, $closeAfter = FALSE, $addTimeDate = FALSE)
{
$logFilename = e_LOG.'calendar_mail.txt'; if ($this->logRequirement == 0) return;
if ($this->logHandle == NULL)
{ $logFilename = e_LOG.'calendar_mail.txt';
if (!($this->logHandle = fopen($logFilename, "a"))) if ($this->logHandle == NULL)
{ // Problem creating file? {
echo "File open failed!<br />"; if (!($this->logHandle = fopen($logFilename, "a")))
$this->logRequirement = 0; { // Problem creating file?
return; echo "File open failed!<br />";
} $this->logRequirement = 0;
} return;
}
if (fwrite($this->logHandle,($addTimeDate ? date('D j M Y G:i:s').': ' : '').$logText."\r\n") == FALSE) }
{
$this->logRequirement = 0; if (fwrite($this->logHandle,($addTimeDate ? date('D j M Y G:i:s').': ' : '').$logText."\r\n") == FALSE)
echo 'File write failed!<br />'; {
} $this->logRequirement = 0;
echo 'File write failed!<br />';
if ($closeAfter) }
{
fclose($this->logHandle); if ($closeAfter)
$this->logHandle = NULL; {
} fclose($this->logHandle);
} $this->logHandle = NULL;
}
}
/**
* Called to process the calendar menu subscriptions list - the cron task must be set to call us once/day (typically at about 0100)
* /**
* Emails are added to the queue. * Called to process the calendar menu subscriptions list - the cron task must be set to call us once/day (typically at about 0100)
* Various events are logged in a text file *
* * Emails are added to the queue.
* @return none * Various events are logged in a text file
*/ *
public function processSubs() * @return none
{ */
global $pref; public function processSubs()
{
require_once(e_PLUGIN.'calendar_menu/ecal_class.php'); require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
$this->ecalClass = new ecal_class; $this->ecalClass = new ecal_class;
e107::getScParser(); e107::getScParser();
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php'); require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
if (is_readable(THEME.'ec_mailout_template.php')) if (is_readable(THEME.'ec_mailout_template.php'))
{ // Has to be require { // Has to be require
require(THEME.'ec_mailout_template.php'); require(THEME.'ec_mailout_template.php');
} }
else else
{ {
require(e_PLUGIN.'calendar_menu/ec_mailout_template.php'); require(e_PLUGIN.'calendar_menu/ec_mailout_template.php');
} }
$this->startTime = mktime(0, 0, 0, date('n'), date('d'), date('Y')); // Date for start processing $this->startTime = mktime(0, 0, 0, date('n'), date('d'), date('Y')); // Date for start processing
setScVar('event_calendar_shortcodes', 'ecalClass', &$this->ecalClass); // Give shortcode a pointer to calendar class setScVar('event_calendar_shortcodes', 'ecalClass', &$this->ecalClass); // Give shortcode a pointer to calendar class
$this->logRequirement = varset($pref['eventpost_emaillog'], 0); $this->logRequirement = varset($this->ecal_class->pref['eventpost_emaillog'], 0);
if ($this->debugLevel >= 2) $this->logRequirement = 2; // Force full logging if debug if ($this->debugLevel >= 2) $this->logRequirement = 2; // Force full logging if debug
// Start of the 'real' code // Start of the 'real' code
$this->logLine("\r\n\r\n".LAN_EC_MAIL_06.date('D j M Y G:i:s')); $this->logLine("\r\n\r\n".LAN_EC_MAIL_06.date('D j M Y G:i:s'));
// Start with the 'in advance' emails // Start with the 'in advance' emails
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and $cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
event_cat_last < " . intval($this->startTime) . " and event_cat_last < " . intval($this->startTime) . " and
event_cat_ahead > 0 and event_cat_ahead > 0 and
event_start >= (" . intval($this->startTime) . "+(86400*(event_cat_ahead))) and event_start >= (" . intval($this->startTime) . "+(86400*(event_cat_ahead))) and
event_start < (" . intval($this->startTime) . "+(86400*(event_cat_ahead+1))) and event_start < (" . intval($this->startTime) . "+(86400*(event_cat_ahead+1))) and
find_in_set(event_cat_notify,'1,3,5,7')"; find_in_set(event_cat_notify,'1,3,5,7')";
$this->sendMailshot($cal_args, 'Advance',1, $calendar_shortcodes); $this->sendMailshot($cal_args, 'Advance',1, $calendar_shortcodes);
$insertString = 'event_cat_today < '.intval($this->startTime).' and'; $insertString = 'event_cat_today < '.intval($this->startTime).' and';
if ($this->debugLevel > 0) $insertString = ''; // Allows us to so a mailshot every call of cron tick if ($this->debugLevel > 0) $insertString = ''; // Allows us to so a mailshot every call of cron tick
// then for today // then for today
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and $cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
{$insertString} event_start >= (" . intval($this->startTime) . ") and {$insertString} event_start >= (" . intval($this->startTime) . ") and
event_start < (86400+" . intval($this->startTime) . ") and event_start < (86400+" . intval($this->startTime) . ") and
find_in_set(event_cat_notify,'2,3,6,7')"; find_in_set(event_cat_notify,'2,3,6,7')";
$this->sendMailshot($cal_args, 'today',2, $calendar_shortcodes); $this->sendMailshot($cal_args, 'today',2, $calendar_shortcodes);
// Finally do 'day before' emails (its an alternative to 'today' emails) // Finally do 'day before' emails (its an alternative to 'today' emails)
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and $cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
{$insertString} event_start >= (" . intval($this->startTime) ." + 86400 ) and {$insertString} event_start >= (" . intval($this->startTime) ." + 86400 ) and
event_start < (" . intval($this->startTime) ." + 172800) and event_start < (" . intval($this->startTime) ." + 172800) and
find_in_set(event_cat_notify,'4,5,6,7')"; find_in_set(event_cat_notify,'4,5,6,7')";
$this->sendMailshot($cal_args, 'tomorrow',2, $calendar_shortcodes); $this->sendMailshot($cal_args, 'tomorrow',2, $calendar_shortcodes);
$this->logLine(' .. Run completed',TRUE, TRUE); $this->logLine(' .. Run completed',TRUE, TRUE);
return TRUE; return TRUE;
} }
// Function called to load in default templates (messages) if required - only accesses database once // Function called to load in default templates (messages) if required - only accesses database once
function loadDefaultMessages() function loadDefaultMessages()
{ {
if (($this->defaultMessage[1] != '') && ($this->defaultMessage[2] != '')) return; if (($this->defaultMessage[1] != '') && ($this->defaultMessage[2] != '')) return;
$this->checkDB(); $this->checkDB();
if ($this->ourDB->db_Select('event_cat', 'event_cat_msg1,event_cat_msg2', "event_cat_name = '".EC_DEFAULT_CATEGORY."' ")) if ($this->ourDB->db_Select('event_cat', 'event_cat_msg1,event_cat_msg2', "event_cat_name = '".EC_DEFAULT_CATEGORY."' "))
{ {
if ($row = $this->ourDB->db_Fetch()) if ($row = $this->ourDB->db_Fetch())
{ {
$this->defaultMessage[1] = $row['event_cat_msg1']; $this->defaultMessage[1] = $row['event_cat_msg1'];
$this->defaultMessage[2] = $row['event_cat_msg2']; $this->defaultMessage[2] = $row['event_cat_msg2'];
} }
} }
// Put in generic message rather than nothing - will help flag omission // Put in generic message rather than nothing - will help flag omission
if ($this->defaultMessage[1] == '') $this->defaultMessage[1] = EC_LAN_146; if ($this->defaultMessage[1] == '') $this->defaultMessage[1] = EC_LAN_146;
if ($this->defaultMessage[2] == '') $this->defaultMessage[2] = EC_LAN_147; if ($this->defaultMessage[2] == '') $this->defaultMessage[2] = EC_LAN_147;
} }
private function checkMailManager() private function checkMailManager()
{ {
if ($this->mailManager == NULL) if ($this->mailManager == NULL)
{ {
require_once(e_HANDLER .'mail_manager_class.php'); require_once(e_HANDLER .'mail_manager_class.php');
$this->mailManager = new e107MailManager(); $this->mailManager = new e107MailManager();
} }
} }
/* /*
Function to actually send a mailshot Function to actually send a mailshot
*/ */
function sendMailshot($cal_query, $shot_type, $msg_num, $calendar_shortcodes) function sendMailshot($cal_query, $shot_type, $msg_num, $calendar_shortcodes)
{ {
global $pref; if ($this->logRequirement > 1)
{
if ($this->logRequirement > 1) $this->logLine(' Starting emails for '.$shot_type, FALSE, TRUE);
{ if ($this->debugLevel >= 2) $this->logLine("\r\n Query is: ".$cal_query);
$this->logLine(' Starting emails for '.$shot_type, FALSE, TRUE); }
if ($this->debugLevel >= 2) $this->logLine("\r\n Query is: ".$cal_query);
} if ($num_cat_proc = $this->e107->sql->db_Select_gen($cal_query))
{ // Got at least one event to process here
if ($num_cat_proc = $this->e107->sql->db_Select_gen($cal_query)) if ($this->logRequirement > 1)
{ // Got at least one event to process here $this->logLine(' - '.$num_cat_proc.' categories found to process');
if ($this->logRequirement > 1)
$this->logLine(' - '.$num_cat_proc.' categories found to process'); $this->checkDB(); // Make sure we've got another DB object
while ($thisevent = $this->e107->sql->db_Fetch())
$this->checkDB(); // Make sure we've got another DB object { // Process one event at a time
while ($thisevent = $this->e107->sql->db_Fetch())
{ // Process one event at a time $this->logLine(' Processing event: '.$event_title);
setScVar('event_calendar_shortcodes', 'event', $thisevent); // Save current values in shortcode
$this->logLine(' Processing event: '.$event_title);
setScVar('event_calendar_shortcodes', 'event', $thisevent); // Save current values in shortcode // Note that event processed, and generate the email
if ($msg_num == 1)
// Note that event processed, and generate the email {
if ($msg_num == 1) $this->ourDB->db_Update('event_cat', 'event_cat_last='.time().' where event_cat_id='.intval($event_cat_id));
{ $cal_msg = $thisevent['event_cat_msg1'];
$this->ourDB->db_Update('event_cat', 'event_cat_last='.time().' where event_cat_id='.intval($event_cat_id)); }
$cal_msg = $thisevent['event_cat_msg1']; else
} {
else $this->ourDB->db_Update('event_cat', 'event_cat_today='.time().' where event_cat_id='.intval($event_cat_id));
{ $cal_msg = $thisevent['event_cat_msg2'];
$this->ourDB->db_Update('event_cat', 'event_cat_today='.time().' where event_cat_id='.intval($event_cat_id)); }
$cal_msg = $thisevent['event_cat_msg2'];
} if (trim($cal_msg) == '')
{
if (trim($cal_msg) == '') $this->loadDefaultMessages();
{ $cal_msg = $this->defaultMessage[$msg_num];
$this->loadDefaultMessages(); }
$cal_msg = $this->defaultMessage[$msg_num];
}
// Parsing the template here means we can't use USER-related shortcodes
// Main ones which are relevant: MAIL_DATE_START, MAIL_TIME_START, MAIL_DATE_END,
// Parsing the template here means we can't use USER-related shortcodes // MAIL_TIME_END, MAIL_TITLE, MAIL_DETAILS, MAIL_CATEGORY, MAIL_LOCATION,
// Main ones which are relevant: MAIL_DATE_START, MAIL_TIME_START, MAIL_DATE_END, // MAIL_CONTACT, MAIL_THREAD (maybe). Also MAIL_LINK, MAIL_SHORT_DATE
// MAIL_TIME_END, MAIL_TITLE, MAIL_DETAILS, MAIL_CATEGORY, MAIL_LOCATION, // Best to strip entities here rather than at entry - handles old events as well
// MAIL_CONTACT, MAIL_THREAD (maybe). Also MAIL_LINK, MAIL_SHORT_DATE // Note that certain user-related substitutions will work, however - |USERID|, |USERNAME|, |DISPLAYNAME|
// Best to strip entities here rather than at entry - handles old events as well $cal_title = html_entity_decode($this->e107->tp->parseTemplate($this->ecal_class->pref['eventpost_mailsubject'], TRUE),ENT_QUOTES,CHARSET);
// Note that certain user-related substitutions will work, however - |USERID|, |USERNAME|, |DISPLAYNAME| $cal_msg = html_entity_decode($this->e107->tp->parseTemplate($cal_msg, TRUE),ENT_QUOTES,CHARSET);
$cal_title = html_entity_decode($this->e107->tp->parseTemplate($pref['eventpost_mailsubject'], TRUE),ENT_QUOTES,CHARSET);
$cal_msg = html_entity_decode($this->e107->tp->parseTemplate($cal_msg, TRUE),ENT_QUOTES,CHARSET); // Four cases for the query:
// 1. No forced mailshots - based on event_subs table only Need INNER JOIN
// Four cases for the query: // 2. Forced mailshot to members - send to all users (don't care about subscriptions) Don't need JOIN
// 1. No forced mailshots - based on event_subs table only Need INNER JOIN // 3. Forced mailshot to group of members - based on user table only Don't need JOIN
// 2. Forced mailshot to members - send to all users (don't care about subscriptions) Don't need JOIN // 4. Forced mailshot to group, plus optional subscriptions - use the lot! Need LEFT JOIN
// 3. Forced mailshot to group of members - based on user table only Don't need JOIN // (Always block sent to banned members)
// 4. Forced mailshot to group, plus optional subscriptions - use the lot! Need LEFT JOIN $manual_subs = (isset($this->ecal_class->pref['eventpost_asubs']) && ($this->ecal_class->pref['eventpost_asubs'] == '1'));
// (Always block sent to banned members) $subs_fields = '';
$manual_subs = (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1')); $subs_join = '';
$subs_fields = ''; $whereClause = '';
$subs_join = ''; $group_clause = '';
$whereClause = '';
$group_clause = ''; if ($event_cat_force_class != e_UC_MEMBER)
{ // Cases 1, 3, 4 (basic query does for case 2)
if ($event_cat_force_class != e_UC_MEMBER) if ((!$thisevent['event_cat_force_class']) || ($manual_subs))
{ // Cases 1, 3, 4 (basic query does for case 2) { // Cases 1 & 4 - need to join with event_subs database
if ((!$thisevent['event_cat_force_class']) || ($manual_subs)) $subs_fields = ", es.* ";
{ // Cases 1 & 4 - need to join with event_subs database if ($thisevent['event_cat_force_class']) $subs_join = 'LEFT'; else $subs_join = 'INNER';
$subs_fields = ", es.* "; $subs_join .= ' join `#event_subs` AS es on u.`user_id`=es.`event_userid` ';
if ($thisevent['event_cat_force_class']) $subs_join = 'LEFT'; else $subs_join = 'INNER'; $whereClause = ' es.`event_cat`='.intval($thisevent['event_category']).' ';
$subs_join .= ' join `#event_subs` AS es on u.`user_id`=es.`event_userid` '; $group_clause = ' GROUP BY u.`user_id`';
$whereClause = ' es.`event_cat`='.intval($thisevent['event_category']).' '; }
$group_clause = ' GROUP BY u.`user_id`';
} if ($event_cat_force_class)
{ // cases 3 and 4 - ... and check for involuntary subscribers
if ($event_cat_force_class) if ($whereClause) $whereClause .= ' OR ';
{ // cases 3 and 4 - ... and check for involuntary subscribers if ($thisevent['event_cat_force_class'] == e_UC_ADMIN)
if ($whereClause) $whereClause .= ' OR '; {
if ($thisevent['event_cat_force_class'] == e_UC_ADMIN) $whereClause .= '(u.`user_admin` = 1 )';
{ }
$whereClause .= '(u.`user_admin` = 1 )'; else
} {
else $whereClause .= "find_in_set('".intval($thisevent['event_cat_force_class'])."', u.`user_class`)";
{ $group_clause = ' GROUP BY u.`user_id`';
$whereClause .= "find_in_set('".intval($thisevent['event_cat_force_class'])."', u.`user_class`)"; }
$group_clause = ' GROUP BY u.`user_id`'; }
}
} if ($whereClause) $whereClause = ' AND ('.$whereClause.' ) ';
} // End of cases 1, 3, 4
if ($whereClause) $whereClause = ' AND ('.$whereClause.' ) ';
} // End of cases 1, 3, 4 $cal_emilargs = "SELECT u.`user_id`, u.`user_class`, u.`user_email`, u.`user_name`, u.`user_ban`, u.`user_admin`{$subs_fields}
from `#user` AS u {$subs_join}
$cal_emilargs = "SELECT u.`user_id`, u.`user_class`, u.`user_email`, u.`user_name`, u.`user_ban`, u.`user_admin`{$subs_fields} WHERE u.`user_ban` = 0 {$whereClause} {$group_clause}";
from `#user` AS u {$subs_join}
WHERE u.`user_ban` = 0 {$whereClause} {$group_clause}";
if ($this->debugLevel >= 2)
{
if ($this->debugLevel >= 2) $this->logLine("\r\n Email selection query is: ".$cal_emilargs);
{ }
$this->logLine("\r\n Email selection query is: ".$cal_emilargs); if ($num_shots = $this->ourDB->db_Select_gen($cal_emilargs))
} {
if ($num_shots = $this->ourDB->db_Select_gen($cal_emilargs)) $this->logLine(' - '.$num_shots.' emails found to send');
{
$this->logLine(' - '.$num_shots.' emails found to send'); // Definitely got some emails to send here
$this->checkMailManager(); // Make sure our mail manager is loaded
// Definitely got some emails to send here
$this->checkMailManager(); // Make sure our mail manager is loaded // Start by adding the email details
$email = array(
// Start by adding the email details 'mail_create_app' => 'calendar_menu',
$email = array( 'mail_title' => str_replace('--REF--', intval(time()/3600), LAN_EC_MAIL_07),
'mail_create_app' => 'calendar_menu', 'mail_subject' => $cal_title,
'mail_title' => str_replace('--REF--', intval(time()/3600), LAN_EC_MAIL_07), 'mail_body' => $cal_msg,
'mail_subject' => $cal_title, 'mail_sender_email' => $this->ecal_class->pref['eventpost_mailaddress'],
'mail_body' => $cal_msg, 'mail_sender_name' => $this->ecal_class->pref['eventpost_mailfrom'],
'mail_sender_email' => $pref['eventpost_mailaddress'], 'mail_send_style' => 'textonly'
'mail_sender_name' => $pref['eventpost_mailfrom'], );
'mail_send_style' => 'textonly' if (FALSE === ($mailMainID = $this->mailManager->saveEmail($email, TRUE)))
); {
if (FALSE === ($mailMainID = $this->mailManager->saveEmail($email, TRUE))) $this->logLine('Error adding mail body to database - run abandoned');
{ break;
$this->logLine('Error adding mail body to database - run abandoned'); }
break; $this->mailManager->mailInitCounters($mailMainID); // Initialise counters for emails added
}
$this->mailManager->mailInitCounters($mailMainID); // Initialise counters for emails added
// Now loop through adding users
while ($row = $this->ourDB->db_Fetch())
// Now loop through adding users {
while ($row = $this->ourDB->db_Fetch()) if ($this->debugLevel == 0)
{ {
if ($this->debugLevel == 0) $recipient = array(
{ 'mail_recipient_id' => $row['user_id'],
$recipient = array( 'mail_recipient_name' => $row['user_name'],
'mail_recipient_id' => $row['user_id'], 'mail_recipient_email' => $row['user_email'],
'mail_recipient_name' => $row['user_name'], 'mail_target_info' => array( // Adding this info means it could be substituted
'mail_recipient_email' => $row['user_email'], 'USERID' => $row['user_id'],
'mail_target_info' => array( // Adding this info means it could be substituted 'DISPLAYNAME' => $row['user_name'],
'USERID' => $row['user_id'], 'USERNAME' => $row['user_loginname']
'DISPLAYNAME' => $row['user_name'], )
'USERNAME' => $row['user_loginname'] );
) $result = $this->mailManager->mailAddNoDup($mailMainID, $recipient, MAIL_STATUS_TEMP);
); if ($result === FALSE)
$result = $this->mailManager->mailAddNoDup($mailMainID, $recipient, MAIL_STATUS_TEMP); {
if ($result === FALSE) $this->logLine("Error adding recipient {$row['user_id']}");
{ }
$this->logLine("Error adding recipient {$row['user_id']}"); }
} else
} {
else $send_result = " **DEBUG**";
{ }
$send_result = " **DEBUG**"; if ($this->logRequirement > 1)
} {
if ($this->logRequirement > 1) $this->logLine(' Send to '.$user_id.':'.$user_email.' Name: '.$user_name.' Result = '.$send_result);
{ }
$this->logLine(' Send to '.$user_id.':'.$user_email.' Name: '.$user_name.' Result = '.$send_result); }
} $this->mailManager->mailUpdateCounters($mailMainID); // Save counters to DB
} if ($this->mailManager->activateEmail($mailMainID, FALSE, time() + 80000) === TRUE)
$this->mailManager->mailUpdateCounters($mailMainID); // Save counters to DB {
if ($this->mailManager->activateEmail($mailMainID, FALSE, time() + 80000) === TRUE) $this->logLine("Email {$mailMainID} activated");
{ }
$this->logLine("Email {$mailMainID} activated"); else
} {
else $this->logLine("Error activating email {$mailMainID}");
{ }
$this->logLine("Error activating email {$mailMainID}"); }
} elseif ($num_cat === FALSE)
} {
elseif ($num_cat === FALSE) $this->logLine(' User read error for '.$shot_type.': '.$this->ourDB->$mySQLlastErrNum.':'.$this->ourDB->$mySQLlastErrText);
{ }
$this->logLine(' User read error for '.$shot_type.': '.$this->ourDB->$mySQLlastErrNum.':'.$this->ourDB->$mySQLlastErrText); elseif ($this->logRequirement > 1)
} {
elseif ($this->logRequirement > 1) $this->logLine(' - no users found.');
{ }
$this->logLine(' - no users found.'); } // while
}
} // while if ($this->logRequirement > 1)
{
if ($this->logRequirement > 1) $this->logLine(' Completed emails for '.$shot_type.' at '.date('D j M Y G:i:s'));
{ }
$this->logLine(' Completed emails for '.$shot_type.' at '.date('D j M Y G:i:s')); }
} elseif ($num_cat === FALSE)
} {
elseif ($num_cat === FALSE) $this->logLine(' DB read error for '.$shot_type.': '.$this->e107->sql->$mySQLlastErrNum.':'.$this->e107->sql->$mySQLlastErrText);
{ }
$this->logLine(' DB read error for '.$shot_type.': '.$this->e107->sql->$mySQLlastErrNum.':'.$this->e107->sql->$mySQLlastErrText); elseif ($this->logRequirement > 1)
} {
elseif ($this->logRequirement > 1) $this->logLine(' - no records found.');
{ }
$this->logLine(' - no records found.'); }
} }
}
}
?> ?>

View File

@@ -1,37 +1,39 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar plugin - Front page * Event calendar plugin - Front page
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_frontpage.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_frontpage.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
* *
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar plugin - Front page
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php'); if (!defined('e107_INIT')) { exit; }
$front_page['calendar'] = array( include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php');
'title' => EC_ADLAN_1,
'page' => array( $front_page['calendar'] = array(
array('page' => e_PLUGIN_ABS.'calendar_menu/calendar.php', 'title' => EC_ADLAN_A09 ), 'title' => EC_ADLAN_1,
array('page' => e_PLUGIN_ABS.'calendar_menu/event.php', 'title' => EC_LAN_163 )) 'page' => array(
); array('page' => e_PLUGIN_ABS.'calendar_menu/calendar.php', 'title' => EC_ADLAN_A09 ),
array('page' => e_PLUGIN_ABS.'calendar_menu/event.php', 'title' => EC_LAN_163 ))
);
?> ?>

View File

@@ -1,110 +1,112 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Calendar e_list Handler * Calendar e_list Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_list.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_list.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
* *
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Calendar e_list Handler
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
class list_calendar_menu if (!defined('e107_INIT')) { exit; }
{
function list_calendar_menu($parent) class list_calendar_menu
{ {
$this->parent = $parent; function list_calendar_menu($parent)
} {
$this->parent = $parent;
function getListData() }
{
$list_caption = $this->parent->settings['caption']; function getListData()
$list_display = ($this->parent->settings['open'] ? "" : "none"); {
$list_caption = $this->parent->settings['caption'];
require_once('ecal_class.php'); $list_display = ($this->parent->settings['open'] ? "" : "none");
$ecal_class = new ecal_class;
require_once('ecal_class.php');
$current_day = $ecal_class->cal_date['mday']; $ecal_class = new ecal_class;
$current_month = $ecal_class->cal_date['mon'];
$current_year = $ecal_class->cal_date['year']; $current_day = $ecal_class->cal_date['mday'];
$current_month = $ecal_class->cal_date['mon'];
$current = mktime(0,0,0,$current_month, $current_day, $current_year); $current_year = $ecal_class->cal_date['year'];
if($this->parent->mode == "new_page" || $this->parent->mode == "new_menu" ) $current = mktime(0,0,0,$current_month, $current_day, $current_year);
{
$lvisit = $this->parent->getlvisit(); if($this->parent->mode == "new_page" || $this->parent->mode == "new_menu" )
$qry = " event_datestamp>".intval($lvisit)." AND "; {
} $lvisit = $this->parent->getlvisit();
else $qry = " event_datestamp>".intval($lvisit)." AND ";
{ }
$qry = ""; else
} {
$qry = "";
$bullet = $this->parent->getBullet($this->parent->settings['icon']); }
$qry = " $bullet = $this->parent->getBullet($this->parent->settings['icon']);
SELECT e.*, c.event_cat_name
FROM #event AS e $qry = "
LEFT JOIN #event_cat AS c ON c.event_cat_id = e.event_category SELECT e.*, c.event_cat_name
WHERE ".$qry." e.event_start>='$current' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."' FROM #event AS e
ORDER BY e.event_start ASC LIMIT 0,".intval($this->parent->settings['amount']); LEFT JOIN #event_cat AS c ON c.event_cat_id = e.event_category
WHERE ".$qry." e.event_start>='$current' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."'
if(!$event_items = $this->parent->e107->sql->db_Select_gen($qry)) ORDER BY e.event_start ASC LIMIT 0,".intval($this->parent->settings['amount']);
{
$list_data = LIST_CALENDAR_2; if(!$event_items = $this->parent->e107->sql->db_Select_gen($qry))
} {
else $list_data = LIST_CALENDAR_2;
{ }
while($row = $this->parent->e107->sql->db_Fetch()) else
{ {
$record = array(); while($row = $this->parent->e107->sql->db_Fetch())
$tmp = explode(".", $row['event_author']); {
if($tmp[0] == "0") $record = array();
{ $tmp = explode(".", $row['event_author']);
$record['author'] = $tmp[1]; if($tmp[0] == "0")
} {
elseif(is_numeric($tmp[0]) && $tmp[0] != "0") $record['author'] = $tmp[1];
{ }
$record['author'] = (USER ? "<a href='".e_BASE."user.php?id.".$tmp[0]."'>".$tmp[1]."</a>" : $tmp[1]); elseif(is_numeric($tmp[0]) && $tmp[0] != "0")
} {
else $record['author'] = (USER ? "<a href='".e_BASE."user.php?id.".$tmp[0]."'>".$tmp[1]."</a>" : $tmp[1]);
{ }
$record['author'] = ""; else
} {
$record['author'] = "";
$rowheading = $this->parent->parse_heading($row['event_title']); }
$record['icon'] = $bullet;
$record['heading'] = "<a href='".e_PLUGIN."calendar_menu/event.php?".$row['event_start'].".event.".$row['event_id']."'>".$rowheading."</a>"; $rowheading = $this->parent->parse_heading($row['event_title']);
$record['category'] = $row['event_cat_name']; $record['icon'] = $bullet;
$record['date'] = ($this->parent->settings['date'] ? ($row['event_start'] ? $this->parent->getListDate($row['event_start']) : "") : ""); $record['heading'] = "<a href='".e_PLUGIN."calendar_menu/event.php?".$row['event_start'].".event.".$row['event_id']."'>".$rowheading."</a>";
$record['info'] = ''; $record['category'] = $row['event_cat_name'];
$record['date'] = ($this->parent->settings['date'] ? ($row['event_start'] ? $this->parent->getListDate($row['event_start']) : "") : "");
$list_data[] = $record; $record['info'] = '';
}
} $list_data[] = $record;
//return array with 'records', (global)'caption', 'display' }
return array( }
'records'=>$list_data, //return array with 'records', (global)'caption', 'display'
'caption'=>$list_caption, return array(
'display'=>$list_display 'records'=>$list_data,
); 'caption'=>$list_caption,
} 'display'=>$list_display
} );
}
}
?> ?>

View File

@@ -1,208 +1,210 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2010 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar - mailout function * Event calendar - mailout function
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_mailout.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_mailout.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
* *
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar - mailout function
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit(); } */
if (!defined('e107_INIT')) { exit(); }
include_lan(e_PLUGIN.'/calendar_menu/languages/'.e_LANGUAGE.'_mailer.php');
/* include_lan(e_PLUGIN.'/calendar_menu/languages/'.e_LANGUAGE.'_mailer.php');
Class for event calendar mailout function
/*
Allows admins to send mail to those subscribed to calendar events Class for event calendar mailout function
*/
// These variables determine the circumstances under which this class is loaded (only used during loading, and may be overwritten later) Allows admins to send mail to those subscribed to calendar events
$mailerIncludeWithDefault = TRUE; // Mandatory - if false, show only when mailout for this specific plugin is enabled */
$mailerExcludeDefault = FALSE; // Mandatory - if TRUE, when this plugin's mailout is active, the default (core) isn't loaded // These variables determine the circumstances under which this class is loaded (only used during loading, and may be overwritten later)
$mailerIncludeWithDefault = TRUE; // Mandatory - if false, show only when mailout for this specific plugin is enabled
class calendar_menu_mailout $mailerExcludeDefault = FALSE; // Mandatory - if TRUE, when this plugin's mailout is active, the default (core) isn't loaded
{
protected $mailCount = 0; class calendar_menu_mailout
protected $mailRead = 0; {
//public $mailerSource = 'calendar_menu'; //FIXME should be auto-detected // Plugin name (core mailer is special case) Must be directory for this file protected $mailCount = 0;
public $mailerName = LAN_EC_MAIL_01; // Text to identify the source of selector (displayed on left of admin page) protected $mailRead = 0;
public $mailerEnabled = TRUE; // Mandatory - set to FALSE to disable this plugin (e.g. due to permissions restrictions) //public $mailerSource = 'calendar_menu'; //FIXME should be auto-detected // Plugin name (core mailer is special case) Must be directory for this file
private $selectorActive = FALSE; // Set TRUE if we've got a valid selector to start returning entries public $mailerName = LAN_EC_MAIL_01; // Text to identify the source of selector (displayed on left of admin page)
public $mailerEnabled = TRUE; // Mandatory - set to FALSE to disable this plugin (e.g. due to permissions restrictions)
private $selectorActive = FALSE; // Set TRUE if we've got a valid selector to start returning entries
// Constructor
public function __construct()
{ // Constructor
} public function __construct()
{
}
/**
* Return data representing the user's selection criteria as entered in the $_POST array.
* /**
* This is stored in the DB with a saved email. (Just return an empty string or array if this is undesirable) * Return data representing the user's selection criteria as entered in the $_POST array.
* The returned value is passed back to selectInit() and showSelect when needed. *
* * This is stored in the DB with a saved email. (Just return an empty string or array if this is undesirable)
* @return string Selection data - comma-separated list of category IDs * The returned value is passed back to selectInit() and showSelect when needed.
*/ *
public function returnSelectors() * @return string Selection data - comma-separated list of category IDs
{ */
$res = array(); public function returnSelectors()
if (is_array($_POST['ec_category_sel'])) {
{ $res = array();
foreach ($_POST['ec_category_sel'] as $k => $v) if (is_array($_POST['ec_category_sel']))
{ {
$res[] = intval($v); foreach ($_POST['ec_category_sel'] as $k => $v)
} {
} $res[] = intval($v);
return implode(',',$res); }
} }
return implode(',',$res);
}
/**
* Called to initialise data selection routine.
* Needs to save any queries or other information into internal variables, do initial DB queries as appropriate. /**
* Could in principle read all addresses and buffer them for later routines, if this is more convenient * Called to initialise data selection routine.
* * Needs to save any queries or other information into internal variables, do initial DB queries as appropriate.
* @param string $selectVals - array of selection criteria as returned by returnSelectors() * Could in principle read all addresses and buffer them for later routines, if this is more convenient
* *
* @return integer Return number of records available (or 1 if unknown) on success, FALSE on failure * @param string $selectVals - array of selection criteria as returned by returnSelectors()
*/ *
public function selectInit($selectVals = FALSE) * @return integer Return number of records available (or 1 if unknown) on success, FALSE on failure
{ */
public function selectInit($selectVals = FALSE)
$sql = e107::getDb(); {
if (($selectVals === FALSE) || ($selectVals == '')) $sql = e107::getDb();
{
return 0; // No valid selector - so no valid records if (($selectVals === FALSE) || ($selectVals == ''))
} {
return 0; // No valid selector - so no valid records
$where = array(); }
$qry = 'SELECT u.user_id, u.user_name, u.user_email, u.user_loginname, u.user_sess, u.user_lastvisit FROM `#event_subs` AS es';
$qry .= ' LEFT JOIN `#user` AS u ON es.`event_subid` = u.`user_id` WHERE es.`event_cat` IN (\''.$selectVals.'\') AND u.`user_id` IS NOT NULL'; $where = array();
$qry .= ' GROUP BY u.`user_id`'; $qry = 'SELECT u.user_id, u.user_name, u.user_email, u.user_loginname, u.user_sess, u.user_lastvisit FROM `#event_subs` AS es';
// echo "Selector query: ".$qry.'<br />'; $qry .= ' LEFT JOIN `#user` AS u ON es.`event_subid` = u.`user_id` WHERE es.`event_cat` IN (\''.$selectVals.'\') AND u.`user_id` IS NOT NULL';
if (!( $this->mail_count = $sql->db_Select_gen($qry))) return FALSE; $qry .= ' GROUP BY u.`user_id`';
$this->selectorActive = TRUE; // echo "Selector query: ".$qry.'<br />';
$this->mail_read = 0; if (!( $this->mail_count = $sql->db_Select_gen($qry))) return FALSE;
return $this->mail_count; $this->selectorActive = TRUE;
} $this->mail_read = 0;
return $this->mail_count;
}
/**
* Return an email address to add to the recipients list. Return FALSE if no more addresses to add
* /**
* @return array|boolean FALSE if no more addresses available; else an array: * Return an email address to add to the recipients list. Return FALSE if no more addresses to add
* 'mail_recipient_id' - non-zero if a registered user, zero if a non-registered user. (Always non-zero from this class) *
* 'mail_recipient_name' - user name * @return array|boolean FALSE if no more addresses available; else an array:
* 'mail_recipient_email' - email address to use * 'mail_recipient_id' - non-zero if a registered user, zero if a non-registered user. (Always non-zero from this class)
* 'mail_target_info' - array of info which might be substituted into email, usually using the codes defined by the editor. * 'mail_recipient_name' - user name
* Array key is the code within '|...|', value is the string for substitution * 'mail_recipient_email' - email address to use
*/ * 'mail_target_info' - array of info which might be substituted into email, usually using the codes defined by the editor.
public function selectAdd() * Array key is the code within '|...|', value is the string for substitution
{ */
$sql = e107::getDb(); public function selectAdd()
{
if (!$this->selectorActive) return FALSE; $sql = e107::getDb();
if (!($row = $sql->db_Fetch(MYSQL_ASSOC))) return FALSE;
$ret = array('mail_recipient_id' => $row['user_id'], if (!$this->selectorActive) return FALSE;
'mail_recipient_name' => $row['user_name'], // Should this use realname? if (!($row = $sql->db_Fetch(MYSQL_ASSOC))) return FALSE;
'mail_recipient_email' => $row['user_email'], $ret = array('mail_recipient_id' => $row['user_id'],
'mail_target_info' => array( 'mail_recipient_name' => $row['user_name'], // Should this use realname?
'USERID' => $row['user_id'], 'mail_recipient_email' => $row['user_email'],
'DISPLAYNAME' => $row['user_name'], 'mail_target_info' => array(
'SIGNUP_LINK' => $row['user_sess'], 'USERID' => $row['user_id'],
'USERNAME' => $row['user_loginname'], 'DISPLAYNAME' => $row['user_name'],
'USERLASTVISIT' => $row['user_lastvisit'] 'SIGNUP_LINK' => $row['user_sess'],
) 'USERNAME' => $row['user_loginname'],
); 'USERLASTVISIT' => $row['user_lastvisit']
$this->mail_read++; )
return $ret; );
} $this->mail_read++;
return $ret;
}
/**
* Called once all email addresses read, to do any housekeeping needed
* /**
* @return none * Called once all email addresses read, to do any housekeeping needed
*/ *
public function select_close() * @return none
{ */
// Nothing to do here public function select_close()
} {
// Nothing to do here
}
/**
* Called to show current selection criteria, and optionally allow edit
* /**
* @param boolean $allow_edit is TRUE to allow user to change the selection; FALSE to just display current settings * Called to show current selection criteria, and optionally allow edit
* @param string $selectVals is the current selection information - in the same format as returned by returnSelectors() *
* * @param boolean $allow_edit is TRUE to allow user to change the selection; FALSE to just display current settings
* @return array Returns array which is displayed in a table cell. * @param string $selectVals is the current selection information - in the same format as returned by returnSelectors()
*/ *
public function showSelect($allow_edit = FALSE, $selectVals = FALSE) * @return array Returns array which is displayed in a table cell.
{ */
$sql = e107::getDb(); public function showSelect($allow_edit = FALSE, $selectVals = FALSE)
$frm = e107::getForm(); {
$var = array(); $sql = e107::getDb();
// $ret = "<table style='width:95%'>"; $frm = e107::getForm();
$selects = array_flip(explode(',', $selectVals)); $var = array();
// $ret = "<table style='width:95%'>";
if ($sql->db_Select('event_cat', 'event_cat_id, event_cat_name', "event_cat_name != 'Default'")) $selects = array_flip(explode(',', $selectVals));
{
$c=0; if ($sql->db_Select('event_cat', 'event_cat_id, event_cat_name', "event_cat_name != 'Default'"))
while ($row = $sql->db_Fetch(MYSQL_ASSOC)) {
{ $c=0;
$checked = (isset($selects[$row['event_cat_id']])) ? " checked='checked'" : ''; while ($row = $sql->db_Fetch(MYSQL_ASSOC))
if ($allow_edit) {
{ $checked = (isset($selects[$row['event_cat_id']])) ? " checked='checked'" : '';
$var[$c]['caption'] = $row['event_cat_name']; if ($allow_edit)
$var[$c]['html'] = $frm->checkbox('ec_category_sel[]',$row['event_cat_id'],$checked); {
$var[$c]['caption'] = $row['event_cat_name'];
/*$ret .= "<tr><td><input type='checkbox' name='ec_category_sel[]' value='{$row['event_cat_id']}' {$checked}/></td><td> $var[$c]['html'] = $frm->checkbox('ec_category_sel[]',$row['event_cat_id'],$checked);
".$row['event_cat_name']."</td></tr>";*/
} /*$ret .= "<tr><td><input type='checkbox' name='ec_category_sel[]' value='{$row['event_cat_id']}' {$checked}/></td><td>
elseif($checked) ".$row['event_cat_name']."</td></tr>";*/
{ }
$var[$c]['html'] = $row['event_cat_name']; elseif($checked)
$var[$c]['caption'] = LAN_EC_MAIL_03; {
$var[$c]['html'] = $row['event_cat_name'];
/*$ret .= "<tr><td>".LAN_EC_MAIL_03."</td><td> $var[$c]['caption'] = LAN_EC_MAIL_03;
".$row['event_cat_name']."</td></tr>";*/
} /*$ret .= "<tr><td>".LAN_EC_MAIL_03."</td><td>
$c++; ".$row['event_cat_name']."</td></tr>";*/
} }
} $c++;
else }
{ }
$var[0]['caption'] = LAN_EC_MAIL_02; else
$var[0]['html'] = ''; {
} $var[0]['caption'] = LAN_EC_MAIL_02;
$var[0]['html'] = '';
return $var; }
}
} return $var;
}
}
?> ?>

View File

@@ -1,60 +1,62 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* * Notify shim
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_notify.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_notify.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Notify shim
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true) if (!defined('e107_INIT')) { exit; }
{
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_class.php'); if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
$config_category = NT_LAN_EC_1; {
$config_events = array('ecalnew' => NT_LAN_EC_7, 'ecaledit' => NT_LAN_EC_2); include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_class.php');
} $config_category = NT_LAN_EC_1;
$config_events = array('ecalnew' => NT_LAN_EC_7, 'ecaledit' => NT_LAN_EC_2);
if (!function_exists('notify_ecalnew')) }
{
function notify_ecalnew($data) if (!function_exists('notify_ecalnew'))
{ {
global $nt; function notify_ecalnew($data)
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php'); {
$message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />'; global $nt;
$message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />'; include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
$nt -> send('ecaledit', NT_LAN_EC_6, $message); $message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />';
} $message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />';
} $nt -> send('ecaledit', NT_LAN_EC_6, $message);
}
if (!function_exists('notify_ecaledit')) }
{
function notify_ecaledit($data) if (!function_exists('notify_ecaledit'))
{ {
global $nt; function notify_ecaledit($data)
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php'); {
$message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />'; global $nt;
$message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />'; include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
$nt -> send('ecaledit', NT_LAN_EC_8, $message); $message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />';
} $message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />';
} $nt -> send('ecaledit', NT_LAN_EC_8, $message);
}
}
?> ?>

View File

@@ -1,87 +1,89 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* * RSS news feed shim
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_rss.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_rss.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * RSS news feed shim
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
if (!e107::isInstalled('calendar_menu')) return; if (!defined('e107_INIT')) { exit; }
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php'); // RSS messages are in admin language file if (!e107::isInstalled('calendar_menu')) return;
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php'); // RSS messages are in admin language file
//##### create feed for admin, return array $eplug_rss_feed --------------------------------
$feed['name'] = EC_ADLAN_A12;
$feed['url'] = 'calendar'; //the identifier for the rss feed url //##### create feed for admin, return array $eplug_rss_feed --------------------------------
$feed['topic_id'] = ''; //the topic_id, empty on default (to select a certain category) $feed['name'] = EC_ADLAN_A12;
$feed['path'] = 'calendar_menu'; //this is the plugin path location $feed['url'] = 'calendar'; //the identifier for the rss feed url
$feed['text'] = EC_ADLAN_A157; $feed['topic_id'] = ''; //the topic_id, empty on default (to select a certain category)
$feed['class'] = '0'; $feed['path'] = 'calendar_menu'; //this is the plugin path location
$feed['limit'] = '9'; $feed['text'] = EC_ADLAN_A157;
//##### ------------------------------------------------------------------------------------ $feed['class'] = '0';
$feed['limit'] = '9';
require_once('ecal_class.php'); //##### ------------------------------------------------------------------------------------
$ecal_class = new ecal_class;
require_once('ecal_class.php');
//##### create rss data, return as array $eplug_rss_data ----------------------------------- $ecal_class = new ecal_class;
$current_day = $ecal_class->cal_date['mday'];
$current_month = $ecal_class->cal_date['mon']; //##### create rss data, return as array $eplug_rss_data -----------------------------------
$current_year = $ecal_class->cal_date['year']; $current_day = $ecal_class->cal_date['mday'];
$current = mktime(0,0,0,$current_month, $current_day, $current_year); $current_month = $ecal_class->cal_date['mon'];
$current_year = $ecal_class->cal_date['year'];
$qry = " $current = mktime(0,0,0,$current_month, $current_day, $current_year);
SELECT e.*, c.event_cat_name
FROM `#event` AS e $qry = "
LEFT JOIN `#event_cat` AS c ON c.event_cat_id = e.event_category SELECT e.*, c.event_cat_name
WHERE e.event_start>='{$current}' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."' FROM `#event` AS e
ORDER BY e.event_start ASC LIMIT 0,".$this->limit; LEFT JOIN `#event_cat` AS c ON c.event_cat_id = e.event_category
WHERE e.event_start>='{$current}' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."'
$rss = array(); ORDER BY e.event_start ASC LIMIT 0,".$this->limit;
$sqlrss = new db;
if($items = $sqlrss->db_Select_gen($qry)) $rss = array();
{ $sqlrss = new db;
$i=0; if($items = $sqlrss->db_Select_gen($qry))
while($rowrss = $sqlrss -> db_Fetch()) {
{ $i=0;
$tmp = explode(".", $rowrss['event_author']); while($rowrss = $sqlrss -> db_Fetch())
$rss[$i]['author'] = $tmp[1]; {
$rss[$i]['author_email'] = ''; $tmp = explode(".", $rowrss['event_author']);
$rss[$i]['link'] = $e107->base_path.$PLUGINS_DIRECTORY."calendar_menu/event.php?".$rowrss['event_start'].".event.".$rowrss['event_id']; $rss[$i]['author'] = $tmp[1];
$rss[$i]['linkid'] = $rowrss['event_id']; $rss[$i]['author_email'] = '';
$rss[$i]['title'] = $rowrss['event_title']; $rss[$i]['link'] = $e107->base_path.$PLUGINS_DIRECTORY."calendar_menu/event.php?".$rowrss['event_start'].".event.".$rowrss['event_id'];
$rss[$i]['description'] = ''; $rss[$i]['linkid'] = $rowrss['event_id'];
$rss[$i]['category_name'] = $rowrss['event_cat_name']; $rss[$i]['title'] = $rowrss['event_title'];
$rss[$i]['category_link'] = ''; $rss[$i]['description'] = '';
$rss[$i]['datestamp'] = $rowrss['event_start']; $rss[$i]['category_name'] = $rowrss['event_cat_name'];
$rss[$i]['enc_url'] = ""; $rss[$i]['category_link'] = '';
$rss[$i]['enc_leng'] = ""; $rss[$i]['datestamp'] = $rowrss['event_start'];
$rss[$i]['enc_type'] = ""; $rss[$i]['enc_url'] = "";
$i++; $rss[$i]['enc_leng'] = "";
} $rss[$i]['enc_type'] = "";
} $i++;
//##### ------------------------------------------------------------------------------------ }
}
$eplug_rss_feed[] = $feed; //##### ------------------------------------------------------------------------------------
$eplug_rss_data[] = $rss;
$eplug_rss_feed[] = $feed;
$eplug_rss_data[] = $rss;
?> ?>

View File

@@ -1,30 +1,32 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* * Search shim for event calendar
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_search.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_search.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Search shim for event calendar
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit(); } */
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_search.php'); if (!defined('e107_INIT')) { exit(); }
$search_info[] = array('sfile' => e_PLUGIN.'calendar_menu/search/search_parser.php', 'qtype' => CM_SCH_LAN_1, 'refpage' => 'calendar.php'); include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_search.php');
$search_info[] = array('sfile' => e_PLUGIN.'calendar_menu/search/search_parser.php', 'qtype' => CM_SCH_LAN_1, 'refpage' => 'calendar.php');

View File

@@ -1,69 +1,71 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Tagwords shim for event calendar * Tagwords shim for event calendar
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_tagwords.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_tagwords.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Tagwords shim
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
class e_tagwords_calendar_menu if (!defined('e107_INIT')) { exit; }
{
function e_tagwords_calendar_menu() class e_tagwords_calendar_menu
{ {
$this->settings = array(); function e_tagwords_calendar_menu()
{
$this->settings['plugin'] = 'calendar_menu'; $this->settings = array();
$this->settings['table'] = 'event';
$this->settings['db_id'] = 'event_id'; $this->settings['plugin'] = 'calendar_menu';
$this->settings['caption'] = 'calendar'; $this->settings['table'] = 'event';
} $this->settings['db_id'] = 'event_id';
$this->settings['caption'] = 'calendar';
function getLink($id) }
{
if($this->row=='') function getLink($id)
{ {
if ($this->row = $this->getRecord($id)) if($this->row=='')
{ {
$url = e_PLUGIN."calendar_menu/event.php?{$this->row['event_start']}.event.{$this->row['event_id']}"; if ($this->row = $this->getRecord($id))
return "<a href='".$url."'>".e107::getParser()->toHTML($this->row['event_title'], TRUE, '')."</a>"; {
} $url = e_PLUGIN."calendar_menu/event.php?{$this->row['event_start']}.event.{$this->row['event_id']}";
} return "<a href='".$url."'>".e107::getParser()->toHTML($this->row['event_title'], TRUE, '')."</a>";
return ''; }
} }
return '';
}
function getRecord($id)
{
$sql = e107::getDb(); function getRecord($id)
{
$this->row = ''; $sql = e107::getDb();
$qry = "SELECT * FROM #event as e WHERE e.event_id='{$id}'";
$this->row = '';
if($sql->db_Select_gen($qry)) $qry = "SELECT * FROM #event as e WHERE e.event_id='{$id}'";
{
$this->row=$sql->db_Fetch(); if($sql->db_Select_gen($qry))
return $this->row; {
} $this->row=$sql->db_Fetch();
return FALSE; return $this->row;
} }
} return FALSE;
}
}
?> ?>

View File

@@ -1,89 +1,91 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar mailout - template file * Event calendar mailout - template file
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_mailout_template.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_mailout_template.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar mailout - template file
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
/* */
This template is used during the subscription mailouts - it is inserted at the front of the text
defined for each category. /*
Main purpose is to define the 'pre' and 'post' styles, but it can be used much as any E107 template This template is used during the subscription mailouts - it is inserted at the front of the text
defined for each category.
Language constants should be in the English_mailer.php file Main purpose is to define the 'pre' and 'post' styles, but it can be used much as any E107 template
*/
Language constants should be in the English_mailer.php file
if (!defined('e107_INIT')) { exit; } */
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_mailer.php'); if (!defined('e107_INIT')) { exit; }
global $sc_style; include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_mailer.php');
$sc_style['EC_MAIL_HEADING_DATE']['pre'] = ''; global $sc_style;
$sc_style['EC_MAIL_HEADING_DATE']['post'] = '';
$sc_style['EC_MAIL_HEADING_DATE']['pre'] = '';
$sc_style['EC_MAIL_SHORT_DATE']['pre'] = ''; $sc_style['EC_MAIL_HEADING_DATE']['post'] = '';
$sc_style['EC_MAIL_SHORT_DATE']['post'] = '';
$sc_style['EC_MAIL_SHORT_DATE']['pre'] = '';
$sc_style['EC_MAIL_TITLE']['pre'] = ''; $sc_style['EC_MAIL_SHORT_DATE']['post'] = '';
$sc_style['EC_MAIL_TITLE']['post'] = '';
$sc_style['EC_MAIL_TITLE']['pre'] = '';
$sc_style['EC_MAIL_ID']['pre'] = ''; $sc_style['EC_MAIL_TITLE']['post'] = '';
$sc_style['EC_MAIL_ID']['post'] = '';
$sc_style['EC_MAIL_ID']['pre'] = '';
$sc_style['EC_MAIL_DETAILS']['pre'] = ''; $sc_style['EC_MAIL_ID']['post'] = '';
$sc_style['EC_MAIL_DETAILS']['post'] = '';
$sc_style['EC_MAIL_DETAILS']['pre'] = '';
$sc_style['EC_MAIL_LOCATION']['pre'] = LAN_EC_MAIL_100.' '; $sc_style['EC_MAIL_DETAILS']['post'] = '';
$sc_style['EC_MAIL_LOCATION']['post'] = '';
$sc_style['EC_MAIL_LOCATION']['pre'] = LAN_EC_MAIL_100.' ';
$sc_style['EC_MAIL_AUTHOR']['pre'] = LAN_EC_MAIL_101.' '; $sc_style['EC_MAIL_LOCATION']['post'] = '';
$sc_style['EC_MAIL_AUTHOR']['post'] = '';
$sc_style['EC_MAIL_AUTHOR']['pre'] = LAN_EC_MAIL_101.' ';
$sc_style['EC_MAIL_CONTACT']['pre'] = LAN_EC_MAIL_102.' '; $sc_style['EC_MAIL_AUTHOR']['post'] = '';
$sc_style['EC_MAIL_CONTACT']['post'] = '';
$sc_style['EC_MAIL_CONTACT']['pre'] = LAN_EC_MAIL_102.' ';
$sc_style['EC_MAIL_THREAD']['pre'] = ''; $sc_style['EC_MAIL_CONTACT']['post'] = '';
$sc_style['EC_MAIL_THREAD']['post'] = '';
$sc_style['EC_MAIL_THREAD']['pre'] = '';
$sc_style['EC_MAIL_LINK']['pre'] = ''; $sc_style['EC_MAIL_THREAD']['post'] = '';
$sc_style['EC_MAIL_LINK']['post'] = '';
$sc_style['EC_MAIL_LINK']['pre'] = '';
$sc_style['EC_MAIL_CATEGORY']['pre'] = ''; $sc_style['EC_MAIL_LINK']['post'] = '';
$sc_style['EC_MAIL_CATEGORY']['post'] = '';
$sc_style['EC_MAIL_CATEGORY']['pre'] = '';
$sc_style['EC_MAIL_DATE_START']['pre'] = ''; $sc_style['EC_MAIL_CATEGORY']['post'] = '';
$sc_style['EC_MAIL_DATE_START']['post'] = '';
$sc_style['EC_MAIL_DATE_START_ALLDAY']['pre'] = LAN_EC_MAIL_103.' '; $sc_style['EC_MAIL_DATE_START']['pre'] = '';
$sc_style['EC_MAIL_DATE_START_ALLDAY']['post'] = ''; $sc_style['EC_MAIL_DATE_START']['post'] = '';
$sc_style['EC_MAIL_DATE_START_TIMED']['pre'] = LAN_EC_MAIL_104.' '; $sc_style['EC_MAIL_DATE_START_ALLDAY']['pre'] = LAN_EC_MAIL_103.' ';
$sc_style['EC_MAIL_DATE_START_TIMED']['post'] = ''; $sc_style['EC_MAIL_DATE_START_ALLDAY']['post'] = '';
$sc_style['EC_MAIL_DATE_START_TIMED']['pre'] = LAN_EC_MAIL_104.' ';
$sc_style['EC_MAIL_TIME_START']['pre'] = LAN_EC_MAIL_105; $sc_style['EC_MAIL_DATE_START_TIMED']['post'] = '';
$sc_style['EC_MAIL_TIME_START']['post'] = '';
$sc_style['EC_MAIL_TIME_START']['pre'] = LAN_EC_MAIL_105;
$sc_style['EC_MAIL_DATE_END']['pre'] = LAN_EC_MAIL_106.' '; $sc_style['EC_MAIL_TIME_START']['post'] = '';
$sc_style['EC_MAIL_DATE_END']['post'] = '';
$sc_style['EC_MAIL_DATE_END']['pre'] = LAN_EC_MAIL_106.' ';
$sc_style['EC_MAIL_TIME_END']['pre'] = LAN_EC_MAIL_105; $sc_style['EC_MAIL_DATE_END']['post'] = '';
$sc_style['EC_MAIL_TIME_END']['post'] = '';
$sc_style['EC_MAIL_TIME_END']['pre'] = LAN_EC_MAIL_105;
$sc_style['EC_MAIL_TIME_END']['post'] = '';
?>
?>

View File

@@ -1,469 +1,471 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar - generate lists * Event calendar - generate lists
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_page.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_page.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar - generate lists
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
/* */
|
| Generate a printer-friendly page of calendar events /*
| Query is: ec_pf_page.php?ssssss.eeeeee[[[.cat].template].output] |
| | Generate a printer-friendly page of calendar events
| Date format is yyyymmdd or yyyymm to make it easy to generate fixed queries. | Query is: ec_pf_page.php?ssssss.eeeeee[[[.cat].template].output]
| cat is a number corresponding to a category ID. '*' or blank gives all categories |
| template determines output style ('*' selects the default template) | Date format is yyyymmdd or yyyymm to make it easy to generate fixed queries.
| output can be 'display' (default), 'print' or 'pdf' | cat is a number corresponding to a category ID. '*' or blank gives all categories
| | template determines output style ('*' selects the default template)
| Mostly the template can use the EVENT and MAIL shortcodes - pretty much anything that | output can be 'display' (default), 'print' or 'pdf'
| uses $thisevent as a parameter. MAIL is best since it's never used elsewhere at the same time |
+----------------------------------------------------------------------------+ | Mostly the template can use the EVENT and MAIL shortcodes - pretty much anything that
*/ | uses $thisevent as a parameter. MAIL is best since it's never used elsewhere at the same time
+----------------------------------------------------------------------------+
require_once('../../class2.php'); */
$e107 = e107::getInstance();
if (!$e107->isInstalled('calendar_menu')) header('Location: '.e_BASE.'index.php'); require_once('../../class2.php');
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php'); $e107 = e107::getInstance();
define('PAGE_NAME', EC_LAN_80); if (!$e107->isInstalled('calendar_menu')) header('Location: '.e_BASE.'index.php');
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
require_once(e_PLUGIN.'calendar_menu/ecal_class.php'); define('PAGE_NAME', EC_LAN_80);
$ecal_class = new ecal_class;
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
$ecal_class = new ecal_class;
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
$calSc = new event_calendar_shortcodes();
$calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
$calSc = new event_calendar_shortcodes();
$message = ''; $calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class
unset($ec_qs);
if (e_QUERY) $ec_qs = explode('.', e_QUERY); $message = '';
else unset($ec_qs);
{ if (e_QUERY) $ec_qs = explode('.', e_QUERY);
if (!isset($pref['eventpost_printlists']) || ($pref['eventpost_printlists'] == 0)) else
header('location:'.SITEURL); // If disabled, just go back to index page {
} if (!isset($ecal_class->pref['eventpost_printlists']) || ($ecal_class->pref['eventpost_printlists'] == 0))
header('location:'.SITEURL); // If disabled, just go back to index page
if (isset($_POST['set_dates']) && isset($_POST['start_date']) && (isset($_POST['end_date']))) }
{
$ec_qs[0] = $_POST['start_date']; if (isset($_POST['set_dates']) && isset($_POST['start_date']) && (isset($_POST['end_date'])))
$ec_qs[1] = $_POST['end_date']; {
if (isset($_POST['event_cat_ids'])) $ec_qs[0] = $_POST['start_date'];
{ $ec_qs[1] = $_POST['end_date'];
$ec_qs[2] = $_POST['event_cat_ids']; if (isset($_POST['event_cat_ids']))
if ($ec_qs[2] == 'all') $ec_qs[2] = '*'; {
} $ec_qs[2] = $_POST['event_cat_ids'];
if (isset($_POST['template_choice'])) $ec_qs[3] = $_POST['template_choice']; if ($ec_qs[2] == 'all') $ec_qs[2] = '*';
} }
if (isset($_POST['template_choice'])) $ec_qs[3] = $_POST['template_choice'];
if (!isset($ec_qs[3])) $ec_qs[3] = 'default'; // Template }
if (isset($_POST['output_type'])) $ec_qs[4] = $_POST['output_type']; if (!isset($ec_qs[3])) $ec_qs[3] = 'default'; // Template
if (!isset($ec_qs[4]) || (($ec_qs[4]) != 'print') && ($ec_qs[4] != 'pdf') ) $ec_qs[4] = 'display';
if (isset($_POST['output_type'])) $ec_qs[4] = $_POST['output_type'];
if (!isset($ec_qs[4]) || (($ec_qs[4]) != 'print') && ($ec_qs[4] != 'pdf') ) $ec_qs[4] = 'display';
$cal_super = $ecal_class->cal_super;
// Get templates, since we may have to give a choice if we're displaying something $cal_super = $ecal_class->cal_super;
// Actually load three in order so they can accumulate, and give the option of overriding other settings
$EVENT_CAL_PDF_HEADER = array(); // Get templates, since we may have to give a choice if we're displaying something
$EVENT_CAL_PDF_BODY = array(); // Actually load three in order so they can accumulate, and give the option of overriding other settings
$EVENT_CAL_PDF_FOOTER = array(); $EVENT_CAL_PDF_HEADER = array();
if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_template.php'); $EVENT_CAL_PDF_BODY = array();
if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_user_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_user_template.php'); $EVENT_CAL_PDF_FOOTER = array();
if (is_readable(THEME.'ec_pf_template.php')) require_once(THEME.'ec_pf_template.php'); if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_template.php');
if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_user_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_user_template.php');
// Hard-coded alternatives if (is_readable(THEME.'ec_pf_template.php')) require_once(THEME.'ec_pf_template.php');
if (!count($EVENT_CAL_PDF_HEADER)) $EVENT_CAL_PDF_HEADER['default'] = '<br />';
if (!count($EVENT_CAL_PDF_BODY)) $EVENT_CAL_PDF_BODY['default'] = '{EC_MAIL_DATE_START} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />'; // Hard-coded alternatives
if (!count($EVENT_CAL_PDF_FOOTER)) $EVENT_CAL_PDF_FOOTER['default'] = '<br />'; if (!count($EVENT_CAL_PDF_HEADER)) $EVENT_CAL_PDF_HEADER['default'] = '<br />';
if (!count($EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default'; if (!count($EVENT_CAL_PDF_BODY)) $EVENT_CAL_PDF_BODY['default'] = '{EC_MAIL_DATE_START} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />';
// If one name only, we just assign that if (!count($EVENT_CAL_PDF_FOOTER)) $EVENT_CAL_PDF_FOOTER['default'] = '<br />';
if (count($EVENT_CAL_PDF_NAMES) == 1) if (!count($EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default';
{ // If one name only, we just assign that
$ec_pdf_template = array_pop(array_keys($EVENT_CAL_PDF_NAMES)); if (count($EVENT_CAL_PDF_NAMES) == 1)
// echo "Assign template: ".$ec_pdf_template."<br />"; {
} $ec_pdf_template = array_pop(array_keys($EVENT_CAL_PDF_NAMES));
// echo "Assign template: ".$ec_pdf_template."<br />";
$ec_enable_pdf = ($pref['eventpost_printlists'] > 1) && is_readable(e_PLUGIN."pdf/e107pdf.php"); }
if (!isset($ec_qs[0]) || !isset($ec_qs[1])) $ec_enable_pdf = ($ecal_class->pref['eventpost_printlists'] > 1) && is_readable(e_PLUGIN."pdf/e107pdf.php");
{
// Put up a prompt to get the view period if (!isset($ec_qs[0]) || !isset($ec_qs[1]))
require_once(HEADERF); {
$cal_text = "<div style='text-align:center'> // Put up a prompt to get the view period
<form method='post' action='".e_SELF."'> require_once(HEADERF);
<table style='".USER_WIDTH."' class='fborder'> $cal_text = "<div style='text-align:center'>
<colgroup> <form method='post' action='".e_SELF."'>
<col style='width:60%;vertical-align:top;' /> <table style='".USER_WIDTH."' class='fborder'>
<col style='width:40%;vertical-align:top;' /> <colgroup>
</colgroup>"; <col style='width:60%;vertical-align:top;' />
$cal_text .= "<tr> <col style='width:40%;vertical-align:top;' />
<td class='forumheader3'>".EC_LAN_153."</td> </colgroup>";
<td class='forumheader3' style='text_align:center'>"; $cal_text .= "<tr>
$cal_text .= gen_drop(FALSE)."</td> <td class='forumheader3'>".EC_LAN_153."</td>
</tr><tr> <td class='forumheader3' style='text_align:center'>";
<td class='forumheader3'>".EC_LAN_154."</td> $cal_text .= gen_drop(FALSE)."</td>
<td class='forumheader3' style='text_align:center'>".gen_drop(TRUE)."</td> </tr><tr>
</tr><tr> <td class='forumheader3'>".EC_LAN_154."</td>
<td class='forumheader3'>".EC_LAN_155."</td> <td class='forumheader3' style='text_align:center'>".gen_drop(TRUE)."</td>
<td class='forumheader3' style='text_align:center'>"; </tr><tr>
$cal_text .= $e107->tp->parseTemplate('{EC_NAV_CATEGORIES=nosubmit}', FALSE, $calSc); <td class='forumheader3'>".EC_LAN_155."</td>
$cal_text .= "</td> <td class='forumheader3' style='text_align:center'>";
</tr>"; $cal_text .= $e107->tp->parseTemplate('{EC_NAV_CATEGORIES=nosubmit}', FALSE, $calSc);
if (isset($EVENT_CAL_PDF_NAMES) && is_array($EVENT_CAL_PDF_NAMES) && (count($EVENT_CAL_PDF_NAMES) > 1)) $cal_text .= "</td>
{ // Offer choice of templates </tr>";
$cal_text .= "<tr> if (isset($EVENT_CAL_PDF_NAMES) && is_array($EVENT_CAL_PDF_NAMES) && (count($EVENT_CAL_PDF_NAMES) > 1))
<td class='forumheader3'>".EC_LAN_157."</td> { // Offer choice of templates
<td class='forumheader3' style='text_align:center'><select name='template_choice' class='tbox' style='width:140px;' >\n"; $cal_text .= "<tr>
foreach($EVENT_CAL_PDF_NAMES as $ec_template_name => $ec_template_choice) <td class='forumheader3'>".EC_LAN_157."</td>
{ <td class='forumheader3' style='text_align:center'><select name='template_choice' class='tbox' style='width:140px;' >\n";
$cal_text .= "<option value='{$ec_template_name}'>{$ec_template_choice}</option>\n"; foreach($EVENT_CAL_PDF_NAMES as $ec_template_name => $ec_template_choice)
} {
$cal_text .= "</select></td> $cal_text .= "<option value='{$ec_template_name}'>{$ec_template_choice}</option>\n";
</tr>\n"; }
} $cal_text .= "</select></td>
// Radio buttons to select output type </tr>\n";
$cal_text .= "<tr> }
<td class='forumheader3'>".EC_LAN_158."</td> // Radio buttons to select output type
<td class='forumheader3' style='text_align:center'>"; $cal_text .= "<tr>
$cal_text .= " <td class='forumheader3'>".EC_LAN_158."</td>
<input type='radio' name='output_type' value='display' checked='checked' /> ".EC_LAN_159."<br /> <td class='forumheader3' style='text_align:center'>";
<input type='radio' name='output_type' value='print' /> ".EC_LAN_160."<br />"; $cal_text .= "
if ($ec_enable_pdf) <input type='radio' name='output_type' value='display' checked='checked' /> ".EC_LAN_159."<br />
{ <input type='radio' name='output_type' value='print' /> ".EC_LAN_160."<br />";
$cal_text .= "<input type='radio' name='output_type' value='pdf' /> ".EC_LAN_161; if ($ec_enable_pdf)
} {
$cal_text .="</td></tr>"; $cal_text .= "<input type='radio' name='output_type' value='pdf' /> ".EC_LAN_161;
}
$cal_text .= "<tr><td colspan='2' style='text-align:center' class='fcaption'><input class='button' type='submit' name='set_dates' value='".EC_LAN_156."' /></td></tr>"; $cal_text .="</td></tr>";
$cal_text .= "</table></form></div>"; $cal_text .= "<tr><td colspan='2' style='text-align:center' class='fcaption'><input class='button' type='submit' name='set_dates' value='".EC_LAN_156."' /></td></tr>";
$ns->tablerender(EC_LAN_150, $cal_text);
require_once(FOOTERF); $cal_text .= "</table></form></div>";
exit; $ns->tablerender(EC_LAN_150, $cal_text);
} require_once(FOOTERF);
exit;
}
if (!is_numeric($ec_start_date = decode_date($ec_qs[0],FALSE)))
{
$message = $ec_start_date; if (!is_numeric($ec_start_date = decode_date($ec_qs[0],FALSE)))
} {
elseif (!is_numeric($ec_end_date = decode_date($ec_qs[1],TRUE))) $message = $ec_start_date;
{ }
$message = $ec_end_date; elseif (!is_numeric($ec_end_date = decode_date($ec_qs[1],TRUE)))
} {
elseif ($ec_start_date >= $ec_end_date) $message = $ec_end_date;
{ }
$message = EC_LAN_151; elseif ($ec_start_date >= $ec_end_date)
} {
elseif (($ec_end_date - $ec_start_date) > 366*86400) $message = EC_LAN_151;
{ }
$message = EC_LAN_152; elseif (($ec_end_date - $ec_start_date) > 366*86400)
} {
$message = EC_LAN_152;
// That's the vetting of the query done (as much as we'll do) }
if ($message !== "")
{ // That's the vetting of the query done (as much as we'll do)
require_once(HEADERF); if ($message !== "")
$ns->tablerender(EC_LAN_80, $message); {
require_once(FOOTERF); require_once(HEADERF);
exit; $ns->tablerender(EC_LAN_80, $message);
} require_once(FOOTERF);
exit;
$calSc->catFilter = $cat_filter; // Category filter }
$ec_output_type = $ec_qs[4]; $calSc->catFilter = $cat_filter; // Category filter
if (isset($ec_qs[5])) $ec_list_title = $ec_qs[5]; else $ec_list_title = EC_LAN_163;
$ec_list_title = str_replace('_',' ',$ec_list_title); $ec_output_type = $ec_qs[4];
if (isset($ec_qs[5])) $ec_list_title = $ec_qs[5]; else $ec_list_title = EC_LAN_163;
if (($ec_output_type == 'pdf') && !$ec_enable_pdf) $ec_output_type = 'display'; $ec_list_title = str_replace('_',' ',$ec_list_title);
if ($ec_output_type == 'display') require_once(HEADERF);
if (($ec_output_type == 'pdf') && !$ec_enable_pdf) $ec_output_type = 'display';
if ($ec_output_type == 'display') require_once(HEADERF);
// Allow a number of categories separated by a '&'
$cat_filter = 0;
$ec_category_list = EC_LAN_97; // Displayable version of categories - default to 'all' // Allow a number of categories separated by a '&'
if (isset($ec_qs[2]) && ($ec_qs[2] != '*')) $cat_filter = 0;
{ $ec_category_list = EC_LAN_97; // Displayable version of categories - default to 'all'
$ec_category_list = array(); if (isset($ec_qs[2]) && ($ec_qs[2] != '*'))
$temp = explode('&',$ec_qs[2]); {
foreach($temp as $t1) $ec_category_list = array();
{ $temp = explode('&',$ec_qs[2]);
if (!is_numeric($t1)) unset($t1); foreach($temp as $t1)
} {
if (!is_numeric($t1)) unset($t1);
// Now look up the category names in the database - check access rights at the same time }
$temp = array(); // Accumulate valid category IDs
$cal_qry = "SELECT event_cat_id, event_cat_name FROM #event_cat WHERE find_in_set(event_cat_id, '{$ec_qs[2]}') ".$ecal_class->extra_query; // Now look up the category names in the database - check access rights at the same time
if ($sql->db_Select_gen($cal_qry)) $temp = array(); // Accumulate valid category IDs
{ $cal_qry = "SELECT event_cat_id, event_cat_name FROM #event_cat WHERE find_in_set(event_cat_id, '{$ec_qs[2]}') ".$ecal_class->extra_query;
while ($thiscat = $sql->db_Fetch()) if ($sql->db_Select_gen($cal_qry))
{ {
$temp [] = $thiscat['event_cat_id']; while ($thiscat = $sql->db_Fetch())
$ec_category_list[] = $thiscat['event_cat_name']; {
} $temp [] = $thiscat['event_cat_id'];
$cat_filter = implode(',',$temp); // Gives us a comma separated numeric set of categories $ec_category_list[] = $thiscat['event_cat_name'];
} }
else $cat_filter = implode(',',$temp); // Gives us a comma separated numeric set of categories
{ }
echo EC_LAN_100."<br /><br />"; else
exit; {
} echo EC_LAN_100."<br /><br />";
} exit;
}
// $ec_start_date - earliest date of period }
// $ec_end_date - latest date of period
// $ec_start_date - earliest date of period
// We'll potentially need virtually all of the event-related fields, so get them regardless. Just cut back on category fields // $ec_end_date - latest date of period
$ev_list = $ecal_class->get_events($ec_start_date, $ec_end_date, FALSE, $cat_filter, TRUE, '*', 'event_cat_name,event_cat_icon');
// Now go through and multiply up any recurring records // We'll potentially need virtually all of the event-related fields, so get them regardless. Just cut back on category fields
$tim_arr = array(); $ev_list = $ecal_class->get_events($ec_start_date, $ec_end_date, FALSE, $cat_filter, TRUE, '*', 'event_cat_name,event_cat_icon');
foreach ($ev_list as $k=>$event) // Now go through and multiply up any recurring records
{ $tim_arr = array();
if (is_array($event['event_start'])) foreach ($ev_list as $k=>$event)
{ {
foreach ($event['event_start'] as $t) if (is_array($event['event_start']))
{ {
$tim_arr[$t] = $k; foreach ($event['event_start'] as $t)
} {
} $tim_arr[$t] = $k;
else }
{ }
$tim_arr[$event['event_start']] = $k; else
} {
} $tim_arr[$event['event_start']] = $k;
}
ksort($tim_arr); // Sort into time order }
ksort($tim_arr); // Sort into time order
if (isset($ec_qs[3])) $ec_pdf_template = $ec_qs[3];
if (!isset($ec_pdf_template) || !array_key_exists($ec_pdf_template,$EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default';
if (isset($ec_qs[3])) $ec_pdf_template = $ec_qs[3];
/* if (!isset($ec_pdf_template) || !array_key_exists($ec_pdf_template,$EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default';
// These available to templates/shortcodes to pick up change of start day/month/year
global $ec_last_year, $ec_last_month, $ec_last_day, $ec_year_change, $ec_month_change, $ec_day_change; /*
global $ec_start_date, $ec_end_date, $ec_pdf_options; // These available to templates/shortcodes to pick up change of start day/month/year
global $ec_current_month, $thisevent_start_date, $thisevent_end_date ; global $ec_last_year, $ec_last_month, $ec_last_day, $ec_year_change, $ec_month_change, $ec_day_change;
*/ global $ec_start_date, $ec_end_date, $ec_pdf_options;
global $ec_current_month, $thisevent_start_date, $thisevent_end_date ;
$calSc->printVars = array('lt' => $ec_list_title, 'cat' => $ec_category_list, 'ot' => $ec_output_type, */
'sd' => $ec_start_date, 'ed' => $ec_end_date); // Give shortcodes the event data
$calSc->printVars = array('lt' => $ec_list_title, 'cat' => $ec_category_list, 'ot' => $ec_output_type,
$ec_last_year = 0; 'sd' => $ec_start_date, 'ed' => $ec_end_date); // Give shortcodes the event data
$ec_last_month = 0;
$ec_last_day = 0; $ec_last_year = 0;
$ec_last_month = 0;
$cal_text = ''; $ec_last_day = 0;
$cal_totev = count($ev_list);
if ($cal_totev > 0) $cal_text = '';
{ $cal_totev = count($ev_list);
if (isset($ec_template_styles[$ec_pdf_template]) && is_array($ec_template_styles[$ec_pdf_template])) if ($cal_totev > 0)
{ {
$ec_current_overrides = $ec_template_styles[$ec_pdf_template]; // Possible array of codes to override standard $sc_style if (isset($ec_template_styles[$ec_pdf_template]) && is_array($ec_template_styles[$ec_pdf_template]))
$sc_style = array_merge($sc_style,$ec_current_overrides); // Override as necessary {
} $ec_current_overrides = $ec_template_styles[$ec_pdf_template]; // Possible array of codes to override standard $sc_style
$sc_style = array_merge($sc_style,$ec_current_overrides); // Override as necessary
// If printing, wrap in a form so the button works }
if ($ec_output_type == 'print') $cal_text .= "<form action=''>\n";
// Add header // If printing, wrap in a form so the button works
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_HEADER[$ec_pdf_template], FALSE, $calSc); if ($ec_output_type == 'print') $cal_text .= "<form action=''>\n";
// Debug code // Add header
// echo "Start date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_start_date)."<br />"; $cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_HEADER[$ec_pdf_template], FALSE, $calSc);
// echo "End date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_end_date)."<br />"; // Debug code
// echo "Template: ".$ec_pdf_template,"<br />"; // echo "Start date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_start_date)."<br />";
// echo "Header: ".$EVENT_CAL_PDF_HEADER[$ec_pdf_template]."<br />"; // echo "End date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_end_date)."<br />";
// echo "Body: ".$EVENT_CAL_PDF_BODY[$ec_pdf_template]."<br />"; // echo "Template: ".$ec_pdf_template,"<br />";
// echo "Footer: ".$EVENT_CAL_PDF_FOOTER[$ec_pdf_template]."<br />"; // echo "Header: ".$EVENT_CAL_PDF_HEADER[$ec_pdf_template]."<br />";
// echo "Body: ".$EVENT_CAL_PDF_BODY[$ec_pdf_template]."<br />";
foreach ($tim_arr as $tim => $ptr) // echo "Footer: ".$EVENT_CAL_PDF_FOOTER[$ec_pdf_template]."<br />";
{
$ev_list[$ptr]['event_start'] = $tim; foreach ($tim_arr as $tim => $ptr)
$thisevent = $ev_list[$ptr]; {
// Decode dates into individual fields - we're bound to want them $ev_list[$ptr]['event_start'] = $tim;
$thisevent_start_date = $ecal_class->gmgetdate($thisevent['event_start']); $thisevent = $ev_list[$ptr];
$thisevent_end_date = $ecal_class->gmgetdate($thisevent['event_end']); // Decode dates into individual fields - we're bound to want them
$thisevent_start_date = $ecal_class->gmgetdate($thisevent['event_start']);
$ec_year_change = ($ec_last_year != $thisevent_start_date['year']); $thisevent_end_date = $ecal_class->gmgetdate($thisevent['event_end']);
$ec_month_change = ($ec_last_month != $thisevent_start_date['mon']);
$ec_day_change = ($ec_last_day != $thisevent_start_date['mday']); $ec_year_change = ($ec_last_year != $thisevent_start_date['year']);
$ec_month_change = ($ec_last_month != $thisevent_start_date['mon']);
$cal_totev --; // Can use this to modify inter-event gap $ec_day_change = ($ec_last_day != $thisevent_start_date['mday']);
$calSc->numEvents = $cal_totev; // Number of events to display
$calSc->event = $thisevent; // Give shortcodes the event data $cal_totev --; // Can use this to modify inter-event gap
$calSc->changeFlags = array('yc' => $ec_year_change, 'mc' => $ec_month_change, 'dc' => $ec_day_change); // Give shortcodes the event data $calSc->numEvents = $cal_totev; // Number of events to display
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_BODY[$ec_pdf_template], FALSE, $calSc); $calSc->event = $thisevent; // Give shortcodes the event data
$calSc->changeFlags = array('yc' => $ec_year_change, 'mc' => $ec_month_change, 'dc' => $ec_day_change); // Give shortcodes the event data
$ec_last_year = $thisevent_start_date['year']; $cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_BODY[$ec_pdf_template], FALSE, $calSc);
$ec_last_month = $thisevent_start_date['mon'];
$ec_last_day = $thisevent_start_date['mday']; $ec_last_year = $thisevent_start_date['year'];
} $ec_last_month = $thisevent_start_date['mon'];
$ec_last_day = $thisevent_start_date['mday'];
// Add footer }
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_FOOTER[$ec_pdf_template], FALSE, $calSc);
if ($ec_output_type == 'print') $cal_text .= "</form>\n"; // Add footer
} $cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_FOOTER[$ec_pdf_template], FALSE, $calSc);
else if ($ec_output_type == 'print') $cal_text .= "</form>\n";
{ }
$cal_text.= EC_LAN_148; else
} {
$cal_text.= EC_LAN_148;
switch($ec_output_type) }
{
case 'display': switch($ec_output_type)
$e107->ns->tablerender(EC_LAN_80, $cal_text, 'ec_pf_page'); {
require_once (FOOTERF); case 'display':
break; $e107->ns->tablerender(EC_LAN_80, $cal_text, 'ec_pf_page');
require_once (FOOTERF);
case 'print': break;
echo $cal_text;
break; case 'print':
echo $cal_text;
case 'pdf': break;
//TODO find a way to pass initialisation options etc to PDF driver
include_lan(e_PLUGIN.'pdf/languages/'.e_LANGUAGE.'.php'); case 'pdf':
// define('FPDF_FONTPATH', 'font/'); //TODO find a way to pass initialisation options etc to PDF driver
//require the ufpdf class include_lan(e_PLUGIN.'pdf/languages/'.e_LANGUAGE.'.php');
// require_once (e_PLUGIN.'pdf/ufpdf.php'); // define('FPDF_FONTPATH', 'font/');
//require the e107pdf class //require the ufpdf class
require_once (e_PLUGIN.'pdf/e107pdf.php'); // require_once (e_PLUGIN.'pdf/ufpdf.php');
$pdf = new e107PDF(); //require the e107pdf class
// $text = array($text, $creator, $author, $title, $subject, $keywords, $url); require_once (e_PLUGIN.'pdf/e107pdf.php');
$text = array( $pdf = new e107PDF();
$cal_text, // $text = array($text, $creator, $author, $title, $subject, $keywords, $url);
'', $text = array(
'', $cal_text,
EC_LAN_163, // Title '',
'', '',
'', EC_LAN_163, // Title
e_SELF.'?'.e_QUERY, // URL '',
'' // Page orientation '',
); e_SELF.'?'.e_QUERY, // URL
$pdf->makePDF($text); '' // Page orientation
break; );
$pdf->makePDF($text);
} break;
}
// We're assuming $date_string is a string of digits
// Which could begin with 'now' or 'now+'
function decode_date($date_string, $last_day = FALSE) // We're assuming $date_string is a string of digits
{ // Decode a date string // Which could begin with 'now' or 'now+'
if (strpos($date_string, 'now') === 0) function decode_date($date_string, $last_day = FALSE)
{ { // Decode a date string
// decode special dates if (strpos($date_string, 'now') === 0)
$today = getdate(); {
// Knock off the 'now' // decode special dates
$date_string = trim(substr($date_string, 3)); $today = getdate();
if (($date_string != '') && ($date_string[0] == '+')) // Knock off the 'now'
{ $date_string = trim(substr($date_string, 3));
// Knock off the '+' if (($date_string != '') && ($date_string[0] == '+'))
$date_string = trim(substr($date_string, 1)); {
if (is_numeric($date_string) && ($date_string >= 0) && ($date_string <= 12)) // Knock off the '+'
{ $date_string = trim(substr($date_string, 1));
$today['mon'] += $date_string; if (is_numeric($date_string) && ($date_string >= 0) && ($date_string <= 12))
if ($today['mon'] > 12) {
{ $today['mon'] += $date_string;
$today['mon'] -= 12; if ($today['mon'] > 12)
$today['year'] += 1; {
} $today['mon'] -= 12;
} $today['year'] += 1;
else }
{ }
return EC_LAN_149; else
} {
} return EC_LAN_149;
$date_string = $today['year'].$today['mon']; }
} }
$date_string = $today['year'].$today['mon'];
// Here, $date_string is a string of 5, 6 or 8 digits }
// use preg_match()
if(preg_match('/^\d{5,8}$/D', $date_string)) // Here, $date_string is a string of 5, 6 or 8 digits
{ // use preg_match()
$month = 0; if(preg_match('/^\d{5,8}$/D', $date_string))
$day = 1; {
if (strlen($date_string) == 5) $month = 0;
$date_string = substr_replace($date_string, '0', -1, 0); $day = 1;
if (strlen($date_string) == 8) if (strlen($date_string) == 5)
{ $date_string = substr_replace($date_string, '0', -1, 0);
$day = substr($date_string, -2, 2); if (strlen($date_string) == 8)
if ($last_day) {
$day += 1; $day = substr($date_string, -2, 2);
} if ($last_day)
elseif (strlen($date_string) == 6) $day += 1;
{ }
if ($last_day) elseif (strlen($date_string) == 6)
$month = 1; {
} if ($last_day)
else $month = 1;
{ }
// Error else
return EC_LAN_149; {
} // Error
$month += substr($date_string, 4, 2); return EC_LAN_149;
$year = substr($date_string, 0, 4); }
$temp = mktime(0, 0, 0, $month, $day, $year); $month += substr($date_string, 4, 2);
// Always do this to get whole of last day $year = substr($date_string, 0, 4);
if ($last_day) $temp = mktime(0, 0, 0, $month, $day, $year);
$temp -= 1; // Always do this to get whole of last day
return $temp; if ($last_day)
} $temp -= 1;
else return $temp;
{ // Error }
return EC_LAN_149; else
} { // Error
} return EC_LAN_149;
}
}
// 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 last date we want end of next // Generate monthly drop-down - FALSE = first, TRUE = last
function gen_drop($drop_type) // For the first date we want beginning of previous year to end of current year
{ // For the last date we want end of next
$text = "<select name='".($drop_type ? 'end_date' : 'start_date')."' class='tbox' style='width:140px;' >\n"; function gen_drop($drop_type)
if ($drop_type) {
{ $text = "<select name='".($drop_type ? 'end_date' : 'start_date')."' class='tbox' style='width:140px;' >\n";
$start_date = strtotime('-3 months'); if ($drop_type)
$match_date = strtotime('+3 months'); // Propose 3-month list {
} $start_date = strtotime('-3 months');
else $match_date = strtotime('+3 months'); // Propose 3-month list
{ }
$start_date = strtotime('-9 months'); else
// $match_date = strtotime('-1 months'); {
$match_date = time(); // Use current month for start date $start_date = strtotime('-9 months');
} // $match_date = strtotime('-1 months');
$match_date = time(); // Use current month for start date
// Get date to be 1st of month }
$date = getdate($match_date);
$match_date = mktime(0,0,0,$date['mon'],1,$date['year'],FALSE); // Get date to be 1st of month
$date = getdate($match_date);
for ($i = 0; $i < 24; $i++) $match_date = mktime(0,0,0,$date['mon'],1,$date['year'],FALSE);
{
$sel_text = (($match_date == $start_date) ? "selected='selected'" : ""); for ($i = 0; $i < 24; $i++)
$date = getdate($start_date); {
$text .= "<option value = '{$date['year']}{$date['mon']}' {$sel_text}>{$date['month']} {$date['year']} </option>\n"; $sel_text = (($match_date == $start_date) ? "selected='selected'" : "");
$start_date = mktime(0,0,0,$date['mon']+1,1,$date['year'],FALSE); $date = getdate($start_date);
} $text .= "<option value = '{$date['year']}{$date['mon']}' {$sel_text}>{$date['month']} {$date['year']} </option>\n";
$text .= "</select>\n"; $start_date = mktime(0,0,0,$date['mon']+1,1,$date['year'],FALSE);
return $text; }
} $text .= "</select>\n";
?> return $text;
}
?>

View File

@@ -1,108 +1,110 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar - template file for list generator * Event calendar - template file for list generator
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_template.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_template.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar - template file for list generator
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
/* */
Templates file for the event calendar listings (display/print/pdf).
There can be more than one template defined, in which case they are selectable. /*
There are four strings to define: Templates file for the event calendar listings (display/print/pdf).
$EVENT_CAL_PDF_NAMES[] - a 'user-friendly' name/description (shown in selection box) There can be more than one template defined, in which case they are selectable.
$EVENT_CAL_PDF_HEADER[] - the template for the header - displayed once at the top pf the list There are four strings to define:
$EVENT_CAL_PDF_BODY[] - template for each individual entry $EVENT_CAL_PDF_NAMES[] - a 'user-friendly' name/description (shown in selection box)
$EVENT_CAL_PDF_FOOTER[] - template for a footer (to close off the list) $EVENT_CAL_PDF_HEADER[] - the template for the header - displayed once at the top pf the list
$EVENT_CAL_PDF_BODY[] - template for each individual entry
The array index defines the name of the template - if there is an entry in the $EVENT_CAL_PDF_NAMES[] $EVENT_CAL_PDF_FOOTER[] - template for a footer (to close off the list)
array, there must be a corresponding entry in each of the other three arrays.
The array index defines the name of the template - if there is an entry in the $EVENT_CAL_PDF_NAMES[]
There are two ways of managing the styling of the various shortcodes: array, there must be a corresponding entry in each of the other three arrays.
a) The $sc_style array works in the usual way, and should be used where the styling is the same
for all templates, or where you can set a 'default' styling which applies to most uses of the shortcode There are two ways of managing the styling of the various shortcodes:
b) An $ec_template_styles array sets styles for an individual template. This need only contain the a) The $sc_style array works in the usual way, and should be used where the styling is the same
styles which override a default $sc_style entry. for all templates, or where you can set a 'default' styling which applies to most uses of the shortcode
*/ b) An $ec_template_styles array sets styles for an individual template. This need only contain the
styles which override a default $sc_style entry.
if (!defined('e107_INIT')) { exit; } */
if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
if (!defined('e107_INIT')) { exit; }
$sc_style['EC_PR_CHANGE_YEAR']['pre'] = '<br /><em><strong>'; if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
$sc_style['EC_PR_CHANGE_YEAR']['post'] = '</strong></em>';
$sc_style['EC_PR_CHANGE_MONTH']['pre'] = '<br /><strong>'; $sc_style['EC_PR_CHANGE_YEAR']['pre'] = '<br /><em><strong>';
$sc_style['EC_PR_CHANGE_MONTH']['post'] = '</strong><br />'; $sc_style['EC_PR_CHANGE_YEAR']['post'] = '</strong></em>';
$sc_style['EC_PRINT_BUTTON']['pre'] = "<br /><div style='text-align:center'>"; $sc_style['EC_PR_CHANGE_MONTH']['pre'] = '<br /><strong>';
$sc_style['EC_PRINT_BUTTON']['post'] = "</div>"; $sc_style['EC_PR_CHANGE_MONTH']['post'] = '</strong><br />';
$sc_style['EC_NOW_DATE']['pre'] = EC_LAN_170; $sc_style['EC_PRINT_BUTTON']['pre'] = "<br /><div style='text-align:center'>";
$sc_style['EC_NOW_DATE']['post'] = ""; $sc_style['EC_PRINT_BUTTON']['post'] = "</div>";
$sc_style['EC_NOW_TIME']['pre'] = EC_LAN_144; $sc_style['EC_NOW_DATE']['pre'] = EC_LAN_170;
$sc_style['EC_NOW_TIME']['post'] = ""; $sc_style['EC_NOW_DATE']['post'] = "";
$sc_style['EC_PR_CAT_LIST']['pre'] = EC_LAN_172; $sc_style['EC_NOW_TIME']['pre'] = EC_LAN_144;
$sc_style['EC_PR_CAT_LIST']['post'] = ""; $sc_style['EC_NOW_TIME']['post'] = "";
$sc_style['EC_PR_LIST_TITLE']['pre'] = "<h3>"; $sc_style['EC_PR_CAT_LIST']['pre'] = EC_LAN_172;
$sc_style['EC_PR_LIST_TITLE']['post'] = "</h3>"; $sc_style['EC_PR_CAT_LIST']['post'] = "";
$sc_style['EC_PR_LIST_TITLE']['pre'] = "<h3>";
// - Default style - very basic $sc_style['EC_PR_LIST_TITLE']['post'] = "</h3>";
$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 />"; // - Default style - very basic
$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_NAMES['default'] = EC_LAN_165;
$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_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_FOOTER['default'] = "---End of List---<br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME}<br />{EC_PRINT_BUTTON}";
// - A simple tabular style
$ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
$ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>'; // - A simple tabular style
$ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['pre'] = '<strong>'; $ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
$ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['post'] = '</strong>'; $ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
$ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['pre'] = '<strong>';
$EVENT_CAL_PDF_NAMES['simple'] = EC_LAN_166; $ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['post'] = '</strong>';
$EVENT_CAL_PDF_HEADER['simple'] = "{EC_IF_PRINT=LOGO}<table border='0px' cellspacing='10px' cellpadding='5px'>
<colgroup> <col width='15%'><col width='10%'><col width='10%'><col width='65%'></colgroup> $EVENT_CAL_PDF_NAMES['simple'] = EC_LAN_166;
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}</td></tr>"; $EVENT_CAL_PDF_HEADER['simple'] = "{EC_IF_PRINT=LOGO}<table border='0px' cellspacing='10px' cellpadding='5px'>
$EVENT_CAL_PDF_BODY['simple'] = "{EC_PR_CHANGE_YEAR}<tr><td>{EC_PR_CHANGE_MONTH}&nbsp;</td> <colgroup> <col width='15%'><col width='10%'><col width='10%'><col width='65%'></colgroup>
<td>{EC_MAIL_DATE_START=%a %d}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n"; <tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}</td></tr>";
$EVENT_CAL_PDF_FOOTER['simple'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME} <br />{EC_PRINT_BUTTON}"; $EVENT_CAL_PDF_BODY['simple'] = "{EC_PR_CHANGE_YEAR}<tr><td>{EC_PR_CHANGE_MONTH}&nbsp;</td>
<td>{EC_MAIL_DATE_START=%a %d}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
$EVENT_CAL_PDF_FOOTER['simple'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME} <br />{EC_PRINT_BUTTON}";
// - A tabular style with lines round the cells
$ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='3'><em><strong><br />";
$ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>'; // - A tabular style with lines round the cells
$ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='3'><em><strong><br />";
$EVENT_CAL_PDF_NAMES['tlinclines'] = EC_LAN_167; $ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
$EVENT_CAL_PDF_HEADER['tlinclines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
<colgroup> <col width='22%'><col width='8%'><col width='70%'></colgroup> $EVENT_CAL_PDF_NAMES['tlinclines'] = EC_LAN_167;
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>"; $EVENT_CAL_PDF_HEADER['tlinclines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
$EVENT_CAL_PDF_BODY['tlinclines'] = "{EC_PR_CHANGE_YEAR}<tr> <colgroup> <col width='22%'><col width='8%'><col width='70%'></colgroup>
<td>{EC_MAIL_DATE_START}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n"; <tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>";
$EVENT_CAL_PDF_FOOTER['tlinclines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}"; $EVENT_CAL_PDF_BODY['tlinclines'] = "{EC_PR_CHANGE_YEAR}<tr>
<td>{EC_MAIL_DATE_START}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
// - A tabular style with lines round the cells and categories $EVENT_CAL_PDF_FOOTER['tlinclines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}";
$ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
$ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>'; // - A tabular style with lines round the cells and categories
$ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
$EVENT_CAL_PDF_NAMES['tlinccatlines'] = EC_LAN_171; $ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
$EVENT_CAL_PDF_HEADER['tlinccatlines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
<colgroup> <col width='12%'><col width='8%'><col width='18%'><col width='62%'></colgroup> $EVENT_CAL_PDF_NAMES['tlinccatlines'] = EC_LAN_171;
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>"; $EVENT_CAL_PDF_HEADER['tlinccatlines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
$EVENT_CAL_PDF_BODY['tlinccatlines'] = "{EC_PR_CHANGE_YEAR}<tr> <colgroup> <col width='12%'><col width='8%'><col width='18%'><col width='62%'></colgroup>
<td>{EC_MAIL_DATE_START=%D %d %b}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_CATEGORY}</td><td>{EC_MAIL_TITLE}</td></tr>\n"; <tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>";
$EVENT_CAL_PDF_FOOTER['tlinccatlines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}"; $EVENT_CAL_PDF_BODY['tlinccatlines'] = "{EC_PR_CHANGE_YEAR}<tr>
<td>{EC_MAIL_DATE_START=%D %d %b}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_CATEGORY}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
$EVENT_CAL_PDF_FOOTER['tlinccatlines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}";
?> ?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,302 +1,304 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* These messages are for the 'user' pages of the event calendar (including event entry/editing) * These messages are for the 'user' pages of the event calendar
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* Language file - 'user' pages * Language file - 'user' pages
* *
* @package e107_plugins * @package e107_plugins
* @subpackage event_calendar * @subpackage event_calendar
* @version $Id$; * @version $Id$;
*/ */
define('EC_ADLAN_1', 'Event Calendar'); define('EC_ADLAN_1', 'Event Calendar');
define('EC_ADLAN_2', 'Configure Event Calendar'); define('EC_ADLAN_2', 'Configure Event Calendar');
define('EC_LAN_TODAY', 'today'); define('EC_LAN_TODAY', 'today');
define('EC_LAN_DAY_1', "1"); define('EC_LAN_DAY_1', "1");
define('EC_LAN_DAY_2', "2"); define('EC_LAN_DAY_2', "2");
define('EC_LAN_DAY_3', "3"); define('EC_LAN_DAY_3', "3");
define('EC_LAN_DAY_4', "4"); define('EC_LAN_DAY_4', "4");
define('EC_LAN_DAY_5', "5"); define('EC_LAN_DAY_5', "5");
define('EC_LAN_DAY_6', "6"); define('EC_LAN_DAY_6', "6");
define('EC_LAN_DAY_7', "7"); define('EC_LAN_DAY_7', "7");
define('EC_LAN_DAY_8', "8"); define('EC_LAN_DAY_8', "8");
define('EC_LAN_DAY_9', "9"); define('EC_LAN_DAY_9', "9");
define('EC_LAN_DAY_10', "10"); define('EC_LAN_DAY_10', "10");
define('EC_LAN_DAY_11', "11"); define('EC_LAN_DAY_11', "11");
define('EC_LAN_DAY_12', "12"); define('EC_LAN_DAY_12', "12");
define('EC_LAN_DAY_13', "13"); define('EC_LAN_DAY_13', "13");
define('EC_LAN_DAY_14', "14"); define('EC_LAN_DAY_14', "14");
define('EC_LAN_DAY_15', "15"); define('EC_LAN_DAY_15', "15");
define('EC_LAN_DAY_16', "16"); define('EC_LAN_DAY_16', "16");
define('EC_LAN_DAY_17', "17"); define('EC_LAN_DAY_17', "17");
define('EC_LAN_DAY_18', "18"); define('EC_LAN_DAY_18', "18");
define('EC_LAN_DAY_19', "19"); define('EC_LAN_DAY_19', "19");
define('EC_LAN_DAY_20', "20"); define('EC_LAN_DAY_20', "20");
define('EC_LAN_DAY_21', "21"); define('EC_LAN_DAY_21', "21");
define('EC_LAN_DAY_22', "22"); define('EC_LAN_DAY_22', "22");
define('EC_LAN_DAY_23', "23"); define('EC_LAN_DAY_23', "23");
define('EC_LAN_DAY_24', "24"); define('EC_LAN_DAY_24', "24");
define('EC_LAN_DAY_25', "25"); define('EC_LAN_DAY_25', "25");
define('EC_LAN_DAY_26', "26"); define('EC_LAN_DAY_26', "26");
define('EC_LAN_DAY_27', "27"); define('EC_LAN_DAY_27', "27");
define('EC_LAN_DAY_28', "28"); define('EC_LAN_DAY_28', "28");
define('EC_LAN_DAY_29', "29"); define('EC_LAN_DAY_29', "29");
define('EC_LAN_DAY_30', "30"); define('EC_LAN_DAY_30', "30");
define('EC_LAN_DAY_31', "31"); define('EC_LAN_DAY_31', "31");
define('EC_LAN_0', "January"); define('EC_LAN_0', "January");
define('EC_LAN_1', "February"); define('EC_LAN_1', "February");
define('EC_LAN_2', "March"); define('EC_LAN_2', "March");
define('EC_LAN_3', "April"); define('EC_LAN_3', "April");
define('EC_LAN_4', "May"); define('EC_LAN_4', "May");
define('EC_LAN_5', "June"); define('EC_LAN_5', "June");
define('EC_LAN_6', "July"); define('EC_LAN_6', "July");
define('EC_LAN_7', "August"); define('EC_LAN_7', "August");
define('EC_LAN_8', "September"); define('EC_LAN_8', "September");
define('EC_LAN_9', "October"); define('EC_LAN_9', "October");
define('EC_LAN_10', "November"); define('EC_LAN_10', "November");
define('EC_LAN_11', "December"); define('EC_LAN_11', "December");
define('EC_LAN_JAN', "Jan"); define('EC_LAN_JAN', "Jan");
define('EC_LAN_FEB', "Feb"); define('EC_LAN_FEB', "Feb");
define('EC_LAN_MAR', "Mar"); define('EC_LAN_MAR', "Mar");
define('EC_LAN_APR', "Apr"); define('EC_LAN_APR', "Apr");
define('EC_LAN_MAY', "May"); define('EC_LAN_MAY', "May");
define('EC_LAN_JUN', "Jun"); define('EC_LAN_JUN', "Jun");
define('EC_LAN_JUL', "Jul"); define('EC_LAN_JUL', "Jul");
define('EC_LAN_AUG', "Aug"); define('EC_LAN_AUG', "Aug");
define('EC_LAN_SEP', "Sep"); define('EC_LAN_SEP', "Sep");
define('EC_LAN_OCT', "Oct"); define('EC_LAN_OCT', "Oct");
define('EC_LAN_NOV', "Nov"); define('EC_LAN_NOV', "Nov");
define('EC_LAN_DEC', "Dec"); define('EC_LAN_DEC', "Dec");
define('EC_LAN_12', "Monday"); define('EC_LAN_12', "Monday");
define('EC_LAN_13', "Tuesday"); define('EC_LAN_13', "Tuesday");
define('EC_LAN_14', "Wednesday"); define('EC_LAN_14', "Wednesday");
define('EC_LAN_15', "Thursday"); define('EC_LAN_15', "Thursday");
define('EC_LAN_16', "Friday"); define('EC_LAN_16', "Friday");
define('EC_LAN_17', "Saturday"); define('EC_LAN_17', "Saturday");
define('EC_LAN_18', "Sunday"); define('EC_LAN_18', "Sunday");
define('EC_LAN_19', "Mon"); define('EC_LAN_19', "Mon");
define('EC_LAN_20', "Tue"); define('EC_LAN_20', "Tue");
define('EC_LAN_21', "Wed"); define('EC_LAN_21', "Wed");
define('EC_LAN_22', "Thu"); define('EC_LAN_22', "Thu");
define('EC_LAN_23', "Fri"); define('EC_LAN_23', "Fri");
define('EC_LAN_24', "Sat"); define('EC_LAN_24', "Sat");
define('EC_LAN_25', "Sun"); define('EC_LAN_25', "Sun");
define('EC_LAN_26', "Events this Month"); define('EC_LAN_26', "Events this Month");
define('EC_LAN_27', "No events for this month."); define('EC_LAN_27', "No events for this month.");
define('EC_LAN_28', "Enter New Event"); define('EC_LAN_28', "Enter New Event");
define('EC_LAN_29', "When:"); define('EC_LAN_29', "When:");
define('EC_LAN_30', "Category:"); define('EC_LAN_30', "Category:");
define('EC_LAN_31', "Posted by:"); define('EC_LAN_31', "Posted by:");
define('EC_LAN_32', "Location:"); define('EC_LAN_32', "Location:");
define('EC_LAN_33', "Contact:"); define('EC_LAN_33', "Contact:");
define('EC_LAN_34', "Jump to"); define('EC_LAN_34', "Jump to");
define('EC_LAN_35', "Edit"); define('EC_LAN_35', "Edit");
define('EC_LAN_36', "Delete"); define('EC_LAN_36', "Delete");
define('EC_LAN_37', "None Listed."); define('EC_LAN_37', "None Listed.");
define('EC_LAN_38', "Not specified"); define('EC_LAN_38', "Not specified");
define('EC_LAN_39', "Click here for more information"); define('EC_LAN_39', "Click here for more information");
define('EC_LAN_40', "Current Month"); define('EC_LAN_40', "Current Month");
define('EC_LAN_41', "Total -NUM- individual events created"); define('EC_LAN_41', "Total -NUM- individual events created");
define('EC_LAN_42', "Event cannot end before it starts."); define('EC_LAN_42', "Event cannot end before it starts.");
define('EC_LAN_43', "You left required field(s) blank."); define('EC_LAN_43', "You left required field(s) blank.");
define('EC_LAN_44', "New event created and entered into database."); define('EC_LAN_44', "New event created and entered into database.");
define('EC_LAN_45', "Event updated in database."); define('EC_LAN_45', "Event updated in database.");
define('EC_LAN_46', "Confirm Delete Event"); define('EC_LAN_46', "Confirm Delete Event");
define('EC_LAN_47', "Delete cancelled."); define('EC_LAN_47', "Delete cancelled.");
define('EC_LAN_48', "Please confirm you wish to delete this event - once deleted it cannot be retrieved"); define('EC_LAN_48', "Please confirm you wish to delete this event - once deleted it cannot be retrieved");
define('EC_LAN_49', "Cancel"); define('EC_LAN_49', "Cancel");
define('EC_LAN_50', "Confirm Delete"); define('EC_LAN_50', "Confirm Delete");
define('EC_LAN_51', "Event deleted."); define('EC_LAN_51', "Event deleted.");
define('EC_LAN_52', "Event Category:"); define('EC_LAN_52', "Event Category:");
define('EC_LAN_53', "Create new category?:"); define('EC_LAN_53', "Create new category?:");
define('EC_LAN_54', "Name:"); define('EC_LAN_54', "Name:");
//define('EC_LAN_55', "Icon:"); //define('EC_LAN_55', "Icon:");
define('EC_LAN_56', "Create"); define('EC_LAN_56', "Create");
define('EC_LAN_57', "Event:"); define('EC_LAN_57', "Event:");
define('EC_LAN_58', "source info URL:"); define('EC_LAN_58', "source info URL:");
define('EC_LAN_59', "Contact email:"); define('EC_LAN_59', "Contact email:");
define('EC_LAN_60', "Update Event"); define('EC_LAN_60', "Update Event");
define('EC_LAN_61', "Go"); define('EC_LAN_61', "Go");
define('EC_LAN_62', "Next -NUM- Events ..."); define('EC_LAN_62', "Next -NUM- Events ...");
define('EC_LAN_63', "Select repeating events between start and end dates. Start and end time as set"); define('EC_LAN_63', "Select repeating events between start and end dates. Start and end time as set");
define('EC_LAN_64', "Check for an all-day event"); define('EC_LAN_64', "Check for an all-day event");
define('EC_LAN_65', "Recurring:"); define('EC_LAN_65', "Recurring:");
define('EC_LAN_66', "Edit Event"); define('EC_LAN_66', "Edit Event");
define('EC_LAN_67', "Start:"); define('EC_LAN_67', "Start:");
define('EC_LAN_68', "All day event:"); define('EC_LAN_68', "All day event:");
define('EC_LAN_69', "Ends:"); define('EC_LAN_69', "Ends:");
define('EC_LAN_70', "Event Title:"); define('EC_LAN_70', "Event Title:");
define('EC_LAN_71', "Event Time:"); define('EC_LAN_71', "Event Time:");
define('EC_LAN_72', "Event Date:"); define('EC_LAN_72', "Event Date:");
define('EC_LAN_73', "End:"); define('EC_LAN_73', "End:");
define('EC_LAN_74', "View Category"); define('EC_LAN_74', "View Category");
//define('EC_LAN_76', "Events can be added by:"); //define('EC_LAN_76', "Events can be added by:");
//define('EC_LAN_77', "Update Settings"); //define('EC_LAN_77', "Update Settings");
//define('EC_LAN_78', "Calendar Settings"); //define('EC_LAN_78', "Calendar Settings");
define('EC_LAN_79', "Calendar View"); define('EC_LAN_79', "Calendar View");
define('EC_LAN_80', "Event List"); define('EC_LAN_80', "Event List");
//define('EC_LAN_81', "Configure Event Calendar"); //define('EC_LAN_81', "Configure Event Calendar");
//define('EC_LAN_82', "To activate please go to your menus screen and select the calendar_menu into one of your menu areas."); //define('EC_LAN_82', "To activate please go to your menus screen and select the calendar_menu into one of your menu areas.");
define('EC_LAN_83', "Calendar"); define('EC_LAN_83', "Calendar");
define('EC_LAN_84', " from "); define('EC_LAN_84', " from ");
define('EC_LAN_85', " until "); define('EC_LAN_85', " until ");
define('EC_LAN_86', "Individual events from entry"); define('EC_LAN_86', "Individual events from entry");
define('EC_LAN_87', "By checking this box you may generate a large number of individual events, which you will have to edit or delete individually if they are wrong"); define('EC_LAN_87', "By checking this box you may generate a large number of individual events, which you will have to edit or delete individually if they are wrong");
define('EC_LAN_88', "You have chosen to generate -NUM- individual events."); define('EC_LAN_88', "You have chosen to generate -NUM- individual events.");
define('EC_LAN_89', "If the entry is wrong, you will have to edit or delete the entries individually"); define('EC_LAN_89', "If the entry is wrong, you will have to edit or delete the entries individually");
//define('EC_LAN_90', "Choose"); //define('EC_LAN_90', "Choose");
define('EC_LAN_91', "Admin must define first"); define('EC_LAN_91', "Admin must define first");
define('EC_LAN_92', "View Category"); define('EC_LAN_92', "View Category");
define('EC_LAN_93', "View Events List"); define('EC_LAN_93', "View Events List");
define('EC_LAN_94', "Enter New Event"); define('EC_LAN_94', "Enter New Event");
define('EC_LAN_95', "Today"); define('EC_LAN_95', "Today");
define('EC_LAN_96', "View Calendar"); define('EC_LAN_96', "View Calendar");
define('EC_LAN_97', "All"); define('EC_LAN_97', "All");
define('EC_LAN_98', "Required fields left blank"); define('EC_LAN_98', "Required fields left blank");
define('EC_LAN_99', "Event must either be an all day event or finish after it starts"); define('EC_LAN_99', "Event must either be an all day event or finish after it starts");
define('EC_LAN_100', "Invalid Category Selection"); define('EC_LAN_100', "Invalid Category Selection");
//define('EC_LAN_101', "Set to inactive to disable on the new event form."); //define('EC_LAN_101', "Set to inactive to disable on the new event form.");
//define('EC_LAN_102', "Show link to 'more information' with events"); //define('EC_LAN_102', "Show link to 'more information' with events");
//define('EC_LAN_103', "On new event entry form."); //define('EC_LAN_103', "On new event entry form.");
//define('EC_LAN_104', "Calendar Administrator Class"); //define('EC_LAN_104', "Calendar Administrator Class");
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 'readme.pdf' 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 ");
define('EC_LAN_112', "All the Events in "); define('EC_LAN_112', "All the Events in ");
define('EC_LAN_113', "Event form already submitted."); define('EC_LAN_113', "Event form already submitted.");
//define('EC_LAN_114', "Week starts with:"); //define('EC_LAN_114', "Week starts with:");
define('EC_LAN_115', "Sunday"); define('EC_LAN_115', "Sunday");
define('EC_LAN_116', "Monday"); define('EC_LAN_116', "Monday");
//define('EC_LAN_117', "Length of daynames (characters)"); //define('EC_LAN_117', "Length of daynames (characters)");
//define('EC_LAN_118', "Date format in calendar header:"); //define('EC_LAN_118', "Date format in calendar header:");
//define('EC_LAN_119', "month/year"); //define('EC_LAN_119', "month/year");
//define('EC_LAN_120', "year/month"); //define('EC_LAN_120', "year/month");
define('EC_LAN_121', "Show Calendar"); define('EC_LAN_121', "Show Calendar");
define('EC_LAN_122', 'Event information (single event)'); define('EC_LAN_122', 'Event information (single event)');
define('EC_LAN_123', "Subscriptions"); define('EC_LAN_123', "Subscriptions");
define('EC_LAN_124', "Calendar Subscriptions"); define('EC_LAN_124', "Calendar Subscriptions");
define('EC_LAN_125', "Categories available for subscription"); define('EC_LAN_125', "Categories available for subscription");
define('EC_LAN_126', "Subscribed"); define('EC_LAN_126', "Subscribed");
define('EC_LAN_127', "Category"); define('EC_LAN_127', "Category");
define('EC_LAN_128', "No categories available to subscribe to"); define('EC_LAN_128', "No categories available to subscribe to");
define('EC_LAN_129', "Update"); define('EC_LAN_129', "Update");
define('EC_LAN_130', "Subscriptions updated"); define('EC_LAN_130', "Subscriptions updated");
define('EC_LAN_131', "Return"); define('EC_LAN_131', "Return");
define('EC_LAN_132', "Expand details"); define('EC_LAN_132', "Expand details");
define('EC_LAN_133', "[read more]"); define('EC_LAN_133', "[read more]");
define('EC_LAN_134', "You have to provide a category name"); 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_140', "Forthcoming Events"); define('EC_LAN_140', "Forthcoming Events");
define('EC_LAN_141', "No forthcoming events"); define('EC_LAN_141', "No forthcoming events");
define('EC_LAN_142', "Only registered and logged in users can subscribe to events"); define('EC_LAN_142', "Only registered and logged in users can subscribe to events");
define('EC_LAN_143', "Facility not available"); define('EC_LAN_143', "Facility not available");
define('EC_LAN_144', " at "); define('EC_LAN_144', " at ");
define('EC_LAN_145', "You must specify a category for the event"); define('EC_LAN_145', "You must specify a category for the event");
define('EC_LAN_146', "Advance notice of calendar event"); define('EC_LAN_146', "Advance notice of calendar event");
define('EC_LAN_147', "Calendar event today or tomorrow"); define('EC_LAN_147', "Calendar event today or tomorrow");
define('EC_LAN_148', "No events in specified date range"); define('EC_LAN_148', "No events in specified date range");
define('EC_LAN_149', "Invalid date format"); define('EC_LAN_149', "Invalid date format");
define('EC_LAN_150', "Enter start and end date for list"); define('EC_LAN_150', "Enter start and end date for list");
define('EC_LAN_151', "End date after start date"); define('EC_LAN_151', "End date after start date");
define('EC_LAN_152', "Maximum one year's events"); define('EC_LAN_152', "Maximum one year's events");
define('EC_LAN_153', "Start Date (first day of): "); define('EC_LAN_153', "Start Date (first day of): ");
define('EC_LAN_154', "End Date (last day of): "); define('EC_LAN_154', "End Date (last day of): ");
define('EC_LAN_155', "Category: "); define('EC_LAN_155', "Category: ");
define('EC_LAN_156', "Create List"); define('EC_LAN_156', "Create List");
define('EC_LAN_157', "Layout Options:"); define('EC_LAN_157', "Layout Options:");
define('EC_LAN_158', "Output: "); define('EC_LAN_158', "Output: ");
define('EC_LAN_159', "Display "); define('EC_LAN_159', "Display ");
define('EC_LAN_160', "Print "); define('EC_LAN_160', "Print ");
define('EC_LAN_161', "PDF "); define('EC_LAN_161', "PDF ");
define('EC_LAN_162', "Print this page"); define('EC_LAN_162', "Print this page");
define('EC_LAN_163', "Event Listing"); define('EC_LAN_163', "Event Listing");
define('EC_LAN_164', "Printable Lists"); define('EC_LAN_164', "Printable Lists");
define('EC_LAN_165', "Default Listing"); define('EC_LAN_165', "Default Listing");
define('EC_LAN_166', "Tabular List no lines"); define('EC_LAN_166', "Tabular List no lines");
define('EC_LAN_167', "Tabular List with lines"); define('EC_LAN_167', "Tabular List with lines");
define('EC_LAN_168', "From: "); define('EC_LAN_168', "From: ");
define('EC_LAN_169', "To: "); define('EC_LAN_169', "To: ");
define('EC_LAN_170', "Printed on: "); define('EC_LAN_170', "Printed on: ");
define('EC_LAN_171', "List including category"); define('EC_LAN_171', "List including category");
define('EC_LAN_172', "Event Categories: "); define('EC_LAN_172', "Event Categories: ");
define('EC_LAN_173', "First event starts: "); define('EC_LAN_173', "First event starts: ");
define('EC_LAN_174', "Last event ends: "); define('EC_LAN_174', "Last event ends: ");
define('EC_LAN_175', 'All Day'); define('EC_LAN_175', 'All Day');
define('EC_LAN_176', "Recurring pattern: "); define('EC_LAN_176', "Recurring pattern: ");
define('EC_LAN_177', "Cancel Entry"); define('EC_LAN_177', "Cancel Entry");
define('EC_LAN_178', "Accept Entries"); define('EC_LAN_178', "Accept Entries");
define('EC_LAN_179', "Confirmation of multiple event entry"); define('EC_LAN_179', "Confirmation of multiple event entry");
define('EC_LAN_180', 'RECORDS NOT SAVED - DB UPDATE ERROR'); define('EC_LAN_180', 'RECORDS NOT SAVED - DB UPDATE ERROR');
define('EC_LAN_181', "You aren't allowed to do that!"); define('EC_LAN_181', "You aren't allowed to do that!");
define('EC_LAN_182', 'Sign up to receive email notification of events');
define('EC_LAN_VIEWCALENDAR', 'View Calendar'); define('EC_LAN_183', 'Create printable lists of events');
define('EC_LAN_VIEWALLEVENTS', 'View all events');
define('EC_LAN_ALLEVENTS', "All events"); define('EC_LAN_VIEWCALENDAR', 'View Calendar');
define('EC_LAN_VIEWALLEVENTS', 'View all events');
/* define('EC_LAN_ALLEVENTS', "All events");
// Recurring events texts - the numeric part of each define is the internal value assigned
define('EC_LAN_RECUR_00', 'no'); /*
define('EC_LAN_RECUR_01', 'annual'); // Recurring events texts - the numeric part of each define is the internal value assigned
define('EC_LAN_RECUR_02', 'biannual'); define('EC_LAN_RECUR_00', 'no');
define('EC_LAN_RECUR_03', 'quarterly'); define('EC_LAN_RECUR_01', 'annual');
define('EC_LAN_RECUR_04', 'monthly'); define('EC_LAN_RECUR_02', 'biannual');
define('EC_LAN_RECUR_05', 'four weekly'); define('EC_LAN_RECUR_03', 'quarterly');
define('EC_LAN_RECUR_06', 'fortnightly'); define('EC_LAN_RECUR_04', 'monthly');
define('EC_LAN_RECUR_07', 'weekly'); define('EC_LAN_RECUR_05', 'four weekly');
define('EC_LAN_RECUR_08', 'daily'); define('EC_LAN_RECUR_06', 'fortnightly');
define('EC_LAN_RECUR_100', 'Sunday in month'); define('EC_LAN_RECUR_07', 'weekly');
define('EC_LAN_RECUR_101', 'Monday in month'); define('EC_LAN_RECUR_08', 'daily');
define('EC_LAN_RECUR_102', 'Tuesday in month'); define('EC_LAN_RECUR_100', 'Sunday in month');
define('EC_LAN_RECUR_103', 'Wednesday in month'); define('EC_LAN_RECUR_101', 'Monday in month');
define('EC_LAN_RECUR_104', 'Thursday in month'); define('EC_LAN_RECUR_102', 'Tuesday in month');
define('EC_LAN_RECUR_105', 'Friday in month'); define('EC_LAN_RECUR_103', 'Wednesday in month');
define('EC_LAN_RECUR_106', 'Saturday in month'); define('EC_LAN_RECUR_104', 'Thursday in month');
define('EC_LAN_RECUR_105', 'Friday in month');
define('EC_LAN_RECUR_1100', 'First'); define('EC_LAN_RECUR_106', 'Saturday in month');
define('EC_LAN_RECUR_1200', 'Second');
define('EC_LAN_RECUR_1300', 'Third'); define('EC_LAN_RECUR_1100', 'First');
define('EC_LAN_RECUR_1400', 'Fourth'); define('EC_LAN_RECUR_1200', 'Second');
define('EC_LAN_RECUR_1300', 'Third');
define('EC_LAN_RECUR_1400', 'Fourth');
// Notify
define('NT_LAN_EC_1', 'Event Calendar Events');
define('NT_LAN_EC_2', 'Event Updated'); // Notify
define('NT_LAN_EC_3', 'Update by'); define('NT_LAN_EC_1', 'Event Calendar Events');
define('NT_LAN_EC_4', 'IP Address'); define('NT_LAN_EC_2', 'Event Updated');
define('NT_LAN_EC_5', 'Message'); define('NT_LAN_EC_3', 'Update by');
define('NT_LAN_EC_6', 'Event Calendar - Event added'); define('NT_LAN_EC_4', 'IP Address');
define('NT_LAN_EC_7', 'New event posted'); define('NT_LAN_EC_5', 'Message');
define('NT_LAN_EC_8', 'Event Calendar - Event modified'); define('NT_LAN_EC_6', 'Event Calendar - Event added');
*/ define('NT_LAN_EC_7', 'New event posted');
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 */
define('EC_MAILOUT_SUBJECT', "Advice of calendar event"); // Use shortcode EC_MAIL_SUBJECT
// 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
?> ?>

View File

@@ -1,395 +1,228 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Messages for admin pages of event calendar * Messages for admin pages of event calendar
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_admin_calendar_menu.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_admin_calendar_menu.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* Language file - 'admin' pages * Language file - 'admin' pages
* *
* @package e107_plugins * @package e107_plugins
* @subpackage event_calendar * @subpackage event_calendar
* @version $Id$; * @version $Id$;
*/ */
define('EC_ADLAN_1', 'Event Calendar'); define('EC_ADLAN_1', 'Event Calendar');
define('EC_LAN_12', "Monday"); define('EC_LAN_12', "Monday");
define('EC_LAN_13', "Tuesday"); define('EC_LAN_13', "Tuesday");
define('EC_LAN_14', "Wednesday"); define('EC_LAN_14', "Wednesday");
define('EC_LAN_15', "Thursday"); define('EC_LAN_15', "Thursday");
define('EC_LAN_16', "Friday"); define('EC_LAN_16', "Friday");
define('EC_LAN_17', "Saturday"); define('EC_LAN_17', "Saturday");
define('EC_LAN_18', "Sunday"); define('EC_LAN_18', "Sunday");
define('EC_LAN_19', "Mon"); define('EC_LAN_19', "Mon");
define('EC_LAN_20', "Tue"); define('EC_LAN_20', "Tue");
define('EC_LAN_21', "Wed"); define('EC_LAN_21', "Wed");
define('EC_LAN_22', "Thu"); define('EC_LAN_22', "Thu");
define('EC_LAN_23', "Fri"); define('EC_LAN_23', "Fri");
define('EC_LAN_24', "Sat"); define('EC_LAN_24', "Sat");
define('EC_LAN_25', "Sun"); define('EC_LAN_25', "Sun");
/* define('EC_LAN_163', "Event Listing");
Following are LANs from user pages - probably not needed in ADMIN // If any 'EC_LAN_xxx' not found, look in language file for user pages.
define('EC_LAN_26', "Events this Month");
define('EC_LAN_27', "No events for this month."); define('EC_ADLAN_A09', 'Main Calendar');
define('EC_LAN_28', "Enter New Event"); define('EC_ADLAN_A10', "Configuration");
define('EC_LAN_29', "When:"); define('EC_ADLAN_A11', "Categories");
define('EC_LAN_30', "Category:"); define('EC_ADLAN_A12', "Calendar");
define('EC_LAN_31', "Posted by:"); define('EC_ADLAN_A13', "Edit");
define('EC_LAN_32', "Location:"); define('EC_ADLAN_A14', "New");
define('EC_LAN_33', "Contact:"); define('EC_ADLAN_A15', "Delete");
define('EC_LAN_34', "Jump to"); define('EC_ADLAN_A16', "Confirm");
define('EC_LAN_35', "Edit"); define('EC_ADLAN_A17', "Proceed");
define('EC_LAN_36', "Delete"); define('EC_ADLAN_A18', "Action");
define('EC_LAN_37', "None Listed."); define('EC_ADLAN_A19', "Administer Categories");
define('EC_LAN_38', "Not specified"); define('EC_ADLAN_A20', "Calendar Categories");
define('EC_LAN_39', "Click here for more information"); define('EC_ADLAN_A21', "Category name");
define('EC_LAN_40', "Current Month"); define('EC_ADLAN_A22', "Adds a field to be used as a link to a forum thread or external site");
define('EC_LAN_41', "Total -NUM- individual events created"); define('EC_ADLAN_A23', "Create category");
define('EC_LAN_42', "Event cannot end before it starts."); define('EC_ADLAN_A24', "Edit category");
define('EC_LAN_43', "You left required field(s) blank."); define('EC_ADLAN_A25', "Save");
define('EC_LAN_44', "New event created and entered into database."); define('EC_ADLAN_A26', "Category created");
define('EC_LAN_45', "Event updated in database."); define('EC_ADLAN_A27', "Unable to create category");
define('EC_LAN_46', "Confirm Delete Event"); define('EC_ADLAN_A28', "Changes Saved");
define('EC_LAN_47', "Delete cancelled."); define('EC_ADLAN_A29', "Unable to save changes");
define('EC_LAN_48', "Please confirm you wish to delete this event - once deleted it cannot be retrieved");
define('EC_LAN_49', "Cancel"); define('EC_ADLAN_A30', "Category Deleted");
define('EC_LAN_50', "Confirm Delete"); define('EC_ADLAN_A31', "Tick the confirm box to delete");
define('EC_LAN_51', "Event deleted."); define('EC_ADLAN_A32', "Unable to delete this category");
define('EC_LAN_52', "Event Category:"); define('EC_ADLAN_A33', "None defined");
define('EC_LAN_53', "Create new category?:"); define('EC_ADLAN_A34', "Calendar Administrator Class");
define('EC_LAN_54', "Name:"); //define('EC_ADLAN_A35', "");
define('EC_LAN_55', "Icon:"); define('EC_ADLAN_A59', "Category is in use. Can not delete.");
define('EC_LAN_56', "Create");
define('EC_LAN_57', "Event:"); define('EC_ADLAN_A80', "Visible to");
define('EC_LAN_58', "source info URL:"); define('EC_ADLAN_A81', "Allow subscription");
define('EC_LAN_59', "Contact email:"); define('EC_ADLAN_A82', "Forced notification class");
define('EC_LAN_60', "Update Event"); define('EC_ADLAN_A83', "Days ahead to notify of event");
define('EC_LAN_61', "Go"); define('EC_ADLAN_A84', "Advanced message");
define('EC_LAN_62', "Next -NUM- Events ..."); define('EC_ADLAN_A85', "Message on the day");
define('EC_LAN_63', "Select repeating events between start and end dates. Start and end time as set"); define('EC_ADLAN_A86', "Send email");
define('EC_LAN_64', "Check for an all-day event"); define('EC_ADLAN_A87', "None");
define('EC_LAN_65', "Recurring:"); define('EC_ADLAN_A88', "Only advanced");
define('EC_LAN_66', "Edit Event"); define('EC_ADLAN_A89', "Only on the day");
define('EC_LAN_67', "Start:"); define('EC_ADLAN_A90', "Advanced and on the day");
define('EC_LAN_68', "All day event:"); define('EC_ADLAN_A91', "Email Subject");
define('EC_LAN_69', "Ends:"); define('EC_ADLAN_A92', "Email from (name)");
define('EC_LAN_70', "Event Title:"); define('EC_ADLAN_A93', "Email from email address");
define('EC_LAN_71', "Event Time:"); define('EC_ADLAN_A94', "Add new event class");
define('EC_LAN_72', "Event Date:"); define('EC_ADLAN_A95', "Enable manual subscriptions");
define('EC_LAN_73', "End:"); define('EC_ADLAN_A96', "Disabling this removes the subscriptions button and overrides the category manual subscription setting.");
define('EC_LAN_74', "View Category");
define('EC_LAN_76', "Events can be added by:");
define('EC_LAN_77', "Update Settings"); define('EC_ADLAN_A100', "Forthcoming Events");
define('EC_LAN_78', "Calendar Settings"); define('EC_ADLAN_A101', "Days to look forward:");
define('EC_LAN_79', "Calendar View"); define('EC_ADLAN_A102', "Number of events to display:");
define('EC_LAN_80', "Event List"); define('EC_ADLAN_A103', "Include recurring events:");
define('EC_LAN_81', "Configure Event Calendar"); define('EC_ADLAN_A104', "Title is link to events list:");
define('EC_LAN_83', "Calendar"); define('EC_ADLAN_A105', "Configure Forthcoming Events Menu");
define('EC_LAN_84', " from "); define('EC_ADLAN_A106', "Menu has to be enabled on the 'Menu' page");
define('EC_LAN_85', " until "); define('EC_ADLAN_A107', "Hide menu if no events to show");
define('EC_LAN_86', "Individual events from entry"); define('EC_ADLAN_A108', "Menu Heading");
define('EC_LAN_87', "By checking this box you may generate a large number of individual events, which you will have to edit or delete individually if they are wrong"); define('EC_ADLAN_A109', "Forthcoming Events preferences updated");
define('EC_LAN_88', "You have chosen to generate -NUM- individual events.");
define('EC_LAN_89', "If the entry is wrong, you will have to edit or delete the entries individually"); define('EC_ADLAN_A110', "Only on previous day");
define('EC_ADLAN_A111', "Advanced and previous day");
define('EC_LAN_90', "Choose"); define('EC_ADLAN_A112', "Previous day and on the day");
define('EC_LAN_91', "Admin must define first"); define('EC_ADLAN_A113', "Advanced, previous day and on the day");
define('EC_LAN_92', "View Category");
define('EC_LAN_93', "View Events List"); define('EC_ADLAN_A114', "Logging of Emails");
define('EC_LAN_94', "Enter New Event"); define('EC_ADLAN_A115', "Summary");
define('EC_LAN_95', "Today"); define('EC_ADLAN_A116', "Detailed");
define('EC_LAN_96', "View Calendar"); define('EC_ADLAN_A117', "Message on the day or the previous day");
define('EC_LAN_97', "All"); define('EC_ADLAN_A118', "Categories to display");
define('EC_LAN_98', "Required fields left blank"); define('EC_ADLAN_A119', "No categories defined, or error reading database");
define('EC_LAN_99', "Event must either be an all day event or finish after it starts"); define('EC_ADLAN_A120', "Show category icon in menu");
define('EC_LAN_100', "Invalid Category Selection"); define('EC_ADLAN_A121', "Category Description");
//define('EC_LAN_101', "Set to inactive to disable on the new event form."); define('EC_ADLAN_A122', "Calendar time reference");
define('EC_LAN_102', "Show link to 'more information' with events"); define('EC_ADLAN_A123', "Calendar time format");
//define('EC_LAN_103', "On new event entry form."); define('EC_ADLAN_A124', "Current server time: ");
define('EC_LAN_104', "Calendar Administrator Class"); define('EC_ADLAN_A125', "Current site time: ");
define('EC_LAN_105', "* Required Field"); define('EC_ADLAN_A126', "Current user time: ");
define('EC_LAN_106', "Events"); define('EC_ADLAN_A127', "Determines time display format throughout event calendar.");
define('EC_LAN_107', "This plugin is a fully featured event calendar with calendar menu."); define('EC_ADLAN_A128', "Custom time uses the format in the box on the right");
define('EC_LAN_108', "Event Calendar Upgraded. See the 'readme.pdf' file for detailed information."); define('EC_ADLAN_A129', '"Site Time" uses the offset defined in preferences');
define('EC_LAN_109', "Unable to delete this event."); define('EC_ADLAN_A130', "Event name is link to:");
define('EC_LAN_110', "Event Number "); define('EC_ADLAN_A131', "Calendar Event");
define('EC_LAN_111', "All the events on "); define('EC_ADLAN_A132', "Source Info URL");
define('EC_LAN_112', "All the Events in "); define('EC_ADLAN_A133', "Date format for event entry: ");
define('EC_LAN_113', "Event form already submitted."); define('EC_ADLAN_A134', "Level of logging to main admin log:");
define('EC_LAN_114', "Week starts with:"); define('EC_ADLAN_A135', "Edit/delete");
define('EC_LAN_115', "Sunday"); define('EC_ADLAN_A136', "All changes");
define('EC_LAN_116', "Monday"); define('EC_ADLAN_A137', "Can cover additions, updates to and deletions from the event list");
define('EC_LAN_117', "Length of daynames (characters)"); define('EC_ADLAN_A138', "Event start/end times on 5-minute boundaries");
define('EC_LAN_118', "Date format in calendar header:"); define('EC_ADLAN_A139', "(Reduces number of entries in drop-down list)");
define('EC_LAN_119', "month/year"); define('EC_ADLAN_A140', "Show number of events for this month in Calendar Menu");
define('EC_LAN_120', "year/month"); define('EC_ADLAN_A141', "Maintenance");
define('EC_LAN_121', "Show Calendar"); define('EC_ADLAN_A142', "Remove past events ending more than x months ago");
define('EC_ADLAN_A143', "timed from beginning of current month");
define('EC_LAN_123', "Subscriptions"); //define('EC_ADLAN_A144', "Event Calendar Maintenance");
define('EC_LAN_124', "Calendar Subscriptions"); define('EC_ADLAN_A145', "Delete old entries");
define('EC_LAN_125', "Categories available for subscription"); define('EC_ADLAN_A146', "Events older than ");
define('EC_LAN_126', "Subscribed"); define('EC_ADLAN_A147', " deleted");
define('EC_LAN_127', "Category"); define('EC_ADLAN_A148', "Parameter error - nothing deleted");
define('EC_LAN_128', "No categories available to subscribe to"); define('EC_ADLAN_A149', "No old events to delete, or delete of past events failed");
define('EC_LAN_129', "Update"); define('EC_ADLAN_A150', "Confirm delete events older than ");
define('EC_LAN_130', "Subscriptions updated");
define('EC_LAN_131', "Return"); define('EC_ADLAN_A151', "e107 Web Site");
define('EC_LAN_132', "Expand details"); define('EC_ADLAN_A152', "calendar@yoursite.com");
define('EC_LAN_133', "[read more]"); define('EC_ADLAN_A153', "Log directory must be created manually - create a subdirectory 'log' off your event calendar plugin directory, with '666' access rights");
define('EC_LAN_134', "You have to provide a category name"); define('EC_ADLAN_A154', "Could not change log directory permissions");
define('EC_LAN_135', "Event"); define('EC_ADLAN_A155', "Log directory permissions may require manual update to 0666 or 0766, although depending on your server setup they may work");
define('EC_LAN_136', "Category Description"); define('EC_ADLAN_A156', "Database upgraded");
define('EC_LAN_137', "Future Events"); define('EC_ADLAN_A157', "this is the rss feed for the calendar entries");
define('EC_ADLAN_A158', "Could not create log directory");
define('EC_LAN_140', "Forthcoming Events");
define('EC_LAN_141', "No forthcoming events"); define('EC_ADLAN_A159', "Cache Management");
define('EC_LAN_142', "Only registered and logged in users can subscribe to events"); define('EC_ADLAN_A160', "(Only relevant if cache enabled)");
define('EC_LAN_143', "Facility not available"); define('EC_ADLAN_A161', "Empty Calendar Cache");
define('EC_LAN_144', " at "); define('EC_ADLAN_A162', "Confirm Empty Cache");
define('EC_ADLAN_A163', "Cache emptied");
define('EC_LAN_145', "You must specify a category for the event");
define('EC_LAN_146', "Advance notice of calendar event"); define('EC_ADLAN_A164', "Update completed");
define('EC_LAN_147', "Calendar event today or tomorrow"); define('EC_ADLAN_A165', "Calendar menu header links to:");
define('EC_LAN_148', "No events in specified date range"); define('EC_ADLAN_A166', "Date display in Event List:");
define('EC_LAN_149', "Invalid date format"); define('EC_ADLAN_A167', "Date display in Forthcoming Events:");
define('EC_LAN_150', "Enter start and end date for list"); define('EC_ADLAN_A168', "Custom date uses the format in the box on the right");
define('EC_LAN_151', "End date after start date"); define('EC_ADLAN_A169', "Determines date display format for event listings");
define('EC_LAN_152', "Maximum one year's events"); define('EC_ADLAN_A170', "Determines date display format for forthcoming events menu");
define('EC_LAN_153', "Start Date (first day of): "); define('EC_ADLAN_A171', "Flag recently added/updated events");
define('EC_LAN_154', "End Date (last day of): "); define('EC_ADLAN_A172', "Value is time from update in hours; zero to disable, 'LV' to show from user's last visit");
define('EC_LAN_155', "Category: ");
define('EC_LAN_156', "Create List"); define('EC_ADLAN_A173', "Subscriptions");
define('EC_LAN_157', "Layout Options:"); define('EC_ADLAN_A174', "No subscription entries found");
define('EC_LAN_158', "Output: "); define('EC_ADLAN_A175', "UID");
define('EC_LAN_159', "Display "); define('EC_ADLAN_A176', "User Name");
define('EC_LAN_160', "Print "); define('EC_ADLAN_A177', "Category");
define('EC_LAN_161', "PDF "); define('EC_ADLAN_A178', "Problems");
define('EC_LAN_162', "Print this page"); define('EC_ADLAN_A179', "Actions");
*/ define('EC_ADLAN_A180', "Deleted subscription record no ");
define('EC_LAN_163', "Event Listing"); define('EC_ADLAN_A181', "Delete failed for record no ");
/* define('EC_ADLAN_A182', "Total --NUM-- entries in database");
define('EC_LAN_164', "Printable Lists"); define('EC_ADLAN_A183', "Calendar Menu mouseover shows event title");
define('EC_LAN_165', "Default Listing"); define('EC_ADLAN_A184', "may not work with all browsers");
define('EC_LAN_166', "Tabular List no lines"); define('EC_ADLAN_A185', "Nothing");
define('EC_LAN_167', "Tabular List with lines"); define('EC_ADLAN_A186', "Update settings\nand send test\nemail to self");
define('EC_LAN_168', "From: "); define('EC_ADLAN_A187', "Test email sent - ");
define('EC_LAN_169', "To: "); define('EC_ADLAN_A188', "Error sending test email - ");
define('EC_LAN_170', "Printed on: "); define('EC_ADLAN_A189', "If the message is left blank, the message from the 'Default' category will be used");
define('EC_LAN_171', "List including category"); define('EC_ADLAN_A190', "Default category - mailout messages are used if none defined for any other category");
define('EC_LAN_172', "Event Categories: "); define('EC_ADLAN_A191', "Details of event for test email");
define('EC_LAN_173', "First event starts: "); define('EC_ADLAN_A192', "Test event location");
define('EC_LAN_174', "Last event ends: "); define('EC_ADLAN_A193', "Allow users to display/print/PDF lists");
define('EC_LAN_175', "All Day"); define('EC_ADLAN_A194', "None");
define('EC_LAN_176', "Recurring pattern: "); define('EC_ADLAN_A195', "Display/Print");
define('EC_LAN_177', "Cancel Entry"); define('EC_ADLAN_A196', "Display/Print/PDF");
define('EC_LAN_178', "Accept Entries"); define('EC_ADLAN_A197', "No class membership");
define('EC_LAN_179', "Confirmation of multiple event entry"); define('EC_ADLAN_A198', "Invalid User");
define('EC_LAN_180', " RECORDS NOT SAVED - DB UPDATE ERROR"); define('EC_ADLAN_A199', "Show 'recent' icon");
define('EC_ADLAN_A200', "Editor for events");
define('EC_LAN_VIEWCALENDAR', "View Calendar"); define('EC_ADLAN_A201', 'BBCode (Standard)');
define('EC_LAN_VIEWALLEVENTS', "View all events"); define('EC_ADLAN_A202', 'BBCode with help');
define('EC_LAN_ALLEVENTS', "All events"); define('EC_ADLAN_A203', 'WYSIWYG');
*/ define('EC_ADLAN_A204', 'Calendar settings updated.');
define('EC_ADLAN_A205', 'Confirm Delete');
define('EC_ADLAN_A09', 'Main Calendar'); define('EC_ADLAN_A206', 'This plugin is a fully featured event calendar with calendar menu.');
define('EC_ADLAN_A10', "Configuration"); define('EC_ADLAN_A207', 'Calendar Settings');
define('EC_ADLAN_A11', "Categories"); define('EC_ADLAN_A208', 'Events can be added by:');
define('EC_ADLAN_A12', "Calendar"); define('EC_ADLAN_A209', 'Event List');
define('EC_ADLAN_A13', "Edit"); define('EC_ADLAN_A210', 'Calendar');
define('EC_ADLAN_A14', "New"); define('EC_ADLAN_A211', 'Calendar Administrator Class');
define('EC_ADLAN_A15', "Delete"); define('EC_ADLAN_A212', 'Week starts with:');
define('EC_ADLAN_A16', "Confirm"); define('EC_ADLAN_A213', 'Show link to \'more information\' with events');
define('EC_ADLAN_A17', "Proceed"); define('EC_ADLAN_A214', 'Length of daynames (characters)');
define('EC_ADLAN_A18', "Action"); define('EC_ADLAN_A215', 'Date format in calendar header:');
define('EC_ADLAN_A19', "Administer Categories"); define('EC_ADLAN_A216', 'month/year');
define('EC_ADLAN_A20', "Calendar Categories"); define('EC_ADLAN_A217', 'year/month');
define('EC_ADLAN_A21', "Category name"); //define('EC_ADLAN_A218', 'Update Settings');
define('EC_ADLAN_A22', "Adds a field to be used as a link to a forum thread or external site"); define('EC_ADLAN_A219', 'Icon:');
define('EC_ADLAN_A23', "Create category"); define('EC_ADLAN_A220', 'Choose');
define('EC_ADLAN_A24', "Edit category"); define('EC_ADLAN_A221', 'Event Calendar - add event ');
define('EC_ADLAN_A25', "Save"); define('EC_ADLAN_A222', 'Event Calendar - edit event ');
define('EC_ADLAN_A26', "Category created"); define('EC_ADLAN_A223', 'Event Calendar - delete event ');
define('EC_ADLAN_A27', "Unable to create category"); define('EC_ADLAN_A224', 'Event Calendar - Bulk Delete');
define('EC_ADLAN_A28', "Changes Saved"); define('EC_ADLAN_A225', 'Event Calendar - multiple add ');
define('EC_ADLAN_A29', "Unable to save changes"); define('EC_ADLAN_A226', '');
define('EC_ADLAN_A227', '');
define('EC_ADLAN_A30', "Category Deleted");
define('EC_ADLAN_A31', "Tick the confirm box to delete");
define('EC_ADLAN_A32', "Unable to delete this category");
define('EC_ADLAN_A33', "None defined");
define('EC_ADLAN_A34', "Calendar Administrator Class");
//define('EC_ADLAN_A35', "");
define('EC_ADLAN_A59', "Category is in use. Can not delete.");
define('EC_ADLAN_A80', "Visible to");
define('EC_ADLAN_A81', "Allow subscription");
define('EC_ADLAN_A82', "Forced notification class");
define('EC_ADLAN_A83', "Days ahead to notify of event");
define('EC_ADLAN_A84', "Advanced message");
define('EC_ADLAN_A85', "Message on the day");
define('EC_ADLAN_A86', "Send email");
define('EC_ADLAN_A87', "None");
define('EC_ADLAN_A88', "Only advanced");
define('EC_ADLAN_A89', "Only on the day");
define('EC_ADLAN_A90', "Advanced and on the day");
define('EC_ADLAN_A91', "Email Subject");
define('EC_ADLAN_A92', "Email from (name)");
define('EC_ADLAN_A93', "Email from email address");
define('EC_ADLAN_A94', "Add new event class");
define('EC_ADLAN_A95', "Enable manual subscriptions");
define('EC_ADLAN_A96', "Disabling this removes the subscriptions button and overrides the category manual subscription setting.");
define('EC_ADLAN_A100', "Forthcoming Events");
define('EC_ADLAN_A101', "Days to look forward:");
define('EC_ADLAN_A102', "Number of events to display:");
define('EC_ADLAN_A103', "Include recurring events:");
define('EC_ADLAN_A104', "Title is link to events list:");
define('EC_ADLAN_A105', "Configure Forthcoming Events Menu");
define('EC_ADLAN_A106', "Menu has to be enabled on the 'Menu' page");
define('EC_ADLAN_A107', "Hide menu if no events to show");
define('EC_ADLAN_A108', "Menu Heading");
define('EC_ADLAN_A109', "Forthcoming Events preferences updated");
define('EC_ADLAN_A110', "Only on previous day");
define('EC_ADLAN_A111', "Advanced and previous day");
define('EC_ADLAN_A112', "Previous day and on the day");
define('EC_ADLAN_A113', "Advanced, previous day and on the day");
define('EC_ADLAN_A114', "Logging of Emails");
define('EC_ADLAN_A115', "Summary");
define('EC_ADLAN_A116', "Detailed");
define('EC_ADLAN_A117', "Message on the day or the previous day");
define('EC_ADLAN_A118', "Categories to display");
define('EC_ADLAN_A119', "No categories defined, or error reading database");
define('EC_ADLAN_A120', "Show category icon in menu");
define('EC_ADLAN_A121', "Category Description");
define('EC_ADLAN_A122', "Calendar time reference");
define('EC_ADLAN_A123', "Calendar time format");
define('EC_ADLAN_A124', "Current server time: ");
define('EC_ADLAN_A125', "Current site time: ");
define('EC_ADLAN_A126', "Current user time: ");
define('EC_ADLAN_A127', "Determines time display format throughout event calendar.");
define('EC_ADLAN_A128', "Custom time uses the format in the box on the right");
define('EC_ADLAN_A129', '"Site Time" uses the offset defined in preferences');
define('EC_ADLAN_A130', "Event name is link to:");
define('EC_ADLAN_A131', "Calendar Event");
define('EC_ADLAN_A132', "Source Info URL");
define('EC_ADLAN_A133', "Date format for event entry: ");
define('EC_ADLAN_A134', "Level of logging to main admin log:");
define('EC_ADLAN_A135', "Edit/delete");
define('EC_ADLAN_A136', "All changes");
define('EC_ADLAN_A137', "Can cover additions, updates to and deletions from the event list");
define('EC_ADLAN_A138', "Event start/end times on 5-minute boundaries");
define('EC_ADLAN_A139', "(Reduces number of entries in drop-down list)");
define('EC_ADLAN_A140', "Show number of events for this month in Calendar Menu");
define('EC_ADLAN_A141', "Maintenance");
define('EC_ADLAN_A142', "Remove past events ending more than x months ago");
define('EC_ADLAN_A143', "timed from beginning of current month");
//define('EC_ADLAN_A144', "Event Calendar Maintenance");
define('EC_ADLAN_A145', "Delete old entries");
define('EC_ADLAN_A146', "Events older than ");
define('EC_ADLAN_A147', " deleted");
define('EC_ADLAN_A148', "Parameter error - nothing deleted");
define('EC_ADLAN_A149', "No old events to delete, or delete of past events failed");
define('EC_ADLAN_A150', "Confirm delete events older than ");
define('EC_ADLAN_A151', "e107 Web Site");
define('EC_ADLAN_A152', "calendar@yoursite.com");
define('EC_ADLAN_A153', "Log directory must be created manually - create a subdirectory 'log' off your event calendar plugin directory, with '666' access rights");
define('EC_ADLAN_A154', "Could not change log directory permissions");
define('EC_ADLAN_A155', "Log directory permissions may require manual update to 0666 or 0766, although depending on your server setup they may work");
define('EC_ADLAN_A156', "Database upgraded");
define('EC_ADLAN_A157', "this is the rss feed for the calendar entries");
define('EC_ADLAN_A158', "Could not create log directory");
define('EC_ADLAN_A159', "Cache Management");
define('EC_ADLAN_A160', "(Only relevant if cache enabled)");
define('EC_ADLAN_A161', "Empty Calendar Cache");
define('EC_ADLAN_A162', "Confirm Empty Cache");
define('EC_ADLAN_A163', "Cache emptied");
define('EC_ADLAN_A164', "Update completed");
define('EC_ADLAN_A165', "Calendar menu header links to:");
define('EC_ADLAN_A166', "Date display in Event List:");
define('EC_ADLAN_A167', "Date display in Forthcoming Events:");
define('EC_ADLAN_A168', "Custom date uses the format in the box on the right");
define('EC_ADLAN_A169', "Determines date display format for event listings");
define('EC_ADLAN_A170', "Determines date display format for forthcoming events menu");
define('EC_ADLAN_A171', "Flag recently added/updated events");
define('EC_ADLAN_A172', "Value is time from update in hours; zero to disable, 'LV' to show from user's last visit");
define('EC_ADLAN_A173', "Subscriptions");
define('EC_ADLAN_A174', "No subscription entries found");
define('EC_ADLAN_A175', "UID");
define('EC_ADLAN_A176', "User Name");
define('EC_ADLAN_A177', "Category");
define('EC_ADLAN_A178', "Problems");
define('EC_ADLAN_A179', "Actions");
define('EC_ADLAN_A180', "Deleted subscription record no ");
define('EC_ADLAN_A181', "Delete failed for record no ");
define('EC_ADLAN_A182', "Total --NUM-- entries in database");
define('EC_ADLAN_A183', "Calendar Menu mouseover shows event title");
define('EC_ADLAN_A184', "may not work with all browsers");
define('EC_ADLAN_A185', "Nothing");
define('EC_ADLAN_A186', "Update settings\nand send test\nemail to self");
define('EC_ADLAN_A187', "Test email sent - ");
define('EC_ADLAN_A188', "Error sending test email - ");
define('EC_ADLAN_A189', "If the message is left blank, the message from the 'Default' category will be used");
define('EC_ADLAN_A190', "Default category - mailout messages are used if none defined for any other category");
define('EC_ADLAN_A191', "Details of event for test email");
define('EC_ADLAN_A192', "Test event location");
define('EC_ADLAN_A193', "Allow users to display/print/PDF lists");
define('EC_ADLAN_A194', "None");
define('EC_ADLAN_A195', "Display/Print");
define('EC_ADLAN_A196', "Display/Print/PDF");
define('EC_ADLAN_A197', "No class membership");
define('EC_ADLAN_A198', "Invalid User");
define('EC_ADLAN_A199', "Show 'recent' icon");
define('EC_ADLAN_A200', "Editor for events");
define('EC_ADLAN_A201', "BBCode (Standard)");
define('EC_ADLAN_A202', "BBCode with help");
define('EC_ADLAN_A203', "WYSIWYG");
define('EC_ADLAN_A204', 'Calendar settings updated.');
define('EC_ADLAN_A205', 'Confirm Delete');
define('EC_ADLAN_A206', 'This plugin is a fully featured event calendar with calendar menu.');
define('EC_ADLAN_A207', 'Calendar Settings');
define('EC_ADLAN_A208', 'Events can be added by:');
define('EC_ADLAN_A209', 'Event List');
define('EC_ADLAN_A210', 'Calendar');
define('EC_ADLAN_A211', 'Calendar Administrator Class');
define('EC_ADLAN_A212', 'Week starts with:');
define('EC_ADLAN_A213', 'Show link to \'more information\' with events');
define('EC_ADLAN_A214', 'Length of daynames (characters)');
define('EC_ADLAN_A215', 'Date format in calendar header:');
define('EC_ADLAN_A216', 'month/year');
define('EC_ADLAN_A217', 'year/month');
//define('EC_ADLAN_A218', 'Update Settings');
define('EC_ADLAN_A219', 'Icon:');
define('EC_ADLAN_A220', 'Choose');
/*
// Notify
define("NT_LAN_EC_1", "Event Calendar Events");
define("NT_LAN_EC_2", "Event Updated");
define("NT_LAN_EC_3", "Update by");
define("NT_LAN_EC_4", "IP Address");
define("NT_LAN_EC_5", "Message");
define("NT_LAN_EC_6", "Event Calendar - Event added");
define("NT_LAN_EC_7", "New event posted");
define("NT_LAN_EC_8", "Event Calendar - Event modified");
*/

View File

@@ -1,62 +1,62 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* These messages are for the 'user' pages of the event calendar (including event entry/editing) * These messages are for the event entry/editing functions on the 'user' pages of the event calendar. Also 'notify'
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_class.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* Language file - anything called up in ecal_class.php and similar * Language file - anything called up in ecal_class.php, notify and similar
* *
* @package e107_plugins * @package e107_plugins
* @subpackage event_calendar * @subpackage event_calendar
* @version $Id$; * @version $Id$;
*/ */
// Recurring events texts - the numeric part of each define is the internal value assigned // Recurring events texts - the numeric part of each define is the internal value assigned
define('EC_LAN_RECUR_00', 'no'); define('EC_LAN_RECUR_00', 'no');
define('EC_LAN_RECUR_01', 'annual'); define('EC_LAN_RECUR_01', 'annual');
define('EC_LAN_RECUR_02', 'biannual'); define('EC_LAN_RECUR_02', 'biannual');
define('EC_LAN_RECUR_03', 'quarterly'); define('EC_LAN_RECUR_03', 'quarterly');
define('EC_LAN_RECUR_04', 'monthly'); define('EC_LAN_RECUR_04', 'monthly');
define('EC_LAN_RECUR_05', 'four weekly'); define('EC_LAN_RECUR_05', 'four weekly');
define('EC_LAN_RECUR_06', 'fortnightly'); define('EC_LAN_RECUR_06', 'fortnightly');
define('EC_LAN_RECUR_07', 'weekly'); define('EC_LAN_RECUR_07', 'weekly');
define('EC_LAN_RECUR_08', 'daily'); define('EC_LAN_RECUR_08', 'daily');
define('EC_LAN_RECUR_100', 'Sunday in month'); define('EC_LAN_RECUR_100', 'Sunday in month');
define('EC_LAN_RECUR_101', 'Monday in month'); define('EC_LAN_RECUR_101', 'Monday in month');
define('EC_LAN_RECUR_102', 'Tuesday in month'); define('EC_LAN_RECUR_102', 'Tuesday in month');
define('EC_LAN_RECUR_103', 'Wednesday in month'); define('EC_LAN_RECUR_103', 'Wednesday in month');
define('EC_LAN_RECUR_104', 'Thursday in month'); define('EC_LAN_RECUR_104', 'Thursday in month');
define('EC_LAN_RECUR_105', 'Friday in month'); define('EC_LAN_RECUR_105', 'Friday in month');
define('EC_LAN_RECUR_106', 'Saturday in month'); define('EC_LAN_RECUR_106', 'Saturday in month');
define('EC_LAN_RECUR_1100', 'First'); define('EC_LAN_RECUR_1100', 'First');
define('EC_LAN_RECUR_1200', 'Second'); define('EC_LAN_RECUR_1200', 'Second');
define('EC_LAN_RECUR_1300', 'Third'); define('EC_LAN_RECUR_1300', 'Third');
define('EC_LAN_RECUR_1400', 'Fourth'); define('EC_LAN_RECUR_1400', 'Fourth');
// Notify // Notify
define('NT_LAN_EC_1', 'Event Calendar Events'); define('NT_LAN_EC_1', 'Event Calendar Events');
define('NT_LAN_EC_2', 'Event Updated'); define('NT_LAN_EC_2', 'Event Updated');
define('NT_LAN_EC_3', 'Update by'); define('NT_LAN_EC_3', 'Update by');
define('NT_LAN_EC_4', 'IP Address'); define('NT_LAN_EC_4', 'IP Address');
define('NT_LAN_EC_5', 'Message'); define('NT_LAN_EC_5', 'Message');
define('NT_LAN_EC_6', 'Event Calendar - Event added'); define('NT_LAN_EC_6', 'Event Calendar - Event added');
define('NT_LAN_EC_7', 'New event posted'); define('NT_LAN_EC_7', 'New event posted');
define('NT_LAN_EC_8', 'Event Calendar - Event modified'); define('NT_LAN_EC_8', 'Event Calendar - Event modified');
?> ?>

View File

@@ -1,27 +1,41 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* These constants are used solely during install/uninstall - in some cases to set defaults into the database * These constants are used solely during install/uninstall - in some cases to set defaults into the database
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_install.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_install.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
// Install
define('EC_ADINST_LAN_01', "Forthcoming event:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n /**
{EC_MAIL_DETAILS}\n\nFor further details: {EC_EVENT_LINK=Click Here}\n\nor {EC_MAIL_CONTACT} for further information."); * e107 Event calendar plugin
define('EC_ADINST_LAN_02', "Calendar event imminent:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n{EC_MAIL_DETAILS}\n\n *
For further details see the calendar entry on the web site:\n{EC_MAIL_LINK=Click Here}\n\n {EC_MAIL_CONTACT} for further details"); * Language file - installation
define('EC_ADINST_LAN_03', 'Default category - mailout messages are used if none defined for any other category'); *
define('EC_ADINST_LAN_04', 'To activate please go to your menus screen and select the calendar_menu into one of your menu areas.'); * @package e107_plugins
* @subpackage event_calendar
* @version $Id$;
*/
// Install
define('EC_ADINST_LAN_01', "Forthcoming event:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n
{EC_MAIL_DETAILS}\n\nFor further details: {EC_EVENT_LINK=Click Here}\n\nor {EC_MAIL_CONTACT} for further information.");
define('EC_ADINST_LAN_02', "Calendar event imminent:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n{EC_MAIL_DETAILS}\n\n
For further details see the calendar entry on the web site:\n{EC_MAIL_LINK=Click Here}\n\n {EC_MAIL_CONTACT} for further details");
define('EC_ADINST_LAN_03', 'Default category - mailout messages are used if none defined for any other category');
define('EC_ADINST_LAN_04', 'To activate please go to your menus screen and select the calendar_menu into one of your menu areas.');
// define('EC_ADINST_LAN_05', 'Configure Event Calendar'); // define('EC_ADINST_LAN_05', 'Configure Event Calendar');
define('EC_ADINST_LAN_06', 'Default category entered'); define('EC_ADINST_LAN_06', 'Default category entered');
define('EC_ADINST_LAN_07', 'Error adding default category'); define('EC_ADINST_LAN_07', 'Error adding default category');
define('EC_ADINST_LAN_08', 'Default category already in DB'); define('EC_ADINST_LAN_08', 'Default category already in DB');
define('EC_ADINST_LAN_09', 'Preferences already converted for 2.0');
define('EC_ADINST_LAN_10', 'Preferences converted ready for 2.0');

View File

@@ -1,27 +1,38 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar - messages for admin log titles * Event calendar - messages for admin log titles
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_log.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_log.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
define('LAN_AL_EC_ADM_01', 'Event Calendar - add event');
define('LAN_AL_EC_ADM_02', 'Event Calendar - edit event'); /**
define('LAN_AL_EC_ADM_03', 'Event Calendar - delete event'); * e107 Event calendar plugin
define('LAN_AL_EC_ADM_04', 'Event Calendar - Bulk Delete'); *
define('LAN_AL_EC_ADM_05', 'Event Calendar - Multiple Add'); * Language file - admin log titles
define('LAN_AL_EC_ADM_06', 'Event Calendar - Main options changed'); *
define('LAN_AL_EC_ADM_07', 'Event Calendar - FE options changed'); * @package e107_plugins
define('LAN_AL_EC_ADM_08', 'Event Calendar - Category added'); * @subpackage event_calendar
define('LAN_AL_EC_ADM_09', 'Event Calendar - Category edited'); * @version $Id$;
define('LAN_AL_EC_ADM_10', 'Event Calendar - Category deleted'); */
define('LAN_AL_EC_ADM_11', 'Event Calendar - Old events deleted');
define('LAN_AL_EC_ADM_01', 'Event Calendar - add event');
define('LAN_AL_EC_ADM_02', 'Event Calendar - edit event');
define('LAN_AL_EC_ADM_03', 'Event Calendar - delete event');
define('LAN_AL_EC_ADM_04', 'Event Calendar - Bulk Delete');
define('LAN_AL_EC_ADM_05', 'Event Calendar - Multiple Add');
define('LAN_AL_EC_ADM_06', 'Event Calendar - Main options changed');
define('LAN_AL_EC_ADM_07', 'Event Calendar - FE options changed');
define('LAN_AL_EC_ADM_08', 'Event Calendar - Category added');
define('LAN_AL_EC_ADM_09', 'Event Calendar - Category edited');
define('LAN_AL_EC_ADM_10', 'Event Calendar - Category deleted');
define('LAN_AL_EC_ADM_11', 'Event Calendar - Old events deleted');

View File

@@ -1,44 +1,54 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar - language file for mailout related routines * Event calendar - language file for mailout related routines
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_mailer.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_mailer.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
* *
*/ */
define('LAN_EC_MAIL_01', 'Event Calendar Subscribers'); /**
define('LAN_EC_MAIL_02', 'No categories defined, or database error'); * e107 Event calendar plugin
define('LAN_EC_MAIL_03', 'Category: '); *
define('LAN_EC_MAIL_04', 'Calendar Subscriptions'); * Language file - mailer
define('LAN_EC_MAIL_05', 'Process notifications of events on the calendar'); *
define('LAN_EC_MAIL_06', 'Mail subscriptions run started at '); * @package e107_plugins
define('LAN_EC_MAIL_07', 'Event calendar mail --REF--'); * @subpackage event_calendar
define('LAN_EC_MAIL_08', ''); * @version $Id$;
define('LAN_EC_MAIL_09', ''); */
define('LAN_EC_MAIL_10', '');
define('LAN_EC_MAIL_01', 'Event Calendar Subscribers');
define('LAN_EC_MAIL_02', 'No categories defined, or database error');
// Following messages used in mailout template define('LAN_EC_MAIL_03', 'Category: ');
define('LAN_EC_MAIL_100', 'Location:'); define('LAN_EC_MAIL_04', 'Calendar Subscriptions');
define('LAN_EC_MAIL_101', 'Posted by:'); define('LAN_EC_MAIL_05', 'Process notifications of events on the calendar');
define('LAN_EC_MAIL_102', 'Contact:'); define('LAN_EC_MAIL_06', 'Mail subscriptions run started at ');
define('LAN_EC_MAIL_103', 'All day event:'); define('LAN_EC_MAIL_07', 'Event calendar mail --REF--');
define('LAN_EC_MAIL_104', 'When:'); define('LAN_EC_MAIL_08', '');
define('LAN_EC_MAIL_105', ' at '); define('LAN_EC_MAIL_09', '');
define('LAN_EC_MAIL_106', 'Ends:'); define('LAN_EC_MAIL_10', '');
define('LAN_EC_MAIL_107', '');
define('LAN_EC_MAIL_108', '');
define('LAN_EC_MAIL_109', ''); // Following messages used in mailout template
define('LAN_EC_MAIL_110', ''); define('LAN_EC_MAIL_100', 'Location:');
define('LAN_EC_MAIL_101', 'Posted by:');
define('LAN_EC_MAIL_102', 'Contact:');
?> define('LAN_EC_MAIL_103', 'All day event:');
define('LAN_EC_MAIL_104', 'When:');
define('LAN_EC_MAIL_105', ' at ');
define('LAN_EC_MAIL_106', 'Ends:');
define('LAN_EC_MAIL_107', '');
define('LAN_EC_MAIL_108', '');
define('LAN_EC_MAIL_109', '');
define('LAN_EC_MAIL_110', '');
?>

View File

@@ -1,5 +1,5 @@
<?php <?php
define("CM_SCH_LAN_1", "Calendar"); define('CM_SCH_LAN_1', 'Calendar');
?> ?>

View File

@@ -1,112 +1,113 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Forthcoming events menu handler for event calendar * Forthcoming events menu handler for event calendar
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/next_event_menu.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/next_event_menu.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Forthcoming events menu handler for event calendar
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
if (!defined('e107_INIT')) { exit; } */
$e107 = e107::getInstance();
if (!defined('e107_INIT')) { exit; }
if (!$e107->isInstalled('calendar_menu')) return ''; $e107 = e107::getInstance();
if (!$e107->isInstalled('calendar_menu')) return '';
if (!isset($ecal_class) || !is_object($ecal_class))
{
require_once(e_PLUGIN.'calendar_menu/ecal_class.php'); if (!isset($ecal_class) || !is_object($ecal_class))
$ecal_class = new ecal_class; {
} require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
$ecal_class = new ecal_class;
// See if the page is already in the cache }
$cache_tag = 'nq_event_cal_next';
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time)) // See if the page is already in the cache
{ $cache_tag = 'nq_event_cal_next';
echo $cacheData; if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
return; {
} echo $cacheData;
return;
}
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php'); include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
$calSc = new event_calendar_shortcodes();
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
if (is_readable(THEME.'calendar_template.php')) $calSc = new event_calendar_shortcodes();
{ // Has to be require
require(THEME.'calendar_template.php'); if (is_readable(THEME.'calendar_template.php'))
} { // Has to be require
else require(THEME.'calendar_template.php');
{ }
require(e_PLUGIN.'calendar_menu/calendar_template.php'); else
} {
require(e_PLUGIN.'calendar_menu/calendar_template.php');
global $pref; }
// Values defined through admin pages
$menu_title = varset($pref['eventpost_menuheading'],EC_LAN_140); // Values defined through admin pages
$days_ahead = varset($pref['eventpost_daysforward'],30); // Number of days ahead to go $menu_title = varset($this->ecal_class->pref['eventpost_menuheading'],EC_LAN_140);
$show_count = varset($pref['eventpost_numevents'],3); // Number of events to show $days_ahead = varset($this->ecal_class->pref['eventpost_daysforward'],30); // Number of days ahead to go
$show_recurring = varset($pref['eventpost_checkrecur'],1); // Zero to exclude recurring events $show_count = varset($this->ecal_class->pref['eventpost_numevents'],3); // Number of events to show
$link_in_heading = varset($pref['eventpost_linkheader'],0); // Zero for simple heading, 1 to have clickable link $show_recurring = varset($this->ecal_class->pref['eventpost_checkrecur'],1); // Zero to exclude recurring events
$link_in_heading = varset($this->ecal_class->pref['eventpost_linkheader'],0); // Zero for simple heading, 1 to have clickable link
$start_time = $ecal_class->cal_timedate;
$end_time = $start_time + (86400 * $days_ahead) - 1; $start_time = $ecal_class->cal_timedate;
$end_time = $start_time + (86400 * $days_ahead) - 1;
$cal_text = '';
$cal_text = '';
$calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class
$calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class
$ev_list = $ecal_class->get_n_events($show_count, $start_time, $end_time, varset($pref['eventpost_fe_set'],FALSE), $show_recurring,
'event_id,event_start, event_thread, event_title, event_recurring, event_allday, event_category', 'event_cat_icon'); $ev_list = $ecal_class->get_n_events($show_count, $start_time, $end_time, varset($this->ecal_class->pref['eventpost_fe_set'],FALSE), $show_recurring,
'event_id,event_start, event_thread, event_title, event_recurring, event_allday, event_category', 'event_cat_icon');
$cal_totev = count($ev_list);
if ($cal_totev > 0) $cal_totev = count($ev_list);
{ if ($cal_totev > 0)
foreach ($ev_list as $thisEvent) {
{ foreach ($ev_list as $thisEvent)
$cal_totev --; // Can use this to modify inter-event gap {
$calSc->numEvents = $cal_totev; // Number of events to display $cal_totev --; // Can use this to modify inter-event gap
$calSc->event = $thisEvent; // Give shortcodes the event data $calSc->numEvents = $cal_totev; // Number of events to display
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_FE_LINE,FALSE, $calSc); $calSc->event = $thisEvent; // Give shortcodes the event data
} $cal_text .= $e107->tp->parseTemplate($EVENT_CAL_FE_LINE,FALSE, $calSc);
} }
else }
{ else
if ($pref['eventpost_fe_hideifnone']) return ''; {
$cal_text.= EC_LAN_141; if ($this->ecal_class->pref['eventpost_fe_hideifnone']) return '';
} $cal_text.= EC_LAN_141;
}
$calendar_title = $e107->tp->toHTML($menu_title,FALSE,'TITLE'); // Allows multi-language title, shortcodes
if ($link_in_heading == 1) $calendar_title = $e107->tp->toHTML($menu_title,FALSE,'TITLE'); // Allows multi-language title, shortcodes
{ if ($link_in_heading == 1)
$calendar_title = "<a class='forumlink' href='".e_PLUGIN_ABS."calendar_menu/event.php' >".$calendar_title."</a>"; {
} $calendar_title = "<a class='forumlink' href='".e_PLUGIN_ABS."calendar_menu/event.php' >".$calendar_title."</a>";
}
// Now handle the data, cache as well
ob_start(); // Set up a new output buffer // Now handle the data, cache as well
$e107->ns->tablerender($calendar_title, $cal_text, 'next_event_menu'); ob_start(); // Set up a new output buffer
$cache_data = ob_get_flush(); // Get the page content, and display it $e107->ns->tablerender($calendar_title, $cal_text, 'next_event_menu');
$e107->ecache->set($cache_tag, $cache_data); // Save to cache $cache_data = ob_get_flush(); // Get the page content, and display it
$e107->ecache->set($cache_tag, $cache_data); // Save to cache
unset($ev_list);
unset($ev_list);
?> ?>

View File

@@ -22,7 +22,7 @@
<pref name="eventpost_showmouseover">0</pref> <pref name="eventpost_showmouseover">0</pref>
<pref name="eventpost_showeventcount">1</pref> <pref name="eventpost_showeventcount">1</pref>
<pref name="eventpost_forum">1</pref> <pref name="eventpost_forum">1</pref>
<pref name="eventpost_recentshow">0</pref> <pref name="eventpost_recentshow">LV</pref>
<pref name="eventpost_weekstart">sun</pref> <pref name="eventpost_weekstart">sun</pref>
<pref name="eventpost_lenday">1</pref> <pref name="eventpost_lenday">1</pref>
<pref name="eventpost_dateformat">1</pref> <pref name="eventpost_dateformat">1</pref>

View File

@@ -1,39 +1,51 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* *
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/search/search_parser.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/search/search_parser.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
if (!defined('e107_INIT')) { exit; }
/**
$return_fields = 'event_id, event_start, event_title, event_location, event_details'; * e107 Event calendar plugin
$search_fields = array('event_title', 'event_location', 'event_details'); *
$weights = array('1.2', '0.6', '0.6'); * Search parser
$no_results = LAN_198; *
$where = ""; * @package e107_plugins
$order = array('event_start' => DESC); * @subpackage event_calendar
* @version $Id$;
$ps = $sch -> parsesearch('event', $return_fields, $search_fields, $weights, 'search_events', $no_results, $where, $order); */
$text .= $ps['text'];
$results = $ps['results']; if (!defined('e107_INIT')) { exit; }
function search_events($row) { $return_fields = 'event_id, event_start, event_title, event_location, event_details';
global $con; $search_fields = array('event_title', 'event_location', 'event_details');
$res['link'] = e_PLUGIN."calendar_menu/event.php?".time().".event.".$row['event_id']; $weights = array('1.2', '0.6', '0.6');
$res['title'] = $row['event_title']; $no_results = LAN_198;
$res['summary'] = $row['event_details']; $where = '';
$res['detail'] = $row['event_location']." | ".$con -> convert_date($row['event_start'], "long"); $order = array('event_start' => DESC);
return $res;
} $ps = $sch -> parsesearch('event', $return_fields, $search_fields, $weights, 'search_events', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_events($row)
{
global $con;
$res['link'] = e_PLUGIN."calendar_menu/event.php?".time().".event.".$row['event_id'];
$res['title'] = $row['event_title'];
$res['summary'] = $row['event_details'];
$res['detail'] = $row['event_location']." | ".$con -> convert_date($row['event_start'], "long");
return $res;
}
?> ?>

View File

@@ -1,117 +1,123 @@
<?php <?php
/* /*
* e107 website system * e107 website system
* *
* Copyright (C) 2008-2009 e107 Inc (e107.org) * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* *
* Event calendar plugin - mail subscription to events notification * Event calendar plugin - mail subscription to events notification
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/subscribe.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/subscribe.php,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* $Author$ * $Author$
*/ */
/** /**
* e107 Event calendar plugin * e107 Event calendar plugin
* *
* @package e107_plugins * Event calendar plugin - mail subscription to events notification
* @subpackage event_calendar *
* @version $Id$; * @package e107_plugins
*/ * @subpackage event_calendar
* @version $Id$;
require_once('../../class2.php'); */
$e107 = e107::getInstance();
require_once('../../class2.php');
if (!$e107->isInstalled('calendar_menu')) $e107 = e107::getInstance();
{
header('Location: '.e_BASE.'index.php'); if (!$e107->isInstalled('calendar_menu'))
exit(); {
} header('Location: '.e_BASE.'index.php');
exit();
include_lan(e_PLUGIN .'calendar_menu/languages/'.e_LANGUAGE.'.php'); }
global $pref;
define('PAGE_NAME', EC_LAN_80); require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
require_once(HEADERF);
if (!is_object($ecal_class)) $ecal_class = new ecal_class;
if ((USER) && (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1'))) include_lan(e_PLUGIN .'calendar_menu/languages/'.e_LANGUAGE.'.php');
{ define('PAGE_NAME', EC_LAN_80);
$cal_db = new db; // Probably best to keep this require_once(HEADERF);
if (isset($_POST['upsubs']))
{ if ((USER) && (isset($ecal_class->pref['eventpost_asubs']) && ($ecal_class->pref['eventpost_asubs'] == '1')))
$cal_cats = $e107->tp->toDB($_POST['event_list']); // IDs of allowed categories {
$cal_subs = $e107->tp->toDB($_POST['event_subd']); // Checkbox results $cal_db = new db; // Probably best to keep this
$cal_db->db_Delete('event_subs', "event_userid='" . USERID . "'"); // Delete all for this user to start
foreach($cal_cats as $cal_row) if (isset($_POST['upsubs']))
{ // Now add in a subscription for each allowed category {
if ($cal_subs[$cal_row]) $cal_cats = $e107->tp->toDB($_POST['event_list']); // IDs of allowed categories
{ $cal_subs = $e107->tp->toDB($_POST['event_subd']); // Checkbox results
$cal_inargs = "0,'" . USERID . "','" . $cal_row . "'"; $cal_db->db_Delete('event_subs', "event_userid='" . USERID . "'"); // Delete all for this user to start
$cal_db->db_Insert('event_subs', $cal_inargs); foreach($cal_cats as $cal_row)
} { // Now add in a subscription for each allowed category
// print $cal_row . $cal_subs[$cal_row] . "<br />"; if ($cal_subs[$cal_row])
} {
$caltext = "<table class='fborder' width='97%'> $cal_inargs = "0,'" . USERID . "','" . $cal_row . "'";
<tr><td class='fcaption' >" . EC_LAN_130 . "</td></tr> $cal_db->db_Insert('event_subs', $cal_inargs);
<tr><td class='forumheader3' ><a href='calendar.php'>" . EC_LAN_131 . "</a></tr> }
<tr><td class='fcaption' >&nbsp;</td></tr></table>"; // print $cal_row . $cal_subs[$cal_row] . "<br />";
} }
else $caltext = "<table class='fborder' width='97%'>
{ <tr><td class='fcaption' >" . EC_LAN_130 . "</td></tr>
$caltext = "<form id='calsubs' action='" . e_SELF . "' method='post' > <tr><td class='forumheader3' ><a href='calendar.php'>" . EC_LAN_131 . "</a></tr>
<table class='fborder' width='97%'> <tr><td class='fcaption' >&nbsp;</td></tr></table>";
<tr><td class='fcaption' colspan='3'>" . EC_LAN_125 . "</td></tr> }
<tr><td class='forumheader2' >" . EC_LAN_126 . "</td><td class='forumheader2' >" . EC_LAN_127 . "</td><td class='forumheader2' >" . EC_LAN_136 . "</td></tr>"; else
// Get list of currently subscribed {
$cal_db->db_Select('event_subs', 'event_cat', "where event_userid='" . USERID . "'", "nowhere"); $caltext = "<form id='calsubs' action='" . e_SELF . "' method='post' >
while ($cal_s = $cal_db->db_Fetch()) <table class='fborder' width='97%'>
{ <tr><td class='fcaption' colspan='3'>" . EC_LAN_125 . "</td></tr>
extract($cal_s); <tr><td class='forumheader2' >" . EC_LAN_126 . "</td><td class='forumheader2' >" . EC_LAN_127 . "</td><td class='forumheader2' >" . EC_LAN_136 . "</td></tr>";
$cal_array[] = $event_cat;
} // while // Get list of currently subscribed
$cal_db->db_Select('event_subs', 'event_cat', "where event_userid='" . USERID . "'", "nowhere");
// Get list of categories that have subscriptions and are visible to this member while ($cal_s = $cal_db->db_Fetch())
$cal_args = "select * from #event_cat {
where event_cat_subs>0 and (find_in_set(event_cat_class,'".USERCLASS_LIST."') OR find_in_set(event_cat_force_class,'".USERCLASS_LIST."'))"; extract($cal_s);
if ($cal_db->db_Select_gen($cal_args)) $cal_array[] = $event_cat;
{ } // while
// echo $cal_args."<br />";
while ($cal_row = $cal_db->db_Fetch()) // Get list of categories that have subscriptions and are visible to this member
{ $cal_args = "select * from #event_cat
extract($cal_row); where event_cat_subs>0 and (find_in_set(event_cat_class,'".USERCLASS_LIST."') OR find_in_set(event_cat_force_class,'".USERCLASS_LIST."'))";
$caltext .= "<tr><td class='forumheader3' style='width:10%;'>"; if ($cal_db->db_Select_gen($cal_args))
if (check_class($event_cat_force_class)) {
{ // echo $cal_args."<br />";
$caltext .= EC_LAN_126; while ($cal_row = $cal_db->db_Fetch())
} {
else extract($cal_row);
{ $caltext .= "<tr><td class='forumheader3' style='width:10%;'>";
$caltext .= "<input type='hidden' name='event_list[]' value='" . $event_cat_id . "' /> if (check_class($event_cat_force_class))
<input type='checkbox' class='tbox' value='1' name='event_subd[$event_cat_id]' " . (in_array($event_cat_id, $cal_array)?"checked='checked' ":"") . " /> </td>"; {
} $caltext .= EC_LAN_126;
$caltext .= "<td class='forumheader3'>{$event_cat_name}</td><td class='forumheader3'>{$event_cat_description}</td></tr>"; }
} else
} {
else $caltext .= "<input type='hidden' name='event_list[]' value='" . $event_cat_id . "' />
{ <input type='checkbox' class='tbox' value='1' name='event_subd[$event_cat_id]' " . (in_array($event_cat_id, $cal_array)?"checked='checked' ":"") . " /> </td>";
$caltext .= "<tr><td class='forumheader3' colspan='3'>" . EC_LAN_128 . "</td></tr>"; }
} $caltext .= "<td class='forumheader3'>{$event_cat_name}</td><td class='forumheader3'>{$event_cat_description}</td></tr>";
$caltext .= "<tr><td class='forumheader3' colspan='3'><input class='tbox' type='submit' value='" . EC_LAN_129 . "' name='upsubs' /></td></tr>"; }
$caltext .= "</table></form>"; }
} else
} {
else $caltext .= "<tr><td class='forumheader3' colspan='3'>" . EC_LAN_128 . "</td></tr>";
{ }
if (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1')) $caltext .= "<tr><td class='forumheader3' colspan='3'><input class='tbox' type='submit' value='" . EC_LAN_129 . "' name='upsubs' /></td></tr>";
$caltext = EC_LAN_142; // Register or log in $caltext .= "</table></form>";
else }
$caltext = EC_LAN_143; // No facility }
} else
$e107->ns->tablerender(EC_LAN_124, $caltext); {
require_once(FOOTERF); if (isset($ecal_class->pref['eventpost_asubs']) && ($ecal_class->pref['eventpost_asubs'] == '1'))
$caltext = EC_LAN_142; // Register or log in
else
$caltext = EC_LAN_143; // No facility
}
$e107->ns->tablerender(EC_LAN_124, $caltext);
require_once(FOOTERF);
?> ?>