Problem with slimbox

Phoca Gallery - image gallery extension
Richie1978
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Jul 2011, 18:00

Problem with slimbox

Post 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
dethisandthat
Phoca Member
Phoca Member
Posts: 13
Joined: 17 Sep 2010, 11:09

Re: Problem with slimbox

Post 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
Richie1978
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Jul 2011, 18:00

Re: Problem with slimbox

Post by Richie1978 »

Thanks. I've found that. But it doesn't matter what there is written, it always says: "undefined" :x :x :x :x

Now I discovery something:
The Slimbox still works even if I change the name slimbox.js to slimbox.bak :o

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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49190
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with slimbox

Post 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
If you find Phoca extensions useful, please support the project
Post Reply