Page 1 of 1
Problem with slimbox
Posted: 11 Jul 2011, 18:03
by Richie1978
Hi,
I have installed Phoca Galley and I use slimbox to show the pictures. Almost everything works like it should execept one thing.
In the detailed view, it shows the title of the image and under the title it should say "image 1 of 10" (for example).
But in my case it says: undefined 1 undefined 10.
I'm running Joomla in German.
Hope someone can help me.
Thanks
Richie
Re: Problem with slimbox
Posted: 12 Jul 2011, 12:41
by dethisandthat
version: 2.7.4
I had a look at the file
\Joomla\components\com_phocagallery\assets\js\slimbox\src\slimbox.js
The image x of y is defined in line 229
Code: Select all
captionAnimationDuration: 400, // Duration of the caption animation (in milliseconds)
counterText: "Image {x} of {y}", // Translate or change as you wish
closeKeys: [27, 88, 67], // Array of keycodes to close Slimbox, default: Esc (27), 'x' (88), 'c' (67)
I have no idea why in your case it's displayed as undefined x of y.
Please note that, that file is the source code which is never executed. You have to find the line in the file
\Joomla\components\com_phocagallery\assets\js\slimbox\slimbox.js
and edit it.
Hope that helps. cheers
Re: Problem with slimbox
Posted: 12 Jul 2011, 18:39
by Richie1978
Thanks. I've found that. But it doesn't matter what there is written, it always says: "undefined"
Now I discovery something:
The Slimbox still works even if I change the name slimbox.js to slimbox.bak
But why?
Could the problem be caused by the also installed joomgalley?
EDIT:
Ok, the Problem is the also installed Joomgallery.
I changed the slimbox.js in the joomgallery folder (changed counter:true to counter: false) and the counter in the Phoca Gallery slimbox also disappeared!!!
So the problem now:
Can I somehow change the code in a way that phoca gallery uses it's own slimbox.js and not the one of joomgallery?
Re: Problem with slimbox
Posted: 12 Jul 2011, 23:07
by Jan
Hi, then it must be customized in the code.
Mostly the extensions are written this way:
They call external javascript libraries but they inform Joomla! core so if other extension will call the same library, it will not load it again.
Jan