phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.Template.inc.php,1.20,1.21 cl


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.Template.inc.php,1.20,1.21 class.common.inc.php,1.134,1.135 footer.inc.php,1.19,1.20 functions.inc.php,1.136,1.137
Date: Fri, 24 May 2002 06:38:06 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv16807/phpgwapi/inc

Modified Files:
        class.Template.inc.php class.common.inc.php footer.inc.php 
        functions.inc.php 
Log Message:
made changes to the loading of the header, navbar, appheader, and footers

Index: class.Template.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.Template.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** class.Template.inc.php      24 May 2002 02:51:20 -0000      1.20
--- class.Template.inc.php      24 May 2002 10:38:02 -0000      1.21
***************
*** 62,66 ****
                                $this->set_file('common', 'common.tpl');
                        }
!                       
$this->set_var('phpgw_css',$GLOBALS['phpgw_info']['theme']['css']);
  
                        /* Now move on to loading up the requested template set 
*/
--- 62,78 ----
                                $this->set_file('common', 'common.tpl');
                        }
! 
!                       if(@is_array($GLOBALS['phpgw_info']['theme']['css']))
!                       {
!                               reset($GLOBALS['phpgw_info']['theme']['css']);
!                               //$css_string = '<STYLE type="text/css">'."\n";
!                               while(list($key,$value) = 
each($GLOBALS['phpgw_info']['theme']['css']))
!                               {
!                                       $css_string .= "\n\t$key { $value } ";
!                               }
!                               $css_string .= "\n";
!                               //$css_string .= '</STYLE>'."\n";
!                               $this->set_var('phpgw_css',$css_string);
!                       }
  
                        /* Now move on to loading up the requested template set 
*/

Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -r1.134 -r1.135
*** class.common.inc.php        14 May 2002 01:02:19 -0000      1.134
--- class.common.inc.php        24 May 2002 10:38:02 -0000      1.135
***************
*** 1054,1084 ****
                        $GLOBALS['phpgw_info']['navbar']['logout']['icon']  = 
$this->image('phpgwapi',Array('logout','nonav'));
                        
$GLOBALS['phpgw_info']['navbar']['logout']['icon_hover']  = 
$this->image_on('phpgwapi',Array('logout','nonav'),'-over');
                }
  
                /*!
!               @function app_header
!               @abstract load header.inc.php for an application
                */
!               function app_header()
                {
!                       if (file_exists(PHPGW_APP_INC . '/header.inc.php'))
                        {
!                               include(PHPGW_APP_INC . '/header.inc.php');
                        }
                }
                /*!
!               @function phpgw_header
!               @abstract load the phpgw header
                */
!               function phpgw_header()
                {
!                       include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . 
$GLOBALS['phpgw_info']['server']['template_set']
!                               . '/head.inc.php');
!                       $this->navbar(False);
!                       include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . 
$GLOBALS['phpgw_info']['server']['template_set']
!                               . '/navbar.inc.php');
!                       if (address@hidden'phpgw_info']['flags']['nonavbar'] && 
address@hidden'phpgw_info']['flags']['navbar_target'])
                        {
!                               echo parse_navbar();
                        }
                }
--- 1054,1126 ----
                        $GLOBALS['phpgw_info']['navbar']['logout']['icon']  = 
$this->image('phpgwapi',Array('logout','nonav'));
                        
$GLOBALS['phpgw_info']['navbar']['logout']['icon_hover']  = 
$this->image_on('phpgwapi',Array('logout','nonav'),'-over');
+ 
+                       
/*************************************************************************\
+                       * If they are using frames, we need to set some 
variables                 *
+                       
\*************************************************************************/
+                       
if(((isset($GLOBALS['phpgw_info']['user']['preferences']['common']['useframes'])
 &&
+                               
$GLOBALS['phpgw_info']['user']['preferences']['common']['useframes']) && 
+                               $GLOBALS['phpgw_info']['server']['useframes'] 
== 'allowed') ||
+                               ($GLOBALS['phpgw_info']['server']['useframes'] 
== 'always'))
+                       {
+                               
$GLOBALS['phpgw_info']['flags']['navbar_target'] = 'phpgw_body';
+                       }
                }
  
                /*!
!               @function phpgw_header
!               @abstract load the phpgw header
                */
!               function phpgw_header($forceheader = True, $forcenavbar = True)
                {
!                       if($forceheader)
                        {
!                               $GLOBALS['phpgw_info']['flags']['noheader'] = 
False;
!                       }
!                       if($forcenavbar)
!                       {
!                               $GLOBALS['phpgw_info']['flags']['nonavbar'] = 
False;
!                       }
! 
!                       if (address@hidden'phpgw_info']['flags']['noheader'])
!                       {
!                               include(PHPGW_INCLUDE_ROOT . 
'/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . 
'/head.inc.php');
!                       }
!                       if(!function_exists('parse_navbar'))
!                       {
!                               $this->navbar(False);
!                               include(PHPGW_INCLUDE_ROOT . 
'/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']  . 
'/navbar.inc.php');
!                       }
!                       if (address@hidden'phpgw_info']['flags']['nonavbar'] && 
address@hidden'phpgw_info']['flags']['navbar_target'])
!                       {
!                               parse_navbar();
!                       }
!                       //elseif 
(address@hidden'phpgw_info']['flags']['noheader'] && 
function_exists('parse_nonavbar'))
!                       //{
!                       //      parse_nonavbar();
!                       //}
!                       if (address@hidden'phpgw_info']['flags']['noheader'] && 
address@hidden'phpgw_info']['flags']['nonavbar'])
!                       {
!                               
$GLOBALS['phpgw']->hooks->process('after_navbar');
!                               //echo '<table><tr><td>msgbox goes 
here</td></tr></table>';
                        }
                }
+ 
                /*!
!               @function phpgw_appheader
!               @abstract load header.inc.php for an application
                */
!               function phpgw_appheader()
                {
!                       if (!is_array(MENUACTION))
                        {
!                               list($app,$class,$method) = 
explode('.',MENUACTION);
!                               if 
(is_array($GLOBALS[$class]->public_functions) && 
$GLOBALS[$class]->public_functions['header'])
!                               {
!                                       $GLOBALS[$class]->header();
!                               }
!                       }
!                       elseif (file_exists(PHPGW_APP_INC . '/header.inc.php'))
!                       {
!                               include(PHPGW_APP_INC . '/header.inc.php');
                        }
                }
***************
*** 1090,1096 ****
                        if (!isset($GLOBALS['phpgw_info']['flags']['nofooter']) 
|| !$GLOBALS['phpgw_info']['flags']['nofooter'])
                        {
!                               include(PHPGW_API_INC . '/footer.inc.php');
                        }
!  
                        /* Clean up mcrypt */
                        if (@is_object($GLOBALS['phpgw']->crypto))
--- 1132,1163 ----
                        if (!isset($GLOBALS['phpgw_info']['flags']['nofooter']) 
|| !$GLOBALS['phpgw_info']['flags']['nofooter'])
                        {
!                               if((file_exists(PHPGW_APP_INC . 
'/footer.inc.php') || MENUACTION) &&
!                                       
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
!                                       
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' &&
!                                       
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' &&
!                                       
address@hidden'phpgw_info']['flags']['noappfooter'])
!                               {
!                                       if(MENUACTION)
!                                       {
!                                               list($app,$class,$method) = 
explode('.',MENUACTION);
!                                               
if(is_array($GLOBALS[$class]->public_functions) && 
$GLOBALS[$class]->public_functions['footer'])
!                                               {
! //                                    eval("\$GLOBALS[$class]->footer();");
!                                                       
$GLOBALS[$class]->footer();
!                                               }
!                                               
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
!                                               {
!                                                       include(PHPGW_APP_INC . 
'/footer.inc.php');
!                                               }
!                                       }
!                                       
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
!                                       {
!                                               include(PHPGW_APP_INC . 
'/footer.inc.php');
!                                       }
!                               }
!                               $GLOBALS['phpgw']->db->disconnect();
!                               parse_navbar_end();
                        }
!                       
                        /* Clean up mcrypt */
                        if (@is_object($GLOBALS['phpgw']->crypto))

Index: footer.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/footer.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** footer.inc.php      30 Apr 2002 11:42:08 -0000      1.19
--- footer.inc.php      24 May 2002 10:38:02 -0000      1.20
***************
*** 35,66 ****
        * Include the apps footer files if it exists                            
   *
        
\**************************************************************************/
!       if((file_exists(PHPGW_APP_INC . '/footer.inc.php') || MENUACTION) &&
!               $GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
!               $GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' &&
!               $GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' &&
!               address@hidden'phpgw_info']['flags']['noappfooter'])
!       {
!               if(MENUACTION)
!               {
!                       list($app,$class,$method) = explode('.',MENUACTION);
!                       if(is_array($GLOBALS[$class]->public_functions) && 
$GLOBALS[$class]->public_functions['footer'])
!                       {
! //                            eval("\$GLOBALS[$class]->footer();");
!                               $GLOBALS[$class]->footer();
!                       }
!                       elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
!                       {
!                               include(PHPGW_APP_INC . '/footer.inc.php');
!                       }
!               }
!               elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
!               {
!                       include(PHPGW_APP_INC . '/footer.inc.php');
!               }
!       }
! 
!       parse_navbar_end();
!       $GLOBALS['phpgw']->db->disconnect();
!   
  ?>
  </BODY>
--- 35,39 ----
        * Include the apps footer files if it exists                            
   *
        
\**************************************************************************/
!       $GLOBALS['phpgw']->common->phpgw_footer();
  ?>
  </BODY>

Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.136
retrieving revision 1.137
diff -C2 -r1.136 -r1.137
*** functions.inc.php   23 May 2002 21:28:59 -0000      1.136
--- functions.inc.php   24 May 2002 10:38:02 -0000      1.137
***************
*** 399,431 ****
                }
  
-               if (!isset($GLOBALS['phpgw_info']['theme']['css']))
-               {
-                       $GLOBALS['phpgw_info']['theme']['css'] = '';
-               }
- 
                if (isset($GLOBALS['phpgw_info']['theme']['hovlink'])
                         && ($GLOBALS['phpgw_info']['theme']['hovlink'] != ''))
                {
!                       $csshover = "\t".'A:hover{ text-decoration:none; color: 
' .$GLOBALS['phpgw_info']['theme']['hovlink'] .'; }'."\n";
                }
-               else
-               {
-                       $csshover = '';
-               }
-               $GLOBALS['phpgw_info']['theme']['css'] = "\t".'a { 
text-decoration:none; }'."\n"
-                 ."\t".'A:link{ text-decoration:none; color: 
'.$GLOBALS['phpgw_info']['theme']['link'].'; }'."\n"
-                 ."\t".'A:visted{ text-decoration:none; color: 
'.$GLOBALS['phpgw_info']['theme']['vlink'].'; }'."\n"
-                 ."\t".'A:active{ text-decoration:none; color: 
'.$GLOBALS['phpgw_info']['theme']['alink'].'; }'."\n"
-                       .$csshover
-                       .$GLOBALS['phpgw_info']['theme']['css'];
  
!               unset($csshover);
  
!               if(@file_exists(PHPGW_APP_TPL . '/app.css'))
                {
!                       $app_css_file = fopen (PHPGW_APP_TPL . '/app.css', "r");
!                       $contents = fread ($app_css_file, filesize 
($app_css_file));
!                       fclose ($app_css_file);
!                       $GLOBALS['phpgw_info']['theme']['css'] .= 
"\n".$contents;
                }
                
--- 399,420 ----
                }
  
                if (isset($GLOBALS['phpgw_info']['theme']['hovlink'])
                         && ($GLOBALS['phpgw_info']['theme']['hovlink'] != ''))
                {
!                       $phpgw_info['theme']['css']['A:hover'] = 
'text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['hovlink'].';';
                }
  
!               $phpgw_info['theme']['css']['A'] = 'text-decoration:none;';
!               $phpgw_info['theme']['css']['A:link'] = 'text-decoration:none; 
color: '.$GLOBALS['phpgw_info']['theme']['link'].';';
!               $phpgw_info['theme']['css']['A:visited'] = 
'text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['vlink'].';';
!               $phpgw_info['theme']['css']['A:active'] = 
'text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['alink'].';';
  
!               if(@file_exists(PHPGW_TEMPLATE_DIR . '/css.inc.php'))
                {
!                       include(PHPGW_TEMPLATE_DIR . '/css.inc.php');
!               }
!               if(@file_exists(PHPGW_APP_TPL . '/css.inc.php'))
!               {
!                       include(PHPGW_APP_TPL . '/css.inc.php');
                }
                
***************
*** 441,464 ****
  
                
/*************************************************************************\
-               * These lines remove the css data from memory since the 
template set will *
-               * already have loaded it into its own memory space              
          *
-               
\*************************************************************************/
-               if(address@hidden'phpgw_info']['flags']['keep_phpgw_css'])
-               {
- //                    unset($GLOBALS['phpgw_info']['theme']['css']);
-               }
- 
-               
/*************************************************************************\
-               * If they are using frames, we need to set some variables       
          *
-               
\*************************************************************************/
-               if 
(((isset($GLOBALS['phpgw_info']['user']['preferences']['common']['useframes']) 
&&
-                       
$GLOBALS['phpgw_info']['user']['preferences']['common']['useframes']) && 
-                       $GLOBALS['phpgw_info']['server']['useframes'] == 
'allowed') ||
-                       ($GLOBALS['phpgw_info']['server']['useframes'] == 
'always'))
-               {
-                       $GLOBALS['phpgw_info']['flags']['navbar_target'] = 
'phpgw_body';
-               }
- 
-               
/*************************************************************************\
                * Verify that the users session is still active otherwise kick 
them out   *
                
\*************************************************************************/
--- 430,433 ----
***************
*** 472,480 ****
                                ! 
$GLOBALS['phpgw_info']['user']['apps']['admin']))
                        {
!                               $GLOBALS['phpgw']->common->phpgw_header();
!                               if ($GLOBALS['phpgw_info']['flags']['noheader'])
!                               {
!                                       echo parse_navbar();
!                               }
  
                                
$GLOBALS['phpgw']->log->write(array('text'=>'W-Permissions, Attempted to access 
%1','p1'=>$GLOBALS['phpgw_info']['flags']['currentapp']));
--- 441,445 ----
                                ! 
$GLOBALS['phpgw_info']['user']['apps']['admin']))
                        {
!                               $GLOBALS['phpgw']->common->phpgw_header(False, 
False);
  
                                
$GLOBALS['phpgw']->log->write(array('text'=>'W-Permissions, Attempted to access 
%1','p1'=>$GLOBALS['phpgw_info']['flags']['currentapp']));
***************
*** 488,495 ****
                * Load the header unless the developer turns it off             
          *
                
\*************************************************************************/
!               if (address@hidden'phpgw_info']['flags']['noheader'])
!               {
!                       $GLOBALS['phpgw']->common->phpgw_header();
!               }
  
                
/*************************************************************************\
--- 453,457 ----
                * Load the header unless the developer turns it off             
          *
                
\*************************************************************************/
!               $GLOBALS['phpgw']->common->phpgw_header(False, False);
  
                
/*************************************************************************\
***************
*** 501,511 ****
                        include(PHPGW_APP_INC . '/functions.inc.php');
                }
!               if (address@hidden'phpgw_info']['flags']['noheader'] && 
!                       address@hidden'phpgw_info']['flags']['noappheader'] &&
!                       file_exists(PHPGW_APP_INC . '/header.inc.php') && 
!MENUACTION)
                {
!                       include(PHPGW_APP_INC . '/header.inc.php');
                }
        }
- 
        error_reporting(E_ERROR | E_WARNING | E_PARSE);
--- 463,471 ----
                        include(PHPGW_APP_INC . '/functions.inc.php');
                }
! 
!               if (address@hidden'phpgw_info']['flags']['noappheader'])
                {
!                       $GLOBALS['phpgw']->common->phpgw_appheader();
                }
        }
        error_reporting(E_ERROR | E_WARNING | E_PARSE);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]