Avoiding selecting images from private albums + remove filter#8
Avoiding selecting images from private albums + remove filter#87tonin wants to merge 6 commits intoPiwigo:masterfrom
Conversation
Looks like using BatchManager styling needs update (since piwigo 11?)
|
I think this will prevent selection from any virtual album, which is not correct. It will also filter out orphan pictures. |
|
Ok, I can imagine what you are talking about. |
|
I don't understand why you are talking about filesystem folder. As far as I remember the privacy setting of an album has nothing to do with the filesystem. Both virtual and physical albums can be made public or private. So if you want to have pictures only selected from public albums, do that, but do not filter on the "dir" column. That being said, yes it should be configurable, because people would want to make private smart albums hydrated from private albums. |
|
Or, like I do : public smart albums from private albums. Also you join to CATEGORY_IMAGES will break if an image is associated to more than one album (making duplicates in the output). |
|
I talk about "file system folders" because my gallery is following "FTP+Sync" scheme; further more, my folder tree is crafted to separate private pictures (in subfolders) from public pictures (in chronologic folders). I was slighty wondering about my JOIN with CATEGORY_IMAGES risk of duplicates, because of SQL table primary index. But the count may have been affected. I realize now, this JOIN is not needed, indeed JOIN ON IMAGES_TABLE.storage_category_id is good enough. something to know, this makes uploaded pictures not reachable. That's ok for me. |
|
After 6c05bf2, I may add a javascript check to count public_physical filters, but PHP check is already enough to make it reliable. Waiting for approval to code further. |
|
As I don't understand what does "Exclude SmartAlbums from permissions management", I don't know if it collides with my proposal. I may study this further... |
|
Why limiting to physical albums ? (ok it is your use case but you are not alone) |
By default, Piwigo decides a picture is public if it belongs to at least one public album. By checking this option it removes Smart Albums from the list when this check is done. For exemple if my picture belongs to one private album and one public Smart album, it will be public if the option is unchecked, and private if the option is checked. This is important for search results wich list pictures directly. (this is from memory, might need to recheck the code) |
This is a quick patch. Another would be to keep it on the "right" while overwriting .showInfo display:flex; coming from */admin/themes/default/theme.css?v11.3.0
|
My use case is a start point, yes. If this is your concern, I could add variants inside with a select to choose between public physical album, or public album, or public virtual album. In order to make it more tunable, and maybe useful to others. I don't think my overview of different piwigo use cases, to be so good. Thanks to you, I now understand the "Exclude SmartAlbums from permissions management" gives an answer to my problem (the tip box is hidden in piwigo 11, until now). Indeed, checking this option excludes pictures which were not supposed to be seen by a user. The content of the smart album is tuned according user's permissions. The pictures count may change, that's not a big problem. But this #3 is more uncomfortable. The "Exclude SmartAlbums from permissions management" checked behaviour is dynamic, because depending on user. The "Exclude SmartAlbums from permissions management" checked behaviour is closer to tags page one. |
7tonin
left a comment
There was a problem hiding this comment.
Can review tools help us to improve this plugin ?
| 'sif_lnk' => ($conf['SmartAlbums']['smart_is_forbidden'])?'Smart is forbidden':'Smart is allowed', | ||
| 'sif' => ($conf['SmartAlbums']['smart_is_forbidden'])?'visitor permissions prepend. Pictures from private albums will be rejected for ungranted visitors. Hence, <strong>using this filter is not required</strong>.':'static permissions. Pictures from private albums may be associated to this virtual smart album. <strong>Using this filter will prevent this to happen</strong>.', |
There was a problem hiding this comment.
In order to provide information to SmartAlbums building page. Wish it helps, but feel it somehow heavy. Need improvements.
| 'sif_lnk' => ($conf['SmartAlbums']['smart_is_forbidden'])?'Smart is forbidden':'Smart is allowed', | ||
| 'sif' => ($conf['SmartAlbums']['smart_is_forbidden'])?'visitor permissions prepend. Pictures from private albums will be rejected for ungranted visitors. Hence, <strong>using this filter is not required</strong>.':'static permissions. Pictures from private albums may be associated to this virtual smart album. <strong>Using this filter will prevent this to happen</strong>.', |
| {$options.public_physical.name} | ||
| </span> | ||
|
|
||
| <span><b>{'Info'|translate}</b> <a href="admin.php?page=plugin-SmartAlbums-config" title="{'Edit'|translate} {'Exclude SmartAlbums from permissions management'|translate}">{$options.permission.sif_lnk}</a> : {$options.permission.sif}</span> |
There was a problem hiding this comment.
Here is the help displayed
| <br><i>{'The permission'|translate}</i> | ||
| </span> | ||
|
|
||
| <span><b>{'Info'|translate}</b> <a href="admin.php?page=plugin-SmartAlbums-config" title="{'Edit'|translate} {'Exclude SmartAlbums from permissions management'|translate}">{$options.permission.sif_lnk}</a> : {$options.permission.sif}</span> |
There was a problem hiding this comment.
and the copy paste display
|
Feel now, "reviewing" sif information, is a bit too much. I would be fine, if as a start, we keep focused on the new filter and its 3 options. |
No description provided.