PDA

View Full Version : Resolved Thumbnail Viewer II Upgrade fails



sabreur
04-24-2014, 12:13 PM
1) Script Title: Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: I have used the original version of this script for a long time. I tried to upgrade to the latest version but cannot get the script to work properly.

Mouseover does not work, when I click on a thumbnail it opens in a new page.

I am using jquery 1.6.2 and running the viewer inside PHP so I have had to modify some of the quoting to get the original version to work. The image url and title data come from a mysql database. Here is my original call:

echo "<a href='images/".$row['vfile']."' rel='enlargeimage::mouseover' rev='loadarea' title='&lt;b&gt;".$row['Title']."&lt;/b&gt;&lt;br /&gt;".$row['Medium']." &nbsp; &nbsp; &nbsp; ".$row['iw']." x ".$row['ih']." cm.'><img border='1' src='images/".$row['tnfile']."
' alt='' width='".$row['tnx']."' height='".$row['tny']."' class='tn' /></a><br />";


for the updraded version I have modified this to:

echo "<a href='images/".$row['vfile']."' rel='enlargeimage' rev='targetdiv:loadarea' title='&lt;b&gt;".$row['Title']."&lt;/b&gt;&lt;br /&gt;".$row['Medium']." &nbsp; &nbsp; &nbsp; ".$row['iw']." x ".$row['ih']." cm.'><img border='1' src='images/".$row['tnfile']."
' alt='' width='".$row['tnx']."' height='".$row['tny']."' class='tn' /></a><br />";

jscheuer1
04-24-2014, 01:28 PM
Interesting, looks like it should work. But it's hard to really know without seeing the page. If I had to guess, I would say that either the PHP has some syntax problem and/or that jQuery is interpreting the title field differently than expected. But it could be something else. Like the javascript(s) could be missing or not running for some reason.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

sabreur
04-25-2014, 07:37 AM
Interesting, looks like it should work. But it's hard to really know without seeing the page. If I had to guess, I would say that either the PHP has some syntax problem and/or that jQuery is interpreting the title field differently than expected. But it could be something else. Like the javascript(s) could be missing or not running for some reason.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

Well, this is embarassing!

It seems to be working now. As this was a live site, I was copying the faulty page to a new location for you. As so often happens, I took the oportunity to do a little house keeping and removed some redundant javascripts. That seems to have fixed it.

Thanks, without you I'd still be running V1!

No the real reason I was updating TNV II was that I was having trouble with it interacting with a popup script. I'll post this as a new thread, not sure whether this is the right forum as it involves TNV II, another jarvascript and php.

Thanks again.
"When you are up to your neck in alligators, it is often difficult to remember that the intention was to drain the swamp!"