Seeing NaN> When Image Clicked

10 years 5 months ago #83287 by moonwolf
Disable Joomla 1.5 SEF plugin
The topic has been locked.
10 years 5 months ago #85618 by matu666
moonwolf wrote:

Disable Joomla 1.5 SEF plugin


and then what? ....i can see profile gallery popup but won't be able to use sef urls...this is no solution
The topic has been locked.
10 years 3 months ago #89666 by jveler
Hey,

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
The topic has been locked.
9 years 9 months ago #108552 by swordali
same problem?

www.thevipmoscow.com taxi taksi ev hizmetleri
The topic has been locked.
9 years 9 months ago #108553 by swordali
i have same problem?????????

www.thevipmoscow.com taxi taksi ev hizmetleri
The topic has been locked.
9 years 9 months ago #108554 by swordali
Could you write which pages ???
thx

www.thevipmoscow.com taxi taksi ev hizmetleri
The topic has been locked.
Moderators: beatnantkrileon
Time to create page: 0.392 seconds
Facebook Twitter Google LinkedIn