Using shadowbox.open() to open particular image on load

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using shadowbox.open() to open particular image on load

Cykaos
This post was updated on .
I would love to be able to link a friend in irc or something to a particular picture which would take them to a gallery on my photo album page but then automatically open the specified picture in shadowbox. As it is now I can either link someone to the actual image file (then they don't see the rest of the gallery) or give them a link to the gallery and tell them to click on the third pic from the left.

IE http://www.mysite.com/photo.php?album=springbreak&pic=15

would take them to my springbreak album and then bring up pic 15 in the shadowbox on page load. From there they can use the previous or next buttons or close the shadowbox and see the other thumbnails etc.

http://www.mysite.com/photo.php?album=springbreak

would just take them to my gallery page with all the thumbnails and when they click a thumb it opens the shadowbox

I guess what I need to know is how to find the object for the image I want. I have already run the Shadowbox.init() and the image I want has already been setup along with all the other images in the gallery. So I need to know the object so I can call Shadowbox.open(object) and it will open the right image in the correct order of the gallery. So basically I want it to be just as if someone clicked that thumbnail but make it happen automatically on load.

Anyone know what calls are made when you click a shadowbox link after the Shadowbox.init() and how do I get the particular object I want?