Hide unpublished images in Image order

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

Comments

  • acrylian Administrator, Developer
    You mean on the backend sorting? Not at the moment, sorry. Sounds like an idea we keep in mind for the future though.
  • acrylian Administrator, Developer
    That's how I understood it ;)
  • 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 ?
  • acrylian Administrator, Developer
    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 ;-)
  • 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!
  • acrylian Administrator, Developer
    Sure, as always whatever works for you. The functionality as a proper selector is on our list.
Sign In or Register to comment.