I am using MediaWiki version 1.18.2, I know that if I want my links to open in new tab/window I have to set up
$wgExternalLinkTarget = '_blank';
in LocalSettings.php
I am creating the links like this
[http://www.google.com/ google]
is there a way that I can make some links open in the same tab/window and others in new tab/window with the same settings in LocalSettings.php?
Mediawiki allows you to wrap html tags around links; you can set the default to not open a new tab/window, and for those you do want to have in a new window, wrap in a different class:
Then you can use JavaScript to make all the “new-win”-wrapped links open a new window; add this to your Common.js script:
EDIT: Modified for user’s intent