Administration theme not on every page

pommac - January 18, 2007 - 10:13

Hi!

My theme is quite different from the default ones and since I haven't skinned the admin part of it yet (not sure if I ever will, either) I'm using Garland as administration theme. However, when I'm on the "Administer Blocks" page or any of the "Create Content" pages, the theme reverts to my custom one and all the form controls look horrible. Is there a way around this?

Having same problem

emackn - January 23, 2007 - 21:05

I'm having a similar problem with the blocks admin page except my theme is completely dropped, no style whatsoever. Same thing happens after enabling/disabling modules.

Here is my original post http://drupal.org/node/111467

check out node/100757

avolve - January 23, 2007 - 21:12

i posted an issue about this some time back. You might glean something from it - http://drupal.org/node/100757

Cheers,
c.

Thanks

emackn - January 23, 2007 - 22:15

That helped some. Looks like there are a fiew problems with the admin theme but no one wants to look at it. Not sure what I'm gonna do at this point.

Seems like Im just missing some new themeing function or something. The page loads, but there is no css links and no style, I took a screenshot of what im talking about below:
http://picasaweb.google.com/eric.mckenna/Drupal/photo#5023352528005646786

fix in block.module

cornelius - March 1, 2007 - 20:34

I found a quick fix for Block administration in block.module (go figure). Just comment out the following lines (213-218) like so:

  // if ($theme) {
    // $custom_theme = $theme;
  // }
  // else {
    // $custom_theme = variable_get('theme_default', 'garland');
  // }

Hope that helps. I'm sure there's a similar fix in node.module for Create Content, I just haven't tracked it down yet.

Solved

reed.richards - December 27, 2007 - 18:06

Add code below in your whatever module. I put in the block module, but it probably should be in a separate module. If you want to have block as well you add that in if statement.

<?php
 
if ((arg(0) == 'node' && arg(1) == 'add') ||  (arg(0) == 'node' && arg(2) == 'edit') ||  (arg(0) == 'user' && arg(2) == 'edit') ) {
      global
$custom_theme;
     
$custom_theme = variable_get('admin_theme', '0');
     
drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
  }
?>

The original post

http://drupal.org/node/122578

I've built this

Davy Van Den Bremt - December 19, 2008 - 13:02

I've built this functionality into a extendable (hooks) module: http://drupal.org/project/admin_theme.

http://www.davyvandenbremt.be
http://www.drupalcoder.com

 
 

Drupal is a registered trademark of Dries Buytaert.