Files without extensions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Files without extensions

jontas
Hey,

I believe I posted this as a comment on your website some time back, but it seems it didn't make it into the 1.0 release..  it is a minor change I had to make to get Shadowbox working on my site:

On line 423:

iframe:     ['asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'pl', 'php',
                        'php3', 'php4', 'php5', 'phtml', 'rb', 'rhtml', 'shtml',
                        'txt', 'vbs']

I changed to:

iframe:     ['asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'pl', 'php',
                        'php3', 'php4', 'php5', 'phtml', 'rb', 'rhtml', 'shtml',
                        'txt', 'vbs', '']

This allows loading pages that do not have extensions.. my index.php handles loading requests at /path/ which means none of my paths actually have filenames or extensions.  I guess it might not be the best generic solution, so shouldn't necessarily be added to the distribution, however, hopefully this change will help someone..

Jon
Reply | Threaded
Open this post in threaded view
|

Re: Files without extensions

Kent Pilkington
No luck (same result, same error).  I made the change the shadowbox.js file (adding the '' element to the array) and confirmed in firebug that the change was, in fact, picked up.

Also, the Google homepage link is the only one that doesn't have an extension (unless links with querystring arguments count as not having an extension).
Reply | Threaded
Open this post in threaded view
|

Re: Files without extensions

Kent Pilkington
Sorry!  Replied to the entry somebody referred rather than the original discussion thread.  
Reply | Threaded
Open this post in threaded view
|

Re: Files without extensions

Runar
In reply to this post by jontas
I have a similar problem with handling image urls without extensions. I have to deal with images from a variety of sources and they are often on the form http://some.site/getImage/image.id. Galleries are created dynamically and if one url is on the mentioned form the Shadowbox doesn't work at all. Your fix helped me to get it work, but the problem then is that the viewport is stretched out on the entire screen regardless the image size.