![]() |
|
Hide unpublished images in Image order - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Hide unpublished images in Image order (/thread-12680.html) |
Hide unpublished images in Image order - normcdn - 2017-02-23 Hi, Is there a way to hide images that were set to unpublished in the Image order feature ? I got this problem. I do not want to delete all previous images when I update an album. I set the old ones that I do no longer need to unpublished, but I keep some files, so when I add new ones and set the order, it shows all files no matter their status. Is there a way to do something about it ? That would be great to have a check box that says ... hide unpublished. Thanks Hide unpublished images in Image order - acrylian - 2017-02-24 You mean on the backend sorting? Not at the moment, sorry. Sounds like an idea we keep in mind for the future though. Hide unpublished images in Image order - normcdn - 2017-02-24 It could be like this ... http://www.destilino.com/temp/20170224-ZenPhoto-ImageOrder-Suggestion.jpg Hide unpublished images in Image order - acrylian - 2017-02-24 That's how I understood it
Hide unpublished images in Image order - normcdn - 2017-02-24 Hi, In the mean time, is there a problem if I modified ... /zp-core/admin-albumsort.php by replacing ... -------------------------------------------------- <ul id="images"> <?php $images = $album->getImages(); foreach ($images as $imagename) { $image = newImage($album, $imagename); ?> <li id="id_<?php echo $image->getID(); ?>"> ... <?php } ?> -------------------------------------------------- by -------------------------------------------------- <ul id="images"> <?php $images = $album->getImages(); foreach ($images as $imagename) { $image = newImage($album, $imagename); ?> <?php if ($image->getShow()) { ?> <li id="id_<?php echo $image->getID(); ?>"> ... <?php } ?> <?php } ?> -------------------------------------------------- I tested and images that were unpublished did not show up. BUT, I do not want to create any problems by dong this. Is this ok ? Hide unpublished images in Image order - acrylian - 2017-02-24 It is of course not recommended to modify core files because you have to do it again after every update and we can't support in case that causes issues ;-) Probably it does not cause any actual issues but remember once you publish images again the sorting might be off for them since your sorted "around" them.. Maybe a better idea would be to move now unneeded images to separate albums? Anyway, I put an option to hide on the long list of small ideas for the future. Naturally I can't say when this will be added so if this "hack" works for you at the moment, great ;-) Hide unpublished images in Image order - normcdn - 2017-02-24 I understand that modifying core files is clearly not recommended. In my case, I will never published an unpublished image. That is the purpose of my gallery. I do not want to move nor delete the existing files, as people may have linked an image in the gallery. If it does not have negative effect on database, I will proceed with it. Thanks for your help! Hide unpublished images in Image order - acrylian - 2017-02-25 Sure, as always whatever works for you. The functionality as a proper selector is on our list. |