Member
Member
normcdn   2017-02-23, 19:41
#1
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
Administrator
Administrator
acrylian   2017-02-24, 12:57
#2
You mean on the backend sorting? Not at the moment, sorry. Sounds like an idea we keep in mind for the future though.
Member
Member
normcdn   2017-02-24, 15:10
#3
It could be like this ...
http://www.destilino.com/temp/20170224-ZenPhoto-ImageOrder-Suggestion.jpg
Administrator
Administrator
acrylian   2017-02-24, 16:23
#4
That's how I understood it Wink
Member
Member
normcdn   2017-02-24, 19:26
#5
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 ?
Administrator
Administrator
acrylian   2017-02-24, 19:50
#6
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 ;-)
Member
Member
normcdn   2017-02-24, 21:57
#7
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!
Administrator
Administrator
acrylian   2017-02-25, 12:12
#8
Sure, as always whatever works for you. The functionality as a proper selector is on our list.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.