retrieve($cString); if(false === $cached) { require_once(e_PLUGIN."blogcalendar_menu/calendar.php"); require_once(e_PLUGIN."blogcalendar_menu/functions.php"); // ------------------------------ // initialization + fetch options // ------------------------------ $prefix = e_PLUGIN."blogcalendar_menu"; $marray = array(BLOGCAL_M1, BLOGCAL_M2, BLOGCAL_M3, BLOGCAL_M4, BLOGCAL_M5, BLOGCAL_M6, BLOGCAL_M7, BLOGCAL_M8, BLOGCAL_M9, BLOGCAL_M10, BLOGCAL_M11, BLOGCAL_M12); $pref['blogcal_ws'] = "monday"; // ---------------------------------------------- // get the requested and current date information // ---------------------------------------------- list($cur_year, $cur_month, $cur_day) = explode(" ", date("Y n j")); if (e_PAGE == 'news.php' && strstr(e_QUERY, "day")) { //$tmp = explode(".", e_QUERY); $tmp = e107::getUrl()->parseRequest('core:news', 'main', urldecode(e_QUERY)); $item = $tmp[1]; $req_year = intval(substr($item, 0, 4)); $req_month = intval(substr($item, 4, 2)); // decide on the behaviour here, do we highlight // the day being viewed? or only 'today'? //$req_day = substr($item, 6, 2); // if the requested year and month are the current, then add // the current day to the mix so the calendar highlights it if (($req_year == $cur_year) && ($req_month == $cur_month)) { $req_day = $cur_day; } else { $req_day = ""; } } elseif(e_PAGE == 'news.php' && strstr(e_QUERY, "month")) { //$tmp = explode(".", e_QUERY); $tmp = e107::getUrl()->parseRequest('core:news', 'main', urldecode(e_QUERY)); $item = $tmp[1]; $req_year = intval(substr($item, 0, 4)); $req_month = intval(substr($item, 4, 2)); // if the requested year and month are the current, then add // the current day to the mix so the calendar highlights it if (($req_year == $cur_year) && ($req_month == $cur_month)) { $req_day = $cur_day; } else { $req_day = ""; } } else { $req_year = $cur_year; $req_month = $cur_month; $req_day = $cur_day; } // ------------------------------- // create the month selection item // ------------------------------- $month_selector = "
$month_selector";
$menu .= " ".calendar($req_day, $req_month, $req_year, $day_links, $pref['blogcal_ws'])." ";
$menu .= " |