I have developed this new plugin for the administration page.
It's permit to close gallery when updating ;-)
http://zenphoto.dev.stephane-huc.net/pages/closeforupdating-administration-plugin-en-
http://zenphoto.dev.stephane-huc.net/pages/closeforupdating-administration-plugin-fr-
Nice plugin! However it is really best to not place non Zenphoto files within the Zenphoto folders. A plugin can add itself to the Utilities buttons. Use the admin_utilities_buttons filter. See the rating, sitemap-extended, and static_html_cache plugins for examples.
Also it would be nice if the handling of the root index.php script could be automated. I don't have a suggestion at the moment on how, but it would be nice.
ok, i'm happy for yours reactions (very happy).
My first idea is not touch at the zenphoto index.php.
Because, by rewriting this script, it's possible to making many errors or dysfunctions. and "help me, my gallery is not function !".
And, i search to write file 'close' at the root ... but not permit ! (when script 'close_for_updating.php' is include to /utilities).
@sbillard, ok, i'm going to see the filter, and those examples.
[french] Rahhhh.
Merci de vos réactions, je les apprécie vraiment (j'avoue, j'avais un peu peur de vos possibles réactions négatives).
Ma première idée était de ne pas toucher au script 'index.php' de la galerie zenphoto. Parce que réécrire celui-ci, pour la plupart des utilisateurs, est une source d'erreurs et de dysfonctionnement. Et, ainsi, pour éviter les "au-secours, ma galerie ne fonctionne plus".
J'ai essayé d'écrire le fichier 'close' à la racine de la galerie ... mais dans le contexte, où le script 'close_for_updating.php' est dans le répertoire /utilities, cela n'est pas permis.
and, if this plugin rename himself the zenphoto script index.php to index_gallery.php ? and put on root the new index.php ?!
(when the button close is active...)
the better (perhaps?) is that script rewriting zenphoto index.php and add this instruction @ line 124 for including text or page html:
`
if( CLOSING == 1 ) echo "Gallery Closing for maintain-it" // or include('close_for_updating.html');
else include(internalToFilesystem($_zp_obj));
`
ok, version 0.2 is out!
Act as plugin (@sbillard: ;-) )
http://zenphoto.dev.stephane-huc.net/pages/closeforupdating-administration-plugin-en-
http://zenphoto.dev.stephane-huc.net/pages/closeforupdating-administration-plugin-fr-
No, but there is a filter which could be used to do that.
For instance:
`
function under_construction_blocker() {
header("Location: " . FULLWEBPATH . "/" . USER_PLUGIN_FOLDER . "/pluginname/upgrading.php");
exit();
}
if (underconstruction) {
zp_register_filter('load_theme_script', 'under_construction_blocker');
}
underconstructionis whatever test you use (Could be an option that the plugin sets.) andpluginname/upgrading.php` is your script.