Hello/Hi/Greetings,
Our images have hierarchically organized keywords. Obviously, Piwigo did not take over the hierarchy while reading them, but I saw this should be possible. What is the latest, best way for Piwigo to read the keywords hierarchically into the database?
Why we need the hierarchical keywords: We want to build a template for Piwigo that displays the keywords hierarchically as they are in the images. This will help us and the users to search in a structured way.
See the planned side menu:
Piwigo version: 2.10.2
PHP version: 7.2.31
MySQL version: 5.5.5-10.1.45-MariaDB
Piwigo URL: http://www.traumtreppe.ch
Offline
Tags are not hierarchical. With [extension by plg] Tag Groups you can simulate 2 levels, but not more.
Albums are hierarchical. You can use them quite the same way as tags if you want.
Offline
Well, I tested the plugin. This does not help me to import the hierarchical keywords from the images as hierarchically recognizable keywords into the database. Is this possible, and how big would the effort be?
Actually we need 3 levels, but maybe we should start with 4 levels from the beginning, if that is not much more complicated. Let's think about.
Offline
What are you trying to do?
If you need a structured hierarchy, you could use the galleries synchronize feature since that will import the images as albums as defined by your folder hierarchy wherever the images are stored. That will likely be the best/most maintainable method for a structured hierarchy.
Offline
We are not looking for a hierarchical folder structure, we want to be able to display the keywords for the user not only in a cloud, but structured as they are captured in the images. Let me explain:
The keywords are captured hierarchically in the images. In Digikam it looks like this:
From this we want to create a menu that has the same hierarchy. The user can open and collapse the menu items, and select the keywords of his choice. This gives him a much better overview of the choices he has. But this requires that the keywords are stored in the database in a way that the hierarchy remains recognizable without confusing the whole logic of the piwigo database.
Here the draft of this menu:
We are also happy to share the extension with the community if it ever works and proves itself. I am convinced that it will be a very useful extension, not only for us.
Hence the key question: what is the best way to write the hierarchy of the keywords to the database?
thanks in advance for all input.
Last edited by qusi (2020-08-31 08:44:13)
Offline
I would love to have this feature, it's the one missing thing I always wanted to have in piwigo!
As an input: darktable stores hierarchical tags as 'hierarchicalSubject' in the form 'One|Two|Three|Four'
So I would use the existing 'keywords' field in the table 'meta' and simply fill it with the pipe-separated string 'One|Two|Three|Four''.
The plugin could then parse this string and show a hierarchy level for every pipe.
Please let me know if I can help in any way (I have very limited programming skills but could test or design)
Offline
I am looking for a solution to this exact problem. Has anyone found any solutions?
I also want to create an expandable and multi-selectable menu for keywords in an hierarchy.
PLease guide me.
Gallery: photos.lagubandhu.com
Version: Piwigo 11.5.0
Offline
I just wanted to say that having this feature would be great. I think it's much better to prioritize improving the functionality of such an important system as keywords, than trying to make the admin page look "pretty"....
Last edited by Crythes (2021-10-14 14:34:50)
Offline
Hi, I feel concerned by this tag tree question.
On my way, I'm still using jBrout to tag pictures. I have translated the jBrout xml categories/tags tree into a static page incorporated in the menu with Additional Pages plugin https://piwigo.org/ext/extension_view.php?eid=153
[extension by P@t] Additional Pages
The translation is made, once in a while, with a PHP script, which gets each tag url from piwigo tags list page tags.php?display_mode=letters ; and builds an html tree from the xml file.
This still experimental categories/tags tree structure is very bushy (about 1 000 tags and 100 nested categories, 6 levels), consider it as a draft. You can have a look here: http://antonin.roussel.free.fr/g/?path= … etiquettes
Notice jBrout is not storing all the branches (tag categories) leading from the root category to a leaf (tag), it only stores the leaves (tags) in the image file. So this is still partially tricky to make it store all the categories (branch path) leading to a tag (leaf).
Last edited by TOnin (2021-10-14 16:42:04)
Offline
Offline
Some may try to extend the 2 levels depth to 3 or 4.
Offline
Where does the search results page get its content from? There's a redirect() in search.php but I don't quite understand how it knows what information to display in the results page. Is that what variable $msg is in redirect_html()? I am asking because I wonder if there might be a way to modify how Piwigo returns results so that I could implement some sort of a hierarchical based search system using keywords by adding a few if statements when Piwigo performs the search. However, I also noticed that the $search variable gets serialized when it's written into the database, I also wonder where unserialize() does its thing in this whole chain.
Last edited by MIDId (2021-10-14 20:36:50)
Offline