[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.153,1.154
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.153,1.154 |
Date: |
Thu, 26 Sep 2002 20:14:21 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv18124
Modified Files:
class.common.inc.php
Log Message:
changed functions to use css files
Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.153
retrieving revision 1.154
diff -C2 -r1.153 -r1.154
*** class.common.inc.php 25 Sep 2002 04:04:24 -0000 1.153
--- class.common.inc.php 27 Sep 2002 00:14:18 -0000 1.154
***************
*** 1245,1250 ****
function load_css_data()
{
!
! /* Make sure some of the defaults are set */
if (!isset($GLOBALS['phpgw_info']['theme']['css']['A']))
{
--- 1245,1249 ----
function load_css_data()
{
! //Make sure some of the defaults are set
if (!isset($GLOBALS['phpgw_info']['theme']['css']['A']))
{
***************
*** 1271,1275 ****
}
! /* now put the css data into the template class */
if(@is_array($GLOBALS['phpgw_info']['theme']['css']))
{
--- 1270,1274 ----
}
! // now put the css data into the template class
if(@is_array($GLOBALS['phpgw_info']['theme']['css']))
{
***************
*** 1287,1290 ****
--- 1286,1338 ----
}
+ function load_css_url()
+ {
+ if (!
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'])
+ {
+ if
($GLOBALS['phpgw_info']['server']['template_set'] == 'user_choice')
+ {
+
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default';
+ }
+ else
+ {
+
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] =
$GLOBALS['phpgw_info']['server']['template_set'];
+ }
+ }
+ if ($GLOBALS['phpgw_info']['server']['force_theme'] ==
'user_choice')
+ {
+ if
(!isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
+ {
+
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default';
+ }
+ }
+ else
+ {
+ if
(isset($GLOBALS['phpgw_info']['server']['force_theme']))
+ {
+
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] =
$GLOBALS['phpgw_info']['server']['force_theme'];
+ }
+ }
+
+ if(@file_exists(PHPGW_SERVER_ROOT . SEP . 'phpgwapi' .
SEP . 'templates' . SEP .
$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']
+ . SEP . 'css' . SEP .
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.css'))
+ {
+ $css_file =
$GLOBALS['phpgw_info']['server']['webserver_url'] . SEP . 'phpgwapi' . SEP .
'templates' . SEP .
$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']
+ . SEP . 'css' . SEP .
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.css';
+ }
+ elseif(@file_exists(PHPGW_SERVER_ROOT . SEP .
'phpgwapi' . SEP . 'templates' . SEP . 'default' . SEP . 'css' . SEP .
'submarine.css'))
+ {
+ $css_file =
$GLOBALS['phpgw_info']['server']['webserver_url'] . SEP . 'phpgwapi' . SEP .
'templates' . SEP . 'default' . SEP . 'css' . SEP . 'submarine.css';
+ }
+
+ else
+ {
+ /* Hope we don't get to this point. Better
then the user seeing a */
+ /* complety back screen and not know whats
going on */
+ $GLOBALS['phpgw_info']['theme']['bg_color'] =
'FFFFFF';
+
$GLOBALS['phpgw']->log->write(array('text'=>'F-Abort, No themes found'));
+ }
+ $GLOBALS['phpgw']->template->set_var('phpgw_css','<link
rel="stylesheet" type="text/css" href="' . $css_file . '">');
+ }
+
function load_preload_images_data()
{
***************
*** 1312,1316 ****
! function load_phpgw_body_tags()
{
$GLOBALS['phpgw_info']['flags']['body_tags']['bgcolor']
= $GLOBALS['phpgw_info']['theme']['bg_color'];
--- 1360,1364 ----
! /*function load_phpgw_body_tags()
{
$GLOBALS['phpgw_info']['flags']['body_tags']['bgcolor']
= $GLOBALS['phpgw_info']['theme']['bg_color'];
***************
*** 1346,1349 ****
--- 1394,1416 ----
$GLOBALS['phpgw']->template->set_var('phpgw_body_tags',$body_tags_string);
}
+ }*/
+
+ function load_phpgw_body_tags()
+ {
+ $GLOBALS['phpgw_info']['flags']['body_tags']['onLoad']
.= $this->load_preload_images_data();
+
+
if(@is_array($GLOBALS['phpgw_info']['flags']['body_tags']))
+ {
+ $body_tags_string = '';
+
reset($GLOBALS['phpgw_info']['flags']['body_tags']);
+ while(list($key,$value) =
each($GLOBALS['phpgw_info']['flags']['body_tags']))
+ {
+ if($value != '')
+ {
+ $body_tags_string .= "
$key=\"$value\"";
+ }
+ }
+
$GLOBALS['phpgw']->template->set_var('phpgw_body_tags',$body_tags_string);
+ }
}
***************
*** 1352,1355 ****
--- 1419,1437 ----
@abstract load the phpgw header
*/
+ /*function phpgw_header($forceheader = True, $forcenavbar =
True)
+ {
+ // So far I dont have use for $forceheader and
$forcenavbar
+ // I only allow this to be run once by using the
constant
+ if(!defined('PHPGW_HEADER_RAN'))
+ {
+ define('PHPGW_HEADER_RAN',True);
+ $this->msgbox('',False,'phpgw_msgbox');
+ $this->load_css_data();
+ $this->load_phpgw_body_tags();
+
$GLOBALS['phpgw']->template->set_block('phpgw','phpgw_head_javascript');
+
$GLOBALS['phpgw']->template->pfp('out','phpgw_main_start');
+ }
+ }*/
+
function phpgw_header($forceheader = True, $forcenavbar = True)
{
***************
*** 1360,1364 ****
define('PHPGW_HEADER_RAN',True);
$this->msgbox('',False,'phpgw_msgbox');
! $this->load_css_data();
$this->load_phpgw_body_tags();
$GLOBALS['phpgw']->template->set_block('phpgw','phpgw_head_javascript');
--- 1442,1446 ----
define('PHPGW_HEADER_RAN',True);
$this->msgbox('',False,'phpgw_msgbox');
! $this->load_css_url();
$this->load_phpgw_body_tags();
$GLOBALS['phpgw']->template->set_block('phpgw','phpgw_head_javascript');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.153,1.154,
Bettina Gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: phpgwapi/templates/idsociety/css idsociety.css,NONE,1.1 submarine.css,NONE,1.1
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/templates/default search_field.xsl,NONE,1.1 app_header.xsl,1.1,1.2 cat_select.xsl,1.2,1.3 filter_select.xsl,1.1,1.2
- Previous by thread:
[Phpgroupware-cvs] CVS: phpgwapi/templates/idsociety/css idsociety.css,NONE,1.1 submarine.css,NONE,1.1
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/templates/default search_field.xsl,NONE,1.1 app_header.xsl,1.1,1.2 cat_select.xsl,1.2,1.3 filter_select.xsl,1.1,1.2
- Index(es):