Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-08 21:24:44

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

if database unavailable then switch to .html?

Is it possible to detect if the database is unavailable via the server, and if so, to present a custom error message and or an html version of the site?


Offline

#2 2007-03-08 22:07:48

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: if database unavailable then switch to .html?

TXP does that in txplib_db.php with a function called db_down(), I guess you could always customize the html there or modify it to call an include file?

Offline

#3 2007-03-08 22:16:09

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: if database unavailable then switch to .html?

hmm, interesting, perhaps a plugin would suit this well, for update compatability?


Offline

#4 2007-03-08 22:44:52

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: if database unavailable then switch to .html?

To load plugins, you need database access :)

Offline

#5 2007-03-09 00:35:30

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: if database unavailable then switch to .html?

der!!!
I should have remembered that.
too many margaritas :)

How then would you call a seperate file? or point toward one? unless its best just to modify the current one?

Last edited by ma_smith (2007-03-09 00:36:27)


Offline

Board footer

Powered by FluxBB