System Module Hack

This little code snippet allows the "admin theme" to extend to the add or edit pages of your site. Open up your system.module file and search for the comment and change the script accordingly: Use the administrative theme if the user is looking at a page in the admin/* path


<?php
/* CHANGED ADMIN THEME OPTION TO EXTEND TO ADD PAGE ETC...
    if (arg(0) == 'admin') {
      global $custom_theme;
      $custom_theme = variable_get('admin_theme', '0');
      drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
    }
*/  
    
if (arg(0) == 'admin' OR (arg(0) == 'node' AND arg(1) == 'add') OR 
    ( 
arg(0) == 'node' AND ( arg(2) == 'edit' OR arg(2) == 'localizernode') ) ) {
      global 
$custom_theme;
      
$custom_theme variable_get('admin_theme''0');
      
drupal_add_css(drupal_get_path('module''system') .'/admin.css''module');
    }


Syndicate content