1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Small changes to reflect changes elsewhere

This commit is contained in:
e107steved
2009-02-01 20:54:08 +00:00
parent 1afc7a612c
commit a5056e0ef6
4 changed files with 56 additions and 54 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar.php,v $
| $Revision: 1.2 $ | $Revision: 1.3 $
| $Date: 2007-07-13 19:37:52 $ | $Date: 2009-02-01 20:54:08 $
| $Author: e107steved $ | $Author: e107steved $
| |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
@@ -20,38 +20,38 @@
require_once("../../class2.php"); require_once("../../class2.php");
if (!isset($pref['plug_installed']['calendar_menu'])) header("Location: ".e_BASE."index.php"); if (!isset($pref['plug_installed']['calendar_menu'])) header('Location: '.e_BASE.'index.php');
require_once(e_PLUGIN."calendar_menu/calendar_shortcodes.php"); require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
if (isset($_POST['viewallevents'])) if (isset($_POST['viewallevents']))
{ {
Header("Location: " . e_PLUGIN . "calendar_menu/event.php?" . $_POST['enter_new_val']); Header("Location: " . e_PLUGIN . 'calendar_menu/event.php?' . $_POST['enter_new_val']);
} }
if (isset($_POST['doit'])) if (isset($_POST['doit']))
{ {
Header("Location: " . e_PLUGIN . "calendar_menu/event.php?ne." . $_POST['enter_new_val']); Header("Location: " . e_PLUGIN . 'calendar_menu/event.php?ne.' . $_POST['enter_new_val']);
} }
if (isset($_POST['subs'])) if (isset($_POST['subs']))
{ {
Header("Location: " . e_PLUGIN . "calendar_menu/subscribe.php"); Header("Location: " . e_PLUGIN . 'calendar_menu/subscribe.php');
} }
if (isset($_POST['printlists'])) if (isset($_POST['printlists']))
{ {
Header("Location: " . e_PLUGIN . "calendar_menu/ec_pf_page.php"); Header("Location: " . e_PLUGIN . 'calendar_menu/ec_pf_page.php');
} }
include_lan(e_PLUGIN."calendar_menu/languages/".e_LANGUAGE.".php"); include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
define("PAGE_NAME", EC_LAN_121); define("PAGE_NAME", EC_LAN_121);
require_once('ecal_class.php'); require_once('ecal_class.php');
$ecal_class = new ecal_class; $ecal_class = new ecal_class;
if (is_readable(THEME."calendar_template.php")) if (is_readable(THEME.'calendar_template.php'))
{ {
require(THEME."calendar_template.php"); require(THEME.'calendar_template.php');
} }
else else
{ {
require(e_PLUGIN."calendar_menu/calendar_template.php"); require(e_PLUGIN.'calendar_menu/calendar_template.php');
} }
@@ -63,11 +63,11 @@ require_once(HEADERF);
$qs = explode(".", e_QUERY); $qs = explode(".", e_QUERY);
if(varset($qs[0],'') == "") if(varset($qs[0],'') == "")
{ // Show current month { // Show current month
$datearray = $ecal_class->cal_date; $datearray = $ecal_class->cal_date;
} }
else else
{ // Get date from query { // Get date from query
$datearray = getdate($qs[0]); $datearray = getdate($qs[0]);
} }
// Note: A lot of the following variables are used within the shortcodes // Note: A lot of the following variables are used within the shortcodes
@@ -79,8 +79,8 @@ $prevmonth = $month-1;
$prevyear = $year; $prevyear = $year;
if ($prevmonth == 0) if ($prevmonth == 0)
{ {
$prevmonth = 12; $prevmonth = 12;
$prevyear = $year-1; $prevyear = $year-1;
} }
$previous = mktime(0, 0, 0, $prevmonth, 1, $prevyear); // Used by nav $previous = mktime(0, 0, 0, $prevmonth, 1, $prevyear); // Used by nav
@@ -88,8 +88,8 @@ $nextmonth = $month + 1;
$nextyear = $year; $nextyear = $year;
if ($nextmonth == 13) if ($nextmonth == 13)
{ {
$nextmonth = 1; $nextmonth = 1;
$nextyear = $year + 1; $nextyear = $year + 1;
} }
$next = mktime(0, 0, 0, $nextmonth, 1, $nextyear); $next = mktime(0, 0, 0, $nextmonth, 1, $nextyear);
$py = $year-1; // Number of previous year for nav $py = $year-1; // Number of previous year for nav

View File

@@ -11,24 +11,26 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_menu.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_menu.php,v $
| $Revision: 1.3 $ | $Revision: 1.4 $
| $Date: 2007-09-04 21:09:47 $ | $Date: 2009-02-01 20:54:08 $
| $Author: e107steved $ | $Author: e107steved $
| |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
$ecal_dir = e_PLUGIN . "calendar_menu/"; $ecal_dir = e_PLUGIN.'calendar_menu/';
require_once($ecal_dir.'ecal_class.php'); require_once($ecal_dir.'ecal_class.php');
if (!isset($ecal_class) || !is_object($ecal_class)) $ecal_class = new ecal_class; if (!isset($ecal_class) || !is_object($ecal_class)) $ecal_class = new ecal_class;
$cache_tag = "nq_event_cal_cal"; $cache_tag = 'nq_event_cal_cal';
global $e107;
// See if the page is already in the cache // See if the page is already in the cache
if($cacheData = $e107cache->retrieve($cache_tag, $ecal_class->max_cache_time)) if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
{ {
echo $cacheData; echo $cacheData;
return; return;
} }
include_lan($ecal_dir."languages/".e_LANGUAGE.".php"); include_lan($ecal_dir.'languages/'.e_LANGUAGE.'.php');
global $ecal_dir, $tp; global $ecal_dir, $tp;
if (is_readable(THEME."calendar_template.php")) if (is_readable(THEME."calendar_template.php"))
{ {
@@ -199,7 +201,7 @@ $cal_text .= $CALENDAR_MENU_END;
ob_start(); // Set up a new output buffer ob_start(); // Set up a new output buffer
$ns->tablerender($calendar_title, $cal_text, 'calendar_menu'); $ns->tablerender($calendar_title, $cal_text, 'calendar_menu');
$cache_data = ob_get_flush(); // Get the page content, and display it $cache_data = ob_get_flush(); // Get the page content, and display it
$e107cache->set($cache_tag, $cache_data); // Save to cache $e107->ecache->set($cache_tag, $cache_data); // Save to cache
unset($ev_list); unset($ev_list);
unset($cal_text); unset($cal_text);
?> ?>

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/event.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/event.php,v $
| $Revision: 1.7 $ | $Revision: 1.8 $
| $Date: 2008-12-29 20:51:07 $ | $Date: 2009-02-01 20:54:08 $
| $Author: lisa_ $ | $Author: e107steved $
| |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -760,13 +760,13 @@ $prevlink = mktime(0, 0, 0, $month, 1, $py);
$ny = $year + 1; $ny = $year + 1;
$nextlink = mktime(0, 0, 0, $month, 1, $ny); $nextlink = mktime(0, 0, 0, $month, 1, $ny);
if (is_readable(THEME."calendar_template.php")) if (is_readable(THEME.'calendar_template.php'))
{ // Has to be require { // Has to be require
require(THEME."calendar_template.php"); require(THEME.'calendar_template.php');
} }
else else
{ {
require(e_PLUGIN."calendar_menu/calendar_template.php"); require(e_PLUGIN.'calendar_menu/calendar_template.php');
} }
$text2 = ""; $text2 = "";

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/next_event_menu.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/next_event_menu.php,v $
| $Revision: 1.4 $ | $Revision: 1.5 $
| $Date: 2007-12-15 22:15:30 $ | $Date: 2009-02-01 20:54:08 $
| $Author: e107steved $ | $Author: e107steved $
| |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
@@ -22,22 +22,22 @@
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
global $ecal_dir, $tp; global $ecal_dir, $tp;
$ecal_dir = e_PLUGIN . "calendar_menu/"; $ecal_dir = e_PLUGIN.'calendar_menu/';
global $ecal_class; global $e107, $ecal_class, $calendar_shortcodes;
require_once($ecal_dir."ecal_class.php"); require_once($ecal_dir.'ecal_class.php');
if (!is_object($ecal_class)) $ecal_class = new ecal_class; if (!is_object($ecal_class)) $ecal_class = new ecal_class;
$cache_tag = "nq_event_cal_next"; $cache_tag = 'nq_event_cal_next';
// See if the page is already in the cache // See if the page is already in the cache
if($cacheData = $e107cache->retrieve($cache_tag, $ecal_class->max_cache_time)) if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
{ {
echo $cacheData; echo $cacheData;
return; return;
} }
include_lan(e_PLUGIN."calendar_menu/languages/".e_LANGUAGE.".php"); include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
// Values defined through admin pages // Values defined through admin pages
$menu_title = varset($pref['eventpost_menuheading'],EC_LAN_140); $menu_title = varset($pref['eventpost_menuheading'],EC_LAN_140);
@@ -47,14 +47,14 @@ $show_recurring = varset($pref['eventpost_checkrecur'],1); // Zero to exclude
$link_in_heading = varset($pref['eventpost_linkheader'],0); // Zero for simple heading, 1 to have clickable link $link_in_heading = varset($pref['eventpost_linkheader'],0); // Zero for simple heading, 1 to have clickable link
require($ecal_dir."calendar_shortcodes.php"); require($ecal_dir.'calendar_shortcodes.php');
if (is_readable(THEME."calendar_template.php")) if (is_readable(THEME.'calendar_template.php'))
{ // Needs to be require in case second { // Has to be require
require(THEME."calendar_template.php"); require(THEME.'calendar_template.php');
} }
else else
{ {
require($ecal_dir."calendar_template.php"); require(e_PLUGIN.'calendar_menu/calendar_template.php');
} }
$start_time = $ecal_class->cal_timedate; $start_time = $ecal_class->cal_timedate;
@@ -88,14 +88,14 @@ else
$calendar_title = $tp->toHTML($menu_title,FALSE,'TITLE'); // Allows multi-language title, shortcodes $calendar_title = $tp->toHTML($menu_title,FALSE,'TITLE'); // Allows multi-language title, shortcodes
if ($link_in_heading == 1) if ($link_in_heading == 1)
{ {
$calendar_title = "<a class='forumlink' href='" . e_PLUGIN . "calendar_menu/event.php' >" . $calendar_title . "</a>"; $calendar_title = "<a class='forumlink' href='".e_PLUGIN_ABS."calendar_menu/event.php' >".$calendar_title."</a>";
} }
// Now handle the data, cache as well // Now handle the data, cache as well
ob_start(); // Set up a new output buffer ob_start(); // Set up a new output buffer
$ns->tablerender($calendar_title, $cal_text, 'next_event_menu'); $ns->tablerender($calendar_title, $cal_text, 'next_event_menu');
$cache_data = ob_get_flush(); // Get the page content, and display it $cache_data = ob_get_flush(); // Get the page content, and display it
$e107cache->set($cache_tag, $cache_data); // Save to cache $e107->ecache->set($cache_tag, $cache_data); // Save to cache
unset($ev_list); unset($ev_list);