coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: sjordan on July 19, 2006, 01:37:48 AM

Title: Helping generating Static URL
Post by: sjordan on July 19, 2006, 01:37:48 AM
Hello,

I am working on a site that pull thumbnails from a CPG gallery. The thumbnails need to be linked to the corresponding detail page (Ex. ~/coppermine/displayimage.php?pos=-33). This is the static URL that is displayed in info section below the photo.

Before I continue, I have looked at CPMFetch, but as far as I can tell, there is no option to link to a specific image by id. There exists cmd lastup, random, cat, album, etc.

In my case, I am querying the CPG db directly to allow me to be as specific as I need. For example, select all images that are more than 3 days old (i.e. ctime) and have a rating of at least 7 (i.e. pic_rating).

Now my question: The static URL of photos is not contained in the db. Clearly it is generated dynamically by some algorithm. Would someone please explain that algorithm so that I may recreate the URL, apply it to the thumbnails I'm showing remotely and have them link correctly?

Thank you in advance.
Title: Re: Helping generating Static URL
Post by: Nibbler on July 19, 2006, 01:44:33 AM
It's the `pid` of the picture with a minus sign in front.
Title: Re: Helping generating Static URL
Post by: sjordan on July 19, 2006, 01:47:57 AM
WOW. How dropdead simple. LOL @ myself. I'm reminded of those lil IQ quiz books that test basic logic skills and pattern recognition.

As always, you're a HUGE help Nibbler. Thank you