
MikeB
Staff
/ Moderator

May 14, 2006, 10:20 AM
Post #3 of 5
(4859 views)
Shortcut
|
|
Re: [kezza] Tutorial: Icons for Uploaded Files
[In reply to]
|
Can't Post
|
|
Hi Kerry, Thanks for posting! I'm glad to hear that this script sounds like it will work for you and I'll just go through your questions for you. It looks like you should be able to add other types of file extensions to this list by modifying the linkPreview.js file. In this file you'll want to find this line: if( extension in { doc:1, pdf:1, ppt:1, txt:1, xls:1, zip:1 } ) You should be able to add your extension to this list. Then, you'd just want to add a style to the linkPreview.css file so the script will know which image to output beside the name of the file. I've taken a look into this script and to get the icons to display before the name of the link you just need to make another quick change to the .js file. You'll want to find this line of code: currentLink.parentNode.insertBefore(span,currentLink.nextSibling); And replace it with this: currentLink.parentNode.insertBefore(span,currentLink); You may then need to adjust some of the padding in the linkPreview.css file. I hope this helps Kerry and if you have any other questions feel free to let me know! Cheers, Mike Briggs - Product Specialist support@interactivetools.com [hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url] Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]
|