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:
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - admin functions
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -25,7 +27,6 @@
|
||||
$eplug_admin = true; // Make sure we show admin theme
|
||||
$e_sub_cat = 'event_calendar';
|
||||
require_once('../../class2.php');
|
||||
//require_once(e_HANDLER.'userclass_class.php');
|
||||
if (!getperms('P'))
|
||||
{
|
||||
header('location:'.e_BASE.'index.php');
|
||||
@@ -38,19 +39,31 @@ include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu
|
||||
require_once(e_HANDLER.'form_handler.php');
|
||||
$frm = new e_form();
|
||||
|
||||
$sql = e107::getDb();
|
||||
$uc = e107::getUserClass(); // Userclass object pointer
|
||||
$message = '';
|
||||
$calendarmenu_text = '';
|
||||
$calendarmenu_msg = '';
|
||||
$calPref = e107::pref('calendar_menu');
|
||||
|
||||
// Given an array of name => format, reads the $_POST variable of each name, applies the specified formatting,
|
||||
// identifies changes, writes back the changes, makes admin log entry
|
||||
function logPrefChanges(&$prefList, $logRef)
|
||||
/**
|
||||
* Given an array of name => format, reads the $_POST variable of each name, applies the specified formatting,
|
||||
* identifies changes, writes back the changes, makes admin log entry
|
||||
*
|
||||
* @param array $prefList - each key is the name of a pref; value is an integer representing its type
|
||||
* @param array $oldPref - array of current pref values
|
||||
* @param string $logRef - used as title if any changes to be logged
|
||||
*
|
||||
* @return - none
|
||||
*/
|
||||
function logPrefChanges(&$prefList, &$oldPref, $logRef)
|
||||
{
|
||||
global $admin_log;
|
||||
$pref = e107::getPref();
|
||||
$admin_log = e107::getAdminLog();
|
||||
$calNew = e107::getPlugConfig('calendar_menu'); // Initialize calendar_menu prefs.
|
||||
$tp = e107::getParser();
|
||||
$prefChanges = array();
|
||||
$mes = eMessage::getInstance();
|
||||
|
||||
foreach ($prefList as $prefName => $process)
|
||||
{
|
||||
switch ($process)
|
||||
@@ -74,18 +87,32 @@ function logPrefChanges(&$prefList, $logRef)
|
||||
unset($tmp);
|
||||
break;
|
||||
}
|
||||
if (!isset($pref[$prefName]) || ($temp != $pref[$prefName]))
|
||||
if (!isset($oldPref[$prefName]) || ($temp != $oldPref[$prefName]))
|
||||
{ // Change to process
|
||||
$pref[$prefName] = $temp;
|
||||
$oldPref[$prefName] = $temp;
|
||||
$calNew->set($prefName, $temp);
|
||||
$prefChanges[] = $prefName.' => '.$temp;
|
||||
}
|
||||
}
|
||||
if (count($prefChanges))
|
||||
{
|
||||
save_prefs();
|
||||
$result = $calNew->save();
|
||||
if ($result === TRUE)
|
||||
{
|
||||
// Do admin logging
|
||||
$logString = implode('[!br!]', $prefChanges);
|
||||
$admin_log->log_event($logRef,$logString,'');
|
||||
$mes->add('Calendar prefs updated', E_MESSAGE_SUCCESS);
|
||||
}
|
||||
elseif ($result === FALSE)
|
||||
{
|
||||
$mes->add('Error saving calendar prefs', E_MESSAGE_ERROR);
|
||||
}
|
||||
else
|
||||
{ // Should never happen
|
||||
$mes->add('Unexpected result: '.$result, E_MESSAGE_INFO);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,19 +162,21 @@ $prefSettings = array(
|
||||
);
|
||||
if (isset($_POST['updatesettings']))
|
||||
{
|
||||
logPrefChanges(&$prefSettings['updateOptions'], 'EC_ADM_06');
|
||||
logPrefChanges($prefSettings['updateOptions'], $calPref, 'EC_ADM_06');
|
||||
$e107cache->clear('nq_event_cal'); // Clear cache as well, in case displays changed
|
||||
$message = EC_ADLAN_A204; // "Calendar settings updated.";
|
||||
}
|
||||
|
||||
|
||||
// ****************** FORTHCOMING EVENTS ******************
|
||||
if (isset($_POST['updateforthcoming']))
|
||||
{
|
||||
logPrefChanges(&$prefSettings['updateForthcoming'], 'EC_ADM_07');
|
||||
logPrefChanges($prefSettings['updateForthcoming'], $calPref, 'EC_ADM_07');
|
||||
$e107cache->clear('nq_event_cal'); // Clear cache as well, in case displays changed
|
||||
$message = EC_ADLAN_A109; // "Forthcoming Events settings updated.";
|
||||
}
|
||||
|
||||
|
||||
$action = 'config'; // Default action - show preferences
|
||||
if (e_QUERY)
|
||||
{
|
||||
@@ -156,7 +185,6 @@ if (e_QUERY)
|
||||
}
|
||||
|
||||
require_once('ecal_class.php');
|
||||
global $ecal_class;
|
||||
$ecal_class = new ecal_class;
|
||||
|
||||
|
||||
@@ -375,7 +403,6 @@ if($action == 'cat')
|
||||
if ($ecal_send_email != 0)
|
||||
{ // Need to send a test email
|
||||
// First, set up a dummy event
|
||||
global $thisevent;
|
||||
$thisevent = array('event_start' => $ecal_class->time_now, 'event_end' => ($ecal_class->time_now)+3600,
|
||||
'event_title' => 'Test event', 'event_details' => EC_ADLAN_A191,
|
||||
'event_cat_name' => $event_cat_name, 'event_location' => EC_ADLAN_A192,
|
||||
@@ -394,10 +421,10 @@ if($action == 'cat')
|
||||
break;
|
||||
}
|
||||
$cal_msg = $tp -> parseTemplate($cal_msg, TRUE);
|
||||
$cal_title = $tp -> parseTemplate($pref['eventpost_mailsubject'], TRUE);
|
||||
$cal_title = $tp -> parseTemplate($calPref['eventpost_mailsubject'], TRUE);
|
||||
$user_email = USEREMAIL;
|
||||
$user_name = USERNAME;
|
||||
$send_result = sendemail($user_email, $cal_title, $cal_msg, $user_name, $pref['eventpost_mailaddress'], $pref['eventpost_mailfrom']);
|
||||
$send_result = sendemail($user_email, $cal_title, $cal_msg, $user_name, $calPref['eventpost_mailaddress'], $calPref['eventpost_mailfrom']);
|
||||
if ($send_result)
|
||||
$calendarmenu_msg .= "<tr><td colspan='2'><strong>".EC_ADLAN_A187.$ecal_send_email."</strong></td></tr>";
|
||||
else
|
||||
@@ -583,6 +610,9 @@ if($action == 'cat')
|
||||
$calendarmenu_catopt .= "<option value=0'>".EC_ADLAN_A33."</option>";
|
||||
}
|
||||
|
||||
$emessage = eMessage::getInstance();
|
||||
echo $emessage->render().$text;
|
||||
|
||||
$calendarmenu_text .= "
|
||||
<form id='calform' method='post' action='".e_SELF."?cat'>
|
||||
|
||||
@@ -620,12 +650,15 @@ if($action == 'cat')
|
||||
if($action == 'forthcoming')
|
||||
{
|
||||
|
||||
if (!isset($pref['eventpost_menuheading'])) $pref['eventpost_menuheading'] = EC_ADLAN_A100;
|
||||
if (!isset($pref['eventpost_daysforward'])) $pref['eventpost_daysforward'] = 30;
|
||||
if (!isset($pref['eventpost_numevents'])) $pref['eventpost_numevents'] = 3;
|
||||
if (!isset($pref['eventpost_checkrecur'])) $pref['eventpost_checkrecur'] = '1';
|
||||
if (!isset($pref['eventpost_linkheader'])) $pref['eventpost_linkheader'] = '0';
|
||||
if (!isset($pref['eventpost_namelink'])) $pref['eventpost_namelink'] = '1';
|
||||
if (!isset($calPref['eventpost_menuheading'])) $calPref['eventpost_menuheading'] = EC_ADLAN_A100;
|
||||
if (!isset($calPref['eventpost_daysforward'])) $calPref['eventpost_daysforward'] = 30;
|
||||
if (!isset($calPref['eventpost_numevents'])) $calPref['eventpost_numevents'] = 3;
|
||||
if (!isset($calPref['eventpost_checkrecur'])) $calPref['eventpost_checkrecur'] = '1';
|
||||
if (!isset($calPref['eventpost_linkheader'])) $calPref['eventpost_linkheader'] = '0';
|
||||
if (!isset($calPref['eventpost_namelink'])) $calPref['eventpost_namelink'] = '1';
|
||||
|
||||
$emessage = eMessage::getInstance();
|
||||
echo $emessage->render().$text;
|
||||
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."?forthcoming'>
|
||||
@@ -638,7 +671,7 @@ if($action == 'forthcoming')
|
||||
<thead>
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A108."</td>
|
||||
<td><input class='tbox' type='text' name='eventpost_menuheading' size='35' value='".$pref['eventpost_menuheading']."' maxlength='30' />
|
||||
<td><input class='tbox' type='text' name='eventpost_menuheading' size='35' value='".$calPref['eventpost_menuheading']."' maxlength='30' />
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -646,50 +679,50 @@ if($action == 'forthcoming')
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A101."</td>
|
||||
<td><input class='tbox' type='text' name='eventpost_daysforward' size='20' value='".$pref['eventpost_daysforward']."' maxlength='10' />
|
||||
<td><input class='tbox' type='text' name='eventpost_daysforward' size='20' value='".$calPref['eventpost_daysforward']."' maxlength='10' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A102."</td>
|
||||
<td><input class='tbox' type='text' name='eventpost_numevents' size='20' value='".$pref['eventpost_numevents']."' maxlength='10' />
|
||||
<td><input class='tbox' type='text' name='eventpost_numevents' size='20' value='".$calPref['eventpost_numevents']."' maxlength='10' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A103."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_checkrecur' value='1' ".($pref['eventpost_checkrecur']==1?" checked='checked' ":"")." /></td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_checkrecur' value='1' ".($calPref['eventpost_checkrecur']==1?" checked='checked' ":"")." /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A107."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_fe_hideifnone' value='1' ".($pref['eventpost_fe_hideifnone']==1?" checked='checked' ":"")." /></td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_fe_hideifnone' value='1' ".($calPref['eventpost_fe_hideifnone']==1?" checked='checked' ":"")." /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A199."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_fe_showrecent' value='1' ".($pref['eventpost_fe_showrecent']==1?" checked='checked' ":"")." /></td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_fe_showrecent' value='1' ".($calPref['eventpost_fe_showrecent']==1?" checked='checked' ":"")." /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A130."<br /></td>
|
||||
<td>
|
||||
<select name='eventpost_namelink' class='tbox'>
|
||||
<option value='1' ".($pref['eventpost_namelink']=='1'?" selected='selected' ":"")." > ".EC_ADLAN_A131." </option>
|
||||
<option value='2' ".($pref['eventpost_namelink']=='2'?" selected='selected' ":"")." > ".EC_ADLAN_A132." </option>
|
||||
<option value='1' ".($calPref['eventpost_namelink']=='1'?" selected='selected' ":"")." > ".EC_ADLAN_A131." </option>
|
||||
<option value='2' ".($calPref['eventpost_namelink']=='2'?" selected='selected' ":"")." > ".EC_ADLAN_A132." </option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A104."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_linkheader' value='1' ".($pref['eventpost_linkheader']==1?" checked='checked' ":"")." />
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_linkheader' value='1' ".($calPref['eventpost_linkheader']==1?" checked='checked' ":"")." />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A120."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_showcaticon' value='1' ".($pref['eventpost_showcaticon']==1?" checked='checked' ":"")." />
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_showcaticon' value='1' ".($calPref['eventpost_showcaticon']==1?" checked='checked' ":"")." />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -699,7 +732,7 @@ if($action == 'forthcoming')
|
||||
|
||||
// Now display all the current categories as checkboxes
|
||||
$cal_fe_prefs = array();
|
||||
if (isset($pref['eventpost_fe_set'])) $cal_fe_prefs = array_flip(explode(",",$pref['eventpost_fe_set']));
|
||||
if (isset($calPref['eventpost_fe_set'])) $cal_fe_prefs = array_flip(explode(",",$calPref['eventpost_fe_set']));
|
||||
if (!isset($calendarmenu2_db) || !is_object($calendarmenu2_db)) $calendarmenu2_db = new DB; // Possible notice here
|
||||
if ($calendarmenu2_db->db_Select("event_cat", "event_cat_id,event_cat_name", " WHERE (event_cat_name != '".EC_DEFAULT_CATEGORY."') order by event_cat_name", "nowhere"))
|
||||
{
|
||||
@@ -735,6 +768,9 @@ if($action == 'forthcoming')
|
||||
|
||||
if(($action == 'maint'))
|
||||
{
|
||||
$emessage = eMessage::getInstance();
|
||||
echo $emessage->render().$text;
|
||||
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."?maint'>
|
||||
<fieldset id='plugin-ecal-maintenance'>
|
||||
@@ -792,6 +828,9 @@ if(($action == 'maint'))
|
||||
|
||||
if($action == 'subs')
|
||||
{
|
||||
$emessage = eMessage::getInstance();
|
||||
echo $emessage->render().$text;
|
||||
|
||||
$from = 0;
|
||||
$amount = 20; // Number per page - could make configurable later if required
|
||||
if (isset($ec_qs[1])) $from = intval($ec_qs[1]);
|
||||
@@ -882,6 +921,8 @@ if($action == 'config')
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$emessage = eMessage::getInstance();
|
||||
echo $emessage->render().$text;
|
||||
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."'>
|
||||
@@ -893,14 +934,14 @@ if($action == 'config')
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A208." </td>
|
||||
<td>". $uc->uc_dropdown('eventpost_admin', $pref['eventpost_admin'], 'public, nobody, member, admin, classes')."
|
||||
<td>". $uc->uc_dropdown('eventpost_admin', $calPref['eventpost_admin'], 'public, nobody, member, admin, classes')."
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A211." </td>
|
||||
<td>". $uc->uc_dropdown('eventpost_super', $pref['eventpost_super'], 'public, nobody, member, admin, classes')."
|
||||
<td>". $uc->uc_dropdown('eventpost_super', $calPref['eventpost_super'], 'public, nobody, member, admin, classes')."
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -908,9 +949,9 @@ $text .= "
|
||||
<td>".EC_ADLAN_A134."</td>
|
||||
<td>
|
||||
<select name='eventpost_adminlog' class='tbox'>
|
||||
<option value='0' ".($pref['eventpost_adminlog']=='0'?" selected='selected' ":"")." >". EC_ADLAN_A87." </option>
|
||||
<option value='1' ".($pref['eventpost_adminlog']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A135." </option>
|
||||
<option value='2' ".($pref['eventpost_adminlog']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A136." </option>
|
||||
<option value='0' ".($calPref['eventpost_adminlog']=='0'?" selected='selected' ":"")." >". EC_ADLAN_A87." </option>
|
||||
<option value='1' ".($calPref['eventpost_adminlog']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A135." </option>
|
||||
<option value='2' ".($calPref['eventpost_adminlog']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A136." </option>
|
||||
</select>
|
||||
<span class='field-help'>".EC_ADLAN_A137."</span>
|
||||
</td>
|
||||
@@ -920,50 +961,50 @@ $text .= "
|
||||
<td>".EC_ADLAN_A165."</td>
|
||||
<td>
|
||||
<select name='eventpost_menulink' class='tbox'>
|
||||
<option value='0' ".($pref['eventpost_menulink']=='0'?" selected='selected' ":"")." >".EC_ADLAN_A209." </option>
|
||||
<option value='1' ".($pref['eventpost_menulink']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A210." </option>
|
||||
<option value='2' ".($pref['eventpost_menulink']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A185." </option>
|
||||
<option value='0' ".($calPref['eventpost_menulink']=='0'?" selected='selected' ":"")." >".EC_ADLAN_A209." </option>
|
||||
<option value='1' ".($calPref['eventpost_menulink']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A210." </option>
|
||||
<option value='2' ".($calPref['eventpost_menulink']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A185." </option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A183."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_showmouseover' value='1' ".($pref['eventpost_showmouseover']==1?" checked='checked' ":"")." />
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_showmouseover' value='1' ".($calPref['eventpost_showmouseover']==1?" checked='checked' ":"")." />
|
||||
<span class='field-help'>".EC_ADLAN_A184."</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A140."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_showeventcount' value='1' ".($pref['eventpost_showeventcount']==1?" checked='checked' ":"")." /></td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_showeventcount' value='1' ".($calPref['eventpost_showeventcount']==1?" checked='checked' ":"")." /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A213."</td>
|
||||
<td>
|
||||
<input class='tbox' type='checkbox' name='eventpost_forum' value='1' ".($pref['eventpost_forum']==1?" checked='checked' ":"")." />
|
||||
<input class='tbox' type='checkbox' name='eventpost_forum' value='1' ".($calPref['eventpost_forum']==1?" checked='checked' ":"")." />
|
||||
<span class='field-help'>".EC_ADLAN_A22."</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A171."</td>
|
||||
<td><input class='tbox' type='text' name='eventpost_recentshow' size='10' value='".$pref['eventpost_recentshow']."' maxlength='5' />
|
||||
<td><input class='tbox' type='text' name='eventpost_recentshow' size='10' value='".$calPref['eventpost_recentshow']."' maxlength='5' />
|
||||
<span class='field-help'>".EC_ADLAN_A172."</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A212."</td>
|
||||
<td>".select_day_start($pref['eventpost_weekstart'])."</td>
|
||||
<td>".select_day_start($calPref['eventpost_weekstart'])."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A214."<br /></td>
|
||||
<td>
|
||||
<select name='eventpost_lenday' class='tbox'>
|
||||
<option value='1' ".($pref['eventpost_lenday']=='1'?" selected='selected' ":"")." > 1 </option>
|
||||
<option value='2' ".($pref['eventpost_lenday']=='2'?" selected='selected' ":"")." > 2 </option>
|
||||
<option value='3' ".($pref['eventpost_lenday']=='3'?" selected='selected' ":"")." > 3 </option>
|
||||
<option value='1' ".($calPref['eventpost_lenday']=='1'?" selected='selected' ":"")." > 1 </option>
|
||||
<option value='2' ".($calPref['eventpost_lenday']=='2'?" selected='selected' ":"")." > 2 </option>
|
||||
<option value='3' ".($calPref['eventpost_lenday']=='3'?" selected='selected' ":"")." > 3 </option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -972,8 +1013,8 @@ $text .= "
|
||||
<td>".EC_ADLAN_A215."<br /></td>
|
||||
<td>
|
||||
<select name='eventpost_dateformat' class='tbox'>
|
||||
<option value='my' ".($pref['eventpost_dateformat']=='my'?" selected='selected' ":"")." >".EC_ADLAN_A216."</option>
|
||||
<option value='ym' ".($pref['eventpost_dateformat']=='ym'?" selected='selected' ":"")." >".EC_ADLAN_A217."</option>
|
||||
<option value='my' ".($calPref['eventpost_dateformat']=='my'?" selected='selected' ":"")." >".EC_ADLAN_A216."</option>
|
||||
<option value='ym' ".($calPref['eventpost_dateformat']=='ym'?" selected='selected' ":"")." >".EC_ADLAN_A217."</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -982,22 +1023,22 @@ $text .= "
|
||||
<td>".EC_ADLAN_A133."<br /></td>
|
||||
<td>
|
||||
<select name='eventpost_datedisplay' class='tbox'>
|
||||
<option value='1' ".($pref['eventpost_datedisplay']=='1'?" selected='selected' ":"")." > yyyy-mm-dd</option>
|
||||
<option value='2' ".($pref['eventpost_datedisplay']=='2'?" selected='selected' ":"")." > dd-mm-yyyy</option>
|
||||
<option value='3' ".($pref['eventpost_datedisplay']=='3'?" selected='selected' ":"")." > mm-dd-yyyy</option>
|
||||
<option value='4' ".($pref['eventpost_datedisplay']=='4'?" selected='selected' ":"")." > yyyy.mm.dd</option>
|
||||
<option value='5' ".($pref['eventpost_datedisplay']=='5'?" selected='selected' ":"")." > dd.mm.yyyy</option>
|
||||
<option value='6' ".($pref['eventpost_datedisplay']=='6'?" selected='selected' ":"")." > mm.dd.yyyy</option>
|
||||
<option value='7' ".($pref['eventpost_datedisplay']=='7'?" selected='selected' ":"")." > yyyy/mm/dd</option>
|
||||
<option value='8' ".($pref['eventpost_datedisplay']=='8'?" selected='selected' ":"")." > dd/mm/yyyy</option>
|
||||
<option value='9' ".($pref['eventpost_datedisplay']=='9'?" selected='selected' ":"")." > mm/dd/yyyy</option>
|
||||
<option value='1' ".($calPref['eventpost_datedisplay']=='1'?" selected='selected' ":"")." > yyyy-mm-dd</option>
|
||||
<option value='2' ".($calPref['eventpost_datedisplay']=='2'?" selected='selected' ":"")." > dd-mm-yyyy</option>
|
||||
<option value='3' ".($calPref['eventpost_datedisplay']=='3'?" selected='selected' ":"")." > mm-dd-yyyy</option>
|
||||
<option value='4' ".($calPref['eventpost_datedisplay']=='4'?" selected='selected' ":"")." > yyyy.mm.dd</option>
|
||||
<option value='5' ".($calPref['eventpost_datedisplay']=='5'?" selected='selected' ":"")." > dd.mm.yyyy</option>
|
||||
<option value='6' ".($calPref['eventpost_datedisplay']=='6'?" selected='selected' ":"")." > mm.dd.yyyy</option>
|
||||
<option value='7' ".($calPref['eventpost_datedisplay']=='7'?" selected='selected' ":"")." > yyyy/mm/dd</option>
|
||||
<option value='8' ".($calPref['eventpost_datedisplay']=='8'?" selected='selected' ":"")." > dd/mm/yyyy</option>
|
||||
<option value='9' ".($calPref['eventpost_datedisplay']=='9'?" selected='selected' ":"")." > mm/dd/yyyy</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A138."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_fivemins' value='1' ".($pref['eventpost_fivemins']==1?" checked='checked' ":"")." /> <span class='field-help'><em>".EC_ADLAN_A139."</em></span>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_fivemins' value='1' ".($calPref['eventpost_fivemins']==1?" checked='checked' ":"")." /> <span class='field-help'><em>".EC_ADLAN_A139."</em></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1005,9 +1046,9 @@ $text .= "
|
||||
<td>".EC_ADLAN_A200."<br /></td>
|
||||
<td>
|
||||
<select name='eventpost_editmode' class='tbox'>
|
||||
<option value='0' ".($pref['eventpost_editmode']=='0'?" selected='selected' ":"")." >".EC_ADLAN_A201."</option>
|
||||
<option value='1' ".($pref['eventpost_editmode']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A202."</option>
|
||||
<option value='2' ".($pref['eventpost_editmode']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A203."</option>
|
||||
<option value='0' ".($calPref['eventpost_editmode']=='0'?" selected='selected' ":"")." >".EC_ADLAN_A201."</option>
|
||||
<option value='1' ".($calPref['eventpost_editmode']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A202."</option>
|
||||
<option value='2' ".($calPref['eventpost_editmode']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A203."</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1021,9 +1062,9 @@ $text .= "
|
||||
</td>
|
||||
<td>
|
||||
<select name='eventpost_caltime' class='tbox'>
|
||||
<option value='1' ".($pref['eventpost_caltime']=='1'?" selected='selected' ":'')." > Server </option>
|
||||
<option value='2' ".($pref['eventpost_caltime']=='2'?" selected='selected' ":'')." > Site </option>
|
||||
<option value='3' ".($pref['eventpost_caltime']=='3'?" selected='selected' ":'')." > User </option>
|
||||
<option value='1' ".($calPref['eventpost_caltime']=='1'?" selected='selected' ":'')." > Server </option>
|
||||
<option value='2' ".($calPref['eventpost_caltime']=='2'?" selected='selected' ":'')." > Site </option>
|
||||
<option value='3' ".($calPref['eventpost_caltime']=='3'?" selected='selected' ":'')." > User </option>
|
||||
</select><br /><span class='field-help'>".EC_ADLAN_A129."</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1034,12 +1075,12 @@ $text .= "
|
||||
</td>
|
||||
<td>
|
||||
<select name='eventpost_timedisplay' class='tbox'>
|
||||
<option value='1' ".($pref['eventpost_timedisplay']=='1'?" selected='selected' ":'')." > 24-hour hhmm </option>
|
||||
<option value='4' ".($pref['eventpost_timedisplay']=='4'?" selected='selected' ":'')." > 24-hour hh:mm </option>
|
||||
<option value='2' ".($pref['eventpost_timedisplay']=='2'?" selected='selected' ":'')." > 12-hour </option>
|
||||
<option value='3' ".($pref['eventpost_timedisplay']=='3'?" selected='selected' ":'')." > Custom </option>
|
||||
<option value='1' ".($calPref['eventpost_timedisplay']=='1'?" selected='selected' ":'')." > 24-hour hhmm </option>
|
||||
<option value='4' ".($calPref['eventpost_timedisplay']=='4'?" selected='selected' ":'')." > 24-hour hh:mm </option>
|
||||
<option value='2' ".($calPref['eventpost_timedisplay']=='2'?" selected='selected' ":'')." > 12-hour </option>
|
||||
<option value='3' ".($calPref['eventpost_timedisplay']=='3'?" selected='selected' ":'')." > Custom </option>
|
||||
</select>
|
||||
<input class='tbox' type='text' name='eventpost_timecustom' size='20' value='".$pref['eventpost_timecustom']."' maxlength='30' />
|
||||
<input class='tbox' type='text' name='eventpost_timecustom' size='20' value='".$calPref['eventpost_timecustom']."' maxlength='30' />
|
||||
<br /><span class='field-help'>".EC_ADLAN_A128."</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1050,12 +1091,12 @@ $text .= "
|
||||
</td>
|
||||
<td>
|
||||
<select name='eventpost_dateevent' class='tbox'>
|
||||
<option value='1' ".($pref['eventpost_dateevent']=='1'?" selected='selected' ":'')." > dayofweek day month yyyy </option>
|
||||
<option value='2' ".($pref['eventpost_dateevent']=='2'?" selected='selected' ":'')." > dyofwk day mon yyyy </option>
|
||||
<option value='3' ".($pref['eventpost_dateevent']=='3'?" selected='selected' ":'')." > dyofwk dd-mm-yy </option>
|
||||
<option value='0' ".($pref['eventpost_dateevent']=='0'?" selected='selected' ":'')." > Custom </option>
|
||||
<option value='1' ".($calPref['eventpost_dateevent']=='1'?" selected='selected' ":'')." > dayofweek day month yyyy </option>
|
||||
<option value='2' ".($calPref['eventpost_dateevent']=='2'?" selected='selected' ":'')." > dyofwk day mon yyyy </option>
|
||||
<option value='3' ".($calPref['eventpost_dateevent']=='3'?" selected='selected' ":'')." > dyofwk dd-mm-yy </option>
|
||||
<option value='0' ".($calPref['eventpost_dateevent']=='0'?" selected='selected' ":'')." > Custom </option>
|
||||
</select>
|
||||
<input class='tbox' type='text' name='eventpost_eventdatecustom' size='20' value='".$pref['eventpost_eventdatecustom']."' maxlength='30' />
|
||||
<input class='tbox' type='text' name='eventpost_eventdatecustom' size='20' value='".$calPref['eventpost_eventdatecustom']."' maxlength='30' />
|
||||
<br /><span class='field-help'>".EC_ADLAN_A168."</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1066,13 +1107,13 @@ $text .= "
|
||||
</td>
|
||||
<td>
|
||||
<select name='eventpost_datenext' class='tbox'>
|
||||
<option value='1' ".($pref['eventpost_datenext']=='1'?" selected='selected' ":'')." > dd month </option>
|
||||
<option value='2' ".($pref['eventpost_datenext']=='2'?" selected='selected' ":'')." > dd mon </option>
|
||||
<option value='3' ".($pref['eventpost_datenext']=='3'?" selected='selected' ":'')." > month dd </option>
|
||||
<option value='4' ".($pref['eventpost_datenext']=='4'?" selected='selected' ":'')." > mon dd </option>
|
||||
<option value='0' ".($pref['eventpost_datenext']=='0'?" selected='selected' ":'')." > Custom </option>
|
||||
<option value='1' ".($calPref['eventpost_datenext']=='1'?" selected='selected' ":'')." > dd month </option>
|
||||
<option value='2' ".($calPref['eventpost_datenext']=='2'?" selected='selected' ":'')." > dd mon </option>
|
||||
<option value='3' ".($calPref['eventpost_datenext']=='3'?" selected='selected' ":'')." > month dd </option>
|
||||
<option value='4' ".($calPref['eventpost_datenext']=='4'?" selected='selected' ":'')." > mon dd </option>
|
||||
<option value='0' ".($calPref['eventpost_datenext']=='0'?" selected='selected' ":'')." > Custom </option>
|
||||
</select>
|
||||
<input class='tbox' type='text' name='eventpost_nextdatecustom' size='20' value='".$pref['eventpost_nextdatecustom']."' maxlength='30' />
|
||||
<input class='tbox' type='text' name='eventpost_nextdatecustom' size='20' value='".$calPref['eventpost_nextdatecustom']."' maxlength='30' />
|
||||
<br /><span class='field-help'>".EC_ADLAN_A168."</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1085,7 +1126,7 @@ $text .= "
|
||||
if (e107::isInstalled('pdf')) { $listOpts['2'] = EC_ADLAN_A196; }
|
||||
foreach ($listOpts as $v => $t)
|
||||
{
|
||||
$s = $pref['eventpost_printlists'] == $v ? " selected='selected'" : '';
|
||||
$s = $calPref['eventpost_printlists'] == $v ? " selected='selected'" : '';
|
||||
$text .= "<option value='{$v}'{$s}>{$t}</option>\n";
|
||||
}
|
||||
$text .= "
|
||||
@@ -1095,25 +1136,25 @@ $text .= "
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A95."</td>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_asubs' value='1' ".($pref['eventpost_asubs']==1?" checked='checked' ":'')." /> <span class='field-help'><em>".EC_ADLAN_A96."</em></span>
|
||||
<td><input class='tbox' type='checkbox' name='eventpost_asubs' value='1' ".($calPref['eventpost_asubs']==1?" checked='checked' ":'')." /> <span class='field-help'><em>".EC_ADLAN_A96."</em></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A92."</td>
|
||||
<td><input class='tbox' type='text' name='eventpost_mailfrom' size='60' value='".$pref['eventpost_mailfrom']."' maxlength='100' />
|
||||
<td><input class='tbox' type='text' name='eventpost_mailfrom' size='60' value='".$calPref['eventpost_mailfrom']."' maxlength='100' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A91."</td>
|
||||
<td><input class='tbox' type='text' name='eventpost_mailsubject' size='60' value='".$pref['eventpost_mailsubject']."' maxlength='100' />
|
||||
<td><input class='tbox' type='text' name='eventpost_mailsubject' size='60' value='".$calPref['eventpost_mailsubject']."' maxlength='100' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".EC_ADLAN_A93."</td>
|
||||
<td><input class='tbox' type='text' name='eventpost_mailaddress' size='60' value='".$pref['eventpost_mailaddress']."' maxlength='100' />
|
||||
<td><input class='tbox' type='text' name='eventpost_mailaddress' size='60' value='".$calPref['eventpost_mailaddress']."' maxlength='100' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1121,9 +1162,9 @@ $text .= "
|
||||
<td>".EC_ADLAN_A114."<br /></td>
|
||||
<td>
|
||||
<select name='eventpost_emaillog' class='tbox'>
|
||||
<option value='0' ".($pref['eventpost_emaillog']=='0'?" selected='selected' ":"")." >". EC_ADLAN_A87." </option>
|
||||
<option value='1' ".($pref['eventpost_emaillog']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A115." </option>
|
||||
<option value='2' ".($pref['eventpost_emaillog']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A116." </option>
|
||||
<option value='0' ".($calPref['eventpost_emaillog']=='0'?" selected='selected' ":"")." >". EC_ADLAN_A87." </option>
|
||||
<option value='1' ".($calPref['eventpost_emaillog']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A115." </option>
|
||||
<option value='2' ".($calPref['eventpost_emaillog']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A116." </option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - large calendar display
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -47,7 +49,7 @@ if (isset($_POST['printlists']))
|
||||
exit();
|
||||
}
|
||||
|
||||
//e107::getScParser();
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
$calSc = new event_calendar_shortcodes();
|
||||
|
||||
@@ -102,10 +104,6 @@ $calSc->ecalClass = &$ecal_class;
|
||||
$calSc->setCalDate($dateArray);
|
||||
$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
|
||||
@@ -191,7 +189,6 @@ $text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER_START, FALSE, $calSc
|
||||
for ($i = 0; $i < 7; $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_END, FALSE, $calSc);
|
||||
@@ -212,8 +209,6 @@ for ($c = 1; $c <= $numberdays; $c++)
|
||||
{ // Loop through the number of days in this month
|
||||
$calSc->todayStart = $start; // Start of current day
|
||||
$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
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -16,11 +16,14 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - calendar menu display
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
$e107 = e107::getInstance();
|
||||
if (!$e107->isInstalled('calendar_menu')) return '';
|
||||
@@ -30,6 +33,7 @@ if (!isset($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_cal';
|
||||
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
|
||||
@@ -37,12 +41,9 @@ if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time)
|
||||
echo $cacheData;
|
||||
return;
|
||||
}
|
||||
global $pref;
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
|
||||
// Doesn't use shortcodes - rather a specific format for that
|
||||
//e107::getScParser();
|
||||
//require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
if (is_readable(THEME.'calendar_template.php'))
|
||||
{ // Has to be require
|
||||
require(THEME.'calendar_template.php');
|
||||
@@ -88,7 +89,7 @@ foreach ($ev_list as $cal_row)
|
||||
|
||||
// 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);
|
||||
if ($pref['eventpost_dateformat'] == 'my')
|
||||
if ($this->ecal_class->pref['eventpost_dateformat'] == 'my')
|
||||
{
|
||||
$calendar_title = $cal_months[$cal_current_month-1] .' '. $cal_current_year;
|
||||
}
|
||||
@@ -96,16 +97,20 @@ else
|
||||
{
|
||||
$calendar_title = $cal_current_year .' '. $cal_months[$cal_current_month-1];
|
||||
}
|
||||
switch ($pref['eventpost_menulink'])
|
||||
|
||||
switch ($this->ecal_class->pref['eventpost_menulink'])
|
||||
{
|
||||
case 0 : $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/event.php' >".$calendar_title."</a>";
|
||||
case 0 :
|
||||
$calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/event.php' >".$calendar_title."</a>";
|
||||
break;
|
||||
case 1 : $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/calendar.php' >".$calendar_title."</a>";
|
||||
case 1 :
|
||||
$calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/calendar.php' >".$calendar_title."</a>";
|
||||
break;
|
||||
default : ;
|
||||
}
|
||||
|
||||
$cal_text = $CALENDAR_MENU_START;
|
||||
if ($pref['eventpost_showeventcount']=='1')
|
||||
if ($this->ecal_class->pref['eventpost_showeventcount']=='1')
|
||||
{
|
||||
if ($cal_totev)
|
||||
{
|
||||
@@ -117,6 +122,7 @@ if ($pref['eventpost_showeventcount']=='1')
|
||||
}
|
||||
$cal_text .= "<br /><br />";
|
||||
}
|
||||
|
||||
$cal_start = $cal_monthstart; // First day of month as time stamp
|
||||
// Start the table
|
||||
$cal_text .= $CALENDAR_MENU_TABLE_START;
|
||||
@@ -160,7 +166,7 @@ for($cal_c = 1; $cal_c <= $numberdays; $cal_c++)
|
||||
if ($cal_event_count)
|
||||
{ // Show icon if it exists
|
||||
$cal_css += 2; // Gives 3 for today, 4 for other day
|
||||
if (isset($pref['eventpost_showmouseover']) && ($pref['eventpost_showmouseover'] == 1))
|
||||
if (isset($this->ecal_class->pref['eventpost_showmouseover']) && ($this->ecal_class->pref['eventpost_showmouseover'] == 1))
|
||||
{
|
||||
$cal_ins = " title='";
|
||||
foreach ($cal_titles[$cal_c] as $cur_title)
|
||||
|
@@ -1,26 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| (c) e107 Inc 2008-2009
|
||||
| http://e107.org
|
||||
|
|
||||
|
|
||||
| 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/calendar_setup.php,v $
|
||||
| $Revision$
|
||||
| $Date$
|
||||
| $Author$
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Installation and update handler for event calendar plugin
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_admin_calendar_menu.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Plugin file - installation and update handling
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -29,23 +27,30 @@
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
|
||||
|
||||
class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup
|
||||
{
|
||||
|
||||
function install_post($param)
|
||||
{
|
||||
$somethingFailed = FALSE;
|
||||
|
||||
$mes = eMessage::getInstance();
|
||||
if($this->insertDefaultCategory(FALSE))
|
||||
if ($this->insertDefaultCategory(FALSE, $mes) == FALSE)
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
|
||||
$somethingFailed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ($somethingFailed)
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_04, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
|
||||
}
|
||||
|
||||
$mes->add(EC_ADINST_LAN_04, E_MESSAGE_SUCCESS);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -55,10 +60,106 @@ class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup
|
||||
}
|
||||
|
||||
|
||||
function upgrade_post($param)
|
||||
|
||||
/**
|
||||
* Called to see if plugin upgrade is required
|
||||
*
|
||||
* @param $param mixed - no purpose currently
|
||||
* @return boolean TRUE if upgrade required, FALSE otherwise
|
||||
*/
|
||||
function upgrade_required($param = FALSE)
|
||||
{
|
||||
$required = FALSE;
|
||||
|
||||
$data = e107::pref('calendar_menu');
|
||||
if (count($data) == 0)
|
||||
{
|
||||
$required = TRUE;
|
||||
}
|
||||
//print_a($data);
|
||||
return $required;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Upgrade stage 1
|
||||
*
|
||||
* @param $param mixed - no purpose currently
|
||||
* @return - none
|
||||
*/
|
||||
function upgrade_pre($param = FALSE)
|
||||
{
|
||||
$mes = eMessage::getInstance();
|
||||
if($this->insertDefaultCategory(TRUE))
|
||||
$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);
|
||||
}
|
||||
@@ -66,24 +167,7 @@ class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function insertDefaultCategory($isUpgrade = FALSE) // Insert the text for the default category into the DB here
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
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))
|
||||
{
|
||||
return EC_ADINST_LAN_08.'<br />';
|
||||
}
|
||||
$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);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -18,6 +18,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Shortcodes for event calendar
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -28,14 +30,11 @@ TODO:
|
||||
1. Good way of reading categories
|
||||
2. Have 'currentMonth' flag (means 'current day' if $ds == 'one') ?
|
||||
3. Check whether $prop should be calculated better
|
||||
4. Get rid of global on $pref
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
//register_shortcode('event_calendar_shortcodes', true);
|
||||
//initShortcodeClass('event_calendar_shortcodes');
|
||||
|
||||
/*
|
||||
Navigation Shortcodes
|
||||
@@ -282,8 +281,7 @@ class event_calendar_shortcodes
|
||||
|
||||
public function sc_ec_current_month($parm = '')
|
||||
{
|
||||
global $pref;
|
||||
if($pref['eventpost_dateformat'] == 'my')
|
||||
if($this->ecalClass->pref['eventpost_dateformat'] == 'my')
|
||||
{
|
||||
return $this->months[($this->month-1)].' '.$this->year;
|
||||
}
|
||||
@@ -328,19 +326,17 @@ class event_calendar_shortcodes
|
||||
|
||||
public function sc_ec_nav_but_subscription($parm = '')
|
||||
{
|
||||
global $pref;
|
||||
if (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs']>0) && USER)
|
||||
if (isset($this->ecalClass->pref['eventpost_asubs']) && ($this->ecalClass->pref['eventpost_asubs']>0) && USER)
|
||||
{
|
||||
return "<input class='button' type='submit' style='width:140px;' name='subs' value='".EC_LAN_123."' />";
|
||||
return "<input class='button' type='submit' style='width:140px;' name='subs' value='".EC_LAN_123."' title='".EC_LAN_182."' />";
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
public function sc_ec_nav_but_enterevent($parm = '')
|
||||
{
|
||||
global $pref;
|
||||
$ret = "<input type='hidden' name='enter_new_val' value='".$this->prop."' />";
|
||||
if ($this->ecalClass->cal_super || check_class($pref['eventpost_admin']))
|
||||
if ($this->ecalClass->cal_super || check_class($this->ecalClass->pref['eventpost_admin']))
|
||||
{
|
||||
$ret .= "<input class='button' type='submit' style='width:140px;' name='doit' value='".EC_LAN_94."' />";
|
||||
}
|
||||
@@ -359,17 +355,17 @@ class event_calendar_shortcodes
|
||||
|
||||
public function sc_ec_nav_but_printlists($parm = '')
|
||||
{
|
||||
global $pref;
|
||||
if (isset($pref['eventpost_printlists']) && ($pref['eventpost_printlists']>0) && USER)
|
||||
if (isset($this->ecalClass->pref['eventpost_printlists']) && ($this->ecalClass->pref['eventpost_printlists']>0) && USER)
|
||||
{
|
||||
return "<input class='button' type='submit' style='width:140px;' name='printlists' value='".EC_LAN_164."' />";
|
||||
return "<input class='button' type='submit' style='width:140px;' name='printlists' value='".EC_LAN_164."' title='".EC_LAN_183."' />";
|
||||
}
|
||||
else
|
||||
return 'Cant print lists';
|
||||
}
|
||||
|
||||
// Categories listing
|
||||
public function sc_ec_nav_categories($parm = '')
|
||||
{
|
||||
global $pref;
|
||||
if ($this->ourDB == NULL)
|
||||
{
|
||||
$this->ourDB = new db; // @todo use new method
|
||||
@@ -566,10 +562,9 @@ class event_calendar_shortcodes
|
||||
//------------------------------------------
|
||||
public function sc_ec_calendar_calendar_header_day($parm = '')
|
||||
{
|
||||
global $pref;
|
||||
if(isset($pref['eventpost_lenday']) && $pref['eventpost_lenday'])
|
||||
if(isset($this->ecalClass->pref['eventpost_lenday']) && $this->ecalClass->pref['eventpost_lenday'])
|
||||
{
|
||||
return "<strong>".$this->e107->tp->text_truncate($this->headerDay,$pref['eventpost_lenday'],'')."</strong>";
|
||||
return "<strong>".$this->e107->tp->text_truncate($this->headerDay,$this->ecalClass->pref['eventpost_lenday'],'')."</strong>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -822,9 +817,8 @@ class event_calendar_shortcodes
|
||||
|
||||
public function sc_ec_event_options()
|
||||
{
|
||||
global $pref;
|
||||
$event_author_name = strstr(varset($this->event['event_author'],'0.??'),'.');
|
||||
if (USERNAME == $event_author_name || $this->ecalClass->cal_super || check_class($pref['eventpost_admin']))
|
||||
if (USERNAME == $event_author_name || $this->ecalClass->cal_super || check_class($this->ecalClass->pref['eventpost_admin']))
|
||||
{
|
||||
return "<a href='".e_PLUGIN_ABS."calendar_menu/event.php?ed.".$this->event['event_id']."'><img class='icon S16' src='".e_IMAGE_ABS."admin_images/edit_16.png' title='".EC_LAN_35."' alt='".EC_LAN_35 . "'/></a> <a href='".e_PLUGIN_ABS.'calendar_menu/event.php?de.'.$this->event['event_id']."'><img style='border:0;' src='".e_IMAGE_ABS."admin_images/delete_16.png' title='".EC_LAN_36."' alt='".EC_LAN_36."'/></a>";
|
||||
}
|
||||
@@ -912,8 +906,7 @@ class event_calendar_shortcodes
|
||||
|
||||
function sc_ec_next_event_recent_icon()
|
||||
{
|
||||
global $pref;
|
||||
if (!$pref['eventpost_fe_showrecent']) return;
|
||||
if (!$this->ecalClass->pref['eventpost_fe_showrecent']) return;
|
||||
if (!isset($this->event['is_recent'])) return;
|
||||
if (is_readable(EC_RECENT_ICON))
|
||||
{
|
||||
@@ -941,8 +934,7 @@ class event_calendar_shortcodes
|
||||
|
||||
public function sc_ec_next_event_title()
|
||||
{
|
||||
global $pref;
|
||||
if (isset($pref['eventpost_namelink']) && ($pref['eventpost_namelink'] == '2') && (isset($this->event['event_thread']) && ($this->event['event_thread'] != '')))
|
||||
if (isset($this->ecalClass->pref['eventpost_namelink']) && ($this->ecalClass->pref['eventpost_namelink'] == '2') && (isset($this->event['event_thread']) && ($this->event['event_thread'] != '')))
|
||||
{
|
||||
$fe_event_title = "<a href='".$this->event['event_thread']."'>";
|
||||
}
|
||||
@@ -957,9 +949,8 @@ class event_calendar_shortcodes
|
||||
|
||||
public function sc_ec_next_event_icon()
|
||||
{
|
||||
global $pref;
|
||||
$fe_icon_file = '';
|
||||
if ($pref['eventpost_showcaticon'] == 1)
|
||||
if ($this->ecalClass->pref['eventpost_showcaticon'] == 1)
|
||||
{
|
||||
if($this->event['event_cat_icon'] && is_readable(e_PLUGIN.'calendar_menu/images/'.$this->event['event_cat_icon']))
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Templates for event calendar displays
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* BBCode template
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -15,6 +15,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - cron task
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -120,8 +122,6 @@ class calendar_menu_cron // include plugin-folder in the name.
|
||||
*/
|
||||
public function processSubs()
|
||||
{
|
||||
global $pref;
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$this->ecalClass = new ecal_class;
|
||||
|
||||
@@ -141,7 +141,7 @@ class calendar_menu_cron // include plugin-folder in the name.
|
||||
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
|
||||
|
||||
|
||||
@@ -220,8 +220,6 @@ class calendar_menu_cron // include plugin-folder in the name.
|
||||
*/
|
||||
function sendMailshot($cal_query, $shot_type, $msg_num, $calendar_shortcodes)
|
||||
{
|
||||
global $pref;
|
||||
|
||||
if ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' Starting emails for '.$shot_type, FALSE, TRUE);
|
||||
@@ -265,7 +263,7 @@ class calendar_menu_cron // include plugin-folder in the name.
|
||||
// MAIL_CONTACT, MAIL_THREAD (maybe). Also MAIL_LINK, MAIL_SHORT_DATE
|
||||
// Best to strip entities here rather than at entry - handles old events as well
|
||||
// Note that certain user-related substitutions will work, however - |USERID|, |USERNAME|, |DISPLAYNAME|
|
||||
$cal_title = html_entity_decode($this->e107->tp->parseTemplate($pref['eventpost_mailsubject'], TRUE),ENT_QUOTES,CHARSET);
|
||||
$cal_title = html_entity_decode($this->e107->tp->parseTemplate($this->ecal_class->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:
|
||||
@@ -274,7 +272,7 @@ class calendar_menu_cron // include plugin-folder in the name.
|
||||
// 3. Forced mailshot to group of members - based on user table only Don't need JOIN
|
||||
// 4. Forced mailshot to group, plus optional subscriptions - use the lot! Need LEFT JOIN
|
||||
// (Always block sent to banned members)
|
||||
$manual_subs = (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1'));
|
||||
$manual_subs = (isset($this->ecal_class->pref['eventpost_asubs']) && ($this->ecal_class->pref['eventpost_asubs'] == '1'));
|
||||
$subs_fields = '';
|
||||
$subs_join = '';
|
||||
$whereClause = '';
|
||||
@@ -330,8 +328,8 @@ class calendar_menu_cron // include plugin-folder in the name.
|
||||
'mail_title' => str_replace('--REF--', intval(time()/3600), LAN_EC_MAIL_07),
|
||||
'mail_subject' => $cal_title,
|
||||
'mail_body' => $cal_msg,
|
||||
'mail_sender_email' => $pref['eventpost_mailaddress'],
|
||||
'mail_sender_name' => $pref['eventpost_mailfrom'],
|
||||
'mail_sender_email' => $this->ecal_class->pref['eventpost_mailaddress'],
|
||||
'mail_sender_name' => $this->ecal_class->pref['eventpost_mailfrom'],
|
||||
'mail_send_style' => 'textonly'
|
||||
);
|
||||
if (FALSE === ($mailMainID = $this->mailManager->saveEmail($email, TRUE)))
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -18,6 +18,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - Front page
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -18,6 +18,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Calendar e_list Handler
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -18,6 +18,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar - mailout function
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,11 +2,11 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 $
|
||||
* $Revision$
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Notify shim
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,11 +2,11 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 $
|
||||
* $Revision$
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* RSS news feed shim
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* Released under the terms and conditions of the
|
||||
* 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 $
|
||||
* $Revision$
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Search shim for event calendar
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Tagwords shim
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar mailout - template file
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar - generate lists
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -56,7 +58,7 @@ unset($ec_qs);
|
||||
if (e_QUERY) $ec_qs = explode('.', e_QUERY);
|
||||
else
|
||||
{
|
||||
if (!isset($pref['eventpost_printlists']) || ($pref['eventpost_printlists'] == 0))
|
||||
if (!isset($ecal_class->pref['eventpost_printlists']) || ($ecal_class->pref['eventpost_printlists'] == 0))
|
||||
header('location:'.SITEURL); // If disabled, just go back to index page
|
||||
}
|
||||
|
||||
@@ -102,7 +104,7 @@ if (count($EVENT_CAL_PDF_NAMES) == 1)
|
||||
// echo "Assign template: ".$ec_pdf_template."<br />";
|
||||
}
|
||||
|
||||
$ec_enable_pdf = ($pref['eventpost_printlists'] > 1) && is_readable(e_PLUGIN."pdf/e107pdf.php");
|
||||
$ec_enable_pdf = ($ecal_class->pref['eventpost_printlists'] > 1) && is_readable(e_PLUGIN."pdf/e107pdf.php");
|
||||
|
||||
if (!isset($ec_qs[0]) || !isset($ec_qs[1]))
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar - template file for list generator
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -19,6 +19,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Class with useful functions
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -39,6 +41,8 @@ include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_class.php');
|
||||
|
||||
class ecal_class
|
||||
{
|
||||
public $pref; // Calendar prefs - now in a separate DB record. Use same name as legacy array to simplify change
|
||||
|
||||
// Useful time/date variables - set up on creation, and available externally
|
||||
// (All the times and dates are consistent, being derived from $time_now, which is the time the constructor was
|
||||
// called - probably doesn't matter, but may help someone.
|
||||
@@ -97,14 +101,15 @@ class ecal_class
|
||||
|
||||
public function __construct()
|
||||
{ // Constructor
|
||||
global $pref;
|
||||
$this->pref = e107::pref('calendar_menu'); // retrieve calendar_menu pref array.
|
||||
|
||||
|
||||
// Get all the times in terms of 'clock time' - i.e. allowing for TZ, DST, etc
|
||||
// All the times in the DB should be 'absolute' - so if we compare with 'clock time' it should work out.
|
||||
$this->time_now = time();
|
||||
$this->site_timedate = $this->time_now + ($pref['time_offset'] * 3600); // Check sign of offset
|
||||
$this->site_timedate = $this->time_now + ($this->pref['time_offset'] * 3600); // Check sign of offset
|
||||
$this->user_timedate = $this->time_now + TIMEOFFSET;
|
||||
switch ($pref['eventpost_caltime'])
|
||||
switch ($this->pref['eventpost_caltime'])
|
||||
{
|
||||
case 1 :
|
||||
$this->cal_timedate = $this->site_timedate; // Site time
|
||||
@@ -121,29 +126,29 @@ class ecal_class
|
||||
|
||||
$this->max_cache_time = $this->site_date['minutes'] + 60*$this->site_date['hours'];
|
||||
|
||||
$this->cal_super = check_class($pref['eventpost_super']);
|
||||
$this->cal_super = check_class($this->pref['eventpost_super']);
|
||||
if ($this->cal_super) $this->extra_query = ""; else $this->extra_query = " AND find_in_set(event_cat_class,'".USERCLASS_LIST."')";
|
||||
|
||||
$this->max_recent_show = 0;
|
||||
if (isset($pref['eventpost_recentshow']))
|
||||
if (isset($this->pref['eventpost_recentshow']))
|
||||
{
|
||||
if ($pref['eventpost_recentshow'] == 'LV')
|
||||
if ($this->pref['eventpost_recentshow'] == 'LV')
|
||||
{
|
||||
if (USER) $this->max_recent_show = time() - USERLV;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->max_recent_show = 3600 * $pref['eventpost_recentshow'];
|
||||
$this->max_recent_show = 3600 * $this->pref['eventpost_recentshow'];
|
||||
}
|
||||
}
|
||||
|
||||
switch ($pref['eventpost_timedisplay'])
|
||||
switch ($this->pref['eventpost_timedisplay'])
|
||||
{
|
||||
case 2 :
|
||||
$this->time_format_string = "%I:%M %p"; // 12-hour display
|
||||
break;
|
||||
case 3 :
|
||||
$this->time_format_string = $pref['eventpost_timecustom']; // custom display
|
||||
$this->time_format_string = $this->pref['eventpost_timecustom']; // custom display
|
||||
if (isset($this->time_format_string)) break;
|
||||
case 4 :
|
||||
$this->time_format_string = "%H:%M"; // 24-hour display with separator
|
||||
@@ -152,8 +157,8 @@ class ecal_class
|
||||
$this->time_format_string = "%H%M"; // default to 24-hour display
|
||||
}
|
||||
|
||||
if (!isset($pref['eventpost_datedisplay'])) $pref['eventpost_datedisplay'] = 1;
|
||||
$temp = $pref['eventpost_datedisplay'];
|
||||
if (!isset($this->pref['eventpost_datedisplay'])) $this->pref['eventpost_datedisplay'] = 1;
|
||||
$temp = $this->pref['eventpost_datedisplay'];
|
||||
if ($temp >3)
|
||||
{
|
||||
$temp-= 3;
|
||||
@@ -182,11 +187,11 @@ class ecal_class
|
||||
$this->java_format_code = 1;
|
||||
}
|
||||
|
||||
if (!isset($pref['eventpost_dateevent'])) $pref['eventpost_dateevent'] = 1;
|
||||
switch ($pref['eventpost_dateevent'])
|
||||
if (!isset($this->pref['eventpost_dateevent'])) $this->pref['eventpost_dateevent'] = 1;
|
||||
switch ($this->pref['eventpost_dateevent'])
|
||||
{ // Event list date display
|
||||
case 0 :
|
||||
$this->event_date_format_string = $pref['eventpost_eventdatecustom'];
|
||||
$this->event_date_format_string = $this->pref['eventpost_eventdatecustom'];
|
||||
break;
|
||||
case 2 :
|
||||
$this->event_date_format_string = "%a %d %b %Y";
|
||||
@@ -198,11 +203,11 @@ class ecal_class
|
||||
$this->event_date_format_string = "%A %d %B %Y";
|
||||
}
|
||||
|
||||
if (!isset($pref['eventpost_datenext'])) $pref['eventpost_datenext'] = 1;
|
||||
switch ($pref['eventpost_datenext'])
|
||||
if (!isset($this->pref['eventpost_datenext'])) $this->pref['eventpost_datenext'] = 1;
|
||||
switch ($this->pref['eventpost_datenext'])
|
||||
{ // Forthcoming event date display
|
||||
case 0 :
|
||||
$this->next_date_format_string = $pref['eventpost_nextdatecustom'];
|
||||
$this->next_date_format_string = $this->pref['eventpost_nextdatecustom'];
|
||||
break;
|
||||
case 2 :
|
||||
$this->next_date_format_string = "%d %b";
|
||||
@@ -217,7 +222,7 @@ class ecal_class
|
||||
$this->next_date_format_string = "%d %B";
|
||||
}
|
||||
|
||||
switch (varset($pref['eventpost_weekstart'],'sun'))
|
||||
switch (varset($this->pref['eventpost_weekstart'],'sun'))
|
||||
{
|
||||
case 'sun' : $this->ec_first_day_of_week = 0; break;
|
||||
case 'mon' : $this->ec_first_day_of_week = 1; break;
|
||||
@@ -228,40 +233,55 @@ class ecal_class
|
||||
case 4 :
|
||||
case 5 :
|
||||
case 6 :
|
||||
$this->ec_first_day_of_week = $pref['eventpost_weekstart']; break;
|
||||
$this->ec_first_day_of_week = $this->pref['eventpost_weekstart']; break;
|
||||
default :
|
||||
$this->ec_first_day_of_week = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a time string from a time stamp, formatted as 24-hour, 12-hour or custom as set in prefs
|
||||
*/
|
||||
public function time_string($convtime)
|
||||
{ // Returns a time string from a time stamp, formatted as 24-hour, 12-hour or custom as set in prefs
|
||||
{
|
||||
return gmstrftime($this->time_format_string, $convtime);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a date string from a date stamp, formatted for display in event list
|
||||
*/
|
||||
public function event_date_string($convdate)
|
||||
{ // Returns a date string from a date stamp, formatted for display in event list
|
||||
{
|
||||
return gmstrftime($this->event_date_format_string,$convdate);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a date string from a date stamp, formatted for display in forthcoming event menu
|
||||
*/
|
||||
public function next_date_string($convdate)
|
||||
{ // Returns a date string from a date stamp, formatted for display in forthcoming event menu
|
||||
{
|
||||
return gmstrftime($this->next_date_format_string,$convdate);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a date as dd-mm-yyyy or yyyy-mm-dd according to prefs (for event entry)
|
||||
*/
|
||||
public function full_date($convdate)
|
||||
{ // Returns a date as dd-mm-yyyy or yyyy-mm-dd according to prefs (for event entry)
|
||||
{
|
||||
return gmdate($this->cal_format_string, $convdate);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Turns a date as entered in the calendar into a time stamp (for event entry)
|
||||
*/
|
||||
public function make_date($new_hour, $new_minute, $date_string)
|
||||
{ // Turns a date as entered in the calendar into a time stamp (for event entry)
|
||||
{
|
||||
$tmp = explode($this->date_separator, $date_string);
|
||||
switch ($this->java_format_code)
|
||||
{
|
||||
@@ -275,23 +295,37 @@ class ecal_class
|
||||
}
|
||||
|
||||
|
||||
// Return day of week string relative to the start of the week
|
||||
|
||||
/**
|
||||
* Return day of week string relative to the start of the week
|
||||
*/
|
||||
public function day_offset_string($doff)
|
||||
{
|
||||
return $this->days[($doff+$this->ec_first_day_of_week) % 7];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Single entry point for all calendar-related logging.
|
||||
*
|
||||
* Also triggers a 'notify' event:
|
||||
* 'ecalnew' when single or multiple events added
|
||||
* 'ecaledit' when an event changed or deleted
|
||||
*
|
||||
* @param integer $event_type - type of event being logged:
|
||||
* 1 - add event
|
||||
* 2 - edit event
|
||||
* 3 - delete event
|
||||
* 4 - Bulk delete
|
||||
* 5 - add multiple events
|
||||
* @param string $event_title - included in logged message
|
||||
* @param string $event_string - included in logged message
|
||||
* @param integer $event_start - start time of event where appropriate
|
||||
*
|
||||
* @return - none
|
||||
*/
|
||||
public function cal_log($event_type, $event_title = '', $event_string='', $event_start=0)
|
||||
{ // All calendar-related logging intentionally passed through a single point to maintain control
|
||||
// (so we could also add other info if we wanted)
|
||||
// Event types:
|
||||
// 1 - add event
|
||||
// 2 - edit event
|
||||
// 3 - delete event
|
||||
// 4 - Bulk delete
|
||||
// 5 - add multiple events
|
||||
global $pref;
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
|
||||
$log_titles = array( '1' => 'EC_ADM_01',
|
||||
@@ -328,26 +362,29 @@ class ecal_class
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($pref['eventpost_adminlog'])
|
||||
switch ($this->pref['eventpost_adminlog'])
|
||||
{
|
||||
case 1 : if ($event_type == '1') return;
|
||||
case 2 : break; // Continue
|
||||
default : return; // Invalid or undefined option
|
||||
}
|
||||
$log_detail = array( '1' => 'Event Calendar - add event '.strftime("%d-%B-%Y",$event_start),
|
||||
'2' => 'Event Calendar - edit event '.strftime("%d-%B-%Y",$event_start),
|
||||
'3' => 'Event Calendar - delete event '.strftime("%d-%B-%Y",$event_start),
|
||||
'4' => 'Event Calendar - Bulk Delete',
|
||||
'5' => 'Event Calendar - multiple add '.strftime("%d-%B-%Y",$event_start)
|
||||
$log_detail = array( '1' => EC_ADLAN_A221.strftime("%d-%B-%Y",$event_start), // Add event
|
||||
'2' => EC_ADLAN_A222.strftime("%d-%B-%Y",$event_start), // Edit event
|
||||
'3' => EC_ADLAN_A223.strftime("%d-%B-%Y",$event_start), // Delete event
|
||||
'4' => EC_ADLAN_A224, // Bulk delete events
|
||||
'5' => EC_ADLAN_A225.strftime("%d-%B-%Y",$event_start) // Multiple add events
|
||||
);
|
||||
$e107->admin_log->log_event($log_titles[$event_type],$event_title." \n".$log_detail[$event_type]."\n".$event_string,'');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get text related to a numeric event category
|
||||
*/
|
||||
function get_category_text($ev_cat)
|
||||
{
|
||||
global $sql;
|
||||
$sql = e107::getDb();
|
||||
if (!isset($this->cat_text_cache[$ev_cat]))
|
||||
{
|
||||
$sql->db_Select('event_cat','event_cat_name',"event_cat_id='{$ev_cat}'");
|
||||
@@ -358,13 +395,19 @@ class ecal_class
|
||||
}
|
||||
|
||||
|
||||
// Implements a version of getdate that expects a GMT date and doesn't do TZ/DST adjustments
|
||||
// time() -date('Z') gives the correction to 'null out' the TZ and DST adjustments that getdate() does
|
||||
|
||||
|
||||
/**
|
||||
* Implements a version of getdate that expects a GMT date and doesn't do TZ/DST adjustments
|
||||
* time() -date('Z') gives the correction to 'null out' the TZ and DST adjustments that getdate() does
|
||||
*/
|
||||
function gmgetdate($date)
|
||||
{
|
||||
return getdate($date-date('Z'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
// Recurring event handling
|
||||
//------------------------------------------------
|
||||
@@ -493,7 +536,6 @@ class ecal_class
|
||||
$tstamp = gmmktime($event['hours'],$event['minutes'],$event['seconds'],$event['mon'],$event['mday'],$event['year']);
|
||||
if ($interval_type >= 100)
|
||||
{ // $tstamp has the first of the month
|
||||
// $dofwk = gmdate('w',$tstamp);
|
||||
$day_diff = $day_number - gmdate('w',$tstamp);
|
||||
if ($day_diff <0) $day_diff += 7;
|
||||
$day_diff += (7 * $week_offset) - 7;
|
||||
@@ -518,7 +560,10 @@ class ecal_class
|
||||
}
|
||||
|
||||
|
||||
// Generate comma separated list of fields for table, with optional alias prefix.
|
||||
|
||||
/**
|
||||
* Generate comma separated list of fields for table, with optional alias prefix.
|
||||
*/
|
||||
function gen_field_list($table, $list, $must_have = '')
|
||||
{
|
||||
if ($list == '*') return $table ? $table.".*" : '*';
|
||||
@@ -547,6 +592,8 @@ class ecal_class
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function to return all events between a given start and end date
|
||||
* Potential option to hook in other routines here later
|
||||
@@ -563,7 +610,7 @@ class ecal_class
|
||||
*/
|
||||
function get_events($start_time, $end_time, $start_only=FALSE, $cat_filter=0, $inc_recur=FALSE, $event_fields='*', $cat_fields='*')
|
||||
{
|
||||
global $sql;
|
||||
$sql = e107::getDb();
|
||||
|
||||
$ret = array();
|
||||
if ($cat_filter === FALSE) return $ret;
|
||||
@@ -617,6 +664,8 @@ class ecal_class
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function to return up to a maximum number of events between a given start and end date
|
||||
* It always uses the event start date only
|
||||
@@ -636,7 +685,7 @@ class ecal_class
|
||||
*/
|
||||
function get_n_events($num_event, $start_time, $end_time, $cat_filter='*', $inc_recur=FALSE, $event_fields='*', $cat_fields='*')
|
||||
{
|
||||
global $sql;
|
||||
$sql = e107::getDb();
|
||||
|
||||
$ret = array();
|
||||
if ($cat_filter === FALSE) return $ret; // Empty category
|
||||
@@ -733,6 +782,8 @@ class ecal_class
|
||||
} // End - function get_n_events()
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get text relating to recurring item
|
||||
* @param int numeric code for type of recurring item
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Calender plugin - event listing and event entry
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -60,17 +62,13 @@ include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
define('PAGE_NAME', EC_LAN_80);
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
global $ecal_class;
|
||||
if (!is_object($ecal_class)) $ecal_class = new ecal_class;
|
||||
$cal_super = $ecal_class->cal_super;
|
||||
|
||||
|
||||
//e107::getScParser();
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
$calSc = new event_calendar_shortcodes();
|
||||
|
||||
// require_once(e_HANDLER.'calendar/calendar_class.ph_');
|
||||
// $cal = new DHTML_Calendar(true);
|
||||
|
||||
$cat_filter = intval(varset($_POST['event_cat_ids'],-1));
|
||||
if ($cat_filter == -1) $cat_filter = '*';
|
||||
@@ -97,7 +95,7 @@ $ev_fields = array(
|
||||
//--------------------------------------
|
||||
// Event to add or update
|
||||
//--------------------------------------
|
||||
if ((isset($_POST['ne_insert']) || isset($_POST['ne_update'])) && ($cal_super || check_class($pref['eventpost_admin'])))
|
||||
if ((isset($_POST['ne_insert']) || isset($_POST['ne_update'])) && ($cal_super || check_class($ecal_class->pref['eventpost_admin'])))
|
||||
{
|
||||
$ev_start = $ecal_class->make_date($_POST['ne_hour'], $_POST['ne_minute'],$_POST['start_date']);
|
||||
if (($_POST['ne_event'] == '') || !isset($_POST['qs']))
|
||||
@@ -226,7 +224,7 @@ if ($mult_count > 1)
|
||||
<tr><td class='forumheader3'>".EC_LAN_57."</td><td class='forumheader3'>".$ev_event."</td></tr>";
|
||||
|
||||
// Only display for forum thread/link if required. No point if not wanted
|
||||
if (isset($pref['eventpost_forum']) && $pref['eventpost_forum'] == 1)
|
||||
if (isset($ecal_class->pref['eventpost_forum']) && $ecal_class->pref['eventpost_forum'] == 1)
|
||||
{
|
||||
$text .= "<tr><td class='forumheader3'>".EC_LAN_58." </td><td class='forumheader3'>".$ev_thread."</td></tr>";
|
||||
}
|
||||
@@ -286,7 +284,7 @@ $month = $dateArray['mon']; // Number of month being shown
|
||||
$year = $dateArray['year']; // Number of year being shown
|
||||
|
||||
|
||||
if ($cal_super || check_class($pref['eventpost_admin']))
|
||||
if ($cal_super || check_class($ecal_class->pref['eventpost_admin']))
|
||||
{ // Bits relating to 'delete event', and generation of multiple events
|
||||
if ($action == 'mc')
|
||||
{
|
||||
@@ -398,48 +396,37 @@ function merge_date_time($date, $time)
|
||||
//-------------------------------------
|
||||
if ($action == 'ne' || $action == 'ed')
|
||||
{
|
||||
if ($ecal_class->cal_super || check_class($pref['eventpost_admin']))
|
||||
if ($ecal_class->cal_super || check_class($ecal_class->pref['eventpost_admin']))
|
||||
{
|
||||
function make_calendar($boxname, $boxvalue)
|
||||
{
|
||||
global $ecal_class;
|
||||
// global $cal;
|
||||
$frm = e107::getForm();
|
||||
|
||||
unset($cal_options);
|
||||
unset($cal_attrib);
|
||||
/*
|
||||
DHTML Calendar is deprecated in v2+
|
||||
$cal_options['firstDay'] = $ecal_class->ec_first_day_of_week;
|
||||
$cal_options['showsTime'] = false;
|
||||
$cal_options['showOthers'] = true;
|
||||
$cal_options['weekNumbers'] = false;
|
||||
$cal_options['ifFormat'] = $ecal_class->dcal_format_string;
|
||||
$cal_attrib['class'] = "tbox";
|
||||
$cal_attrib['size'] = "12";
|
||||
$cal_attrib['name'] = $boxname;
|
||||
$cal_attrib['value'] = $boxvalue;
|
||||
*/
|
||||
|
||||
$opt = array('size' => 12);
|
||||
$opt = array(
|
||||
'type' => 'date',
|
||||
'dateformat' => $ecal_class->dcal_format_string,
|
||||
'firstDay' => $ecal_class->ec_first_day_of_week, // 0 = Sunday. @TODO: Can't change firstday ATM!
|
||||
'size' => 12
|
||||
);
|
||||
return $frm->datepicker($boxname,$boxvalue,$opt);
|
||||
// return $cal->make_input_field($cal_options, $cal_attrib);
|
||||
}
|
||||
|
||||
|
||||
function make_hourmin($boxname,$cur_hour,$cur_minute)
|
||||
{
|
||||
global $pref;
|
||||
if (isset($pref['eventpost_fivemins'])) $incval = 5; else $incval = 1;
|
||||
global $ecal_class; // @TODO:
|
||||
if (isset($ecal_class->pref['eventpost_fivemins'])) $incval = 5; else $incval = 1;
|
||||
// @TODO: Need to restrict width of select box
|
||||
$retval = " <select name='{$boxname}hour' id='{$boxname}hour' class='tbox'>\n";
|
||||
for($count = "00"; $count <= "23"; $count++)
|
||||
for($count = '00'; $count <= '23'; $count++)
|
||||
{
|
||||
$val = sprintf("%02d", $count);
|
||||
$retval .= "<option value='{$val}' ".(isset($cur_hour) && $count == $cur_hour ? "selected='selected'" :"")." >".$val."</option>\n";
|
||||
}
|
||||
$retval .= "</select>\n
|
||||
<select name='{$boxname}minute' class='tbox'>\n";
|
||||
for($count = "00"; $count <= "59"; $count+= $incval)
|
||||
for($count = '00'; $count <= '59'; $count+= $incval)
|
||||
{
|
||||
$val = sprintf("%02d", $count);
|
||||
$retval .= "<option ".(isset($cur_minute) && $count == $cur_minute ? "selected='selected'" :"")." value='{$val}'>".$val."</option>\n";
|
||||
@@ -450,7 +437,7 @@ if ($action == 'ne' || $action == 'ed')
|
||||
|
||||
function recur_select($curval)
|
||||
{
|
||||
global $ecal_class;
|
||||
global $ecal_class; // @TODO:
|
||||
while ($curval > 150) { $curval -= 100; } // Could have values up to about 406
|
||||
$ret = "<select class='tbox' name='ec_recur_type' onchange=\"proc_recur(this.value);\">";
|
||||
foreach ($ecal_class->recur_type as $k => $v)
|
||||
@@ -465,7 +452,7 @@ if ($action == 'ne' || $action == 'ed')
|
||||
|
||||
function recur_week_select($curval)
|
||||
{
|
||||
global $ecal_class;
|
||||
global $ecal_class; // @TODO:
|
||||
$disp = $curval < 100 ? " style='display:none;'" : "";
|
||||
$curval -= intval($curval % 10); // Should make it an exact multiple of 100
|
||||
$ret = "<span id='rec_week_sel'{$disp}><select class='tbox' name='ec_recur_week'>";
|
||||
@@ -676,7 +663,7 @@ if ($action == 'ne' || $action == 'ed')
|
||||
$text .= "</select>
|
||||
</td></tr>";
|
||||
|
||||
switch ($pref['eventpost_editmode'])
|
||||
switch ($ecal_class->pref['eventpost_editmode'])
|
||||
{
|
||||
case 1 :
|
||||
$insertjs = "rows='15' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'";
|
||||
@@ -694,7 +681,7 @@ if ($action == 'ne' || $action == 'ed')
|
||||
|
||||
<tr><td class='forumheader3'>".EC_LAN_57." *</td><td class='forumheader3'>
|
||||
<textarea class='tbox' id='ne_event' name='ne_event' cols='59' style='width:95%' {$insertjs}>".(isset($ne_event) ? $ne_event : "")."</textarea>";
|
||||
if ($pref['eventpost_editmode'] == 1)
|
||||
if ($ecal_class->pref['eventpost_editmode'] == 1)
|
||||
{
|
||||
// Show help
|
||||
require_once(e_HANDLER."ren_help.php");
|
||||
@@ -704,7 +691,7 @@ if ($action == 'ne' || $action == 'ed')
|
||||
$text .= "</td></tr>";
|
||||
|
||||
// Only display for forum thread/link if required. No point if not wanted
|
||||
if (isset($pref['eventpost_forum']) && $pref['eventpost_forum'] == 1)
|
||||
if (isset($ecal_class->pref['eventpost_forum']) && $ecal_class->pref['eventpost_forum'] == 1)
|
||||
{
|
||||
$text .= "
|
||||
<tr><td class='forumheader3'>".EC_LAN_58." </td><td class='forumheader3'>
|
||||
|
@@ -2,11 +2,11 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 $
|
||||
* $Revision$
|
||||
@@ -254,6 +254,8 @@ define('EC_LAN_178', "Accept Entries");
|
||||
define('EC_LAN_179', "Confirmation of multiple event entry");
|
||||
define('EC_LAN_180', 'RECORDS NOT SAVED - DB UPDATE ERROR');
|
||||
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_183', 'Create printable lists of events');
|
||||
|
||||
define('EC_LAN_VIEWCALENDAR', 'View Calendar');
|
||||
define('EC_LAN_VIEWALLEVENTS', 'View all events');
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -40,169 +40,8 @@ define('EC_LAN_22', "Thu");
|
||||
define('EC_LAN_23', "Fri");
|
||||
define('EC_LAN_24', "Sat");
|
||||
define('EC_LAN_25', "Sun");
|
||||
/*
|
||||
Following are LANs from user pages - probably not needed in ADMIN
|
||||
define('EC_LAN_26', "Events this Month");
|
||||
define('EC_LAN_27', "No events for this month.");
|
||||
define('EC_LAN_28', "Enter New Event");
|
||||
define('EC_LAN_29', "When:");
|
||||
define('EC_LAN_30', "Category:");
|
||||
define('EC_LAN_31', "Posted by:");
|
||||
define('EC_LAN_32', "Location:");
|
||||
define('EC_LAN_33', "Contact:");
|
||||
define('EC_LAN_34', "Jump to");
|
||||
define('EC_LAN_35', "Edit");
|
||||
define('EC_LAN_36', "Delete");
|
||||
define('EC_LAN_37', "None Listed.");
|
||||
define('EC_LAN_38', "Not specified");
|
||||
define('EC_LAN_39', "Click here for more information");
|
||||
define('EC_LAN_40', "Current Month");
|
||||
define('EC_LAN_41', "Total -NUM- individual events created");
|
||||
define('EC_LAN_42', "Event cannot end before it starts.");
|
||||
define('EC_LAN_43', "You left required field(s) blank.");
|
||||
define('EC_LAN_44', "New event created and entered into database.");
|
||||
define('EC_LAN_45', "Event updated in database.");
|
||||
define('EC_LAN_46', "Confirm Delete Event");
|
||||
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_49', "Cancel");
|
||||
define('EC_LAN_50', "Confirm Delete");
|
||||
define('EC_LAN_51', "Event deleted.");
|
||||
define('EC_LAN_52', "Event Category:");
|
||||
define('EC_LAN_53', "Create new category?:");
|
||||
define('EC_LAN_54', "Name:");
|
||||
define('EC_LAN_55', "Icon:");
|
||||
define('EC_LAN_56', "Create");
|
||||
define('EC_LAN_57', "Event:");
|
||||
define('EC_LAN_58', "source info URL:");
|
||||
define('EC_LAN_59', "Contact email:");
|
||||
define('EC_LAN_60', "Update Event");
|
||||
define('EC_LAN_61', "Go");
|
||||
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_64', "Check for an all-day event");
|
||||
define('EC_LAN_65', "Recurring:");
|
||||
define('EC_LAN_66', "Edit Event");
|
||||
define('EC_LAN_67', "Start:");
|
||||
define('EC_LAN_68', "All day event:");
|
||||
define('EC_LAN_69', "Ends:");
|
||||
define('EC_LAN_70', "Event Title:");
|
||||
define('EC_LAN_71', "Event Time:");
|
||||
define('EC_LAN_72', "Event Date:");
|
||||
define('EC_LAN_73', "End:");
|
||||
define('EC_LAN_74', "View Category");
|
||||
define('EC_LAN_76', "Events can be added by:");
|
||||
define('EC_LAN_77', "Update Settings");
|
||||
define('EC_LAN_78', "Calendar Settings");
|
||||
define('EC_LAN_79', "Calendar View");
|
||||
define('EC_LAN_80', "Event List");
|
||||
define('EC_LAN_81', "Configure Event Calendar");
|
||||
define('EC_LAN_83', "Calendar");
|
||||
define('EC_LAN_84', " from ");
|
||||
define('EC_LAN_85', " until ");
|
||||
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_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_90', "Choose");
|
||||
define('EC_LAN_91', "Admin must define first");
|
||||
define('EC_LAN_92', "View Category");
|
||||
define('EC_LAN_93', "View Events List");
|
||||
define('EC_LAN_94', "Enter New Event");
|
||||
define('EC_LAN_95', "Today");
|
||||
define('EC_LAN_96', "View Calendar");
|
||||
define('EC_LAN_97', "All");
|
||||
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_100', "Invalid Category Selection");
|
||||
//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_103', "On new event entry form.");
|
||||
define('EC_LAN_104', "Calendar Administrator Class");
|
||||
define('EC_LAN_105', "* Required Field");
|
||||
define('EC_LAN_106', "Events");
|
||||
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_109', "Unable to delete this event.");
|
||||
define('EC_LAN_110', "Event Number ");
|
||||
define('EC_LAN_111', "All the events on ");
|
||||
define('EC_LAN_112', "All the Events in ");
|
||||
define('EC_LAN_113', "Event form already submitted.");
|
||||
define('EC_LAN_114', "Week starts with:");
|
||||
define('EC_LAN_115', "Sunday");
|
||||
define('EC_LAN_116', "Monday");
|
||||
define('EC_LAN_117', "Length of daynames (characters)");
|
||||
define('EC_LAN_118', "Date format in calendar header:");
|
||||
define('EC_LAN_119', "month/year");
|
||||
define('EC_LAN_120', "year/month");
|
||||
define('EC_LAN_121', "Show Calendar");
|
||||
|
||||
define('EC_LAN_123', "Subscriptions");
|
||||
define('EC_LAN_124', "Calendar Subscriptions");
|
||||
define('EC_LAN_125', "Categories available for subscription");
|
||||
define('EC_LAN_126', "Subscribed");
|
||||
define('EC_LAN_127', "Category");
|
||||
define('EC_LAN_128', "No categories available to subscribe to");
|
||||
define('EC_LAN_129', "Update");
|
||||
define('EC_LAN_130', "Subscriptions updated");
|
||||
define('EC_LAN_131', "Return");
|
||||
define('EC_LAN_132', "Expand details");
|
||||
define('EC_LAN_133', "[read more]");
|
||||
define('EC_LAN_134', "You have to provide a category name");
|
||||
define('EC_LAN_135', "Event");
|
||||
define('EC_LAN_136', "Category Description");
|
||||
define('EC_LAN_137', "Future Events");
|
||||
|
||||
define('EC_LAN_140', "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_143', "Facility not available");
|
||||
define('EC_LAN_144', " at ");
|
||||
|
||||
define('EC_LAN_145', "You must specify a category for the event");
|
||||
define('EC_LAN_146', "Advance notice of calendar event");
|
||||
define('EC_LAN_147', "Calendar event today or tomorrow");
|
||||
define('EC_LAN_148', "No events in specified date range");
|
||||
define('EC_LAN_149', "Invalid date format");
|
||||
define('EC_LAN_150', "Enter start and end date for list");
|
||||
define('EC_LAN_151', "End date after start date");
|
||||
define('EC_LAN_152', "Maximum one year's events");
|
||||
define('EC_LAN_153', "Start Date (first day of): ");
|
||||
define('EC_LAN_154', "End Date (last day of): ");
|
||||
define('EC_LAN_155', "Category: ");
|
||||
define('EC_LAN_156', "Create List");
|
||||
define('EC_LAN_157', "Layout Options:");
|
||||
define('EC_LAN_158', "Output: ");
|
||||
define('EC_LAN_159', "Display ");
|
||||
define('EC_LAN_160', "Print ");
|
||||
define('EC_LAN_161', "PDF ");
|
||||
define('EC_LAN_162', "Print this page");
|
||||
*/
|
||||
define('EC_LAN_163', "Event Listing");
|
||||
/*
|
||||
define('EC_LAN_164', "Printable Lists");
|
||||
define('EC_LAN_165', "Default Listing");
|
||||
define('EC_LAN_166', "Tabular List no lines");
|
||||
define('EC_LAN_167', "Tabular List with lines");
|
||||
define('EC_LAN_168', "From: ");
|
||||
define('EC_LAN_169', "To: ");
|
||||
define('EC_LAN_170', "Printed on: ");
|
||||
define('EC_LAN_171', "List including category");
|
||||
define('EC_LAN_172', "Event Categories: ");
|
||||
define('EC_LAN_173', "First event starts: ");
|
||||
define('EC_LAN_174', "Last event ends: ");
|
||||
define('EC_LAN_175', "All Day");
|
||||
define('EC_LAN_176', "Recurring pattern: ");
|
||||
define('EC_LAN_177', "Cancel Entry");
|
||||
define('EC_LAN_178', "Accept Entries");
|
||||
define('EC_LAN_179', "Confirmation of multiple event entry");
|
||||
define('EC_LAN_180', " RECORDS NOT SAVED - DB UPDATE ERROR");
|
||||
|
||||
define('EC_LAN_VIEWCALENDAR', "View Calendar");
|
||||
define('EC_LAN_VIEWALLEVENTS', "View all events");
|
||||
define('EC_LAN_ALLEVENTS', "All events");
|
||||
*/
|
||||
// If any 'EC_LAN_xxx' not found, look in language file for user pages.
|
||||
|
||||
define('EC_ADLAN_A09', 'Main Calendar');
|
||||
define('EC_ADLAN_A10', "Configuration");
|
||||
@@ -360,9 +199,9 @@ 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_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.');
|
||||
@@ -380,16 +219,10 @@ 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");
|
||||
*/
|
||||
define('EC_ADLAN_A221', 'Event Calendar - add event ');
|
||||
define('EC_ADLAN_A222', 'Event Calendar - edit event ');
|
||||
define('EC_ADLAN_A223', 'Event Calendar - delete event ');
|
||||
define('EC_ADLAN_A224', 'Event Calendar - Bulk Delete');
|
||||
define('EC_ADLAN_A225', 'Event Calendar - multiple add ');
|
||||
define('EC_ADLAN_A226', '');
|
||||
define('EC_ADLAN_A227', '');
|
||||
|
@@ -2,11 +2,11 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 $
|
||||
* $Revision$
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* 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
|
||||
* @subpackage event_calendar
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -14,6 +14,17 @@
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - installation
|
||||
*
|
||||
* @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.");
|
||||
@@ -25,3 +36,6 @@ define('EC_ADINST_LAN_04', 'To activate please go to your menus screen and selec
|
||||
define('EC_ADINST_LAN_06', 'Default category entered');
|
||||
define('EC_ADINST_LAN_07', 'Error adding default category');
|
||||
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');
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -14,6 +14,17 @@
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - admin log titles
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
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');
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -15,6 +15,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - mailer
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
define('LAN_EC_MAIL_01', 'Event Calendar Subscribers');
|
||||
define('LAN_EC_MAIL_02', 'No categories defined, or database error');
|
||||
define('LAN_EC_MAIL_03', 'Category: ');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
define("CM_SCH_LAN_1", "Calendar");
|
||||
define('CM_SCH_LAN_1', 'Calendar');
|
||||
|
||||
?>
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Forthcoming events menu handler for event calendar
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -57,14 +59,13 @@ 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);
|
||||
$days_ahead = varset($pref['eventpost_daysforward'],30); // Number of days ahead to go
|
||||
$show_count = varset($pref['eventpost_numevents'],3); // Number of events to show
|
||||
$show_recurring = varset($pref['eventpost_checkrecur'],1); // Zero to exclude recurring events
|
||||
$link_in_heading = varset($pref['eventpost_linkheader'],0); // Zero for simple heading, 1 to have clickable link
|
||||
$menu_title = varset($this->ecal_class->pref['eventpost_menuheading'],EC_LAN_140);
|
||||
$days_ahead = varset($this->ecal_class->pref['eventpost_daysforward'],30); // Number of days ahead to go
|
||||
$show_count = varset($this->ecal_class->pref['eventpost_numevents'],3); // Number of events to show
|
||||
$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;
|
||||
@@ -75,7 +76,7 @@ $cal_text = '';
|
||||
|
||||
$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,
|
||||
$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);
|
||||
@@ -91,7 +92,7 @@ if ($cal_totev > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($pref['eventpost_fe_hideifnone']) return '';
|
||||
if ($this->ecal_class->pref['eventpost_fe_hideifnone']) return '';
|
||||
$cal_text.= EC_LAN_141;
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
<pref name="eventpost_showmouseover">0</pref>
|
||||
<pref name="eventpost_showeventcount">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_lenday">1</pref>
|
||||
<pref name="eventpost_dateformat">1</pref>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -14,20 +14,32 @@
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Search parser
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$return_fields = 'event_id, event_start, event_title, event_location, event_details';
|
||||
$search_fields = array('event_title', 'event_location', 'event_details');
|
||||
$weights = array('1.2', '0.6', '0.6');
|
||||
$no_results = LAN_198;
|
||||
$where = "";
|
||||
$where = '';
|
||||
$order = array('event_start' => DESC);
|
||||
|
||||
$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) {
|
||||
function search_events($row)
|
||||
{
|
||||
global $con;
|
||||
$res['link'] = e_PLUGIN."calendar_menu/event.php?".time().".event.".$row['event_id'];
|
||||
$res['title'] = $row['event_title'];
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* 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
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - mail subscription to events notification
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -31,13 +33,16 @@ if (!$e107->isInstalled('calendar_menu'))
|
||||
exit();
|
||||
}
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
|
||||
if (!is_object($ecal_class)) $ecal_class = new ecal_class;
|
||||
|
||||
include_lan(e_PLUGIN .'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
global $pref;
|
||||
define('PAGE_NAME', EC_LAN_80);
|
||||
require_once(HEADERF);
|
||||
|
||||
|
||||
if ((USER) && (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1')))
|
||||
if ((USER) && (isset($ecal_class->pref['eventpost_asubs']) && ($ecal_class->pref['eventpost_asubs'] == '1')))
|
||||
{
|
||||
$cal_db = new db; // Probably best to keep this
|
||||
|
||||
@@ -66,6 +71,7 @@ if ((USER) && (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '
|
||||
<table class='fborder' width='97%'>
|
||||
<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>";
|
||||
|
||||
// Get list of currently subscribed
|
||||
$cal_db->db_Select('event_subs', 'event_cat', "where event_userid='" . USERID . "'", "nowhere");
|
||||
while ($cal_s = $cal_db->db_Fetch())
|
||||
@@ -106,7 +112,7 @@ if ((USER) && (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1'))
|
||||
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
|
||||
|
Reference in New Issue
Block a user