audibleCode

a code repository for codes that you don’t have enough words to describe

Drupal Backend theme issues

with one comment

If you’ve configured Drupal (www.drupal.org) the way that it
uses different themes for the frontend and the backend, it still kicks
you into the frontend when you edit content.
To change this you have to edit this file:
modules/system/system.module

at the end of the function “function system_menu($may_cache)” look
for the “else” part

// in line ~308
// find:
if (arg(0) == ‘admin’) 

// repalce with:
if (arg(0) == ‘admin’||
(arg(0)==’node’ && arg(1)==’add’) ||
(arg(0)==’user’ && arg(1)!=”) ||
(arg(0)==’node’ && (arg(2)==’edit’ || arg(2)==’localizernode’))
)

 

Written by audiblecode

May 22, 2008 at 1:58 pm

One Response

Subscribe to comments with RSS.

  1. Not only is it VERY ill advice to hack your Drupal core, above code is simply ugly.

    It includes a rather obscure module called “localizernode” and it will break your system when e.g. you start using a forum. Because people who add forum-topics suddenly switch between backend and frontend.

    Better option is to enable a module such as sections or another theme-switcher, that lets you define where a certain theme is enabled.

    ber

    October 8, 2008 at 12:59 pm


Leave a Reply