Lightbox problem

svsanchez

Hello everyone, thank you for your help. I was able to solve this by making again the template since I couldn't "clean" my code. Thanks to you I could determine that the lightbox was indeed working and that it was not the problem, but my template was so just making it again little by little fixed it :)

instantflorian

Hi,

there is still the problem that both libraries jQuery and prototype.js are loaded. If you don't need jQuery anewhere else, you can remove the line

<script type="text/javascript" src="http://www.compugangas.com.gt/templates/round/jquery-2.1.1.js"></script>

from the head of your template and try again.
If you need jQuery, you can either update bakery to 1.70 (but take care of the side effects, see release notes), this version does not use prototype any more.

The other possibilty is to edit the modules/bakery/view_item.php, if you don't want to update Bakery.

You can replace the lines in view_item.php where the lightbox is built manually with those from the view_item.php of Bakery 1.70 and edit the line where the lightbox link is built accordingly.

Or you remove the lines where prototype is loaded (around lines 40ff.) completely and edit the line where the thumbnail/lightbox links are generated (around line 158).
The line should be changed to something like

$prepend = "<a href='".$img_url.$image_file."' class='grouped_elements'  title='".$img_title."'><img src='";

or

$prepend = "<a href='".$img_url.$image_file."' rel='lightbox'  title='".$img_title."'><img src='";

Then you can add any jQuery lightbox script to your template which hopefully will do the trick.

hth
-Florian.

freeSbee

Hi svsanchez

You have to include the Bakery frontend.css stylesheet that provides the necessary Lightbox styling:
http://www.bakery-shop.ch/#css

Regards Christoph

svsanchez

Thanks dbs, I think it will have to do something with the DIVs. Haven't solved it yet but I feel I'm on the right path thanks to your link!

dbs

[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

svsanchez

Hello dbs and jacobi22, thanks a lot for your replies. Unfortunatelly, even after removing the extra calls to jquery the problem is still there. I also uploaded jquery version 2.1.1 but this didn't solve the problem either. What else could be causing this problem, please help!

Gast

and maybe a newer jquery version helps


QuoteAnd jQuery will loaded twice. One of this lines is enough
one time more here
<script type="text/javascript" src="http://www.compugangas.com.gt/templates/round/jquery-1.4.2.js"></script>

dbs

#2
Hi, you want use jQuery and Prototype together.
This makes often problems.

And jQuery will loaded twice. One of this lines is enough
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

svsanchez

Hello Bakers!

I am having a very strange problem with my Bakery installation on www.compugangas.com.gt: when I click on the thumbs, the lightbox does appear, but not on top of the page but instead it shows the image at the very bottom of the page. Here's a link to show my problem, just click on any of the thumbs images and you will see the scroll bar increases its size then at the bottom of the page you will see the lightbox image:

http://compugangas.com.gt/pages/bakery/hp-compaq-dc7700-dt-5.php