[Solved]: Picture url logic [Solved]: Picture url logic
 

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

[Solved]: Picture url logic

Started by apassio, August 15, 2004, 10:40:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

apassio

Hello,

I need to learn more about how the picture url is generated and maintained because I sometimes refer to pictures within my website with that url (for instance when I describe a trip I made).

What I do is locate the picture, open it and copy/paste its url as a hyperlink on my website (e.g. http://www.dophan.com/photos/displayimage.php?album=24&pos=10). Recently however, I noticed while browsing on the site that some picture url links were pointing to a wrong picture.

After thinking, I remember having either resorted the pictures in the album (by name or date) or even adding pictures to the album.

Can you please confirm how to avoid this problem in the future / describe how urls are generated and maintained by Coppermine, so that I can avoid having to check all my links every time I change sort option or upload new pictures.

Thanks

Regards

Joachim Müller

expand the pic info section and check the url at the very bottom of the page - this is the absolute url of a pic, looking like this: http://coppermine.sourceforge.net/demo/displayimage.php?pos=-2
The stuff you have is a relative position and is determined by the sorting order the user has chosen - don't post links like http://coppermine.sourceforge.net/demo/displayimage.php?album=1&pos=0 (although they both relate to the same pic if you haven't changed the custom sort order.

GauGau

apassio

Thanks for the hint. Does it mean that if I use the absolute url of a picture (with a displayimage.php?pos=-x), it will stay unchanged even if I add or delete photos or albums or change sort order as long as the picture stays in the database?

Regards

Son

Joachim Müller

yes, the absolute url will link to the pic as long as it stays in the coppermine database, no matter into what album you move it to.

GauGau

apassio

Thanks, does this hold also if I delete pictures or add some to albums?

Regards

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

apassio

Thanks for your patience.

have a nice day.