coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: cdrake on April 07, 2005, 12:16:59 AM

Title: About URLs in Coppermine
Post by: cdrake on April 07, 2005, 12:16:59 AM
Ive noticed that it produces urls like displayimage.php?pos=-2722 and ?album=50&pos=34 which both go to the same page. If I delete an image from an image from an album, with the url then change to ?album=50&pos=33 & displayimage.php?pos=-2721? Or would they remain the same?

If they change is there a way to make it where they will not and can you force coppermine to use either displayimage.php?pos=-2722 or ?album=50&pos instead of using both?

Thanks.
Title: Re: About URLs in Coppermine
Post by: kmax on April 07, 2005, 09:31:05 PM
If you delete an image from an album, the url that is shown as 'displayimage.php?album=50&pos=34' will indeed change for images that were after the one you deleted in the album.  In that case the pos value is the image's relative position in the album.  However, the url formed as 'displayimage.php?pos=-2721' will not change no matter what is done in deleting other images.  In this case the pos value in the url is actually the unique picture id which is unique throughout the gallery and will not change.  If you want to have a link to a particular image to put elsewhere on your site or to post on other sites, use the 'displayimage.php?pos=-2721' format since it will not change. 
Title: Re: About URLs in Coppermine
Post by: cdrake on April 08, 2005, 01:33:09 AM
How can you change coppermine to just use 'displayimage.php?pos=-2721'?

I tried changing {LINK_TGT} to '{LINK_TGT}' => "displayimage.php?pos=-".$CURRENT_PIC_DATA['pid']."", but it just returns links like http://www.drakeshangout.com/gallery/displayimage.php?pos=-

"displayimage.php?pos=-$pic_id", doesnt work either.
Title: Re: About URLs in Coppermine
Post by: kmax on April 08, 2005, 05:53:40 PM
Not exactly sure why you are wanting to do this.  The method you are trying to use could be made to work so that it would get the pic id properly, however I am unsure if it would break anything further along as users continued viewing other images and such.  I will defer to someone who has more experience with the Coppermine code on the question of changing something like this so as not to give you bad information. 
Title: Re: About URLs in Coppermine
Post by: cdrake on April 08, 2005, 10:20:10 PM
I am wanting to do this so there will only be one link to an image and improved search engine ranking. Also when other websites/forums post a link they always copy the address bar and paste it but if i ever delete an image then the link will point to something else.
Title: Re: About URLs in Coppermine
Post by: cdrake on April 10, 2005, 08:02:23 PM
How could it be "made" to work?
Title: Re: About URLs in Coppermine
Post by: Joachim Müller on April 10, 2005, 10:10:04 PM
currently: not at all, unless you sacrifice all meta albums. There's a reason why pics can be accessed using two different ways in the URL. We would have removed the option if it was that easy anyway.

Joachim