[User experience feature] Variable overrides in settings.php
Issue status update for http://drupal.org/node/38713 Post a follow up: http://drupal.org/project/comments/add/38713 Project: User experience Version: <none> Component: usability Category: feature requests Priority: normal Assigned to: Zen Reported by: Zen Updated by: drlingo Status: patch (code needs review) I have tried to use your patch however, I receive a blank screen when I installed the patch. What must I do to make this work? This problem with the online, offline function needs to be resolved I know I can't be the only one. drlingo Previous comments: ------------------------------------------------------------------------ Thu, 24 Nov 2005 05:56:03 +0000 : Zen Hi, When a user moves/duplicates a site with clean_urls on, caching etc. he is very frequently locked out if he can't get mod_rewrite etc. working. Similarly, with the new Site Offline/Online feature, there doesn't seem to be any option for the admin to turn it off or log back in if he accidentally logs out.. The site/default/settings.php file has a section that allows overriding these DB variables. If the above mentioned variables can be added (and commented out), it might make things a lot easier to rescue the site without having to mess around with serialized variables in the variables table.. <?php $conf = array( 'site_name' => 'My Drupal site', 'clean_url' => 0, 'clean_url_ok' => 0, 'cache' => 0, 'site_offline' => '0', ); ?> (I'm not entirely sure what clean_url_ok does, but I've added it in anyways..) If and when all the variables to be added are decided, I'll attach a patch file. Cheers Karthik. P.S User Experience/usability seemed like the best place to put this.. ------------------------------------------------------------------------ Thu, 24 Nov 2005 19:54:08 +0000 : Geary This is an outstanding idea! I have been in this fix myself, and naturally looked in settings.php to see if there was an override. Having these "safe mode" settings visible and commented out would save a lot of people a lot of headache. ------------------------------------------------------------------------ Thu, 24 Nov 2005 23:15:21 +0000 : lekei In my settings.php I have the ability to launch the site in safe mode: /* * Safe mode -- launch site with safe settings */ if ($ALLOW_SAFE_SETTINGS && isset($_GET['SAFE_SETTINGS'])) { $conf = array_merge( $conf,array( 'site_name' => trim($_SERVER['HTTP_HOST'],"/").' (SAFE MODE)', 'theme_default' => 'pushbutton', 'clean_url' => 0, 'cache' => 0, 'site_offline' => '0' )); } at the beginning of settings.php there is a line allowing disabling safe mode: // Permits launching the site in "safe mode" by acccesing it with: // http://yourdomain?SAFE_SETTINGS $ALLOW_SAFE_SETTINGS = TRUE; ------------------------------------------------------------------------ Fri, 25 Nov 2005 03:37:25 +0000 : Zen @lekei: ah, that's a lot cleaner. But I assume that you're either using Civic or have added this in yourself? It isn't present in standard installations. I'm not sure the _GET is really required though. Either way, you should make that into a patch and submit it. Cheers Karthik. ------------------------------------------------------------------------ Sat, 14 Jan 2006 22:56:33 +0000 : Zen Attachment: http://drupal.org/files/issues/settings_5.patch (579 bytes) Patch attached. -K
participants (1)
-
drlingo