Guest Posted July 27, 2003 Share Posted July 27, 2003 ok been mucking with the down for maintence followed the instructions for version 1.1 for the /admin/configuration.php for mine its on line 15-30 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($HTTP_GET_VARS['action']) { case 'save': $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']); $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . tep_db_input($cID) . "'"); // set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'true') ) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '" . NOW . "' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); } tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); break; } } I have not got the notice to public to work yet getting error on line 40 but will work on that tommorow you can see here http://www.myweb-host2.com/catalog/down_fo...maintenance.php Quote Link to comment Share on other sites More sharing options...
stretchr Posted July 27, 2003 Share Posted July 27, 2003 ok been mucking with the down for maintence followed the instructions for version 1.1... That fixed it, thanks. What was the code that was preventing changes from being saved? Cheers, Stretchr Quote "It's a small world... But I wouldn't want to paint it!" Stephen Wright Link to comment Share on other sites More sharing options...
Guest Posted July 27, 2003 Share Posted July 27, 2003 the original code for the /admin/configuration $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'save': $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']); $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); break; } } which is different from ms1 i use the code from that i posted before if copied the code directly for the readme then it will not work ***NOTE*** i have not got the notice to public to work on mine i get the error in the header.php on line 40 wihci is a database connection not sure why its not pulling the data from the database Quote Link to comment Share on other sites More sharing options...
stretchr Posted July 27, 2003 Share Posted July 27, 2003 the original code for the /admin/configuration $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'save': $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']); $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); break; } } which is different from ms1 i use the code from that i posted before if copied the code directly for the readme then it will not work ***NOTE*** i have not got the notice to public to work on mine i get the error in the header.php on line 40 wihci is a database connection not sure why its not pulling the data from the database I get the same error and also get one if I put an IP address into the Admin IP field. Cheers, Stretchr Quote "It's a small world... But I wouldn't want to paint it!" Stephen Wright Link to comment Share on other sites More sharing options...
Guest Posted July 28, 2003 Share Posted July 28, 2003 stretchr i found this thread http://www.oscommerce.com/forums/viewtopic.php?t=52507 which should get down for maintence working for you Quote Link to comment Share on other sites More sharing options...
Guest Posted July 29, 2003 Share Posted July 29, 2003 Trying to install 1.0 (or 1.1) on MS1, and already having an issue. In my 'includes/header.php' file, i cannot locate this line: // check session.auto_start is disabled I checked my original install, and still can't find it, so i don't think I have modified that file yet. Can anyone else point me in the right direction? Thanks. t. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 29, 2003 Share Posted July 29, 2003 pocketGEAR.ca i have a customized shop available for download which is 2.2 MS1 and 40 mods added in if this will work for you, you download from the following thread. download section is towards the bottom http://www.oscommerce.com/forums/viewtopic.php?t=48333 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 29, 2003 Share Posted July 29, 2003 Trying to install 1.0 (or 1.1) on MS1, and already having an issue. In my 'includes/header.php' file, i cannot locate this line: // check session.auto_start is disabled I checked my original install, and still can't find it, so i don't think I have modified that file yet. Can anyone else point me in the right direction? Thanks. t. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 29, 2003 Share Posted July 29, 2003 it should be located around line 38 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2003 Share Posted September 23, 2003 I installed this version rather than the updated one, as I have MS1, not MS2. I've only installed it in my test store but everything seems to be working OK except I haven't tried the admin IP thing yet as I have a dynamic IP, not a static one. The only thing that stays the same are the first two sets of numbers eg it could be 12.345.67.890 or 12.345.42.35 I don't want to just put in 12.345 as everyone with those numbera t the beginning could get in. Any ideas? Quote Link to comment Share on other sites More sharing options...
laurie Posted January 30, 2004 Share Posted January 30, 2004 I am installing v1.2 on ms2 and getting the error MySQL said: You have an error in your SQL syntax near '; INSERT INTO configuration (configuration_id, configuration_title, configurati' at line 1 This has been previously posted and the solution was to change the 16 's to 700's. I tried this but it does not work. Could anyone throw some light on this, before I end up with grey hair. Quote Link to comment Share on other sites More sharing options...
busonero Posted January 30, 2004 Share Posted January 30, 2004 @laurie Ich had the same problem. You must change "all" value 16 to the new value (i did set 18 ) Just load the sql in your editor , i use homesite, and do a search for value 16 and replace with value 18 It did work for me sincerely roberto Quote Link to comment Share on other sites More sharing options...
adiwillow Posted August 3, 2005 Share Posted August 3, 2005 Hi all :D installed down for maintenance v2.1, all works fine, but when i enter my IP into the admin i get a blank page on the shop? Any ideas? easy fix? Quote Link to comment Share on other sites More sharing options...
giapet Posted November 21, 2005 Share Posted November 21, 2005 I've installed Down for Maintenance v2.1 It has code in the catalog/down_for_maintenance.php file that refers to the contribution Header Tag Controller that I don't have installed. My stylesheet design is not showing up though all else works fine with it. Can anyone post the code I need t ochange to make it refer to my stylesheet and not the header tag controller con? I tried just taking out the other con. info but that didn't work. Here's the code just up to the body. <?php /* Created by: Linda McGrath [email protected] Update by: fram 05-05-2003 down_for_maintenance.php v1.1 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . DOWN_FOR_MAINTENANCE_FILENAME); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php // BOF: WebMakers.com Changed: Header Tag Controller v1.0 // Replaced by header_tags.php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE ?></title> <?php } // EOF: WebMakers.com Changed: Header Tag Controller v1.0 ?> <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="<? echo THEMA_STYLE;?>"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <?php // WebMakers.com Added: Down for Maintenance // Hide header if not to show if (DOWN_FOR_MAINTENANCE_HEADER_OFF =='false') { ?> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <?php } ?> <!-- body //--> Thank you, Karen Quote Link to comment Share on other sites More sharing options...
giapet Posted November 21, 2005 Share Posted November 21, 2005 Okay I played around with the code and fixed it. This is what I did in case anyone else has the same problem of your stylesheet design not showing up with version 2.1 I changed this <?php // BOF: WebMakers.com Changed: Header Tag Controller v1.0 // Replaced by header_tags.php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE ?></title> <?php } // EOF: WebMakers.com Changed: Header Tag Controller v1.0 ?> To just this <title><?php echo TITLE ?></title> And changed this href="<? echo THEMA_STYLE;?>"> to this href="stylesheet.css"> Karen Quote Link to comment Share on other sites More sharing options...
kittmaster Posted December 1, 2005 Share Posted December 1, 2005 I've installed this, and all the options work except when I change the NOTICE option is used. Fatal error: Call to undefined function: tep_output_warning() in /homepages/2/d134230169/htdocs/GForce/shopping/includes/header.php on line 42 // give the visitors a message that the website will be down at ... time if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) { tep_output_warning(TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE); } I have the TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE defines in the language file so I'm not sure why it is call it an undefined function Any ideas? .......heavily modified shop ms2 Chris Quote Link to comment Share on other sites More sharing options...
kittmaster Posted December 9, 2005 Share Posted December 9, 2005 I've installed this, and all the options work except when I change the NOTICE option is used. Fatal error: Call to undefined function: tep_output_warning() in /homepages/2/d134230169/htdocs/GForce/shopping/includes/header.php on line 42 // give the visitors a message that the website will be down at ... time if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) { tep_output_warning(TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE); } I have the TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE defines in the language file so I'm not sure why it is call it an undefined function Any ideas? .......heavily modified shop ms2 Chris :-" Can't get past this error...... Quote Link to comment Share on other sites More sharing options...
kittmaster Posted December 10, 2005 Share Posted December 10, 2005 :-" Can't get past this error...... I am now past this error by doing the following fix The reason it seems is that the code was altered from tep_output_warning to another format. I have the solution for MS2 and it works with all contribs installed. Use the code below and it should solve your issues and get the warning working as they were meant to. Works flawlessly on my site........:) // give the visitors a message that the website will be down at ... time if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) { $messageStack->add('header', TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE, 'warning'); } // this will let the admin know that the website is DOWN FOR MAINTENANCE to the public if ( (DOWN_FOR_MAINTENANCE == 'true') && (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE == getenv('REMOTE_ADDR')) ) { $messageStack->add('header', TEXT_ADMIN_DOWN_FOR_MAINTENANCE, 'warning'); } // check session.auto_start is disabled Enjoy and Greets Chris Quote Link to comment Share on other sites More sharing options...
primadude Posted December 14, 2005 Share Posted December 14, 2005 giapet, your change fixed my stylesheet issue for me... kittmaster, your change fixed my tep_output_warning() error... Thanks, both of you... :thumbsup: Joe Quote Link to comment Share on other sites More sharing options...
kittmaster Posted December 14, 2005 Share Posted December 14, 2005 giapet, your change fixed my stylesheet issue for me... kittmaster, your change fixed my tep_output_warning() error... Thanks, both of you... :thumbsup: Joe Glad to help....... Chris Quote Link to comment Share on other sites More sharing options...
azer Posted February 3, 2006 Share Posted February 3, 2006 hi , is there any way to add in the admin several ip allowed, for instance, my real ip and also 127.0.0.1 when i work locally ? Quote MS2 Link to comment Share on other sites More sharing options...
mrgtec Posted February 5, 2006 Share Posted February 5, 2006 Hi, The IP address thing still doesnt work for me, I can't get in to my site when I swhich this on, it stays on the Down for Maintenance page, when I already logged in to the admin panel, and when I swhich it back to off, the front page is back to the norm. Michael Quote Michael Link to comment Share on other sites More sharing options...
BlackCap Posted August 26, 2007 Share Posted August 26, 2007 I know this is a old contrib, but i is still the only one i have found, and it works fine for me.. But... :blush: Can some one please tell me how to make the "Down For Maintenance (exclude this IP-Address)" work whit ip listet whit a comma like in the "Send Extra Order Emails To" from the standart osc options.. I havent got the skills to do it... BlackCap... (ps.. sorry for my bad spelling.. if it is any consolation i cant spell in my own language) :-" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.