Having Lightbox Issues? Read this FIRST!!

17 years 2 months ago #30829 by rpitera
I really don't know why this is never mentioned here, but if you're having lightbox issues one of the first things you need to be aware of is that there are some lines required in your header to make this thing work!

Right after your <head> tag on your template (or templates if you use more than one - it needs to be on all of them!!) you should have the following lines:

[code:1]<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/components/com_comprofiler/plugin/user/plug_cbprofilegallery/js/prototype.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/components/com_comprofiler/plugin/user/plug_cbprofilegallery/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/components/com_comprofiler/plugin/user/plug_cbprofilegallery/js/lightbox.js"></script>

<link href="<?php echo $mosConfig_live_site; ?>/components/com_comprofiler/plugin/user/plug_cbprofilegallery/css/lightbox.css" rel="stylesheet" type="text/css" media="screen" />[/code:1]

You see, if you don't have these scripts and the CSS properly referenced and initialized, you can click all day long and nothing will happen!

You can find out more about this at www.huddletogether.com/projects/lightbox2/ where the LightBox 2 JS was created.

Also, make sure your download indicators have stopped before trying to click on a photo - on some slower sites, there's a bit of lag time before everything gets loaded in the background and if you click to soon you get the picture opening up in a window instead of the lightbox.

Another thing to look at is if you have any implementations of other "box" type scripts. Prototype and ThickBox for example do NOT play well together. In general it's a good idea to check your js folders and compare the contents to make sure you don't run into issues - check the includes directory as well as the individual CB plugins and other gallery plugin directories.

I'm no developer, but it mystifies me why the general attitude seems to be "Search me?" or "I dunno?" when a simple guideline or two will suffice - especially from developers I otherwise regard with high esteem. Writing great code is one thing, but try and remember WHO you write that spectacular code for. It's not just other developers!!

Hopefully this will be a sticky and solve a lot of problems for others.

Please Log in to join the conversation.

15 years 5 months ago #80529 by vmethod
Replied by vmethod on topic Re:Having Lightbox Issues? Read this FIRST!!
I have added the script... however...

the image doesn't display at all still... in fact, not even in the blank white window (which is what comes up, no lightbox). I even double checked all my links, all correct.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.364 seconds

Facebook Twitter LinkedIn