Extension:LaunchExternal

Allows wiki author to choose to open existing media, images or a "://" type link into a new external window. An http reference must be in the correct fully named web format (http://www.google.com) or you'll get a 'bad reference' error. You'll get the same error if a local media file match isn't found as well.

This extension should be able to open any type of documents that can normally be opened with the installed web browser. I've personally tested Powerpoint, Word and Excel for Office 2003. It also works will with Adobe PDF files.

Note: With Powerpoint, I've noticed in my testing, that the Powerpoint process is still running even after you close the browser window... not sure if this is a standard issue with running Powerpoint in a browser window or if its my WinXP configuration.

Please report bugs/comments in the talk page: Extension_talk:LaunchExternal

Syntax
Holiday_calendar.doc Holiday_calendar.doc::Paid Holidays http://www.google.com file://\\sharedserver\Holiday_calendar.doc

www.cnn.com <-- incorrect syntax/bad reference

Recommended Script for "outside links only..."
This scipt, if added into either the 'Mediawiki:Common.js' or 'User:Common.js' forces all external links to open in a new window. The extension above opens uploaded media/images into a new window (this script doesn't). For http type links, you can either use this script or the above extension.

externalLinks = function { if (!document.getElementsByTagName) { return; }       var anchors = document.getElementsByTagName("a"); for (var i = 0; i < anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") &&                                anchor.getAttribute("rel") != null &&                                 (anchor.getAttribute("rel").indexOf("external") >= 0 || anchor.getAttribute("rel").indexOf("nofollow") >= 0)                       ) { anchor.target = "_blank"; }       } } if (window.addEventListener) { window.addEventListener("load", externalLinks, false); } else if (window.attachEvent) { window.attachEvent("onload", externalLinks); }