From ebe0e893eb39ee4150cc0760e5f45c53c03861e2 Mon Sep 17 00:00:00 2001 From: e107steved Date: Sat, 15 Dec 2007 16:31:32 +0000 Subject: [PATCH] Icon-related bugfixes --- .../calendar_menu/calendar_shortcodes.php | 16 ++++++++-------- .../calendar_menu/calendar_template.php | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/e107_plugins/calendar_menu/calendar_shortcodes.php b/e107_plugins/calendar_menu/calendar_shortcodes.php index c2a72b758..11130fa31 100644 --- a/e107_plugins/calendar_menu/calendar_shortcodes.php +++ b/e107_plugins/calendar_menu/calendar_shortcodes.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_shortcodes.php,v $ -| $Revision: 1.5 $ -| $Date: 2007-12-08 12:22:36 $ +| $Revision: 1.6 $ +| $Date: 2007-12-15 16:31:32 $ | $Author: e107steved $ | +----------------------------------------------------------------------------+ @@ -212,7 +212,7 @@ SC_BEGIN EC_CALENDAR_CALENDAR_RECENT_ICON if (!isset($ev['is_recent'])) return ""; if (!$ev['startofevent']) return ""; // Only display on first day of multi-day events // $recent_icon = e_PLUGIN."calendar_menu/images/recent_icon.png"; - $recent_icon = e_IMAGE."generic/".IMODE."/new.png"; + $recent_icon = EC_RECENT_ICON; if (file_exists($recent_icon)) { return " "; @@ -438,10 +438,10 @@ SC_BEGIN EC_EVENT_THREAD SC_END SC_BEGIN EC_EVENT_OPTIONS - global $EC_EVENT_OPTIONS, $thisevent, $event_author_name, $cal_super; + global $EC_EVENT_OPTIONS, $thisevent, $event_author_name, $cal_super,$ec_images_path; if (USERNAME == $event_author_name || $cal_super) { - $EC_EVENT_OPTIONS = "".EC_LAN_35 . "  ".EC_LAN_36.""; + $EC_EVENT_OPTIONS = "".EC_LAN_35 . "  ".EC_LAN_36.""; } return $EC_EVENT_OPTIONS; SC_END @@ -502,13 +502,13 @@ SC_BEGIN EC_IF_SAMEDAY SC_END -// FORTHCOMINT EVENTS MENU +// FORTHCOMING EVENTS MENU //-------------------------------------------- SC_BEGIN EC_NEXT_EVENT_RECENT_ICON - global $thisevent; + global $cal_row; if (!$pref['eventpost_fe_showrecent']) return; - if (!isset($thisevent['is_recent'])) return; + if (!isset($cal_row['is_recent'])) return; $recent_icon = EC_RECENT_ICON; if (file_exists($recent_icon)) { diff --git a/e107_plugins/calendar_menu/calendar_template.php b/e107_plugins/calendar_menu/calendar_template.php index 7f8a9a814..fca52129a 100644 --- a/e107_plugins/calendar_menu/calendar_template.php +++ b/e107_plugins/calendar_menu/calendar_template.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_template.php,v $ -| $Revision: 1.2 $ -| $Date: 2007-07-13 19:37:52 $ +| $Revision: 1.3 $ +| $Date: 2007-12-15 16:31:32 $ | $Author: e107steved $ | +----------------------------------------------------------------------------+ @@ -20,8 +20,19 @@ if (!defined('e107_INIT')) { exit; } if (!defined("USER_WIDTH")){ define("USER_WIDTH","width:auto"); } +global $imode; +if (varsettrue($imode)) +{ // Its 0.8 + $ec_images_path = e_IMAGE.'packs/'.$imode.'/'; + if (!defined('EC_RECENT_ICON')) {define('EC_RECENT_ICON',$ec_images_path.'generic/new.png'); } // Filename of icon used to flag recent events +} +else +{ + $ec_images_path = e_IMAGE; + if (!defined('EC_RECENT_ICON')) {define('EC_RECENT_ICON',e_IMAGE.'generic/'.IMODE.'/new.png'); } // Filename of icon used to flag recent events +} + -if (!defined('EC_RECENT_ICON')) {define('EC_RECENT_ICON',e_IMAGE.'generic/'.IMODE.'/new.png'); } // Filename of icon used to flag recent events // TIME SWITCH BUTTONS ------------------------------------------------------------ $sc_style['EC_PREV_MONTH']['pre'] = "";