Difference between revisions of "Configuration Notes"
From Richard's Wiki
| Line 9: | Line 9: | ||
insert the following code | insert the following code | ||
<tt>$r .= " target=\"_blank\"";</tt> | <tt>$r .= " target=\"_blank\"";</tt> | ||
| + | |||
| + | === Actually did this to includes/Linker.php: === | ||
| + | <tt> | ||
| + | function getExternalLinkAttributes( $title, $unused = null, $class='' ) { | ||
| + | ### return $this->getLinkAttributesInternal( $title, $class, 'external' ); | ||
| + | $r = $this->getLinkAttributesInternal( $title, $class, 'external' ); | ||
| + | $r .= " target=\"_blank\""; | ||
| + | return $r; | ||
| + | } | ||
| + | |||
| + | </tt> | ||
Revision as of 21:04, 12 November 2008
Opening external links in a new window
The new window Wikimedia link is useful information. Probably the easiest way is:
Version > 1.5.0
- Open includes/Linker.php
- Find "function getExternalLinkAttributes"
- After
$r = ($class != ) ? " class='$class'" : " class='external'"; insert the following code $r .= " target=\"_blank\"";
Actually did this to includes/Linker.php:
function getExternalLinkAttributes( $title, $unused = null, $class= ) {
### return $this->getLinkAttributesInternal( $title, $class, 'external' );
$r = $this->getLinkAttributesInternal( $title, $class, 'external' );
$r .= " target=\"_blank\"";
return $r;
}