View Single Post
Old November 10th, 2015, 02:12 PM   #7
Alex
ninjette.org dude
 
Alex's Avatar
 
Name: 1 guess :-)
Location: SF Bay Area
Join Date: Jun 2008

Motorcycle(s): '13 Ninja 300 (white, the fastest color!), '13 R1200RT, '14 CRF250L, '12 TT-R125LE

Posts: Too much.
Blog Entries: 7
Quote:
Originally Posted by spooph View Post
@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.
__________________________________________________
Montgomery Street Motorcycle Club / cal24.com / crf250l.org / ninjette.org

ninjette.org Terms of Service

Shopping for motorcycle parts or equipment? Come here first.

The friendliest Ninja 250R/300/400 forum on the internet! (especially Unregistered)
Alex is offline   Reply With Quote


1 out of 1 members found this post helpful.