Hi,

If this is already possible please forgive me, but I can't find the settings anywhere.

Would it be possible, or is it possible, to set the settings (eg colour) of the maintenance page. Currently, although my site is running in grey/silver, when in maintenance mode it reverts to and uses the girly pink colours.

Comments

Actually I don't know, give me a couple of days to look into it.

First, thanks for a great theme! As a workaround I switch to the default theme before going to maintenance mode. Having the maintenance mode in the same look as the pixture reloaded theme would look much better though.

Actually, what would do for me is, the default color set being something more neutral than the pink one :)

I think what I will do is build a dedicated maintenance page that avoids the color module, something like that - I can probably make this work when the database is active, but when its not then all hell will break loose unless I account for that, in which case we're getting into a lot of hassel to display one page. Something along the lines of what Bartik does is probably the best approach.

I see still the same problem that pink site in maintenance looks realy girl like.

But i have a solution for the Problem.

I have addes follow code to pixture_reloaded template.php

<?php
/**
* Implements hook_preprocess_maintenance_page().
*/
function pixture_reloaded_preprocess_maintenance_page(&$variables) {
  global
$theme_key;
 
$color_paths = variable_get('color_' . $theme_key . '_stylesheets', '');
 
$css str_replace('public://','sites/default/files/',$color_paths[0]);
 
drupal_add_css($css,array('group' => CSS_THEME,'weight' => 99));
}
?>

This needs to added the configure color.css to the maintenace-page.tpl.php.

Its really simple and works fine. Testet with both 2.2-dev version of pixture_reloaded
and adaptive themes.

Greets Lennard

Title:Maintence Theme SettingsMaintenance Page Color
Version:7.x-1.0» 7.x-2.x-dev

Hi Lennard - that looks ingenious, I have to try this out immediately!

Status:Active» Needs review

Hey Jeff we need same code in the 7.x.-3.x Version to display the right colors
in the maintanance page. ^^

Thank you.

OK, thinking about something a little more generic that could actually slot into the base theme and save me replicating this for every subtheme:

<?php
 
if (module_exists('color')) {
   
$color_file = variable_get('color_' . $theme_name . '_stylesheets', NULL);
    if (
file_exists($color_file[0])) {
     
drupal_add_css($color_file[0], array(
       
'group' => CSS_THEME,
       
'weight' => 99,
        )
      );
    }
  }
?>

I tested the above with some of my themes and it works really good, of course it fails for database failure but I can't seem to find a way around that, since I don't think there's a way to set config variables in settings.php just for maintenance pages (there probably is, and if someone finds out could they tell me please :)

Ok jeff i have testet and it works too.

I have insert follow in template.php of pixture_reloaded.

<?php
/**
* Implements hook_preprocess_maintenance_page().
*/
function pixture_reloaded_preprocess_maintenance_page(&$variables) {
  global
$theme;
  if (
module_exists('color')) {
   
$color_file = variable_get('color_' . $theme . '_stylesheets', NULL);
    if (
file_exists($color_file[0])) {
     
drupal_add_css($color_file[0], array(
       
'group' => CSS_THEME,
       
'weight' => 99,
        )
      );
    }
  }
}
?>

I hope that is what you means.

Greets Lennard

It is not necessary in my opinion mantanance page settings in settings.php is because when a database once a fault has normal, the website does not appear.

Drupal requires at all times a working database.

A further point is that even the text of the maintenance page databank also stored in.

Greets Lennard

Yep, thats what I mean, sorry about the $theme_name variable, thats something I use in AT Core 3.x. Global theme serves the purpose well also.

I'm working on a client site with 7.x-2.2 (not dev as this issue is set as) and neither #5 nor #10 work, maintenance page still pink. Is this expected to work with 7.x-2.2?