Any help would be greatly appreciated, and Happy New Year!

Here is my situation:
I have a CCK image link field created using http://drupalmodules.com/module/link-image-field.
I have an image that needs to link to another image (a different image).
I want my linked image to display using lightbox (which is already installed and being used on the same site for a gallery).

I need the link code to place in the image link field. I've tried different approaches I found on the web, but they all return "the requested page could not be found" errors when I click on the image.

What's the correct hard-coded url for an image to show up in lightbox?

Thanks guys.

Comments

i25’s picture

Using a href="images/image-1.jpg" rel="lightbox" title="my caption">click here! from

http://drupal.org/node/144488

doesn't work.

i25’s picture

Any suggestions guys? Thanks.

i25’s picture

Any thoughts or suggestions guys? How can I link to a different image using Lightbox? Please see my first post. Thanks!

i25’s picture

Some help guys! I really need to figure this one out, and I'm not having any luck!

i25’s picture

Any suggestions?

i25’s picture

No suggestions guys? Anything might help me here... this one is draining me...

i25’s picture

Somebody out there has to have some knowledge on this one! I could just have the link open in a blank new page, but having it open with lightbox would be awesome! Please help!

i25’s picture

Anything?

ludo1960’s picture

i25’s picture

This looks promising. I installed the module (along with it's dependent modules).

I tried placing in the url field for the link image .

Remember that the linkimage module gives you a place to upload the image, then a field to enter the url to be activated when that image is clicked.

I get the same result when I click the image... a page could not be found error.

i25’s picture

Anything further?

ludo1960’s picture

Is your code now ?

i25’s picture

ludo1960,
I think some of your post was stripped out. Can you re-post? Thanks.

ludo1960’s picture

I didn't post any code, I was asking for you to post your code as it is now (after installing automoda!l)

i25’s picture

Oh... sorry.

My URL in the Link Image field is:

<a href="themes/mytheme/images/banner1.jpg" class="automodal"></a>

ludo1960’s picture

....you type http://mysite.com/themes/mytheme/images/banner1.jpg in a browser, what do you see ?

i25’s picture

The banner1.jpg image shows up fine in the browser if I navigate directly to it. I think it has something to do with how the LinkImage module is interpreting the url code.

ludo1960’s picture

...the full path in your link. or maybe embed the image in a node, other than that I just don't know.

i25’s picture

I have tried the full path to the image... no luck there.

What do you mean my "embed the image in a node?"

i25’s picture

Anything else?

i25’s picture

Anything guys!?!?

Please help!

Is there perhaps another way to achieve this?

i25’s picture

Anything guys?!?!

i25’s picture

I now get what you mean by embedding the image in a node (I assume creating a node with the image attached to it). How will this help? Thanks.

ludo1960’s picture

And I'll have a look.

i25’s picture

Thanks to Ludo who dedicated some time to helping me out!

So, here's a quick summary which will hopefully help someone else.

I'm using CCK/Views/Lightbox/ImageField. Normally Lightbox is used to display the same graphic image in a larger format or different dimensions.

I needed something slightly different. I needed "image1" to be clicked and "image2" to displayed in Lightbox. Image1 and Image2 and not different sizes or dimensions of the same graphic; they are actually 2 different graphics.

Ludo suggested that I find the url for the image that is being called for display in Lightbox (using FireBug), then re-name image2 in my file structure to match what Lightbox is looking for. This worked great!

Thanks again Ludo!

gandhiano’s picture

I'm trying to do exactly the same as you. How do you actually rename image2 in your file structure? Do you make this manually, or is it possible to have some kind of automation (for example a path for a imagecache type?)

i25’s picture

I made the change manually in the file structure. While I'm sure this not recommended, it was the only solution I had at the time. I don't know of any automated ways of doing this.