[geeklog-cvs] Geeklog-1.x/system/classes config.class.php, 1.18, 1.19

Blaine Lang blaine at qs1489.pair.com
Sat Feb 2 16:56:45 EST 2008


Update of /cvsroot/geeklog/Geeklog-1.x/system/classes
In directory qs1489.pair.com:/tmp/cvs-serv56655

Modified Files:
	config.class.php 
Log Message:
Modifications to config manager to not use a standard block function. Config Manager menu(s) are setup to be part of the configmanager template. The config menu block will use the theme's functions.php to get any block header and footer templates. By default we are using a new pair of templates that don't have a title to tighten up the layout.

Index: config.class.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/classes/config.class.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** config.class.php	27 Jan 2008 09:02:15 -0000	1.18
--- config.class.php	2 Feb 2008 21:56:43 -0000	1.19
***************
*** 438,442 ****
          // Output the result and add the required CSS for the dropline menu
          $cssfile = '<link rel="stylesheet" type="text/css" href="'.$_CONF['layout_url'] .'/droplinemenu.css" ' . XHTML .'>' . LB;
!         $display  = COM_siteHeader(array('configmanager_menu'),'Configuration Manager',$cssfile);
          if ($change_result != null AND $change_result !== array()) {
              $t->set_var('change_block',$this->_UI_get_change_block($change_result));
--- 438,443 ----
          // Output the result and add the required CSS for the dropline menu
          $cssfile = '<link rel="stylesheet" type="text/css" href="'.$_CONF['layout_url'] .'/droplinemenu.css" ' . XHTML .'>' . LB;
!         $display  = COM_siteHeader('none','Configuration Manager',$cssfile);
!         $t->set_var('config_menu',$this->_UI_configmanager_menu($grp));
          if ($change_result != null AND $change_result !== array()) {
              $t->set_var('change_block',$this->_UI_get_change_block($change_result));
***************
*** 647,650 ****
--- 648,683 ----
  
          return $r;
+     }
+ 
+ 
+     function _UI_configmanager_menu($conf_group) {
+         global $_CONF,$LANG_configsubgroups,$LANG_CONFIG;
+ 
+         $retval = COM_startBlock( 'Config Sections', '', COM_getBlockTemplate( 'configmanager_block', 'header' ));
+         $retval .= "<div><a href=\"{$_CONF['site_url']}\">{$LANG_CONFIG['home']}</a></div>";
+         $retval .= "<div><a href=\"{$_CONF['site_admin_url']}\">{$LANG_CONFIG['admin_home']}</a></div>";
+         $groups = $this->_get_groups();
+         if (count($groups) > 0) {
+             foreach ($groups as $group) {
+                 $group_display = ucwords($group);
+                 $retval .= "<div><a href=\"#\" onclick='open_group(\"$group\")'>$group_display</a></div>";
+             }
+         }
+         $retval .= COM_endBlock(COM_getBlockTemplate( 'configmanager_block', 'footer' ));
+ 
+         $subgroup_title = ucwords($conf_group);
+         $retval .= COM_startBlock( $subgroup_title, '',COM_getBlockTemplate( 'configmanager_block', 'header' ) );
+ 
+         $groups = $this->get_sgroups($conf_group);
+         if (count($groups) > 0) {
+             foreach ($groups as $group) {
+                 $group_display =  $LANG_configsubgroups[$conf_group][$group];
+                 $retval .= "<div><a href=\"#\" onclick='open_subgroup(\"$conf_group\",\"$group\")'>$group_display</a></div>";
+             }
+         }
+         $retval .= COM_endBlock(COM_getBlockTemplate( 'configmanager_block', 'footer' ));
+ 
+         return $retval;
+ 
      }
  }




More information about the geeklog-cvs mailing list