Config keys: maybe use a plugin.revisions. prefix, instead of just revisions.?
Maybe, maybe not.
My plugin name is revisions
so that’s my prefix right now.
I’m aware of a potentially collision with the core if revisions
are re-invented there. But if there would be revisions
in the core we should probably use the core feature instead.
It’s also possible for other plugins to collide with the revisions
prefix, but maybe the other plugin is prefixed plugin.revisions
. I will never be collision safe against other plugins.
We had a discussion about this hard solved topic:
forum.getkirby.com/t/suggestions-for-kirby-options/3799
I wouldn’t bet against some PHP lib already using the Revisions name, and having classes like RevisionContent. Or maybe, more likely, Kirby using that name internally at some point. Maybe using a namespace could help? (Like namespace RevisionsPlugin; or maybe namespace Kirby\Plugin\Revisions.)
I will look into it. I added an issue about it.
Maybe the default folder for revisions should be kirby()->roots()->site() . DS . ‘revisions’)? That way it’s already protected from direct access with the default .htaccess.
Interesting idea. The default is the root because that’s where content
, thumbs
and cache
are stored. Revisions are a kind of content and almost like a cache.
I’m not sure about add it to the site folder just because it’s protected by htaccess. I think the folder structure will be a little off. But it can be changed in the config if you are not happy about the path.
But this still gave me a thought. I will add some docs about how to add a row in the htaccess about revisions as well as a comment about the alternative to put it into one of the protected folders.
I still need to install and try it to see what happens when you click on a revision’s link.
Don’t expect too much. The big thing is not the field, it’s what happends behind the scenes.
Thanks for all your opinions. They are of great value!