Something like this doesn’t work?
<a href="file:///fileserver/docs/manual.pdf">manual</a>
Thread Starter
iar
(@iar)
No, it doesnt 🙁
I’m talking about Sidebar Links btw.
Ah, looks like WP is not so smart on this one. :)
Edit links-manager.php in the wp-admin/ directory. You’ll find two lines like this:
$link_url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $link_url) ? $link_url : 'http://' . $link_url;
Change both to:
$link_url = preg_match('/^(https?|ftps?|mailto|news|gopher|file):/is', $link_url) ? $link_url : 'http://' . $link_url;
It’s always a good idea to back up source files before editing, and to comment your changes for future reference.
Thread Starter
iar
(@iar)
Thanks, it accepts “file://something” now.
Theres a problem tho (or maybe im just dumb and missing something here) – it doesnt work.
I mean, the PDF link does not open. I click the link and nothing happens.
I do have access to the fileserver (windows has memorized the user/password).
Thread Starter
iar
(@iar)
Wait, it doesnt work in Firefox.
but it does work in IE.
Problem is, I dont really use IE anymore.
Thread Starter
iar
(@iar)
So, is there a light at the end of the tunnel?
Perhaps this will help:
http://forums.mozillazine.org/viewtopic.php?t=13859
(Topic is a few years old, but I don’t believe the issue is.)
you should store the pdf files on the same server as WP.
this is what I’ve done at work in similar setup, except it’s a l.a.m.p.’d WP