SMFHacks.com

SMF Store => Support => Topic started by: Sweetwater on July 23, 2009, 07:43:12 am

Title: Lighbox not working {Solved}
Post by: Sweetwater on July 23, 2009, 07:43:12 am
My light box in Store & also Classifieds is stalling half way thru openning up the image. Am getting complaints from customers about it. Have turned off the lightbox in the Store (not the most desirable option). There is no option to turn it off in SMF Classifieds.

Can SMF Hacks offer any assistance or advice on how to fix this??

THanks for any replies or assistance.

Sweetwater
Title: Re: Lighbox not working
Post by: SMFHacks on July 23, 2009, 07:56:01 am
This is an issue with TinyPortal they are using another script on that page to cause

If that code is removed from tiny portal then the highslide will work again
Code: [Select]
<script type="text/javascript" src="http://www.sweetwaterfishing.com.au/Forum/tp-files/tp-plugins/javascript/mootools.js"></script>
Title: Re: Lighbox not working
Post by: Sweetwater on July 25, 2009, 03:49:14 am
 I deleted the file & the problem with the images in Store & Classifieds is now solved.

Thankyou SMF Hacks.  ;D
 
Sweetwater...
Title: Re: Lighbox not working
Post by: treasurenet on July 25, 2009, 11:09:47 am
Can someone tell me what the lightbox is supposed to do?  When I select it, and I click on an image, i just opens the image by itself...  I see no features.

Thanks.
Title: Re: Lighbox not working
Post by: SMFHacks on July 25, 2009, 11:31:31 am
That's all it is meant to do really. Just show the enlarged image. Lightbox adds a black background.
Title: Re: Lighbox not working
Post by: treasurenet on July 26, 2009, 01:05:27 am
Well, I think there's something wrong with 2.5's implementation.

When I select Lightbox, it does nothing...  the image is not centered, there's no black background...  nothing.  Just the image in a new window.

Looking at the source with Lightbox selected, I see that the lightbbox .js files are using the gallery path, not the gallery url to the .js files.

in other words....  in my case, it should be.... 

Code: [Select]
<script type="text/javascript" src="/gallery/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="/gallery/js/lightbox.js"></script>
<link rel="stylesheet" href="/gallery/css/lightbox.css" type="text/css" media="screen" />

and not how it currently is.....

Code: [Select]
<script type="text/javascript" src="/users/gallery/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="/users/gallery/js/lightbox.js"></script>
<link rel="stylesheet" href="/users/gallery/css/lightbox.css" type="text/css" media="screen" />

Where can I fix that?

Thanks.

Title: Re: Lighbox not working
Post by: treasurenet on July 26, 2009, 01:16:26 am
Ah, found it myself.... 

In Gallery2.php  find....

Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_path'] . 'css/lightbox.css" type="text/css" media="screen" />';
   
Replace with....

Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_url'] . 'css/lightbox.css" type="text/css" media="screen" />';
   
      

In Gallery.php  find....   
      
Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_path']. 'css/lightbox.css" type="text/css" media="screen" />';

Replace with....

Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_url']. 'css/lightbox.css" type="text/css" media="screen" />';
Title: Re: Lighbox not working
Post by: SMFHacks on July 26, 2009, 08:50:53 am
Nice catch fixed for next release