Quote:
Originally Posted by spooph
@ Alex, how hard would that be to do? Allow a direct link from that home page display to the actual photo?
|
I realized I didn't directly answer this question. I would have hoped (when I first implemented it 6 or 7 years back), that the smugmug random pic API could be used to provide a link to the pic within the gallery as well as the pic itself (even if there isn't any additional context or info tied to the pic in the gallery). But sadly, it doesn't; and to my knowledge it has never been updated to do so. Here's what I mean, just go to the portal page and copy the image URL by right-clicking, here's what the code is:
Code:
https://secure.smugmug.com/photos/random.mg?AlbumID=5159458&AlbumKey=6dhW3&Size=M
It returns an image url, so if you put that code within IMG tags, voila: a picture shows up. But if you put that same code just a few lines later, it will pull a new random image. So within the webpage itself, there isn't a straightforward way to show on a single page both the image and the link to that image within the gallery, using that simple API. There isn't a way to substitute the response from the API into a variable and then call that same variable twice right within the basic HTML. I had thought it would have been possible within php, but never had much luck with it way back when. There were similar requests on the smugmug forums, and I was never able to track down a working prototype.