Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7749299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:00:43+00:00 2026-06-01T11:00:43+00:00

I am using MediaWiki version 1.18.2, I know that if I want my links

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:00:45+00:00Added an answer on June 1, 2026 at 11:00 am

    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:

    <span class="new-win">[http://google.com google]</span>
    

    Then you can use JavaScript to make all the “new-win”-wrapped links open a new window; add this to your Common.js script:

    jQuery( document ).ready( function( $ ) { 
      $(".new-win a").click(function(event) {
        event.preventDefault(); // Keep from following standard href of link
        new_win = window.open($(this).attr('href'), 'offsite_popup') // Pop up a window to that URL
        if (window.focus) { new_win.focus() } // Give it focus if possible
      });
    });
    

    EDIT: Modified for user’s intent

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have set up Wiki:Family using the tutorial #2 specified here http://www.mediawiki.org/wiki/Wiki_family Specifically, i
I have created an extension for mediawiki that works in all major browsers other
I want to wrap a mediawiki site inside another site - using the header.inc
I have a problem with my MediaWiki installation on a local network. I'm using
Using the MediaWiki maintenance script called dumpBackup.php I want to create an XML dump
Please have a look at www.mediawiki.org using Chrome and try increasing/decreasing the page zoom
I am trying to use HTML::WikiConverter::MediaWiki which I have installed using yum install perl-HTML-WikiConverter-MediaWiki.noarch
I'm using MediaWiki, and I can't use the tag <script></script> . Have an method
If I have a simple table on a MediaWiki page like this: {|{{#vardefine:new|style=background: none
I have played with the idea of using a wiki (MediaWiki) to centralize all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.