Thread:Project:Support desk/Is it possible to link to local directory like \\server\dir... instead of http://.... ?/reply (5)

I use this extension. not sure where I got it:

<?php // Link MediaWiki extension. // Creates a link to a network location. // Copyright (C) 2007, Aretai Systems. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 * 1) Usage
 * 2) with this extension it is possible to define
 * 3) new tags of the form
 * 4) network location
 * 5) The behaviour of a window is configurable. Options are not obligatory: "SELF", "TOP", "PARENT", "BLANK" (default).
 * 6) the function registered by the extension gets the text between the
 * 7) tags as input and renders a link.
 * 8) You can just copy the network location and paste it between.

$wgHooks['ParserFirstCallInit'][] = "hookNetworkLink"; function hookNetworkLink( &$parser ) { $parser->setHook( "link", "renderNetworkLink" ); return true; } function renderNetworkLink( $loc='', $argv=array ) { global $wgOut, $wgTitle, $wgParser; $loc = htmlspecialchars($loc); switch( strtoupper( $argv['TARGET'] ) ) { case "SELF": $out = "$loc"; break; case "TOP": $out = "$loc"; break; case "PARENT": $out = "$loc"; break; default: $out = "$loc"; }   return $out; }
 * 1) The callback function for converting the input text to HTML output