teksigns Posted March 23, 2003 Share Posted March 23, 2003 good reason ..... but other like myself surley have lans like myself with more than one pc and use more than one pc.... guess ill release my mod on the site with its original self intact so others that find it usefull can use it without having to search ...... its really usefull to me since i use different pcs on our lan at different times . i may include the option to make it a single ip or range like i have by setting a true false in the admin .... keep up the good work later Quote Link to comment Share on other sites More sharing options...
DavidR Posted March 23, 2003 Share Posted March 23, 2003 Thanks! I never know if I am just overlooking something as I end up working with osC at all hours. I just realized that my server is on a different time zone as well so I will probably have to do the same hack or just use GMT. Thanks again. David Quote Link to comment Share on other sites More sharing options...
Druide Posted March 23, 2003 Share Posted March 23, 2003 for users on a LAN ( special request from teksign ;) ) update 1.0.1b insert in your database with your favorite tool like phpmyadmin or whatever you like... INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Down For Maintenance - Allowed IP Range', 'EXCLUDE_IP_RANGE_FROM_MAINTENANCE', '192.168.0', 'IP address Range (first 9) Allowed to access site during Down For Maintenance.<br>Only usefull for working on a LAN.', 1, 500, '2003-03-23 15:07:52', '0000-00-00 00:00:00', NULL, NULL); ========================================================== Changes to /catalog/includes/application_top.php Locate the lines: // BOF: Down for Maintenance except for admin ip if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){ if (DOWN_FOR_MAINTENANCE=='true' and !strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } } Replace it with: // BOF: Down for Maintenance except for admin ip if (!defined("EXCLUDE_IP_RANGE_FROM_MAINTENANCE")) define('EXCLUDE_IP_RANGE_FROM_MAINTENANCE', substr($EXCLUDE_ADMIN_IP_FOR_MAINTENANCE,0,9)); if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR') || EXCLUDE_IP_RANGE_FROM_MAINTENANCE != substr($REMOTE_ADDR,0,9)){ if (DOWN_FOR_MAINTENANCE=='true' and !strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } } Changes to /catalog/includes/header.php Locate the lines: // 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')) ) { tep_output_warning('NOTICE: the website is currently Down For Maintenance to the public'); } Replace it with: // 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')) || ( EXCLUDE_IP_RANGE_FROM_MAINTENANCE == substr($REMOTE_ADDR,0,9)) ) { tep_output_warning('NOTICE: the website is currently Down For Maintenance to the public'); } Quote Robert We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;) Link to comment Share on other sites More sharing options...
Druide Posted March 24, 2003 Share Posted March 24, 2003 new version with email options will be launched soon.... Read Linda's reply for the new options a few post back Admin Area is ready, just need to make the code osC style and some lay-out adjusting Quote Robert We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;) Link to comment Share on other sites More sharing options...
Waza04 Posted March 24, 2003 Share Posted March 24, 2003 new version with email options will be launched soon.... Read Linda's reply for the new options a few post back Admin Area is ready, just need to make the code osC style and some lay-out adjusting Yes - This would be great! I cant wait!! Thanks, Warren PS When will it be ready? Quote Link to comment Share on other sites More sharing options...
howgo Posted May 24, 2003 Share Posted May 24, 2003 Hello, I have got an error with the latest v1.1 - If I change to the maintenance modus, the stylesheets file won?t be loaded. The result of them is that the page is totally unformated. What I have done wrong ? Thanks Andreas Quote Link to comment Share on other sites More sharing options...
oilzzz Posted May 28, 2003 Share Posted May 28, 2003 Having trouble loading the database getting this.... MySQL said: You have an error in your SQL syntax near '; INSERT INTO configuration (configuration_id, configuration_title, configuratio' at line 1 Quote Link to comment Share on other sites More sharing options...
oilzzz Posted May 28, 2003 Share Posted May 28, 2003 I should also point out.... I'm using one of the latest CVS and I had to change the configuration_group_id to 16 as 15 is now taken Quote Link to comment Share on other sites More sharing options...
lampie Posted June 14, 2003 Share Posted June 14, 2003 Ho people, Im having a strange problem with this contribution. All is installed correctly on an MS1 release. The strange thing is that sometimes it does nog load my site at all. It says page not found. Now after a night working on this problem i have narrowed it to this contribibution. The lines that give these odd trouble are in application_top: // BOF: WebMakers.com Added: Down for Maintenance if (DOWN_FOR_MAINTENANCE=='true' { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } // do not let people get to down for maintenance page if not turned on if (DOWN_FOR_MAINTENANCE=='false' { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } // EOF: WebMakers.com Added: Down for Maintenance // BOF: Down for Maintenance except for admin ip if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){ if (DOWN_FOR_MAINTENANCE=='true' { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } } // do not let people get to down for maintenance page if not turned on if (DOWN_FOR_MAINTENANCE=='false' { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } // EOF: WebMakers.com Added: Down for Maintenance I was having this problem with all version of this conrtibution. Its really weird because sometimes it does load and sometimes it does not :roll: Im thinking of a redirection problem :?: Any help would be appreciated :) Quote Link to comment Share on other sites More sharing options...
lampie Posted June 14, 2003 Share Posted June 14, 2003 I mean these lines, disrecard the lines above. // BOF: WebMakers.com Added: Down for Maintenance if (DOWN_FOR_MAINTENANCE=='true' and !strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } // do not let people get to down for maintenance page if not turned on if (DOWN_FOR_MAINTENANCE=='false' and strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } // EOF: WebMakers.com Added: Down for Maintenance // BOF: Down for Maintenance except for admin ip if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){ if (DOWN_FOR_MAINTENANCE=='true' and !strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } } // do not let people get to down for maintenance page if not turned on if (DOWN_FOR_MAINTENANCE=='false' and strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } // EOF: WebMakers.com Added: Down for Maintenance Quote Link to comment Share on other sites More sharing options...
lampie Posted June 14, 2003 Share Posted June 14, 2003 I only have these porblem on the live server. Local testing did not give any troubles at all???? Quote Link to comment Share on other sites More sharing options...
stretchr Posted June 15, 2003 Share Posted June 15, 2003 I too had this problem. It loads consistantly now but I FTP'd the file again. Ho people, Im having a strange problem with this contribution. All is installed correctly on an MS1 release. The strange thing is that sometimes it does nog load my site at all. It says page not found. Now after a night working on this problem i have narrowed it to this contribibution. The lines that give these odd trouble are in application_top: // BOF: WebMakers.com Added: Down for Maintenance if (DOWN_FOR_MAINTENANCE=='true' { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } // do not let people get to down for maintenance page if not turned on if (DOWN_FOR_MAINTENANCE=='false' { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } // EOF: WebMakers.com Added: Down for Maintenance // BOF: Down for Maintenance except for admin ip if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){ if (DOWN_FOR_MAINTENANCE=='true' { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } } // do not let people get to down for maintenance page if not turned on if (DOWN_FOR_MAINTENANCE=='false' { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } // EOF: WebMakers.com Added: Down for Maintenance I was having this problem with all version of this conrtibution. Its really weird because sometimes it does load and sometimes it does not :roll: Im thinking of a redirection problem :?: Any help would be appreciated :) 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...
stretchr Posted June 15, 2003 Share Posted June 15, 2003 If you haven't already figured out this problem, it's happening because the stylesheet is referencing 'Thema". Just change the line in down_for_maintenance.php for the stylesheet to the correct path and it should work. Hello, I have got an error with the latest v1.1 - If I change to the maintenance modus, the stylesheets file won?t be loaded. The result of them is that the page is totally unformated. What I have done wrong ? Thanks Andreas 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...
stretchr Posted June 15, 2003 Share Posted June 15, 2003 I was wondering if it would be possible to allow 2 different IP addresses, not on the same LAN to have access. We have a unique situation that this would be very valuable to have this capability. Thanks! This is really a handy mod to have. Your efforts are greatly appreciated. for users on a LAN ( special request from teksign ;) ) update 1.0.1b insert in your database with your favorite tool like phpmyadmin or whatever you like... INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Down For Maintenance - Allowed IP Range', 'EXCLUDE_IP_RANGE_FROM_MAINTENANCE', '192.168.0', 'IP address Range (first 9) Allowed to access site during Down For Maintenance.<br>Only usefull for working on a LAN.', 1, 500, '2003-03-23 15:07:52', '0000-00-00 00:00:00', NULL, NULL); ========================================================== Changes to /catalog/includes/application_top.php Locate the lines: // BOF: Down for Maintenance except for admin ip if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){ if (DOWN_FOR_MAINTENANCE=='true' and !strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } } Replace it with: // BOF: Down for Maintenance except for admin ip if (!defined("EXCLUDE_IP_RANGE_FROM_MAINTENANCE")) define('EXCLUDE_IP_RANGE_FROM_MAINTENANCE', substr($EXCLUDE_ADMIN_IP_FOR_MAINTENANCE,0,9)); if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR') || EXCLUDE_IP_RANGE_FROM_MAINTENANCE != substr($REMOTE_ADDR,0,9)){ if (DOWN_FOR_MAINTENANCE=='true' and !strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); } } Changes to /catalog/includes/header.php Locate the lines: // 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')) ) { tep_output_warning('NOTICE: the website is currently Down For Maintenance to the public'); } Replace it with: // 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')) || ( EXCLUDE_IP_RANGE_FROM_MAINTENANCE == substr($REMOTE_ADDR,0,9)) ) { tep_output_warning('NOTICE: the website is currently Down For Maintenance to the public'); } 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...
stretchr Posted June 16, 2003 Share Posted June 16, 2003 I changed from "' NOW '" to now() but isn't the time supposed to decriment on that last line on the Down for Maintenance? I set the duration in admin to 03:30 but it just stays at that. I hope I'm not missing something obvious but I could use a pointer here. Thanks. I installed this on MS1 and it works fine except that the time doesn't show on the down page. I checked and the problem seems to be here: tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = '" . NOW . "' where configuration_id = '" . tep_db_input($cID) . "'"); I know I am going to feel stupid, but can someone tell me where the value of "NOW" is coming from? I can't find a function anywhere to match it. I thought I saw a thread on this but the crazy forum search won't let me search on any variation of "NOW" :(. Thanks. David Oppssss.... Sorry for that one I got a different servertime then my timezone so i hacked it. change '" . NOW . "' to now() without all quotes left & right 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 June 16, 2003 Share Posted June 16, 2003 using 2.2 ms1 and installed down for mainteinece 1.1 and get the following error TEXT_BEFORE_DOWN_FOR_MAINTENANCEWeb Site Will Be Down For Maintenance on June 17, 2003 from 1600 to 1800 and the code for the header is // 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); } // 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')) ) { tep_output_warning(TEXT_ADMIN_DOWN_FOR_MAINTENANCE); } // check session.auto_start is disabled Quote Link to comment Share on other sites More sharing options...
stretchr Posted June 16, 2003 Share Posted June 16, 2003 I had the same problem then I looked and found I had left the last line of the .sql statement out when I copied it to do the query. This code (I think) derives from MYSQL. HTH Cheers! using 2.2 ms1 and installed down for mainteinece 1.1 and get the following error TEXT_BEFORE_DOWN_FOR_MAINTENANCEWeb Site Will Be Down For Maintenance on June 17, 2003 from 1600 to 1800 and the code for the header is // 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); } // 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')) ) { tep_output_warning(TEXT_ADMIN_DOWN_FOR_MAINTENANCE); } // check session.auto_start is disabled 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 June 16, 2003 Share Posted June 16, 2003 ah found the problem what i did was change the TEXT_DOWN_FOR_MAINTENCE to PERIOD_DOWN_FOR_MAINTENCE so now it reads as // 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(PERIOD_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE); } // 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')) ) { tep_output_warning(TEXT_ADMIN_DOWN_FOR_MAINTENANCE); } // check session.auto_start is disabled using 2.2 ms1 and installed down for mainteinece 1.1 and get the following error TEXT_BEFORE_DOWN_FOR_MAINTENANCEWeb Site Will Be Down For Maintenance on June 17, 2003 from 1600 to 1800 and the code for the header is // 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); } // 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')) ) { tep_output_warning(TEXT_ADMIN_DOWN_FOR_MAINTENANCE); } // check session.auto_start is disabled Quote Link to comment Share on other sites More sharing options...
Guest Posted June 16, 2003 Share Posted June 16, 2003 disregard previous post hmm seem to be missing some thing i uninstalled and reinstalled still same problem wondering if something missing from the sql file Quote Link to comment Share on other sites More sharing options...
stretchr Posted June 16, 2003 Share Posted June 16, 2003 Well that define is the last line of the statement, for what that's worth. Good luck! disregard previous post hmm seem to be missing some thing i uninstalled and reinstalled still same problem wondering if something missing from the sql file 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 June 17, 2003 Share Posted June 17, 2003 i think i finally got it figured out was missing part of the sql file added the following to the database and seems to work INSERT INTO `configuration` VALUES (2124, 'Display Text Down for Maintenance', 'TEXT_BEFORE_DOWN_FOR_MAINTENANCE', 'Web Site Will Be Down For Maintenance On-', 'Display Text Down For Maintenance', 16, 12, '2003-06-16 11:36:23', '0000-00-00 00:00:00', NULL, NULL); not sure if this right but now displays correctly Quote Link to comment Share on other sites More sharing options...
stretchr Posted July 26, 2003 Share Posted July 26, 2003 :? Got this mod installed in MS2 and everything is showing up but for some reason, I am unable to change any of the values in the Admin Config panel. All 14 of the settings show up (I added that last set of code by asiabound) but I can't change any of them. Hmmmm. Anyone have any ideas? 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...
ElLeonBlanco Posted July 27, 2003 Share Posted July 27, 2003 MS2 sure has got people polishing up those coding skills again. Besides being an excellent project it is just great for getting those brain cells out of vacation mode. :D Quote ElLeonBlanco "The man of genius makes no mistakes. His errors are volitional and are the portals of discovery." James Joyce (1882?1941) Link to comment Share on other sites More sharing options...
Guest Posted July 27, 2003 Share Posted July 27, 2003 stretchr i havn't installed the down for maintenice mod yet for ms2 working on a few other things first before i try it but i do i post for what i did to get it to work Quote Link to comment Share on other sites More sharing options...
stretchr Posted July 27, 2003 Share Posted July 27, 2003 stretchr i havn't installed the down for maintenice mod yet for ms2 working on a few other things first before i try it but i do i post for what i did to get it to work Thanks. I get no errors at all. Probably something incredibly obvious but I just don't see it. 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...
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.