diff --git a/addressbook/inc/hook_home.inc.php b/addressbook/inc/hook_home.inc.php
index eef529e7d9..0442e0a6af 100644
--- a/addressbook/inc/hook_home.inc.php
+++ b/addressbook/inc/hook_home.inc.php
@@ -1,14 +1,13 @@
\n";
-
$c = CreateObject('phpgwapi.contacts');
- $qfields = array(
+ $qfields = array
+ (
'n_given' => 'n_given',
'n_family' => 'n_family',
'bday' => 'bday'
@@ -36,38 +34,17 @@
$bdays = $c->read(0,15,$qfields,$today,'tid=n','','',$GLOBALS['phpgw_info']['user']['account_id']);
- $title = '
'.lang('Birthdays').'';
-
- $portalbox = CreateObject('phpgwapi.listbox',
- Array(
- 'title' => $title,
- 'width' => '100%',
- 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler')
- )
- );
$app_id = $GLOBALS['phpgw']->applications->name2id('addressbook');
$GLOBALS['portal_order'][] = $app_id;
- $var = Array(
- 'up' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'down' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'close' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'question' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'edit' => Array('url' => '/set_box.php', 'app' => $app_id)
- );
-
- while(list($key,$value) = each($var))
- {
- $portalbox->set_controls($key,$value);
- }
-
- $portalbox->data = Array();
+ $GLOBALS['phpgw']->portalbox->set_params(array('app_id' => $app_id,
+ 'title' => lang('addressbook')));
while(list($key,$val) = @each($bdays))
{
- $portalbox->data[] = array
+ $GLOBALS['phpgw']->portalbox->data[] = array
(
- 'text' => lang("Today is x's birthday!", $val['n_given'] . ' ' . $val['n_family']),
- 'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']),
+ 'text' => lang("Today is x's birthday!", $val['n_given'] . ' ' . $val['n_family']),
+ 'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']),
'lang_link_statustext' => lang('show contact')
);
}
@@ -78,20 +55,13 @@
while(list($key,$val) = @each($bdays))
{
- $portalbox->data[] = array
+ $GLOBALS['phpgw']->portalbox->data[] = array
(
- 'text' => lang("Tomorrow is x's birthday.", $val['n_given'] . ' ' . $val['n_family']),
- 'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='.$val['id']),
- 'lang_link_statustext' => lang('show contact')
+ 'text' => lang("Tomorrow is x's birthday.", $val['n_given'] . ' ' . $val['n_family']),
+ 'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='.$val['id']),
+ 'lang_link_statustext' => lang('show contact')
);
}
- if(count($portalbox->data))
- {
- $tmp = $portalbox->draw();
- }
- unset($portalbox);
-
- $GLOBALS['phpgw']->template->set_var('phpgw_body',$tmp,True);
- unset($tmp);
+ $GLOBALS['phpgw']->portalbox->draw();
}
?>
diff --git a/calendar/inc/hook_home.inc.php b/calendar/inc/hook_home.inc.php
index 0b938d82e7..e43ac26340 100755
--- a/calendar/inc/hook_home.inc.php
+++ b/calendar/inc/hook_home.inc.php
@@ -36,8 +36,6 @@
$GLOBALS['g_month'] = substr($GLOBALS['date'],4,2);
$GLOBALS['g_day'] = substr($GLOBALS['date'],6,2);
$GLOBALS['owner'] = $GLOBALS['phpgw_info']['user']['account_id'];
- $GLOBALS['css'] = "\n".'';
$page_ = explode('.',$GLOBALS['phpgw_info']['user']['preferences']['calendar']['defaultcalendar']);
$_page = $page_[0];
@@ -54,37 +52,11 @@
}
include(PHPGW_INCLUDE_ROOT.'/calendar/inc/hook_home_'.$_page.'.inc.php');
-
- $title = ''.lang('Calendar').'';
-
- $portalbox = CreateObject('phpgwapi.listbox',
- Array(
- 'title' => $title,
- 'width' => '100%',
- 'outerborderwidth' => '0',
- 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler')
- )
- );
-
$app_id = $GLOBALS['phpgw']->applications->name2id('calendar');
$GLOBALS['portal_order'][] = $app_id;
- $var = Array(
- 'up' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'down' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'close' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'question' => Array('url' => '/set_box.php', 'app' => $app_id),
- 'edit' => Array('url' => '/set_box.php', 'app' => $app_id)
- );
- while(list($key,$value) = each($var))
- {
- $portalbox->set_controls($key,$value);
- }
-
- $portalbox->data = Array();
-
- $GLOBALS['phpgw']->template->set_var('phpgw_body', "\n".''."\n".$portalbox->draw($GLOBALS['extra_data'])."\n".''."\n",True);
- unset($cal);
- }
- flush();
+ $GLOBALS['phpgw']->portalbox->set_params(array('app_id' => $app_id,
+ 'title' => lang('calendar')));
+ $GLOBALS['phpgw']->portalbox->draw($GLOBALS['extra_data'])
+ }
?>
diff --git a/calendar/inc/hook_home_day.inc.php b/calendar/inc/hook_home_day.inc.php
index f076743241..45e8f13ef7 100755
--- a/calendar/inc/hook_home_day.inc.php
+++ b/calendar/inc/hook_home_day.inc.php
@@ -23,7 +23,7 @@
}
unset($d1);
- $GLOBALS['extra_data'] = $GLOBALS['css']."\n".''."\n".''
+ $GLOBALS['extra_data'] = ' | '."\n".''
. ExecMethod('calendar.uicalendar.mini_calendar',
Array(
'day' => $GLOBALS['g_day'],
diff --git a/calendar/inc/hook_home_month.inc.php b/calendar/inc/hook_home_month.inc.php
index b98c6fe8b2..de0b82671f 100755
--- a/calendar/inc/hook_home_month.inc.php
+++ b/calendar/inc/hook_home_month.inc.php
@@ -23,7 +23,7 @@
}
unset($d1);
- $GLOBALS['extra_data'] = $GLOBALS['css']."\n".' | '."\n".''
+ $GLOBALS['extra_data'] = ' | '."\n".''
. ExecMethod('calendar.uicalendar.get_month')
.' | '."\n".' '."\n".' '."\n".' | '."\n";
?>
diff --git a/calendar/inc/hook_home_week.inc.php b/calendar/inc/hook_home_week.inc.php
index 27e56e7290..1ecc813c61 100755
--- a/calendar/inc/hook_home_week.inc.php
+++ b/calendar/inc/hook_home_week.inc.php
@@ -23,7 +23,7 @@
}
unset($d1);
- $GLOBALS['extra_data'] = $GLOBALS['css']."\n".''."\n".''
+ $GLOBALS['extra_data'] = ' | '."\n".''
. ExecMethod('calendar.uicalendar.get_week')
.' | '."\n".' '."\n".' '."\n".' | '."\n";
?>
diff --git a/calendar/inc/hook_home_year.inc.php b/calendar/inc/hook_home_year.inc.php
index a7c67772f2..6c0a470272 100755
--- a/calendar/inc/hook_home_year.inc.php
+++ b/calendar/inc/hook_home_year.inc.php
@@ -23,7 +23,7 @@
}
unset($d1);
- $GLOBALS['extra_data'] = $GLOBALS['css']."\n".''."\n".''
+ $GLOBALS['extra_data'] = ' | '."\n".''
. ExecMethod('calendar.uicalendar.get_year')
.' | '."\n".' '."\n".' '."\n".' | '."\n";
?>
|
|
|
|
|