WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Lightbox not working
  • Print
Pages: [1]   Go Down

Author Topic: Lightbox not working  (Read 9644 times)

Offline imakeart

  • Posts: 18
Lightbox not working
« on: February 07, 2012, 08:17:08 PM »
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.
Logged

freeSbee

  • Guest
Re: Lightbox not working
« Reply #1 on: February 07, 2012, 09:06:52 PM »
Hi imakeart

http://www.bakery-shop.ch/#css
http://www.bakery-shop.ch/#js
http://www.websitebaker2.org/en/help/designer-guide/enhanced-template-elements.php#anker4

Regards Christoph
Logged

Offline imakeart

  • Posts: 18
Re: Lightbox not working
« Reply #2 on: February 07, 2012, 09:15:30 PM »
Thank you!!

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

Offline Het Artiek

  • Posts: 96
  • Gender: Male
  • What do you mean, my birth certificate expired?
    • www.hetartiek.nl
Re: Lightbox not working
« Reply #3 on: September 24, 2012, 09:14:25 AM »
My picture is still at the bottom of the page  :?
« Last Edit: November 07, 2012, 08:34:57 PM by Paradontax »
Logged

jacobi22

  • Guest
Re: Lightbox not working
« Reply #4 on: September 24, 2012, 12:56:39 PM »
please post a link to the Problem
Logged

Offline Het Artiek

  • Posts: 96
  • Gender: Male
  • What do you mean, my birth certificate expired?
    • www.hetartiek.nl
....
« Reply #5 on: October 01, 2012, 12:24:37 PM »
....
« Last Edit: September 17, 2013, 06:32:23 PM by Het Artiek »
Logged

Offline yppds

  • Posts: 38
Re: Lightbox not working
« Reply #6 on: October 22, 2012, 07:28:34 PM »
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_m odfiles('css');
            register_frontend_m odfiles('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.
Logged

jacobi22

  • Guest
Re: Lightbox not working
« Reply #7 on: October 22, 2012, 08:39:32 PM »
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
Logged

Offline yppds

  • Posts: 38
Re: Lightbox not working
« Reply #8 on: October 23, 2012, 07:14:51 PM »
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
Logged

jacobi22

  • Guest
Re: Lightbox not working
« Reply #9 on: October 23, 2012, 08:25:50 PM »
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
Code: [Select]
[THUMBS]
(click here for more pics)
<table border="0" ................>

the solution:

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

Code: [Select]
.mod_bakery_item_thumb_fff {
        border: none;
        display:none;
}

view_item.php
1. search this code-lines  (original in line 137)
Code: [Select]
// 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
Code: [Select]
$ix = 0;
behind this lines (original in line 173)
Code: [Select]
// Make array
                                $thumb_arr[] = $prepend.$thumb_url.$thumb_file.$thumb_append;
                                $image_arr[] = $prepend.$img_url.$image_file.$img_append;

write this:
Code: [Select]
$ix++;
these lines here build the pictures links, if you use lightbox

Code: [Select]
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

Code: [Select]
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


« Last Edit: October 23, 2012, 08:33:45 PM by jacobi22 »
Logged

Offline yppds

  • Posts: 38
Re: Lightbox not working
« Reply #10 on: October 25, 2012, 01:57:53 PM »
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?
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Lightbox not working
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2