![]() |
|
site_upgrade plugin modifications??? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: site_upgrade plugin modifications??? (/thread-10357.html) |
site_upgrade plugin modifications??? - n20capri - 2012-09-02 So I was checking out this option and it's great! BUT, I was thinking there needs to be a little more to it... If the site is "closed" - there is no way for the person to ever get back to the site once it "re-opens". Since closed.html is a static page - refreshing does nothing and there are no other links on it. So unless the user backs out of the url to index they will never know when the site is back up...unless they close their browser and come back to the site later. SO, what I did was to add a meta refresh tag to the head: This way the page tries to load index.php every 2 seconds so if someone happens to be on closed.html when the site "re-opens" they will automatically be re-directed. I also added some text to let them know what was happening: "Our site is being upgraded - please be patient - you will be re-directed shortly once the upgrade is complete. You can also CLICK to refresh." (and the word click is a link to index). This way they are more likely to stay and click rather than just closing the browser) Nothing major but I think a nice upgrade to an already neat plugin. Anyone can easily modify closed.html themselves but maybe someone that's more of a beginner might not be able to. The other thing I was thinking about was is there a way for the site to be accessible for testing to someone who is logged in? (while remaining closed to everyone else) Right now, there is no way to test the site w/o "re-opening" it... Lastly, why does mod_rewrite have to be enabled for this plugin to work? If I manually un-comment the appropriate lines in .htaccess the plugin works just fine w/o mod re-write enabled...I am using this plugin now by manually changing .htaccess but it would a lot easier if I could just do it through the backend...mod_rewrite is NOT enabled on my sites... Thanks for the consideration, site_upgrade plugin modifications??? - acrylian - 2012-09-02
Actually the htaccess file does redirect all request to the root index.php of Zenphoto to the closed page. Since no one will "wait" on that page for the site to open the site will be working normally when it is opened again via the normal url.
site_upgrade plugin modifications??? - n20capri - 2012-09-02 Yes I agree uploading takes some time...that's why I like this new feature and as I notice 1.4.3.2 is out I will be using it to upgrade 3 of my sites! lol BUT, I still think some sort of automatic redirect would be helpful as a feature...Also, I DO think people will wait or at least be more inclined to leave the window open will doing something else or even click refresh themselves in hopes of the site being re-opened. And once it is re-opened it would load for them. I know I would be if I encountered that. Also, FYI - even when index.php and zp-core are missing my setup still works perfectly. The closed.html page just continues to display until the site is re-opened. Also, I'm aware the backend is available when the "site is closed" but I was hoping to be able to test the frontend while it was still closed to everyone else. Sometimes there are a few bugs or quirks after an upgrade in a rush to get everything finished. So yes 2 kinds of closed...or better yet closed for different users...admins can still view the site as normal (but maybe with a small "site is closed" message somewhere) and to all other visitors the standard closed.html page. Thanks again, site_upgrade plugin modifications??? - acrylian - 2012-09-02 Ok, maybe I am just thinking of me as I surely would not leave the window open but revisit probably some time later. But each his own... Ok, sure since it redirects by htaccess, of course. I do understand your thought about testing the frontend. Best you open a ticket on this (incl. the refreshing) so we can consider this for 1.4.4 and don't forget it. site_upgrade plugin modifications??? - n20capri - 2012-09-02 Ok great thanks! site_upgrade plugin modifications??? - sbillard - 2012-09-02 Some comments: While it might be nice to allow visits to the site during the upgrade that is not possible via rewrite rules. Remember that these are independent of PHP so have no working knowledge of the state of the installation. If the rewrite rule is active you will be redirected to the site closed page no matter who you are. Refreshing the page is ok, if that is what you want to do. One of the reasons why the actual page is left mofifiable by the site owner. With the 1.4.4 release this page will change to be a PHP script so that you can do other processing. But remember there is probably no reliable way of knowing if Zenphoto content is available. You could create a plugin that redirects to the site closed page for non-admin users. That could be activated and then you could "open" the site for your testing. site_upgrade plugin modifications??? - Michel Gagnon - 2012-09-02 @n20capri: Besides, the redirect is not a permanent one, so people who go to [i]yoursiteDotCom/zenphoto/whatever[/i] will be back on the regular gallery pages when your site goes online. Besides, I see a few problems with the Refresh you were suggesting above: |