Lightbox not working

yppds

Hello Jacobi,

Again thank you very much for your help.
Your tweak is great and i have already apply it, but it seems to be happening the following.

When I add a product, a new product and view it, the hidden images are also viewed. So, the product shows lets say 5 images one next to the other. Normally, I should only see one image and the other 4 should be hidden and viewed only in lightbox.
Now, If i hit the refresh button (F5) everything is corrected. But on any new image, it seems that it holds some cache.

Is this normail?

jacobi22

#10
its "very simple"  ;-)

count the pics in the THUMBS-Array, give only the first THUMB the standard css-class and the otherones a new CSS-Class and set this pictures to display: none;

thats all   :-D

BUT the Problem...
the customer doesnt know, that you have more than one picture.....
maybe it helps, if you put a little tip in the template (page settings -> details (footer)
like this
[THUMBS]
(click here for more pics)
<table border="0" ................>


the solution:

your frontend.css (for bakery)
build a new class like this

.mod_bakery_item_thumb_fff {
       border: none;
       display:none;
}


view_item.php
1. search this code-lines  (original in line 137)
// Check if the thumb and image directories exist
       if (is_dir($thumb_dir) && is_dir($img_dir)) {

behind this line define your counter with this line
$ix = 0;

behind this lines (original in line 173)
// Make array
                               $thumb_arr[] = $prepend.$thumb_url.$thumb_file.$thumb_append;
                               $image_arr[] = $prepend.$img_url.$image_file.$img_append;


write this:
$ix++;

these lines here build the pictures links, if you use lightbox

if ($setting_lightbox2 == "detail" || $setting_lightbox2 == "all") {
                                       $prepend = "<a href='".$img_url.$image_file."' rel='lightbox[image_".ITEM_ID."]' title='".$img_title."'><img src='";
                                       $thumb_append = "' alt='".$img_title."' title='".$img_title."' class='mod_bakery_item_thumb_f' /></a>";
                                       $img_append = "' alt='".$img_title."' title='".$img_title."' class='mod_bakery_item_img_f' /></a>";
                               // ...else add thumb/image only
                               }


change this lines to

if ($setting_lightbox2 == "detail" || $setting_lightbox2 == "all") {
if ($ix == 0){
                                   $prepend = "<a href='".$img_url.$image_file."' rel='lightbox[image_".ITEM_ID."]' title='".$img_title."'><img src='";
                                       $thumb_append = "' alt='".$img_title."' title='".$img_title."' class='mod_bakery_item_thumb_f' /></a>";
                                       $img_append = "' alt='".$img_title."' title='".$img_title."' class='mod_bakery_item_img_f' /></a>";}
                                       else{


                                       $prepend = "<a href='".$img_url.$image_file."' rel='lightbox[image_".ITEM_ID."]' title='".$img_title."'><img src='";
                                       $thumb_append = "' alt='".$img_title."' title='".$img_title."' class='mod_bakery_item_thumb_fff' /></a>";
                                       $img_append = "' alt='".$img_title."' title='".$img_title."' class='mod_bakery_item_img_f' /></a>";
                                       }
                               // ...else add thumb/image only



the first picture in the thumbs-array has the (original-)class mod_bakery_item_thumb_f
the next pics has the class mod_bakery_item_thumb_fff



yppds

Jacobi22,

Thank you soooo much. You saved me a lot of time and effort.

Can I ask one more thing perhaps you have deal with this. I have replaced [IMAGE] with [THUMB]. This suites me better to have smaller images and when clicked to see the normal image under lightbox.

Is it possible, instead of showing many thumbnails(or images), to show only one and the other images to be visible only when lightbox is played?

What do you think?

Thanks

jacobi22

please check the bakery page settings
Overview (Product-Loop) ->
THUMB is (only) the main image
THUMBS = all images

Item Detail (Footer):
IMAGE = only main image
IMAGES = all images

yppds

Hello,

I seem to have a more complicated problem than imakeart, before.

I have downloaded bakery 1.6 and install it in on a clean installation of WB 283sp1. I am using the round template which as far as I see, contains already the
            register_frontend_modfiles('css');
            register_frontend_modfiles('js');

I have not modified any other file, just add a new product with 3 images. The issue is that I cannot see the other images. LIghtbox opens up, and shows only the main image. There are no prev-next links, only the main image.

I have reproduced the problem on 3-4 different setups. I have just seen from firebug that there might be the case prototype.js is not updated. Even though I have updated, the problem still persists.

Do you have any idea what is happening?

Thanks for your help.

Het Artiek

#6
....

jacobi22

please post a link to the Problem

Het Artiek

#4
My picture is still at the bottom of the page  :?

imakeart

Thank you!!

I knew it would end up being something simple. Everything works now.


imakeart

Lightbox is not working in Bakery. It's a little difficult to explain, basically it's not popping up, instead it is showing the image further down the web page. You can see it at the url below, just click on one of the thumbnails:

http://amandamakepeace.com/art/pages/artshop/white-feather-bookmark-42.php

Has anyone seen this happen before?

I'm running Website Baker 2.8.2 SP 2 with the latest version of the Bakery module.

If anyone has a fix, I can probably do it myself, if you share the code and where it goes--but this is not my area of expertise.