GetSimple Support Forum
site maintenance - how i can? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: site maintenance - how i can? (/showthread.php?tid=2039)

Pages: 1 2


site maintenance - how i can? - platinum - 2011-08-04

i use Getsimple 3.0

i tried to use this plugin
Maintenance
http://get-simple.info/extend/plugin/maintenance/29/

but doesn't work (if i choose to enable "site maintenance" by check-box in admin panel, when i save new option the check-box comes back again empty)

is there another solution for a "site maintenance"?


site maintenance - how i can? - mikeh - 2011-08-04

platinum Wrote:i use Getsimple 3.0

i tried to use this plugin
Maintenance
http://get-simple.info/extend/plugin/maintenance/29/

but doesn't work (if i choose to enable "site maintenance" by check-box in admin panel, when i save new option the check-box comes back again empty)

is there another solution for a "site maintenance"?

You can always make a backup of the root "index.php". Then just create a new index.php with whatever the maintenance message should say. Then were the maintenance is complete, replace the old file


site maintenance - how i can? - platinum - 2011-08-04

mikeh Wrote:
platinum Wrote:i use Getsimple 3.0

i tried to use this plugin
Maintenance
http://get-simple.info/extend/plugin/maintenance/29/

but doesn't work (if i choose to enable "site maintenance" by check-box in admin panel, when i save new option the check-box comes back again empty)

is there another solution for a "site maintenance"?

You can always make a backup of the root "index.php". Then just create a new index.php with whatever the maintenance message should say. Then were the maintenance is complete, replace the old file

yes.i tought this solution ....but then all other pages are avaible?!?!?


site maintenance - how i can? - mikeh - 2011-08-04

platinum Wrote:
mikeh Wrote:
platinum Wrote:i use Getsimple 3.0

i tried to use this plugin
Maintenance
http://get-simple.info/extend/plugin/maintenance/29/

but doesn't work (if i choose to enable "site maintenance" by check-box in admin panel, when i save new option the check-box comes back again empty)

is there another solution for a "site maintenance"?

You can always make a backup of the root "index.php". Then just create a new index.php with whatever the maintenance message should say. Then were the maintenance is complete, replace the old file

yes.i tought this solution ....but then all other pages are avaible?!?!?

Actually it would do the opposite. it will kill all pages


site maintenance - how i can? - platinum - 2011-08-04

mikeh Wrote:Actually it would do the opposite. it will kill all pages

ok. thanks mikeh!

i'll try when i'll need :-)


site maintenance - how i can? - amaurib - 2011-09-09

mikeh Wrote:Actually it would do the opposite. it will kill all pages

Is there a way to not kill all the pages and only show the maintenance template to not loged in users?


site maintenance - how i can? - SlavaP - 2011-10-27

platinum Wrote:i use Getsimple 3.0

i tried to use this plugin
Maintenance
http://get-simple.info/extend/plugin/maintenance/29/

but doesn't work (if i choose to enable "site maintenance" by check-box in admin panel, when i save new option the check-box comes back again empty)

is there another solution for a "site maintenance"?


After changing last two lines of the script:

Code:
add_action('settings-website-extras','soge_maintenance_create_field',array());
add_action('settings-cpsettings','soge_maintenance_create_xml',array());

to the

Code:
add_action('settings-website-extras','soge_maintenance_create_xml',array());
add_action('settings-website-extras','soge_maintenance_create_field',array());

it works fine Wink

Attention: you need to move them vice versa and make first parameter 'settings-website-extras' for both - thats all.


RE: site maintenance - how i can? - Oleg06 - 2012-12-06

like this plugin has not been updated for a long time


RE: site maintenance - how i can? - datiswous - 2012-12-06

I think this is (also) possible by using a theme and/or template.

Use theme for full website maintenance. Use template for single page:

http://get-simple.info/wiki/themes:template_files

allthough a plugin might be easyer.


RE: site maintenance - how i can? - shovenose - 2012-12-07

That's an interesting concept, to use a template for it.


RE: site maintenance - how i can? - datiswous - 2012-12-13

In that actually maintenance template file you can add a component in place of the original <?php get_page_content(); ?>

In the component you can easily change the maintenance text and/or add an image


RE: site maintenance - how i can? - shawn_a - 2012-12-13

Use a special theme and special template, very good idea.
Loving it.


RE: site maintenance - how i can? - n00dles101 - 2012-12-14

might be a good idea to bundle a maintenance mode theme with the distro.
like the idea of doing it this way.


RE: site maintenance - how i can? - shawn_a - 2012-12-14

I have been wanting to add a maint mode to core for awhile but coudlnt decide how.
I think we can combine this with the issue i created for custom error pages as well, and email templates.
So we need some kind of templating system for system stuff.


RE: site maintenance - how i can? - Carlos - 2013-01-04

This is how I think it could be:

- A setting for maintenance mode in the backend.

- themes/maintenance/template.php : a clean html page with no GS tags. To be customized by the webmaster.

If enabled, frontend site checks if authenticated user: if logged in, render pages with normal selected theme. If not, use maintenance theme (if available -- if not, a small hardcoded default message/page).

The backend could show a "maintenance mode" notice (just like "debug mode"). The frontend could also add some notice (maybe before the content) so that the webmaster doesn't forget to disable maint mode. :-) And/or else have some expiry option.


RE: site maintenance - how i can? - shawn_a - 2013-01-05

Are you suggesting a seperate theme for this ?
Or additional templates for themes.

I prefer the later.


RE: site maintenance - how i can? - lnickel - 2013-08-27

Is there a solution to this? I'm working with the maintenance plugin and it's working but I cant edit the site while this is enabled.

I'd like to get my site up on production for the client to review but it needs to be hidden from the public until approved. Sad


RE: site maintenance - how i can? - lnickel - 2013-08-27

Ok so I have found the Front-End User Login. That seems like that could be used.


RE: site maintenance - how i can? - shawn_a - 2013-08-27

I guess you could modify the maintenance plugin to ignore if admin user.


RE: site maintenance - how i can? - lnickel - 2013-08-27

Thanks Shawn_a. I really dont know how to accomplish that. Thanks though. I'll keep digging.


RE: site maintenance - how i can? - shawn_a - 2013-08-27

Do you want a solution real quick ill write one up

You can stick this in your template or ,using my component hook plugin, in a component named
Code:
hook_index-pretemplate

PHP Code:
<?php
if(!is_logged_in()) die('Site is undergoing maintenance');
?>

If you want to get fancy , for exmaple on a live site, you can do stuff like

PHP Code:
<?php
if(!is_logged_in()){
  
header('HTTP/1.1 503 Service Temporarily Unavailable');
  
header('Status: 503 Service Temporarily Unavailable');
  
header('Retry-After: 7200'); // in seconds
  
print "This page is temporarily unavailable";
  die();
}
?>

you can also replace that with a temporary redirect to wherever also.


RE: site maintenance - how i can? - lnickel - 2013-08-27

(2013-08-27, 04:00:37)shawn_a Wrote: Do you want a solution real quick ill write one up

You can stick this in your template or ,using my component hook plugin, in a component named
Code:
hook_index-pretemplate

PHP Code:
<?php
if(!is_logged_in()) die('Site is undergoing maintenance');
?>

If you want to get fancy , for exmaple on a live site, you can do stuff like

PHP Code:
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 7200'); // in seconds
print "This page is temporarily unavailable"


Wow thanks Shawn! I just add the php !is_looged_in inside the my default template file? Before the !defined('IN_GS')

Now anyone who is not logged in cannot see any of the pages? I'm not sure where to implement the hook? I'll check you plugin


RE: site maintenance - how i can? - lnickel - 2013-08-27

Looks like the php function of not logged in is what I need for a quick solution.!!!! Thank you very much!!

I'm still very much a noob at this system and php for that matter but I get what this does now.


RE: site maintenance - how i can? - shawn_a - 2013-08-27

check theme_functions.php for some basic php functions to use, they should be documented in the code.


RE: site maintenance - how i can? - lnickel - 2013-08-27

OMG I am sorry but where do I find that php file? I created my own theme. Sad sorry LOL!