Hi gregbosen,
Another nice plugin with [extension by gregbosen] Author to Tag, congrats!
First thing I've noticed : the use of an authors.php file at the root of Piwigo installation.
That is not a very common way to do things. I remember only 2 plugins doing it: [extension by rvelices] RV Maps & Earth (adding map.php) and [extension by xbgmsharp] piwigo-openstreetmap (adding osmmap.php).
First, I don't understand why you need this file, considering you don't use the URL authors.php but index.php?/authors
Then, if you decide to keep such a file, could be please implement the possibility to avoid file deletion on plugin de-activation, like it's done on OpenStreetMap plugin:
if (conf_get_param('osm_remove_osmmap.php', true))
{
@unlink(PHPWG_ROOT_PATH.'osmmap.php');
}why does this configuration setting exists? because Piwigo can be used with multisite feature, see https://github.com/Piwigo/Piwigo/wiki/M … ltisite%29 (we use that on Piwigo Cloud, ie piwigo.com) and if pierrick.piwigo.com deactivates plugin OpenStreetMap, it should not impact greg.piwigo.com
Offline
Thanks for the thoughtful feedback, and for the pointers to how RV Maps and OpenStreetMap handle this.
You're right that a file at the webroot is unusual, and digging in, it turned out authors.php wasn't even needed anymore. It's a leftover from an earlier design: the plugin originally rendered the "all authors" listing from that webroot file, the way core does with tags.php. But the listing has since moved in-plugin — it's rendered by the plugin's own /authors section handler on loc_end_section_init — and every link the plugin generates already points at index.php?/authors. So authors.php had quietly stopped being on any code path. It was dead weight.
So rather than add a "don't delete this file" option, I've removed authors.php entirely (released as 16.1.14). The plugin no longer writes anything into the webroot at all.
On your multisite concern: upgrading to 16.1.14 also cleans up any stale authors.php a previous version installed, but that cleanup is deliberately conservative — it only removes the file if it carries the plugin's own header marker, it's silent on a read-only webroot, and it never touches a same-named file that another plugin or site owns. So a deactivation/upgrade on greg.piwigo.com can't affect pierrick.piwigo.com.
Thanks again — this made the plugin simpler.
Offline