Deleting photos without affecting other photo links in album Deleting photos without affecting other photo links in album
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Deleting photos without affecting other photo links in album

Started by Tyrus, August 20, 2007, 07:02:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tyrus

Hi,

I searched the forums/faqs but couldn't find anything on this.  I was asked to delete an image from a gallery by the person in the photo.  Since I take photos at events this happens occasionally, and I usually honor the request.

However, the displayimage uses a counting of the pictures in the gallery for its photo page links.  So instead of removing the link number it renumber all of the photos. 

For example, if I delete the 11th in a gallery (displayimage.php?album=30&pos=10), image 12 becomes image 11, 13 becomes 12, etc.  So any links to photos after this one are now one off.  After deleting the photo I had to edit any links I made to later photos so they were correct.  Is there any way around this?  I need all of the displayimage links to remain the same if I remove a photo so that links aren't broken, but still need to be able to remove a photo occasionally.

Thanks!
Tony



Joachim Müller

Those links you mentioned are relative and will change when you remove a pic. They will differ as well if a user has chosen another sorting option.  Currently, the only way to avoid this is not to use those dynamic URLs when linking from external pages to individual pics. You (as gallery admin) are encouraged to use the static links (they will never change no matter if you delete a file or sort the view in another way than the standard sort order) that get displayed when you expand the pic info section. You can tell the difference between a dynamic and a static URL:
This method has one drawback: visitors of your page won't be aware of the issue, so they will just copy the URL to link to from the address bar of their browser. That's why there are some mods/plugins that show the static link in a better place.
We (the Coppermine dev team) are aware of the drawback of the URL in the address bar being the dynamic one. That's why this will change in the future: the next release (cpg1.5.x) will take care of this issue and always display static links in the browser's address bar. Drawback: cpg1.5.x hasn't been released yet (nor is there a scheduled release date). So while it hasn't been released yet, use the static URLs provided in the pic info section of each pic.

Tyrus

Thanks!  Thats exactly what I needed.  I somehow managed to miss the static URL, since my file info is hidden by default.  I did some more searching now that I know what to look for, and found some stuff from Stramm so I can put post the correct link below the photo.