Shadowbox autostart

Phoca Gallery - image gallery extension
mpappe
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 29 Nov 2016, 15:41

Shadowbox autostart

Post by mpappe »

Using Joomla 3.6.4, Phoca Gallery 3.6.1. There is no autostart of the shadowbox, using

overlayColor: '#000',overlayOpacity:0.5,resizeDuration:0.35,displayCounter:true,displayNav:true,slideshowDelay:5.

The 2014 post says it should work with slideshowDelay:5.

Any solution?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shadowbox autostart

Post by Jan »

Hi, to autostart the slideshow, go to:
administrator\components\com_phocagallery\libraries\phocagallery\render\renderdetailwindow.php
and edit (line cca 164)
FROM:

Code: Select all

var SBpauseOnStart = "true";
TO:

Code: Select all

var SBpauseOnStart = "false";
I will add new parameter for this in next version.

Jan
If you find Phoca extensions useful, please support the project
mpappe
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 29 Nov 2016, 15:41

Re: Shadowbox autostart

Post by mpappe »

Hi
Now with Joomla 3.6.5 and Phoca Gallery 4.3.4 I wanted to change the autostart. But now shadowbox and shadowbox (images only) don't show the navigation signs any more. Just the image with a white bare above and below.
Is there anything wrong with the shadowbox. I change to boxplus (but would prefer shadowbox)
Best regards
Markus
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shadowbox autostart

Post by Jan »

Hi, can you paste a screenshot of the white bar? Does it behave the same in other standard templates?

Jan
If you find Phoca extensions useful, please support the project
mpappe
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 29 Nov 2016, 15:41

Re: Shadowbox autostart

Post by mpappe »

Hi
I changed to "false" (below // shadowbox (image only)

if ( $libraries['pg-group-shadowbox']->value == 0 ) {
$document->addStyleSheet(JURI::base(true).'/components/com_phocagallery/assets/shadowbox/shadowbox.css');
$document->addScript(JURI::base(true).'/components/com_phocagallery/assets/shadowbox/shadowbox.js');
$document->addCustomTag('<script type="text/javascript">
var SBpauseOnStart = „false“;
Shadowbox.init({
'.$sbSettingsO.',
continuous: true

and the result is

shadowbox: shows the box in front of the category-view, but no navigation, just a white bar on top of and below the image

shadowbox (image only): shows just a popup window, white around the image, depending on the screen size. The category-view is gone.

Might be: After two days I changed from boxplus (image only) to shadowbox (image only), and everything was ok again. Then I changed to SBpauseOnStart = "false" again, and it didn't work again. But I am not quite sure if this is true, bevause shadowbox and boxplus look quite similar. I shall check later again if the shadowbox will be correct again, mysteriously.

And I habe to find out how to send screenshots.

Best regards
Markus
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Shadowbox autostart

Post by marcel77 »

Hi Markus,

I think, the easiest way is to upload your screenshots to your webspace and use the img tag to link them here.

Marcel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shadowbox autostart

Post by Jan »

See forum rules, the best way how to attach screenshots here is to use some external service like imgur is. (upload image to imgur, click on share icon and copy the bb code of the image and paste it here)

Jan
If you find Phoca extensions useful, please support the project
mpappe
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 29 Nov 2016, 15:41

Re: Shadowbox autostart

Post by mpappe »

Hi
Autostart for shadowbox has been activated.
Result for shadowbox (image only) is http://i.imgur.com/d4eCg5U.png.
Result for shadowbox is http://i.imgur.com/a5FvWgE.png.

Boxplus (image only) is ok, but no autostart: http://i.imgur.com/sJDmhqh.png.

Any idea what is wrong with shadowbox?
Best regards
Markus
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shadowbox autostart

Post by Jan »

Hi, the autostart works only for "image" type.

Try to add this code (or check if it is the same in your file):

Code: Select all

$document->addCustomTag('<script type="text/javascript">
                    var SBpauseOnStart = "false";
                    Shadowbox.init({
                    '.$sbSettingsO.',
                    continuous: true,
          onFinish: function(){setTimeout(\'if(SBpauseOnStart == "true"){SBpauseOnStart = "done";Shadowbox.pause();}\', 375)},
          onClose: function(){SBpauseOnStart = "true";}
                    });
                </script>');
If you find Phoca extensions useful, please support the project
mpappe
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 29 Nov 2016, 15:41

Re: Shadowbox autostart

Post by mpappe »

Hi
I have this code:

if ( $libraries['pg-group-shadowbox']->value == 0 ) {
$document->addStyleSheet(JURI::base(true).'/components/com_phocagallery/assets/shadowbox/shadowbox.css');
$document->addScript(JURI::base(true).'/components/com_phocagallery/assets/shadowbox/shadowbox.js');
$document->addCustomTag('<script type="text/javascript">
var SBpauseOnStart = „false“;
Shadowbox.init({
'.$sbSettingsO.',
continuous: true,
onFinish: function(){setTimeout(\'if(SBpauseOnStart == "true"){SBpauseOnStart = "done";Shadowbox.pause();}\', 375)},
onClose: function(){SBpauseOnStart = "true";}
});
</script>');
}

break;

case 13:
// SHADOWBOX


But the shadowbox (image only) is not working at all anymore.

Best regards
Markus
Last edited by mpappe on 07 Mar 2017, 23:47, edited 1 time in total.
Post Reply