Mailing List Archive

RE: collection of dumb questions [external links in new browser w indow]
We did the following in our 1.2.6 installation (Skin.php):

function getExternalLinkAttributes( $link, $text )
{
global $wgUser, $wgOut, $wgLang;

$link = urldecode( $link );
$link = $wgLang->checkTitleEncoding( $link );
$link = str_replace( "_", " ", $link );
$link = wfEscapeHTML( $link );

if ( $wgOut->isPrintable() ) { $r = " class='printable'"; }
else { $r = " class='external'"; }

if ( 1 == $wgUser->getOption( "hover" ) ) {
# $r .= " title=\"{$link}\"";
$r .= " target=\"_new\" title=\"{$link}\"";
}
return $r;
}

Please note that this approach allows the user to override the behavior by
disabling 'Show hoverbox over wiki links' in the user preferences.

Not a perfect hack perhaps, but it suits us fine.

Best Regards,

JT

===
You said:
===

Message: 1
Date: Thu, 09 Sep 2004 15:00:51 -0400
From: "Jon Kenoyer" <jonk@op2s.com>
Subject: [Mediawiki-l] collection of dumb questions
To: mediawiki-l@wikimedia.org
Message-ID: <opsd2prpyzw9v1w3@work>
Content-Type: text/plain; format=flowed; delsp=yes;
charset=iso-8859-15

Hi I am very happy with mediawiki so far. I got it up and running pretty
easy but now have two questions that I can't find answers for in the
documentation or mailing list.

Question 1: I would like the have the same skin as the mediawiki and
encyclopedia site. Especially with the tabs across the top. However in
LocalSettings.php only cologneblue works for $wgDefaultSkin =
'cologneblue'; If I set it to something else the default skin appears. Is
monobook the skin that mediawiki uses?

Question 2: Is there anyway to reference the contents of another page to
be included inline in the current page? I have a collection of pages that
I would like to have a link with the option to view all the pages compiled
into one page.

Question 3: How do I make an external link open in a separate window
instead of the current wiki window?