Jump to content

MediaWiki talk:Linkshere/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1

Formating

Does anyone know where to parse the variable of the pagename in to this display, e.g. so it will be "The following pages link to here" where here is the target of the search? If I can solve this my eventual proposal will be to include a deletion link on this listing, to avoid having to go back to the article before clicking delete. — xaosflux Talk 16:15, 13 August 2006 (UTC)

It would be in the source code in SpecialWhatlinkshere.php. This message currently takes no parameters - adding one would take a source change. -- Rick Block (talk) 19:04, 13 August 2006 (UTC)
Thank you, — xaosflux Talk 00:18, 14 August 2006 (UTC)

I've added this in version control. When the change shows up, edit MediaWiki:Linkshere and shove $1 in - it'll be replaced with the full title of the page when the message is used. You can also do this with MediaWiki:Nolinkshere. 86.134.116.228 21:20, 18 August 2006 (UTC)

This has gone live, thanks devs! — xaosflux Talk 15:17, 20 August 2006 (UTC)

Expansion proposed:

The following pages link to $1: edit·history·delete

The following pages link to '''[[$1]]''': <span class="plainlinks"> [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]·[{{fullurl:{{FULLPAGENAME}}|action=history}} history]·[{{fullurl:{{FULLPAGENAME}}|action=delete}} delete]</span>

xaosflux Talk 15:55, 20 August 2006 (UTC)

Syntax

(edithistorydelete) breaks for pages with spaces in them. — xaosflux Talk 16:05, 20 August 2006 (UTC)

You tried {{urlencode:$1}}? --> {{urlencode:Blah blah blah}} gives Blah+blah+blah. --Splarka (rant) 07:03, 21 August 2006 (UTC)
urlencode also does not work, breaks the link after the space. — xaosflux Talk 01:15, 22 August 2006 (UTC)

Could someone change it to $1 (if it works)? http://wiki.riteme.site/w/index.php?title=Special:Whatlinkshere&target=Image%3AWestend.jpg displays the image. http://wiki.riteme.site/w/index.php?title=Special:Whatlinkshere&target=Category:Foo gets a category bar at the bottom. Kotepho 00:13, 23 August 2006 (UTC)

I changed it to [[:$1]], looks like it fixed the category bug, still looking in to the image one. — xaosflux Talk 00:42, 23 August 2006 (UTC)

A search engine?

Should we have a search engine in this special page? It would prove to be useful. For example, users would be able to know at a faster rate, how many times a particular user had done edits on these talk pages. Any concerns and objections over this would be most welcomed. --Siva1979Talk to me 16:31, 21 August 2006 (UTC)

Got any sample code? — xaosflux Talk 01:15, 22 August 2006 (UTC)
Good question! Errr, no I don't. Do you know anyone who has one? --Siva1979Talk to me 18:44, 22 August 2006 (UTC)

I removed the recent addition of the new delete link. This is totally unneeded and very confusing. I've also reverted the corresponding addition of a new CSS class to MediaWiki:Common.css. --Ligulem 22:56, 21 October 2006 (UTC)

I'd love to see this back, how was it confusing for you? When deleting pages we should always check to see WHat Links There, to consider updating the links before deleting it (among other things). This is usually the last thing that I do, and it's annying to have to go back to the page, then delete it. As for the monobook, was this the ONLY page using that class? — xaosflux Talk 01:22, 22 October 2006 (UTC)
As I said. It is confusing and completely unneeded. Admins do have a delete tab on each page, non-admins don't. If it weren't distracting, why do you want to hide it with a CSS class using display:none, which is specifically advised against by Brion Vibber? (See Wikipedia:HiddenStructure). --Ligulem 12:08, 22 October 2006 (UTC)
I agree, I really thought it was great. There were a few pages using that class as well, not only this one. —Mets501 (talk) 01:25, 22 October 2006 (UTC)
I restored the class, as it appears used elsewhere. — xaosflux Talk 01:34, 22 October 2006 (UTC)
I disagree with that, as I doubt there is consensus for adding this new class. It was never discussed or proposed on common.css. --Ligulem 12:10, 22 October 2006 (UTC)
My restoral was ONLY due to the use of the class in other pages, and wanting to ensure they were not broken by it's removal. It appears they have been updated now. — xaosflux Talk 17:41, 24 October 2006 (UTC)

For any andmin who would like a "delete" link on the Whatlinkshere page and "Move successful" page, the delete link can be added by adding

function addDeleteLink() {
    var targetSpan = document.getElementById('specialDeleteTarget');
    var linkSpan = document.getElementById('specialDeleteLink');
    if (targetSpan == null || linkSpan == null) return;

    var targetLink = targetSpan.getElementsByTagName("A")[0];
    if (targetLink == null) return;

    var targetTitle = targetLink.childNodes[0].data;

    var deleteHref = "http://wiki.riteme.site/w/index.php?action=delete&title=" + escape(targetTitle);

    var deleteSpan = null;
    with (easyDom) {
        deleteSpan = span({ "class": "plainlinks" }, " (", a({ "href": deleteHref, "class": "external text" }, "delete"), ")");
    }

    linkSpan.appendChild(deleteSpan);
}
addOnloadHook(addDeleteLink);

document.write('<script type="text/javascript" src="' 
             + 'http://wiki.riteme.site/w/index.php?title=User:Mike_Dillon/easydom.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

to your personal js. I don't know any better place to let admins know, so here seems good :-) —Mets501 (talk) 11:04, 24 October 2006 (UTC)

  • Is there any convenient way to add an "edit" link, too? This would help in cleaning up after deleted articles (where you often need to remove incoming links). Neat script already though, I'm going to add it. --W.marsh 02:25, 20 October 2007 (UTC)

Please see Wikipedia:Village pump (proposals)#Get rid of the "Show redirects only" external tool in WhatLinksHere in favor of the native interface for a discussion that may affect this page. Thanks.--Fuhghettaboutit (talk) 11:57, 13 September 2012 (UTC)

{{NAMESPACENUMBER}} and {{PAGENAME}}

Can't we use them here in order to simplify the code? --DixonD (talk) 11:36, 26 March 2013 (UTC)

More specifically:
The following pages link to '''<span id="specialDeleteTarget">[[:$1]]</span>'''
<span id="specialDeleteLink"></span>

External tools: [[tools:~dispenser/cgi-bin/rdcheck.py/$1|Show redirects only]] {{#switch:{{NAMESPACENUMBER:$1}}|10|828 ='''·''' <span class="plainlinks">[http://toolserver.org/~jarry/templatecount/index.php?lang=en&name={{urlencode:{{PAGENAME:$1}}}}&namespace={{NAMESPACENUMBER:$1}} Transclusion count]</span>}}
----

--DixonD (talk) 11:53, 26 March 2013 (UTC)

Absolutely. checkY Done, thanks! Amalthea 13:12, 26 April 2013 (UTC)

Hi. The number of transclusions that a given template has is now available via the info action. For example, for {{infobox}}, the count can be found here. Using the built-in info action removes an unstable external dependency (the Toolserver).

Current code
The following pages link to '''<span id="specialDeleteTarget">[[:$1]]</span>'''
<span id="specialDeleteLink"></span>

External tools: [[tools:~dispenser/cgi-bin/rdcheck.py/$1|Show redirects only]] {{
  #switch:{{NAMESPACENUMBER:$1}}
  |10|828 = '''·''' <span class="plainlinks">[http://toolserver.org/~jarry/templatecount/index.php?lang=en&name={{PAGENAMEE:$1}}&namespace={{NAMESPACENUMBER:$1}} Transclusion count]</span>
}}
----
Proposed code
The following pages link to '''<span id="specialDeleteTarget">[[:$1]]</span>'''
<span id="specialDeleteLink"></span>

External tools: [[tools:~dispenser/cgi-bin/rdcheck.py/$1|Show redirects only]] {{
  #switch:{{NAMESPACENUMBER:$1}}
  |10|828 = '''·''' <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=info}}#mw-pageinfo-transclusions Transclusion count]</span>
}}
----

Untested, but this should work. :-) The only rub here is that if a template has no transclusions, the link won't be very useful. --MZMcBride (talk) 19:01, 8 November 2013 (UTC)

I made the change but I'm not seeing any difference. Would you mind explaining where this message is used? When I use Special:WhatLinksHere I see The following pages link to xyz, but nothing else. — Martin (MSGJ · talk) 21:33, 8 November 2013 (UTC)
Should work now, see e.g. the transclusion count link at Special:WhatLinksHere/Template:Example (FULLPAGENAME emitted the link target as Special:WhatLinksHere/Example, which has no info page). Amalthea 01:14, 9 November 2013 (UTC)

Protected edit request on 20 August 2014: Use protocol relative URL

Since Tool Labs supports HTTPS, I suggest switching the link to protocol-relative URL (reason). So could we make the following change:

http://tools.wmflabs.org/templatecount/index.php

to

//tools.wmflabs.org/templatecount/index.php

Thanks! Chmarkine (talk) 01:19, 21 August 2014 (UTC)

 Donexaosflux Talk 01:28, 21 August 2014 (UTC)

rdcheck.py 404s

[1] is a 404. This page needs to be changed from [[toollabs:dispenser/cgi-bin/rdcheck.py/$1|Show redirects only]] to [http://dispenser.homenet.org/~dispenser/cgi-bin/rdcheck.py?/$1 Show redirects only]. --NE2 20:11, 13 October 2014 (UTC)

I removed the 404 link, however additional consensus to add third party links to the interface should be shown first. Will link in to here from WP:VPT for additional feedback. — xaosflux Talk 20:30, 13 October 2014 (UTC)
Link in added at VPT here: Special:Diff/629484789. — xaosflux Talk 20:32, 13 October 2014 (UTC)
I use the transclusion count tool all the time - this at least should be added back. — Mr. Stradivarius ♪ talk ♪ 21:56, 13 October 2014 (UTC)
The one on toollabs is 404'd; if you have another toollabs one that is working it can go up for now. — xaosflux Talk 22:37, 13 October 2014 (UTC)
Or we can cut the crap and do what's best for enwiki. --NE2 23:24, 13 October 2014 (UTC)
I've nudged WM-DE to address the 6 week old request to update the original Toolserver URL (considered "stable") to skip the Labs intermediate redirect (Labs staff singled me out for policy/rules enforcement). It had been redirecting to my server for 3 months now (I only thought to switch all the regular external links). Privacy wise I actually collect less data than Labs or the WMF. They really nonsensical on privacy, wanting to entice GLAMs (and everyone non-wiki side) with analytic tools. — Dispenser 08:13, 14 October 2014 (UTC)
The transclusion count tool is working fine for me - whatever the outage was, it looks like it was temporary. I've restored the link to it. — Mr. Stradivarius ♪ talk ♪ 23:31, 14 October 2014 (UTC)
The request is for 'Show redirects only' which groups them by target section. WM-DE fixed the Toolserver link, so I suggest reverting to the August version and switching the link to [[tools:~dispenser/cgi-bin/rdcheck.py/$1|Show redirects only]]. — Dispenser 00:20, 15 October 2014 (UTC)

Bump. --NE2 04:31, 18 October 2014 (UTC)

DoneMr. Stradivarius ♪ talk ♪ 12:09, 20 October 2014 (UTC)

Protected edit request on 21 May 2018

I’m requesting that we replace the IP address with Dispenser’s tools’ new domain name (dispenser.info.tm), which will also allow us to use an HTTPS connection. I’m also requesting that we decruft the Transclusion-count URI and move the query parameter to the end of the URI, which is more transparent and allows for easier reuse.

Specifically, I propose line 4 change from:

External tools: <span class="plainlinks">[http://69.142.160.183/~dispenser/cgi-bin/rdcheck.py?page={{FULLPAGENAMEE:$1}} Show redirects only]</span> {{
to:
External tools: <span class="plainlinks">[https://dispenser.info.tm/~dispenser/cgi-bin/rdcheck.py?page={{FULLPAGENAMEE:$1}} Show redirects only]</span> {{

and that line 6 change from:

|10|828 = '''·''' <span class="plainlinks">[//tools.wmflabs.org/templatecount/index.php?lang=en&name={{PAGENAMEE:$1}}&namespace={{NAMESPACENUMBER:$1}} Transclusion count]</span>
to:
|10|828 = '''·''' <span class="plainlinks">[//tools.wmflabs.org/templatecount/?lang=en&namespace={{NAMESPACENUMBER:$1}}&name={{PAGENAMEE:$1}} Transclusion count]</span>

Thank you, —LLarson (said & done) 18:39, 21 May 2018 (UTC)

 Not done for now: please could you provide a mock-up of before and after these changes are applied, so that I can decide whether this is likely to be controversial or not. — Martin (MSGJ · talk) 10:40, 22 May 2018 (UTC)
 Partly done: I examined the changes and made two of them. It's good to avoid an IP address as domain and it makes sense to place the pagename last in the templatecount URI. But I don't see good reason to remove index.php from the URI. It's included in the URI generated by https://tools.wmflabs.org/templatecount so it's more canonical and may be more likely to keep working if something changes. PrimeHunter (talk) 12:04, 22 May 2018 (UTC)
@PrimeHunter: I actually think you made the right decision. Thanks for your help! —LLarson (said & done) 01:34, 23 May 2018 (UTC)

New message name

Mediawiki has changed WhatLinksHere from using MediaWiki:Linkshere to using the new MediaWiki:Linkshere-2. The new MediaWiki message is called with the wikilinked page name instead of just the page name. It was reported at Wikipedia:Village pump (technical)#Jarry's Template transclusion count missing! PrimeHunter (talk) 13:15, 30 May 2018 (UTC)

Yes, please fix this. The transclusion count is one of the most important tools I use on a near-daily basis. Primefac (talk) 13:19, 30 May 2018 (UTC) (please ping on reply)
So for calling the tools we'd need to strip out the link to get the page name to then create the url for the template transclusion counter? Galobtter (pingó mió) 13:20, 30 May 2018 (UTC)
Based on translatewiki:MediaWiki:Linkshere-2/qqq it is called with a html link and not a wikilink. The only purpose of this mess is apparently to be able to not follow a redirect per phab:T189860. Examples is a redirect and on Special:WhatLinksHere/Examples the link goes to https://wiki.riteme.site/w/index.php?title=Examples&redirect=no. I wonder whether the message even has access to the html link and can process it to try to strip out the page name. Or maybe {{FULLPAGENAME}} works on WhatLinksHere? Another annoying change reported in phab:T195933 is that red links are no longer red. Special:WhatLinksHere/No such page shows a blue link to No such page. I think the whole MediaWiki change should be reverted or modified to be backwards compatible. It breaks customized messages at many wikis and does more harm than good. I will propose it is changed to use MediaWiki:Linkshere again with the page name as $1 as before so customized messages are not broken. If the developers are really keen on not following redirects then they can add a html link to the message as $2 and modify the default MediaWiki:Linkshere to use $2. PrimeHunter (talk) 13:41, 30 May 2018 (UTC)
Agree, it should be reverted. For now, we can try stripping out the html link I suppose...to prevent Primefac from stabbing too many people in the kidneys. Galobtter (pingó mió) 13:56, 30 May 2018 (UTC)
I have reopened phab:T189860 with a request to revert it or make it backwards compatible with existing customized messages. PrimeHunter (talk) 14:08, 30 May 2018 (UTC)
It was made backwards compatible in the MediaWiki version deployed yesterday. Our customized message now works as intended. I have used the new $2 parameter [2] which doesn't follow redirects, for example on Special:WhatLinksHere/Examples. PrimeHunter (talk) 13:53, 15 June 2018 (UTC)

The link to Dispenser's "Show redirects only" tool was added to this page over 10 years ago, presumably before the MediaWiki software allowed filtering by link, transcluion, and redirect. However, with the current MediaWiki software this tool is no longer needed. I am proposing either removing it altogether or replacing it with the following:

<span class="plainlinks">[{{fullurl:Special:WhatLinksHere/{{FULLPAGENAMEE:$1}}|hidetrans=1&hidelinks=1}} Show redirects only]</span>

There are a few reasons for this:

  • There is no need to use a tool hosted on an external server for this, since the functionality is built-in to Special:WhatLinksHere
  • The external tool sometimes lags behind the live database.
  • The link text implies that it functions similar to the filters listed above it and it has no external link icon, which can be misleading. Despite the "External links" text next to the link, it is easy for a user's eyes to skip over the black text and only read what the link says. (Another potential solution to this would be to rename the link to something like "Dispenser's Rdcheck tool")
  • Linking to an external site with a different privacy policy could potentially expose user data to third parties (for this reason, all tools hosted on toolforge require explicit consent before redirecting off of WMF servers).
  • The external server being linked has in the past gone down for extended periods of time, and may do so again in the future.
  • Many web filtering software packages used in corporate and school environments block info.tm, so the existing tool is inaccessible for those users.
  • Having a core interface page link to a website asking for bitcoin donations at the very least implies Wikipedia endoresement, and at worst may imply to users that donating to that bitcoin address is donating to Wikipedia.

A gadget or userscript could easily be created to provide a link to the tool for users that prefer its interface. --Ahecht (TALK
PAGE
) 22:06, 26 July 2018 (UTC)

See Wikipedia:Village pump (proposals)/Archive 93#Get rid of the "Show redirects only" external tool in WhatLinksHere in favor of the native interface for a former suggestion. The tool has extra features. We deliberately remove the external link icon with <span class="plainlinks">...</span>. PrimeHunter (talk) 22:33, 26 July 2018 (UTC)

Remove the gratuitous space

There are several ways the empty line that appears in all but Template and Module namespaces can be removed as it should be, but perhaps the easiest is to turn the first line break (between </b> and <span id="specialDeleteLink">) into a space. That's the way it already is at MediaWiki:Nolinkshere. Nardog (talk) 23:04, 17 June 2020 (UTC)

 Done @Nardog: I removed a line break, the gap has shrunk. — xaosflux Talk 16:15, 18 June 2020 (UTC)
File under "no good deed goes unpunished": This change appears to have caused an undesirable lack of a line break (or at least white space) at the What links here page for this Module. Right now I see "The following pages link to Module:Routemap External tool: Transclusion count". I think there should be a line break, or at least more white space on the same line, before "External tool". (edited to add: It looks like there used to be "·" before the External tool link. See the latest diffs for the character I mean.)– Jonesey95 (talk) 21:33, 18 June 2020 (UTC)
@Jonesey95: See below. Nardog (talk) 00:54, 19 June 2020 (UTC)
@Xaosflux: Thanks for taking it up, but you didn't fulfill my request. I said turn the first line break (between </b> and <span id="specialDeleteLink">) into a space, not "remove the empty line". Nardog (talk) 00:54, 19 June 2020 (UTC)
@Nardog: thought that was more of a suggestion then a prescription, tried again with the space trick you mentioned. @Jonesey95: how's it now? — xaosflux Talk 01:16, 19 June 2020 (UTC)
@Xaosflux: Ah, my bad. Turns out removing the first line break doesn't get rid of the empty space. How about removing the empty line and changing External tool: <span class="plainlinks">...</span> to <div class="plainlinks">External tool: ...</div> (tested on a sandbox)? Nardog (talk) 01:33, 19 June 2020 (UTC)
Looks better. I see it on a new line now. Thanks. – Jonesey95 (talk) 01:36, 19 June 2020 (UTC)
Here is the current markup, please put what you want it changed to below and reactivate the edit request.
The following pages link to <b id="specialDeleteTarget">$2</b> <span id="specialDeleteLink"></span>

{{#switch:{{NAMESPACENUMBER:$1}}
  |10|828 = External tool: <span class="plainlinks">[//templatecount.toolforge.org/index.php?lang=en&namespace={{NAMESPACENUMBER:$1}}&name={{PAGENAMEE:$1}} Transclusion count]</span>
}}
----

xaosflux Talk 01:52, 20 June 2020 (UTC)
Proposed markup:
The following pages link to <b id="specialDeleteTarget">$2</b> <span id="specialDeleteLink"></span>
{{#switch:{{NAMESPACENUMBER:$1}}
  |10|828 = <div class="plainlinks">External tool: [//templatecount.toolforge.org/index.php?lang=en&namespace={{NAMESPACENUMBER:$1}}&name={{PAGENAMEE:$1}} Transclusion count]</div>
}}
----

Nardog (talk) 01:58, 20 June 2020 (UTC)
 Done how's that? — Martin (MSGJ · talk) 05:37, 21 June 2020 (UTC)
Working as intended, thanks. Nardog (talk) 06:24, 21 June 2020 (UTC)