Extension talk:MsLinks/Archive 1

edit

Is there a way to create a direct link to the file, instead of a link to the wiki-page for the file? Just want to reduce the number of clicks people make when using this. I notice the option for "dlink", which I thought might do this, but it doesn't seem to do anything.

You are right the option "dlink" should enable this feature but it seems to be not working properly. I will have a look at that. So far you can click on the file-extension icon to get directly to the file. --Ratin (talk) 12:07, 13 November 2012 (UTC)Reply

Thanks for the quick response :) I can see now that the icon does provide a direct link - which will work in the interim. --194.176.105.150 12:32, 13 November 2012 (UTC)Reply

Any news about the dlink issue?

Should be solved in V 3.1 --Ratin (talk) 12:42, 5 February 2013 (UTC)Reply


edit

In version 3.1 (which still seems to work fine on MW 1.19 btw), the dlink option is still working in a strange manner.

The extension always seems to create both a direct link to the file, and a link to the MediaWiki page. If the parser function is used in the standard way, the icon will point directly to the file, and the text will point to the files MediaWiki page. If the dlink option is used, these two are reversed.

On my wiki, I have altered the mslinks_body.php file, lines 56 - 63, the following way, so that the dlink option renders a direct link for both the icon and the text:

if ($typ == "dlink"){
		$html = "[[Media:$url|$beschreibung]]";
#		$bild = "[[$base:$url|".$bild."]]";
		$bild = "[[Media:$url|".$bild."]]";
	} else {
		$html = "[[$base:$url|$beschreibung]]";
		$bild = "[[Media:$url|".$bild."]]";
	}

This is what I think it should be.

Remove Li-button?

edit

Sometimes an extra button appears "Li" (see screenshot). This seems the template structure of a link to a file so you can use it yourself. As we installed MsUpload to make things easier for our end users it would be nice if we could somehow get rid of this button. I addressed this issue over there but was pointed in this direction.


In order to stop the button appearing do as follows:

in extensions/MsLinks/mslinks.php comment out line 93:

//$wgOut->addScriptFile( $path.'/mslinks.js' );
edit
  • I'm still seeing the issue in v4.0 with the links for the icon working to directly link to the file, however the actual text goes to the file page. Is there a way to fix this?
    • Hello, this is and was the intended way by us, the developers. If you have a suggestion on how to customize this you are very welcome to participate in the coding. We are always happy to enlarge the dev-team. --SmartK (talk) 08:27, 22 April 2015 (UTC)Reply
edit

Hello,
The dlink option works backwards in MsLinks versions 5.0 and 5.1: clicking on the icon or text leads to the file page and not to the file itself. Otherwise congratulations to the developers for this essential extension.
--Megajoule (talk) 16:10, 29 April 2018 (UTC)Reply

Return to "MsLinks/Archive 1" page.