Lightbox- assign each image its own...

User 2432550 Photo


Registered User
105 posts

Is there a way to give each image in a lightbox its own URL? It opens and then in the caption there is a link to a full page image maybe? *Maybe without creating new pages for each photo, instead just letting the image open in another page by itself?
User 2088758 Photo


Senior Advisor
3,087 posts

Hi Tara,

It sounds like your missing some code in your headers for the VSD page. Here is an example of a lightbox that I used in VSD: http://www.bobbiejoesbeauty.com/gallery.html

Are you manually coding your lightbox or are you using software to do it?
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 2432550 Photo


Registered User
105 posts

I used code in the VSD. Here is an example - http://tdcustoms.com/PhotoGallery.html

That example you gave- the first few pictures open to a new page, while the last few open up in a lightbox. My lightbox currently works fine, I am just wondering if I want to have a link for an image, can I do this in the code- or does having a link to the actual image change the lightbox setup entirely?
User 2147626 Photo


Ambassador
2,958 posts

Yes. You can do this. But it's a little bit of a process. Let me see if I can explain. Please bear with me as I'm on medication this week so if you have questions after this, please ask.

Create your visual lightbox with all your photos. Open the HTML file that lightbox creates and look at the code for each picture. You can reference what I'm doing here... http://stackoverflow.com/questions/5054134/adding-a-link-under-my-image-where-i-am-using-lightbox

Find the code for your first picture. Should look something like this:
<a class="vlightbox1" href="index_files/vlb_images1/directftp.jpg" title="directftp"><img src="index_files/vlb_thumbnails1/directftp.jpg" alt="directftp"/></a>


You need to make changes to look like this:
<a class="vlightbox1" href="index_files/vlb_images1/directftp.jpg" title="&lt;a href=&quot;http://gunsmoke.me&quot;&gt;http://gunsmoke.me&lt;/a&gt;"><img src="index_files/vlb_thumbnails1/directftp.jpg" alt="&lt;a href=&quot;http://gunsmoke.me&quot;&gt;http://gunsmoke.me&lt;/a&gt;"/></a>


This will create a link to my home page at http://gunsmoke.me and display it in the caption box under your photo. You'll need to make these changes for each picture you want to add a link to. Of course use whatever link you need for your pictures.

Let me know if you still need more help. :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2432550 Photo


Registered User
105 posts

Thanks for your help! What I am wondering is if each individual picture can have a link to its own page- rather than an external link to a website. If I click on the link in the caption, for example, will it ever be able to open a page with just that photo on it?
User 2147626 Photo


Ambassador
2,958 posts

Yes. I just used that link to my website as an example. You should be able to put in any proper link and it should work fine. Each picture can have it's own link to either a page, a download, a video, or whatever you desire.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2432550 Photo


Registered User
105 posts

Ok, but if it linked to a page with just that image on it, I would have to actually create the page, right? It wouldn't have it's own image page? Like on Steve's link, where some images go straight to the plain image page. (I believe this happens maybe when the code is not entirely correct, since it doesn't allow for moving from pic to pic, but instead opens it in another window..?)
User 2147626 Photo


Ambassador
2,958 posts

Okay, maybe I missed what you are after. In Visual Lightbox you have 'thumbs' of your images. These can be any size. When you hover over the thumb it comes up with a full size picture. The size of that picture is up to you and is set when you create the lightbox. No other link needed. You can disable 'right-click' or watermark your pics to keep folks from 'borrowing them, or you can allow right-click and folks can download the full size pic. You really shouldn't need any other page. I'm using Chrome browser and when I go to Steve's site all I see is a standard lightbox with the slideshow set. I don't get any links to any picture pages.

Doing it my way, yes, you would have to create a page for each picture you wanted to link to. Might not be what you want.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2088758 Photo


Senior Advisor
3,087 posts

Tara Johnson wrote:
Ok, but if it linked to a page with just that image on it, I would have to actually create the page, right? It wouldn't have it's own image page? Like on Steve's link, where some images go straight to the plain image page. (I believe this happens maybe when the code is not entirely correct, since it doesn't allow for moving from pic to pic, but instead opens it in another window..?)


Hi Tara,

I'm not sure which images you are referencing off of my site that are opening directly to an image? When I open it they all use the lightbox. But the answer to your question is no you do not need to add a page for each image. As long as you upload them to your server you can reference them directly... I have another client that does not like the lightbox and would rather them open in a new page directly. For Example: http://lucsusedequipment.com/2007-FNH%2 … ractor.htm

I have all these pictures just uploaded in a folder on my server. Then I reference the path of that folder and image name to get it to open in a new window. Like this:

<a target="_blank" href="wgc_media/photos/2007-FNH TJ430 Tractor.jpg">
<img border="2" src="wgc_media/thumbs/2007-FNH TJ430 Tractor.jpg"></a>
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 2147626 Photo


Ambassador
2,958 posts

Steve, perfect! But that still works in Lightbox too. Just add the link to the folder location of the pic and it will open in it's own page. Using lightbox or not, is up to you Tara, but it's a great way to display a large number of photos.

Just make sure that if you don't want others to download your full size pics that you disable right click. And that's still not 100% foolproof!
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.