work mule
Senior Member
USA
1358 Posts |
Posted - 13 April 2001 : 17:45:57
|
I don't know if this is already built into the forum or if someone has done this before.
If you can identify places in your forum code that would be called when your forum is down or messed up (such as in your config.asp file (Line 373) where the redirect is made to your setup.asp file), either include this file or redirect to users to it. When the code is processed, and certain conditions are met, an email is sent to a designated person.
This mod should work when your forum application goes down, but the web server is still available. If the server is down, this will not work of course.
Download Zip: http://www.writermag.com/forum/download/admin_down_notification.zip
When the sub is called for the first time, an application variable is set to the current date/time and email is sent. Every time this is called, the time is checked and also compared to a delay value so that email isn't being sent out every time. (If you have a paging service that can accept emails - this would also be useful.) When the problem has been fixed, you can call this page directly to set the date to nothing so you can be notified if the forum goes down again soon after it's reset.
You will need to look through the file, since there are a bunch of variables that need to be modified (mostly grouped together at the top). You may want to move some things around, maybe encapsulate all of it in a sub or something. You may want to change the name, the querystring, etc. because it's something that could theoretically used by anyone to send email to the administrator. Think of this as a working example that should be modified before putting into production.
The approach I took is to hardcode everything because my reasoning is that this would be used if your database is unavailable or your configuration settings are messed up. So stuff like your mail server info, admin email address, etc. may be unavailable.
|
|