Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 15th, 2012  |  syntax: None  |  size: 0.92 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /**
  3.  * Custom admin layout
  4.  */
  5.  
  6. // add this file to a folder admintheme/code
  7. // create a _config.php in admintheme/
  8.  
  9. // add this to _config.php
  10. // LeftAndMain::add_extension('LeftAndMain','MyLeftAndMain');
  11. // MyLeftAndMain::set_theme($theme = 'blue');
  12.  
  13. // optional javascript loading in _config.php
  14. // LeftAndMain::require_javascript("admintheme/javascript/jquery.my.js");
  15.  
  16. class MyLeftAndMain extends LeftAndMainDecorator {
  17.        
  18.         static $theme = 'blue';
  19.        
  20.         function set_theme($theme = 'blue'){
  21.                 self::$theme = $theme;
  22.         }
  23.        
  24.         function init() {
  25.                 parent::init();
  26.                 CMSMenu::remove_menu_item('Help');  
  27.                 CMSMenu::remove_menu_item('CommentAdmin');
  28.                
  29.                 Requirements::block(CMS_DIR . '/css/layout.css');
  30.                 Requirements::block(THIRDPARTY_DIR . '/tree/tree.css');
  31.                 Requirements::css('admintheme/'.self::$theme.'/css/layout.css');
  32.                 Requirements::css('admintheme/'.self::$theme.'/tree/tree.css');
  33.  
  34.         }      
  35. }