Shadowbox problem

Phoca Gallery plugins - plugins for Phoca Gallery extension
kindUp
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 04 Oct 2009, 10:30

Shadowbox problem

Post by kindUp »

Hi,
It,s my first post. Sorry for my english (i'm from Poland).

Does anyone have a problem with displaying shadowbox with this Plugin? Here is the solution:

Into file: plugins/content/phocagallery.php near line 358 (
I changed a few lines and this number line into my file is 358) you must replace window.onload function to window.addEvent:

orginal:

Code: Select all

if ( $libraries['pg-group-shadowbox']->value == 0 ) {
                        $document->addCustomTag('<script type="text/javascript">
			Shadowbox.loadSkin("classic", "'.JURI::base(true).'/components/com_phocagallery/assets/js/shadowbox/src/skin");
			Shadowbox.loadLanguage("'.$sb_lang.'", "'.JURI::base(true).'/components/com_phocagallery/assets/js/shadowbox/src/lang");
			Shadowbox.loadPlayer(["img"], "'.JURI::base(true).'/components/com_phocagallery/assets/js/shadowbox/src/player");
			window.onload = function(){
			Shadowbox.init();
			}
			</script>');
					$library->setLibrary('pg-group-shadowbox', 1);
				}
new:

Code: Select all

if ( $libraries['pg-group-shadowbox']->value == 0 ) {
					$document->addCustomTag('<script type="text/javascript">
			Shadowbox.loadSkin("classic", "'.JURI::base(true).'/components/com_phocagallery/assets/js/shadowbox/src/skin");
			Shadowbox.loadLanguage("'.$sb_lang.'", "'.JURI::base(true).'/components/com_phocagallery/assets/js/shadowbox/src/lang");
			Shadowbox.loadPlayer(["img"], "'.JURI::base(true).'/components/com_phocagallery/assets/js/shadowbox/src/player");
			window.addEvent(\'domready\', function(){
                        Shadowbox.init()
                        });
			</script>');
					$library->setLibrary('pg-group-shadowbox', 1);
				}
good luck, kindUp
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shadowbox problem

Post by Jan »

Hi, thank you for this information. Jan
If you find Phoca extensions useful, please support the project
dagofee
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Nov 2009, 14:46

Re: Shadowbox problem

Post by dagofee »

I just registred myself to let know that this fixed the issues in my case!
please consider to fix it in the next release
ciao
Post Reply