audibleCode

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

Drupal Backend theme issues

with 2 comments

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

2 Responses

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

  2. Prima Internetpage – Habe klitze kleine Frage. Mein kleines Ego ist auch gerade dabei meinen eigenen kleinen Blog einzurichten und ich finde dein Style gut. Wo kann man das Theme installieren?

    Summer Lahey

    February 17, 2010 at 11:56 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.