[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.171,1.172 cl
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.171,1.172 class.xslttemplates.inc.php,1.10,1.11 functions.inc.php,1.159,1.160 |
Date: |
Sat, 26 Oct 2002 16:28:39 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv7577/inc
Modified Files:
class.common.inc.php class.xslttemplates.inc.php
functions.inc.php
Log Message:
update xslt
Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.171
retrieving revision 1.172
diff -C2 -r1.171 -r1.172
*** class.common.inc.php 26 Oct 2002 00:27:46 -0000 1.171
--- class.common.inc.php 26 Oct 2002 20:28:37 -0000 1.172
***************
*** 695,699 ****
$GLOBALS['phpgw_info']['server']['template_set'] = 'default';
}
-
/******** start temporarily code **************************************/
/* this just makes sure the template set is updated to the new format */
--- 695,698 ----
***************
*** 1074,1078 ****
{
$this->navbar();
!
$css = $this->get_css_url();
$var = array
--- 1073,1077 ----
{
$this->navbar();
!
$css = $this->get_css_url();
$var = array
***************
*** 1085,1089 ****
);
-
$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] =
'idsociety';
$GLOBALS['phpgw']->xslttpl->add_file($this->get_tpl_dir('phpgwapi') . SEP .
'phpgw');
--- 1084,1087 ----
***************
*** 1113,1126 ****
}
- $var['home_link'] =
$GLOBALS['phpgw_info']['navbar']['home']['url'];
- $var['prefs_link'] =
$GLOBALS['phpgw_info']['navbar']['preferences']['url'];
- $var['logout_link'] =
$GLOBALS['phpgw_info']['navbar']['logout']['url'];
- $var['about_link'] =
$GLOBALS['phpgw_info']['navbar']['about']['url'];
-
- $var['home_title'] =
$GLOBALS['phpgw_info']['navbar']['home']['title'];
- $var['prefs_title'] =
$GLOBALS['phpgw_info']['navbar']['preferences']['title'];
- $var['logout_title'] =
$GLOBALS['phpgw_info']['navbar']['logout']['title'];
- $var['about_title'] =
$GLOBALS['phpgw_info']['navbar']['about']['title'];
-
if
($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home')
{
--- 1111,1114 ----
***************
*** 1164,1169 ****
--- 1152,1176 ----
$var['logo_img'] =
$this->image('phpgwapi','logo2');
$var['nav_bar_left_top_bg_img'] =
$this->image('phpgwapi','nav_bar_left_top_bg');
+ break;
+
+ case 'verdilak':
+ $app =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ $var['logo_img'] =
$this->image('phpgwapi','logo');
+ $var['home_img'] =
$this->image('phpgwapi','welcome-'.($app=='home' ? 'red' : 'grey'));
+ $var['prefs_img'] =
$this->image('phpgwapi','preferences-'.($app=='preferences' ? 'red' : 'grey'));
+ $var['logout_img'] =
$this->image('phpgwapi','logout-grey');
+ $var['about_img'] =
$this->image('phpgwapi','help');
+ $var['greybar'] =
$this->image('phpgwapi','greybar.jpg');
break;
}
+ $var['home_link'] =
$GLOBALS['phpgw_info']['navbar']['home']['url'];
+ $var['prefs_link'] =
$GLOBALS['phpgw_info']['navbar']['preferences']['url'];
+ $var['logout_link'] =
$GLOBALS['phpgw_info']['navbar']['logout']['url'];
+ $var['about_link'] =
$GLOBALS['phpgw_info']['navbar']['about']['url'];
+
+ $var['home_title'] =
$GLOBALS['phpgw_info']['navbar']['home']['title'];
+ $var['prefs_title'] =
$GLOBALS['phpgw_info']['navbar']['preferences']['title'];
+ $var['logout_title'] =
$GLOBALS['phpgw_info']['navbar']['logout']['title'];
+ $var['about_title'] =
$GLOBALS['phpgw_info']['navbar']['about']['title'];
if (isset($GLOBALS['phpgw_info']['navbar']['admin']) &&
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']))
***************
*** 1181,1200 ****
$var['user_info'] = $var['user_info_name'] .' - '
.$var['user_info_date'];
! while ($app = each($GLOBALS['phpgw_info']['navbar']))
{
! if ($app[0] != 'home' && $app[0] !=
'preferences' && $app[0] != 'about' && $app[0] != 'logout')
{
$var['applications'][] = array
(
! 'icon' =>
$app[1]['icon'],
! 'title' =>
$app[1]['title'],
! 'img_src_over' =>
$app[1]['icon_hover'],
! 'url' =>
$app[1]['url'],
! 'name' =>
str_replace('-','_',$app[0])
);
! if($app[1]['icon_hover'] != '')
{
!
$GLOBALS['phpgw_info']['flags']['preload_images'][] = $app[1]['icon_hover'];
}
}
--- 1188,1207 ----
$var['user_info'] = $var['user_info_name'] .' - '
.$var['user_info_date'];
! while (list($app,$data) =
each($GLOBALS['phpgw_info']['navbar']))
{
! if ($app != 'home' && $app != 'preferences' &&
$app != 'about' && $app != 'logout')
{
$var['applications'][] = array
(
! 'icon' =>
$data['icon'],
! 'title' =>
$data['title'],
! 'img_src_over' =>
$data['icon_hover'],
! 'url'
=> $data['url'],
! 'name' =>
str_replace('-','_',$app)
);
! if($data['icon_hover'] != '')
{
!
$GLOBALS['phpgw_info']['flags']['preload_images'][] = $data['icon_hover'];
}
}
***************
*** 1416,1419 ****
--- 1423,1428 ----
/* So far I dont have use for $forceheader and
$forcenavbar */
/* I only allow this to be run once by using the
constant */
+
+ /* not longer needed für xslttpl and would require to
load the phpgw template
if(!defined('PHPGW_HEADER_RAN'))
{
***************
*** 1425,1428 ****
--- 1434,1438 ----
$GLOBALS['phpgw']->template->pfp('out','phpgw_main_start');
}
+ */
}
***************
*** 1466,1469 ****
--- 1476,1505 ----
}
+ function start_xslt_capture()
+ {
+ if (!isset($GLOBALS['phpgw_info']['xslt_capture']))
+ {
+ $GLOBALS['phpgw_info']['xslt_capture'] = True;
+ ob_start(); // capture the output
+ }
+ }
+
+ /* Note: need to be run BEFORE exit is called, as buffers get
flushed automatically before
+ * any registered shutdown-functions (eg. phpgw_footer)
gets called
+ */
+ function stop_xslt_capture()
+ {
+ if (isset($GLOBALS['phpgw_info']['xslt_capture']))
+ {
+ unset($GLOBALS['phpgw_info']['xslt_capture']);
+ $output = ob_get_contents(); // get captured
output
+ ob_end_clean();
// stop capture and clean output-buffer
+ if (!empty($output))
+ {
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('body_data' => $output));
+ }
+ }
+ }
+
function phpgw_footer()
{
***************
*** 1477,1482 ****
--- 1513,1521 ----
address@hidden'phpgw_info']['flags']['noappfooter'])
{
+ $this->start_xslt_capture(); // if
index already turned it off
$this->phpgw_appfooter();
}
+ $this->stop_xslt_capture();
+
$GLOBALS['phpgw']->xslttpl->pp();
$GLOBALS['phpgw']->db->disconnect();
***************
*** 1496,1534 ****
}
}
-
- /*function phpgw_footer()
- {
- if(!defined('PHPGW_FOOTER_RAN'))
- {
- define('PHPGW_FOOTER_RAN',True);
- if
(!isset($GLOBALS['phpgw_info']['flags']['nodisplay']) ||
!$GLOBALS['phpgw_info']['flags']['nodisplay'])
- {
-
if($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
-
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' &&
-
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' &&
-
address@hidden'phpgw_info']['flags']['noappfooter'])
- {
- $this->phpgw_appfooter();
- }
- $this->phpgw_header();
-
$GLOBALS['phpgw']->template->pfp('out','phpgw_main_end');
- }
-
- $GLOBALS['phpgw']->db->disconnect();
-
- //Clean up mcrypt
- if (@is_object($GLOBALS['phpgw']->crypto))
- {
- $GLOBALS['phpgw']->crypto->cleanup();
- unset($GLOBALS['phpgw']->crypto);
- }
-
- if (DEBUG_TIMER)
- {
- $GLOBALS['debug_timer_stop'] =
perfgetmicrotime();
- echo 'Page loaded in ' .
($GLOBALS['debug_timer_stop'] - $GLOBALS['debug_timer_start']) . ' seconds.';
- }
- }
- }*/
function hex2bin($data)
--- 1535,1538 ----
Index: class.xslttemplates.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.xslttemplates.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.xslttemplates.inc.php 26 Oct 2002 00:27:46 -0000 1.10
--- class.xslttemplates.inc.php 26 Oct 2002 20:28:37 -0000 1.11
***************
*** 164,168 ****
while(list($key,$val) = each($value))
{
! $this->vars[$name][$key] = $val;
}
}
--- 164,175 ----
while(list($key,$val) = each($value))
{
! if (!is_array($val) &&
!is_array($this->vars[$name][$key]))
! {
!
$this->vars[$name][$key] .= $val;
! }
! else
! {
!
$this->vars[$name][$key] = array_merge($this->vars[$name][$key],$val);
! }
}
}
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.159
retrieving revision 1.160
diff -C2 -r1.159 -r1.160
*** functions.inc.php 25 Oct 2002 22:33:39 -0000 1.159
--- functions.inc.php 26 Oct 2002 20:28:37 -0000 1.160
***************
*** 36,39 ****
--- 36,41 ----
include(PHPGW_API_INC.'/common_functions.inc.php');
+ function parse_navbar() {} // just for compatibility with apps,
which should run under 0.9.14 too
+
/*!
@function lang
***************
*** 269,277 ****
/****************************************************************************\
* Forcing the footer to run when the rest of the script is done.
*
\****************************************************************************/
! $footer_common = &$GLOBALS['phpgw']->common;
! register_shutdown_function(array(&$footer_common, 'phpgw_footer'));
!
/****************************************************************************\
* Stuff to use if logging in or logging out
*
--- 271,283 ----
/****************************************************************************\
+ * Forcing all non-cooperating apps to send there output through the
xslt-tpl *
+
\****************************************************************************/
+ $GLOBALS['phpgw']->common->start_xslt_capture();
+
+
/****************************************************************************\
* Forcing the footer to run when the rest of the script is done.
*
\****************************************************************************/
! register_shutdown_function(array($GLOBALS['phpgw']->common,
'phpgw_footer'));
!
/****************************************************************************\
* Stuff to use if logging in or logging out
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.171,1.172 class.xslttemplates.inc.php,1.10,1.11 functions.inc.php,1.159,1.160,
Bettina Gille <address@hidden> <=