Seeing NaN> When Image Clicked

12 years 10 months ago #108608 by swordali
Replied by swordali on topic Re:Seeing NaN> When Image Clicked
Dear jveler i changed as you wrote. It is working. But Picture galery list lightbox format is not working!!! Do you have anothor way???

Thank you

jveler wrote:


1) I don't quite understand why the link for the title of the image would be different than the image itself. In one case, you get a new browser window, and in the other a popup.

2) I agree that disabling the SEF plugin was not a solution. I looked into the code and tried to determine what was going on and a quick fix that seems to work for me.

It seems as though the bug was being caused by the SEF plugin rewriting the src= with src=/. The forward slash was not coming up on the original line (970) in Nant's Gallery:

[code:1]$htmltext2 .= "var imageurl = \"<img src=\" + pgimagefile + \">\";\n";[/code:1]

So that'st he only thing I can think of that was causing. Thus, disabling the plugin fixed it. Well, since I can't disable that plugin for SEO purposes... I used the Javascript unescape() function to write the line in such a way that the plugin wouldn't try to change it.

I modified line 970 to the following:

[code:1]$htmltext2 .= "var imageurl = unescape(\"%3Cimg%20src%3D%22\"«») + pgimagefile + unescape(\"%22\"«») + \">\";\n";[/code:1]

And all seems to work fine.

FYI, if you're not familiar with escape and unescape, they allow you to convert special characters to their url encoded equivalents. The use of them for this purpose is something that I've used a few times to get around tricky things like this. Also, it's a trick Google uses in it's analytics tracking code. Anyway, just a bit of trivia.

- Joe

Post edited by: jveler, at: 2009/02/23 23:22 taxi taksi ev hizmetleri
The topic has been locked.
12 years 10 months ago #108804 by ankitv
Replied by ankitv on topic Re:Seeing NaN> When Image Clicked
Hi all,

After clicking on an image in gallery the basic pop up was showing a blank image, it was solved by using the unescape function.

And now there was an error using lightbox, it was showing a blank image, this is according to me actually a version conflict of lightbox2, so i simply replaced the existing lightbox js files with the newer ones available here:

Thanks to joomlapolis and all the participants, my gallery functionality is working fine now!!

The topic has been locked.
12 years 10 months ago #108810 by nant
Replied by nant on topic Re:Seeing NaN> When Image Clicked
Latest CB Gallery plugin availble for doc subscribers works just fine with Joomla 1.5.X series.
The topic has been locked.
Moderators: beatnantkrileon
Time to create page: 0.205 seconds

Facebook Twitter LinkedIn