From 7d4eb35da42100306a6d461f8e94cb9b4eb48efc Mon Sep 17 00:00:00 2001 From: skeeter Date: Mon, 1 Jan 2001 18:49:28 +0000 Subject: [PATCH] added calendar hook for home app --- calendar/inc/hook_home.inc.php | 25 +++++++++++++++++++++++++ index.php | 16 +--------------- 2 files changed, 26 insertions(+), 15 deletions(-) create mode 100755 calendar/inc/hook_home.inc.php diff --git a/calendar/inc/hook_home.inc.php b/calendar/inc/hook_home.inc.php new file mode 100755 index 0000000000..c518719556 --- /dev/null +++ b/calendar/inc/hook_home.inc.php @@ -0,0 +1,25 @@ +\n"; + $phpgw->common->phpgw_exit(); + } unset($d1); + + $tmp_app_inc = $phpgw_info["server"]["app_inc"]; + $phpgw_info["server"]["app_inc"] = $phpgw_info["server"]["server_root"]."/calendar/inc"; + + if ($phpgw_info["user"]["preferences"]["calendar"]["mainscreen_showevents"]) { + include($phpgw_info["server"]["app_inc"] . "/functions.inc.php"); + echo "\n"; + $now = $phpgw->calendar->splitdate(mktime (0, 0, 0, $phpgw->calendar->today["month"], $phpgw->calendar->today["day"], $phpgw->calendar->today["year"]) - ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"])); + + echo "" + . "
" + . lang(date("F",$phpgw->calendar->today["raw"])) . " " .$phpgw->calendar->today["day"] . ", " . $phpgw->calendar->today["year"] ."
" + . $phpgw->calendar->print_day_at_a_glance($now)."
\n"; + echo "\n"; + unset($phpgw->calendar); + } + + $phpgw_info["server"]["app_inc"] = $tmp_app_inc; +?> diff --git a/index.php b/index.php index 35034cba2b..ccac36dc76 100755 --- a/index.php +++ b/index.php @@ -125,7 +125,7 @@ include($phpgw_info["server"]["server_root"] . "/stocks/inc/functions.inc.php"); echo '' . return_quotes($quotes) . ''; } - $phpgw->common->hook(); + $phpgw->common->hook("",array("email","calendar")); if ($phpgw_info["user"]["apps"]["addressbook"] && $phpgw_info["user"]["preferences"]["addressbook"]["mainscreen_showbirthdays"]) { echo "\n"; @@ -150,20 +150,6 @@ } echo "\n"; } - - if ($phpgw_info["user"]["apps"]["calendar"] - && $phpgw_info["user"]["preferences"]["calendar"]["mainscreen_showevents"]) { - include($phpgw_info["server"]["server_root"]."/calendar/inc/functions.inc.php"); - echo "\n"; - $now = $phpgw->calendar->splitdate(mktime (0, 0, 0, $phpgw->calendar->today["month"], $phpgw->calendar->today["day"], $phpgw->calendar->today["year"]) - ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"])); - - echo "" - . "
" - . lang(date("F",$phpgw->calendar->today["raw"])) . " " .$phpgw->calendar->today["day"] . ", " . $phpgw->calendar->today["year"] ."
" - . $phpgw->calendar->print_day_at_a_glance($now)."
\n"; - echo "\n"; - } - //$phpgw->common->debug_phpgw_info(); //$phpgw->common->debug_list_core_functions(); ?>