<?php
/**
* In this example, it uses the administration theme on "node creation", "node edition",
* "user registration", "user profile" and "forgot password" pages.
*/
function MODULENAME_init(){
// The list of paths on which to use the administration theme
$patterns = array(
'user',
'user/*',
'user/password',
'user/*/edit',
'user/*/geodata',
'node/add/*',
'node/*/edit',
'node/*/delete'
);
$path = drupal_get_path_alias($_GET['q']);
$use_admin_theme = false;
foreach ($patterns as $pattern){
if (drupal_match_path($path, $pattern)){
$use_admin_theme = true;
break;
}
}
if ($use_admin_theme){
global $custom_theme;
$custom_theme = variable_get('admin_theme', '0');
drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
}
}
?>