Textpattern Forum

You are not logged in. Register | Login | Help

#11 2007-11-13 01:04:06

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,542
Website

Re: [request] a maintenance mode for textpattern

I have a maintenance plugin for TXP that has no user interface at all (not anything that isn’t already in TXP). A friend of mine needed it for a new website she is setting up. I’m willing to share it, but I don’t want to offend Mariano as he’s already working on an alternate approach.

Offline

#12 2007-11-13 15:20:03

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

Re: [request] a maintenance mode for textpattern

Hi Ruud,

it’s no offense at all… the more, the merrier.

In fact, it’s not actually me building the plugin but three of my students are… they were required (by me) to choose a plugin for txp (if it was something wanted in this forum, it was a plus) and develop it… so, passing the course is enough reward for them :-)

Go ahead and publish… I’ll do the same… and maybe some people prefer your approach and some other my students’… and then, maybe they’re mostly alike and we can later merge.

Regards.


Mariano AbsatzEl Baby

I don’t suffer from insanity. I enjoy every minute of it.

Offline

#13 2007-11-13 16:09:51

Chalito
Plugin Author
Registered: 2007-08-22
Posts: 26

Re: [request] a maintenance mode for textpattern

baby wrote:

In fact, it’s not actually me building the plugin but three of my students are… they were required (by me) to choose a plugin for txp (if it was something wanted in this forum, it was a plus) and develop it… so, passing the course is enough reward for them :-)

Yeah, we’ll get you a Great Dictator hat for xmas or something :)

beats having to do a written exam though.

(sorry for the offtopic, couldn’t resist)

Last edited by Chalito (2007-11-13 16:10:45)

Offline

#14 2007-11-13 18:33:35

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

Re: [request] a maintenance mode for textpattern

Well, quick and dirty… you can download the plugin directly from our subversion repository.

Don’t pay attention to the help, it is not only in Spanish, but also outdated…

Simply load the plugin, once activated, you’ll have a new tab within the Admin tab, named Site Maintenance.

There you’ll see a couple of radio-buttons which allows you to have the site Active (that is, working normally, which is obviously the default), or to put it in Maintenance.

Below the radio buttons there’s an editable area where you can paste a complete HTML page which will be displayed when the site is in maintenance mode. I hardwired a default page, but I recomend you change it to something suitable before puting your site in maintenance mode.

The plugin writes a couple of files under the …./files subdirectory in your textpattern, one for control, the other for the HTML content.

Some polishing to the code still needs to be done (let alone the help), but it shouldn’t crash on you… (I hope).

All feedback is very welcome… in a couple of days I’ll try to have a 1.0 or 0.9 version (depending on the feedback, or lack thereof) and have my students post in the author support forum.

Regards.

Last edited by baby (2007-12-26 21:27:25)


Mariano AbsatzEl Baby

I don’t suffer from insanity. I enjoy every minute of it.

Offline

#15 2007-11-13 19:11:18

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [request] a maintenance mode for textpattern

woot!

though i get this error when pressing go (happens when i choose either active or maintenance radio buttons and then press go)

Fatal error: Call to undefined function: file_put_contents() in /home/username/public_html/textpattern/lib/txplib_misc.php(534) : eval()’d code on line 105

i looked up the function and it looks like php5 is required is that correct? i’m running txp 4.0.5 under php 4.4.7

Offline

#16 2007-11-13 19:14:21

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

Re: [request] a maintenance mode for textpattern

mmmhhh maybe it is so…. I’ll see (and use fopen/fwrite/fclose in order to be php4 compatible… I’ll keep you posted, thanx for the feedback.


Mariano AbsatzEl Baby

I don’t suffer from insanity. I enjoy every minute of it.

Offline

#17 2007-11-13 19:16:56

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [request] a maintenance mode for textpattern

its no big deal for me! i just tried the plugin out on another site using php5 and it works just fine as far as i can tell! once maintenance is on, i tried going to any other sections by url and they all brought back the maintenance page instead. great stuff so far! thank you and your students :)

Offline

#18 2007-11-13 19:27:13

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

Re: [request] a maintenance mode for textpattern

Anyway… I already updated the plugin… it should work fine with PHP4, now.

GEE!!! I see your own site using the plugin right now :-D

Regards.


Mariano AbsatzEl Baby

I don’t suffer from insanity. I enjoy every minute of it.

Offline

#19 2007-11-13 20:46:36

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [request] a maintenance mode for textpattern

haha yes i was testing it on my own site (which uses php5) and another that used php 4.

just tried out your new version and it worked for both sites. bravo! the only thing i can suggest is a more semantic/efficient markup as the ‘default’ maintenance page. all those <br />‘s are a downer! of course that wont be an issue for most textpattern users as i’m sure everyone will want to customise their maintenance page anyway.

thanks again!

Offline

#20 2007-11-13 20:50:16

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

Re: [request] a maintenance mode for textpattern

yeah… I suck at writing html… in fact, my html editor is vim :-P

I’ll try to look into it once I finished checking all of my students’ plugins (by xmas, I think).


Mariano AbsatzEl Baby

I don’t suffer from insanity. I enjoy every minute of it.

Offline

Board footer

Powered by FluxBB