Embed thumbnail in another page, by ID

thornsoft

Joined: 2007-01-16
Posts: 3
Posted: Tue, 2007-01-16 23:19

Hi All,
I'm trying to use thumbnails from gallery in another page. I know the IDs of the images that I want. Well, I know the IDs of the full-size items. So knowing an ID 1234, I want to build an <img> tag that uses the thumbnail. I thought I had it, but no. I get inconsistent results (sometimes a thumbnail, sometimes a full-size image, sometimes nothing).

Here's what I THOUGT would work:
http://www.mydomain.net/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=6071

Anyone know what to do here? I saw an old thread that talked about external image blocks, short URLs, and needing access to the webroot. I really don't want to expose my directory like that. Is there a good way to do this?
Thanks,
Chris

 
thornsoft

Joined: 2007-01-16
Posts: 3
Posted: Thu, 2007-01-18 00:11

It seems so simple, but the more I dig, the more I see that isn't easily done. I wonder if there would be so many discussions on integration if there were a simpler method of accessing a picture? It seems like a shortcoming in Gallery, that there isn't a way to fetch a picture by URL, such as:
http://www.mysite.com/gallery/getimage.php?id=1234&size=thumb
http://www.mysite.com/gallery/getimage.php?id=1234&sizex=800&sizey=600
http://www.mysite.com/gallery/getimage.php?id=1234&sizex=800&sizey=fit
http://www.mysite.com/gallery/getimage.php?id=1234&size=full

I saw the GetUrls module, but that requires you to go through the gallery and grab the URLs via copy/paste, etc., because you can't predict what the image will be.

Hmm. I may be taking the wrong approach here.
I was hoping to write a simple php/mysql script to grab the most 10 recent items (or most popular, most viewed, etc.,) and display those in a flash slideshow on another site.

 
nmahlin

Joined: 2005-09-26
Posts: 19
Posted: Thu, 2007-01-18 18:28

Goto site admin in gallery and look at the image block module. It gives directions on how to do this using php.

 
thornsoft

Joined: 2007-01-16
Posts: 3
Posted: Fri, 2007-01-19 03:36
Quote:
and look at the image block module

Close, but that gives HTML crap around the image. I just want the .jpg file. I also get a security violation if I try to use the specificImage= option, but I suppose that could be overcome, if I tried hard. But it's a non-starter anyway. I'm trying to get a list of .jpg files to feed into a flash slideshow rotator, and this isn't going to do it.