Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#21 2007-11-13 21:52:16

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

Re: [request] a maintenance mode for textpattern

My own rvm_maintenance plugin can be downloaded here
I wonder what grade I’ll get from professor Mariano :)

Offline

#22 2007-11-13 23:48:22

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: [request] a maintenance mode for textpattern

i’m currently using ruud’s solution but it’s great to have an alternative :)
thanks to mariano, his students and ruud for filling my plugin request, you guys rock.

Offline

#23 2007-11-14 09:19:34

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: [request] a maintenance mode for textpattern

WoW! We dreamt about this till a long months ago. And the solutions are here.

But : do we live in a perfect world?

How to choose between this two great works?

I like the Ruud’s idea with the ability to create a page maintenance within the back-end and the 503 state of the page to indicate to robots the website is temporarly in maintenance mode (and preserve SEO).

…And I like Mariano’s and his students idea with the ability to switch between tow states : Active or Maintenance with a special warning message displaying within the back-end.

Now in a perfect world :
Ruud could be a teacher in Argentina or Mariano and his students could integrate Core Developers Team to create a combinated version of a new plugin with the best ideas of each… :)

Thanks lot Ruud and Mariano. It’s a great and very useful work for community.

Best Regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#24 2007-11-14 12:21:35

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

Re: [request] a maintenance mode for textpattern

Hi Pat, thanx for the kudos… I can asure you that I’m really far from a txp core dev… maybe some of my students are or will be nearer…

Actually, my own php knowledge is like you say about your “en”… read only … or maybe, patch only

Now, I do have to get closure on this semester, but what would you like to have?… the possibility to handle the HTTP reply code set to 503 (or maybe configurable) and the ability to edit the actual page in-line?


Mariano AbsatzEl Baby

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

Offline

Board footer

Powered by FluxBB