Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: EE style 'turn off site' function
Jeremie wrote:
Ok, so yes I was speaking about the same thing too. But with some kind of granularity, aka in Adv Prefs severals options :
Since Textpattern really only supports 404 conditions right now, my plugin checks for that and will redirect the user to a specified URL. I decided to do that because someone may want to send the user to something that’s not in the Textpattern system, a static HTML file or whatnot.
I feel like the “down for maintenance” mechanism should assume that the database isn’t available. If I go through the trouble of setting my site to this mode, it’s because I’m doing some serious system changes. Even if I’m just modifying some code in a form or something, I don’t want to chance having that displayed.
Jeremie also wrote:
But I still think a pre-automated-search would be quite nice.
My plugin will do that too. It’s like magic.
[Lee]
Monkeys could have written a better post..
Offline
Re: EE style 'turn off site' function
@Jeremie Okie. Mine was just an idea sort of. Sad it cannot be applied practically.
Thought: How do admins vew the website while it is being updated or maintained?
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline
#33 2005-09-08 00:56:25
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: EE style 'turn off site' function
> “But with some kind of granularity”
Exactly. I see it as the pref(s) being a dropdown list of available pages, then pick one to set it as the error/message page.
> “How do admins view the website while it is being updated or maintained?”
Check for valid user info, just like the backend does. Currently, you can’t use the cookie the admin generates. Doesn’t mean it isn’t possible though, either by setting a second cookie (if a plugin) or adjusting the current cookie (if built-in).
Offline
#34 2005-09-08 01:09:25
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: EE style 'turn off site' function
I feel like the “down for maintenance” mechanism should assume that the database isn’t available.
How do we check for the ‘down for maintenance’ preference, which is stored in the database, if the database isn’t available?
Alex
Offline
#35 2005-09-08 02:41:10
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: EE style 'turn off site' function
A flag in the filesystem? TXP, if properly configured, should have somewhere to write to, so maybe it could put something there?
But then how does it pull the ‘down for maintenance’ page out of the DB to show it to the user? Or is it now a separate file (maintenance.php?).
I’m confused. I’d say that the existing ‘database unavailable’ page should do fine for that case, and a separate ‘down for maintenance’ form stored in the DB.
Of course, if a database outage and TXP downtime coincide, the viewer will see the less-informative ‘database unavailable’ message, but I’m not sure that there’s a clean solution to that.
kurt@kurtraschke.com
Offline
Re: EE style 'turn off site' function
DB unavailable and site down for maintenance are two different things. The latter intend some kind of will from the webmaster, the first may be the hosting going south.
Some interesting links on how to make good 404 pages : ALA, Plinko, 404ep and 404lounge
Last edited by Jeremie (2005-09-09 09:36:29)
Offline
Re: EE style 'turn off site' function
Get this
and then wrap whatever you want to protect with this
<code><txp:ign_password_protect>
STUFF HERE
</txp:ign_password_protect>
</code>
Proud Canadian. Toronto Locksmith , Actualize Consulting
Offline
Re: EE style 'turn off site' function
Get this and then wrap whatever you want to protect with this
<code><txp:ign_password_protect>
STUFF HERE
</txp:ign_password_protect>
</code>
Hmm, that won’t quite cut it – if my site was down for maintainence, I wouldn’t want visitors to see a log in box – just a holding page reassuring them that everything is OK, and the site will be back up shortly. If they see a dialog asking for name and password, they’ll most likely be scared away, its not very friendly.
Also – you would have to add this to your page templates, and then remove it again. Not a lot of work if the opening and closing tags were both in forms that were being called, but it should just be a switch – site on, site off.
I evaluated Expression Engine a few weeks ago, and it was impressive. However, going back to Textpattern, this ability to put a site in maintainence mode was the only thing I came away wishing TXP could do.
Last edited by jonhicks (2005-09-12 08:15:51)
Cheers,
Jon VC#9
Offline
Re: EE style 'turn off site' function
I’d heard rumour that someone had figured out a hack or plugin to do this – but can’t find anything in the forums.
Anyone know?
Cheers,
Jon VC#9
Offline
Re: EE style 'turn off site' function
There’s this Jon but it goes back to July last year. I suspect you can probably work it out though. ;)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#41 2005-10-08 00:20:00
- NyteOwl
- Member

- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Re: EE style 'turn off site' function
Or without altering the admin console, just create the holding page/stylesheet and set them as the selection for the defeault section when you want to close the site.
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
#42 2005-10-22 10:00:18
- newnomad
- New Member
- Registered: 2005-06-11
- Posts: 5
Re: EE style 'turn off site' function
bump
any new input about this?
FWIW
http://blog.taragana.com/index.php/archive/wordpress-plugin-to-make-your-blog-temporarily-unavailable-for-maintenance/
Offline
Re: EE style 'turn off site' function
I’ve checked in a little change (for 4.0.2), that will allow you to use
<code><txp:txp_die msg=“Site is disabled” status=“503” /></code>
in a page_template. Together with the error-pages functionality that allows you to make custom templates for error pages, you can completely shut off your site and display a custom-page.
Now the only thing left to do for a plugin-author is to set a cookie in the backend, and add a conditional-tag for the frontend that checks said cookie.
Though sooner or later I think we’ll add site-off functionality to the core.
Last edited by Sencer (2005-10-22 17:28:55)
Offline
Re: EE style 'turn off site' function
Yay! Good news!
Cheers,
Jon VC#9
Offline
Re: EE style 'turn off site' function
I was wondering if you can still do this. I see that the “die” fuctionality works. I wonder if it is possible to use the rss_admin_edit plugin to allow access to the site for people logged in. It would seem to me like the two things are almost using the same mechanism- trying to figure out who is logged in and display it in some way.
bludrop studios .::. Creative Expression
Offline