PhotoshopForums.com Home
Navigate Contact FAQ Search Members
Bad Hyperlinks Using Web Photo Gallery and Long Filenames
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> General Photoshop and Design Discussion
 See a User Guidelines violation? Please contact us.
Author Message

Ken Rahaim

Joined: 22 Jul 2005
Posts: 2



PostPosted: Fri Jul 22, 2005 1:11 am    Post subject: Bad Hyperlinks Using Web Photo Gallery and Long Filenames Reply with quote

I'm using the Horizontal slideshow style and I think I've isolated the problem down to this bit of code in the ThumbnailsFrame.htm file that's generated by Web Photo Gallery:

<a onmouseover="window.status='disco2 johntravoltaisthemacdaddy.jpg'; return true;" onmouseout="window.status=''; return true;" href="javascript:jumpToImage(replaceCharacter('disco2%20johntravoltaisthe%235b3cd.jpg', '%20', ''));">

When using long filenames with pshop cs2 on Mac OSX, the filenames are truncated to less than 31 characters. When its truncated, the last 4 or 5 digits are converted to a unique serial number preceeded by the "#" symbol (which the computer sees as %23). That's all well and good until the bit of javascript above tries to convert the %xx to literal symbols. It does it just fine for spaces (%20), but it has nothing built into it for the "#" sign (%23). Unfortunatley, this results in unusable thumbnail hyperlinks in the generated thumbnail web page.

I've searched this forum and several others and find it hard to believe that I'm the first to run into this problem. Does anyone have a solution for this problem? Can you "nest" 'replaceCharacter' functions inside each other to do multiple search and replaces? I tried this myself with my best guess at the syntax (I don't know javascript) but it didn't work. Will the syntax of 'replaceCharacter' support multiple replacements?

Any help or workaround (aside from renaming the long filenames) would be greatly appreciated. Thank you!
View user's profile Send private message

Ken Rahaim

Joined: 22 Jul 2005
Posts: 2



PostPosted: Sat Jul 23, 2005 7:27 pm    Post subject: Reply with quote

Oh well, was hoping someone here might know the answer to make life a bit easier for me :). I ended up spending some time and figuring it out myself. If anyone else runs into the same problem, here's the relevant bit of code that allows for long filenames using OSX Web Photo Gallery:

href="javascript:jumpToImage('CRW_7659%20thisfilename%2361116.jpg'.replace( /%20/g, '' ).replace( /%23/g, '#' ));">

myImages['CRW_7659%20thisfilename%2361116.jpg'.replace( /%20/g, '' ).replace( /%23/g, '#' )]

As mentioned previously, the code appears towards the bottom of the ThumbnailFrame.htm file (which is generated by Web Photo Gallery). You have to make the 2 changes above for each thumbnail in your gallery. As Sean mentioned, a global search and replace is a quick way to make the change.
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> General Photoshop and Design Discussion All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Contact - User Guidelines >

Copyright © 2003-2016. PhotoshopForums.com, iFroggy Network. All Rights Reserved.
Powered by phpBB © phpBB Group. phpBB SEO. Privacy Policy.
We are in no way affiliated with Adobe. Photoshop, Adobe and related marks are registered trademarks of Adobe.
PhotoshopForums.com