Jump to content

Manual talk:$wgUrlProtocols

Add topic
From mediawiki.org
Latest comment: 6 months ago by Ciencia Al Poder in topic Custom namespace News
[edit]

I found out that

$wgUrlProtocols[] = "file:";

breaks images like

 [[File:John_Surtees.JPG|150px]]

If I use

$wgUrlProtocols[] = "file:///";

everything works as expected.

I used MediaWiki 1.20.0 with Firefox 18.0.1. If above observation is true for other configurations as well, I think the article should be updated to reflect this. --Pigpen (talk) 15:23, 25 January 2013 (UTC)Reply

I have now documented this bug in the manual page. Using file:// not with three, but with two slashes should help. --87.123.46.59 13:06, 6 January 2016 (UTC)Reply

Can not add the rdp protocol

[edit]

Add to LocalSettings.php (the receiver is taken from here: UNC_links):

$wgPFEnableStringFunctions = true; array_push($wgUrlProtocols, 'rdp://');

But MediaWiki in view-mode displays text: [rdp://full_address=s:ip] instead of url

Something can be corrected to add the correct formation of URI RDP links?

As of MediaWiki 1.35, RDP links appear to work fine when enabled with just:
$wgUrlProtocols[] = "rdp://";
- Jim Grisham (talk) 22:00, 23 July 2022 (UTC)Reply

Custom namespace News

[edit]

I created a custom namespace name 'News' and I wanted to make some links to News pages. So I add the wsUrlProtocol parameter with 'news:' but that still don't work. When I create a internal link to news page the wiki create an external link. 132.166.177.50 07:02, 12 June 2024 (UTC)Reply

You actually need to *remove* news: from $wgUrlProtocols. See Manual:$wgUrlProtocols#Advanced modification Ciencia Al Poder (talk) 08:02, 12 June 2024 (UTC)Reply
I all ready try this but that don't work... 132.166.177.50 09:14, 12 June 2024 (UTC)Reply
Be sure you're trying to add a [[News:Whatever]] link on a new page and not viewing an existing one, to discard cache problems! Ciencia Al Poder (talk) 09:26, 12 June 2024 (UTC)Reply