how to theme maintenance page?

noovot - February 16, 2008 - 15:02

Hi.

I just started making my theme, and i want to stylize maintenance page. I found some solutions by searching but it seems that they fit for 5.x. As i'm dealing with 6.x they don't for for me. Because as i understand something in theming maintenance page has changed. Can anybody enlighten me? I want to override theming of maintenance page in my theme (tempalte), i don't want to hack core. Thanks

=-=

VeryMisunderstood - February 16, 2008 - 15:21

add a custom maintenance-page.tpl.php to your theme

see the one in garland for example

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

okay, i just copied it,

noovot - February 16, 2008 - 23:49

okay, i just copied it, because it seems to not have any garland tails

nothing happened

i tried to loook through garland's template.php - there's nothing that looks like maintenance (override or kinda)

i feel it's somewhere in includes/themes.maintenance.inc but where...?

This might be the

jmburnz - February 17, 2008 - 02:03

The registry doesn't factor

dvessel - February 24, 2008 - 23:41

The registry doesn't factor into maintenance pages but that is the only exception.

joon park

Get that

dvessel - February 23, 2008 - 04:11

Get that maintenance-page.tpl.php into your theme then look inside your "settings.php" file. There will be notes on maintenance themes.

The way the new theming system is handled, makes this necessary. A nice bonus though is that if your database crashes, you can also add "maintenance-page-offline.tpl.php" to show a friendly page with your branding intact.

joon park

Doesn't work for online maintenance mode

Sandoz - February 29, 2008 - 21:21

That does work well if the mysql DB is offline, but maintenance-page.tpl.php isn't parsed when the DB is online and the site mode is offline--page.tpl.php is called instead.

You have to log-out. It's

dvessel - February 29, 2008 - 21:46

You have to log-out. It's only supposed to be visible for anonymous users.

http://drupal.org/node/195435

joon park

Any way to override that?

Sandoz - March 5, 2008 - 21:12

Any way to override that?

To be more clear.. Users

dvessel - March 6, 2008 - 18:44

To be more clear.. Users without administration privileges will see the offline page. Administrators seeing that screen would lock them out forever.

joon park
–the devil in the details–

doesnt work for me either

macrocosm - June 14, 2008 - 21:01

Does not work for me, followed the instructions in the docs .. seems simple enough. That hack below is looking very tempting!

Nevermind that

macrocosm - June 14, 2008 - 21:51

I forgot to uncomment the closing line of the $conf thingy. Oops ^_^
also I got tripped up by not including both
maintenance-page-offline.tpl.php
maintenance-page.tpl.php

Now I just need to find the hook to call the off-line message set in the admin, and this will be perfect!

make some changes

NecroHill - February 24, 2008 - 20:01

change in the includes\theme.maintenance.inc (line 46):
$theme = variable_get('maintenance_theme', 'minnelli');

to
$theme = variable_get('maintenance_theme', 'YOUR_THEME');

do not forget to put your changed maintenance-page.tpl.php file in the root folder of your theme

=-=

VeryMisunderstood - February 24, 2008 - 20:05

you shouldn't hack core files, it's not a best practice. Using the settings.php method insures that when your site is updated the changes are left intact. The method above means, you will have to make this same change multiple times.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

make some change - just Curious

wolfflow - June 15, 2008 - 03:45

Hi, reading this Post i had somehow a clue.

Can you not add to your custom maintenance-page.tpl.php an "if" statement that when the "variable_get('maintenance_theme' == "minnelli", change to "Your_Theme" ?

I'm really unknown of PHP it's really only a pure ultra-beginners curiosity.
I just thing that might be the logical sequence to not fork or hack Drupal-Core for obviously
future update-processing.

Cheers

P.S.
JUst deleted my link to a homepage that do not exist anymore. (15.06.2008)

For the love of god.... I

abato - July 25, 2008 - 20:27

For the love of god.... I cant get this to work after I upgraded... Working with theme "marvin".

I copied the template.tpl.php to chameleon directory

then I change settings. I have tried both (line 185)

$conf = 'maintenance_theme' => 'marvin',

and
$conf = ['maintenance_theme'] => 'marvin',

and
'maintenance_theme' => 'marvin',

None if this worked so I went to theme.maintance.inc and changed on line 46

    $theme = variable_get('maintenance_theme', 'marvin');

whatever I do, when site is off line the viewer gets:

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /var/www/dzidzo.dk/public_html/sites/default/settings.php on line 185

PLS: Any help would be much appreciated.
Regards

changing maintenance page

1phatdj - July 26, 2008 - 22:18

Hi, i figured out a nifty way to change my maintenance page without messing with any configuration whatsoever. Go into the Garland theme folder in your drupal installation, copy the maintanance-page.tpl.php to your computer and edit the heck out of it. Then, rename the garland's original one as something else, like maintenance-page.tpl-old.php, and upload your new one in its place. it will automatically take it up and i pretty much took a html page which i'm using as the "coming soon" page for a client.

Hope this way works out for you, and let me know if you have any questions; oh by the way i'm in drupal 6.3.

Jesus fraken bush, you would

darumaki - August 2, 2008 - 01:22

Jesus fraken bush, you would think the drupal team could have made this any more difficult :)

 
 

Drupal is a registered trademark of Dries Buytaert.