MediaWiki talk:Linkshere/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  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]&middot;[ history]&middot;[ delete]

The following pages link to $1: [ edit]&middot;[ history]&middot;[ delete]
 * — xaosflux  Talk  15:55, 20 August 2006 (UTC)

Syntax
( edit • history • delete ) breaks for pages with spaces in them. — xaosflux  Talk  16:05, 20 August 2006 (UTC)


 * Sorry, but I removed those links because a majority of all pages here on Wikipedia have spaces in them. Might I suggest you post something on http://bugzilla.wikimedia.org/. You might even suggest to them to hard code those links directly on the special:whatlinkshere page similar to the talk/block/block log/logs links on the special:contributions page. Zzyzx11 (Talk) 18:02, 20 August 2006 (UTC)
 * Especially because: do you really want the delete link to show up for normal non-sysop users? Zzyzx11 (Talk) 18:14, 20 August 2006 (UTC)


 * Seems like " " should work for the space issue. Showing a delete link for non-sysops seems like bad form, though. -- Rick Block (talk) 18:46, 20 August 2006 (UTC)
 * Didn't work, gives a result of http://en.wikipedia.org/w/index.php?action=history&title=/wiki/%241 — xaosflux  Talk  21:55, 20 August 2006 (UTC)


 * You tried ? -->    gives . --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://en.wikipedia.org/w/index.php?title=Special:Whatlinkshere&target=Image%3AWestend.jpg displays the image. http://en.wikipedia.org/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. -- S iva1979 Talk 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? -- S iva1979 Talk to me  18:44, 22 August 2006 (UTC)

Delete link
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 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. — Mets 501  (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)

Delete link
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://en.wikipedia.org/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(' '); to your personal js. I don't know any better place to let admins know, so here seems good :-) — Mets 501 (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)

Related discussion
Please see Village pump (proposals) for a discussion that may affect this page. Thanks.--Fuhghettaboutit (talk) 11:57, 13 September 2012 (UTC)

and
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  $1 

External tools: Show redirects only

--DixonD (talk) 11:53, 26 March 2013 (UTC)
 * Absolutely. ✅, thanks! Amalthea  13:12, 26 April 2013 (UTC)

Change "transclusion count" link
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


 * Proposed code

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. &mdash; 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)
 * ✅ — xaosflux  Talk 01:28, 21 August 2014 (UTC)

rdcheck.py 404s
is a 404. This page needs to be changed from Show redirects only to 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. — <span style="color: #194D00; font-family: Palatino, Times, serif">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  .  — Dispenser 00:20, 15 October 2014 (UTC)

Bump. --NE2 04:31, 18 October 2014 (UTC)
 * Yes check.svg Done — <span style="color: #194D00; font-family: Palatino, Times, serif">Mr. 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 change from:
 * {{!xt| External tools: [http ://69.142.160.183 /~dispenser/cgi-bin/rdcheck.py?page={{FULLPAGENAMEE:$1}} Show redirects only] {{ }}
 * to:
 * {{ xt| External tools: [http s://dispenser.info.tm /~dispenser/cgi-bin/rdcheck.py?page={{FULLPAGENAMEE:$1}} Show redirects only] {{ }}

and that {{link title|url=//en.wikipedia.org/w/?oldid=793308563&action=edit#editform|text="MediaWiki:Linkshere (as of 2017-07-31)"|plain=line 6}} change from:
 * {{!xt| |10|828 = · [//tools.wmflabs.org/templatecount/ index.php ?lang=en&name={{PAGENAMEE:$1}}&namespace={{NAMESPACENUMBER:$1}} Transclusion count] }}
 * to:
 * {{ xt| |10|828 = · [//tools.wmflabs.org/templatecount/ ?lang=en&namespace={{NAMESPACENUMBER:$1}}&name={{PAGENAMEE:$1}} Transclusion count] }}

Thank you, — LLarson   (said &amp; done) 18:39, 21 May 2018 (UTC)
 * Red information icon with gradient background.svg 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. &mdash; Martin (MSGJ · talk) 10:40, 22 May 2018 (UTC)
 * Yellow check.svg 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  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)
 * {{re|PrimeHunter}} I actually think you made the right decision. Thanks for your help! — LLarson   (said &amp; 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 Village pump (technical) 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)
 * 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 T189860. Examples is a redirect and on Special:WhatLinksHere/Examples the link goes to https://en.wikipedia.org/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  works on WhatLinksHere? Another annoying change reported in 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 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 [//en.wikipedia.org/w/index.php?title=MediaWiki:Linkshere&diff=845984843&oldid=842431583] which doesn't follow redirects, for example on Special:WhatLinksHere/Examples. PrimeHunter (talk) 13:53, 15 June 2018 (UTC)

Replace link to Dispenser's redirects tool
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: [ Show redirects only] There are a few reasons for this: A gadget or userscript could easily be created to provide a link to the tool for users that prefer its interface. --Ahecht (<span style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:-.3em;font:bold 50%/1 sans-serif;text-align:center">TALK PAGE ) 22:06, 26 July 2018 (UTC)
 * 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.
 * See Village pump (proposals)/Archive 93 for a former suggestion. The tool has extra features. We deliberately remove the external link icon with . 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  and  ) into a space. That's the way it already is at MediaWiki:Nolinkshere. Nardog (talk) 23:04, 17 June 2020 (UTC)
 * ✅ 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)
 * See below. Nardog (talk) 00:54, 19 June 2020 (UTC)
 * Thanks for taking it up, but you didn't fulfill my request. I said turn the first line break (between and  ) into a space, not "remove the empty line". Nardog (talk) 00:54, 19 June 2020 (UTC)
 * thought that was more of a suggestion then a prescription, tried again with the space trick you mentioned.  how's it now? —  xaosflux  Talk 01:16, 19 June 2020 (UTC)
 * 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  to   (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>


 * — xaosflux  Talk 01:52, 20 June 2020 (UTC)
 * Proposed markup:

The following pages link to <b id="specialDeleteTarget">$2</b>


 * Nardog (talk) 01:58, 20 June 2020 (UTC)
 * Yes check.svg Done how's that? &mdash; Martin (MSGJ · talk) 05:37, 21 June 2020 (UTC)
 * Working as intended, thanks. Nardog (talk) 06:24, 21 June 2020 (UTC)