Contributions
Down for Maintenance v1.0
Down for Maintenance v1.0 was written from snapshot 02-22-2003
In theory, the logic should work with any snapshot.
I have not, however, tested that theory.
Once installed, everything is configured in the Admin.
It's a pretty easy install. Be sure to backup first, just in case!
Expand All / Collapse All
use theses lignes in application_top.php instead of those in the install readme:
// 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)) {
$url = tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME);
header("HTTP/1.0 307 Temporary Redirect");
header("Location: $url"); // redirect...bye bye
}
}
// 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)) {
$url = tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME);
header("HTTP/1.0 307 Temporary Redirect");
header("Location: $url"); // redirect...bye bye
}
// EOF: WebMakers.com Added: Down for Maintenance
This is a simple update of the last 1.2b version for those who haven't a fix IP number (the majority I think)...
Each time you go in the admin menu, it check if the IP number saved in the database is the same you actualy have for your computer...
*** Download the b version instead of the a! ***
I got a little ahead of myself and forgot to check the exclude Admin IP. So in the v1.1a version /header.php another change must be made.
In the 1.1b, all changes have been made and work great!
Sorry for any confusion.
* For MS2 *
In header.php, you will get an error for notify before maint unless you change the following line. Also a few other minor changes like the stylesheet call in down_for_maintenance.php is incorrect.
Everything is in the README file.
All changes and example files are contained. Also two other mods are also contained.
1. Auto Copyright
2. Auto Feedback with CRON CGI.
Hope someone finds these useful.
Hi
Just updated the contribution to work on Milestone 2.2.
Post your comments here:
http://forums.oscommerce.com/viewtopic.php?t=52507
Down for maintenance v1.1
-multi languages possibility (English and french available)
-more options in admin.
-SQL Upgrade in admin. for English or French user.
-ok for MS1 CreLoad5
only change in readme.txt
changed
'" . NOW . "'
to
now()
because not everyone has MODIFIED their servertime, sorry for that one...
complete package
The settings will be defined in the Admin ... My Store ...
Options are:
++ 3 new
- Down For Maintenance (exclude this IP-Address)
(give yourself access to the site while PUBLIC cannot see the pages)
- NOTICE PUBLIC Before going Down for Maintenance: ON/OFF
(this will show a message above the header on all pages !)
(will set itself automaticly to false when you enable Down for Maintenance 'true')
- Text Before going Down for Maintenance
(define in admin the text / time you will be down for maintenance)
Also added the actual time you DID SET the function 'Down for Maintenance' to 'true' on the PUBLIC page...
Enjoy...
Robert
With this add-on you will be able to put a message at the top of the screen, when you are expecting to be down for maintenance.
So now it is a little more user friendly for the visitors who are browsing your site.
When you finally set your 'Down For Maintenance' option to 'true' the message will disspear, but don't forget to set the 'Warning Before Down for Maintenance: ON/OFF' to 'false' when you are really 'Down For Maintenance'
Otherwise this message will stay at the top of your page :)
You can set the contents of this message in your Admin area
Enjoy
Down for Maintenance v1.0 was written from snapshot 02-22-2003
In theory, the logic should work with any snapshot.
I have not, however, tested that theory.
Once installed, everything is configured in the Admin.
It's a pretty easy install. Be sure to backup first, just in case!
Note: Contributions are used at own risk.