URLENCODE

edit

Instead of getting the user to add the +'s (and spoiling the look of the link) why not add them here? i.e. using {{URLENCODE: ...}} or whatever... --Dan|(talk) 13:37, 21 July 2008 (UTC)Reply

Interwiki

edit

Can anyone please add interwiki to pl version of this template: pl:Szablon:Mesh? Kauczuk (talk) 09:22, 28 August 2008 (UTC)Reply

Done. --Arcadian (talk) 18:38, 28 August 2008 (UTC)Reply

Requested modification

edit

As suggested above, adding the function urlencode to the MeshName template as follows:

[http://www.nlm.nih.gov/cgi/mesh/{{{2|2009}}}/MB_cgi?mode=&term={{urlencode:{{{1}}}}} {{{3|{{{1}}}}}}]

will eliminate the need to replace spaces with "+"s in the MeSH name and in addition will improve the look of the link. Therefore I would appreciate if an administrator would modify this template to include the urlencode function. Thanks. Boghog2 (talk) 21:16, 13 April 2009 (UTC)Reply

Done. --Arcadian (talk) 22:40, 13 April 2009 (UTC)Reply
Thanks for your quick response! Boghog2 (talk) 06:16, 14 April 2009 (UTC)Reply
I've reverted the edit for now. It appears to have broken the existing Mesh links. (If you can provide a few examples of the exact format of the new desired link format, we can probably figure out the issue.) --Arcadian (talk) 02:58, 18 April 2009 (UTC)Reply
Opps, sorry about that. I have created a test template ({{MeSH name}}) in order to figure out what went wrong and to try to find a solution to fix it. Using urlencode had the desired effect of replacing spaces in the MeSH name with pluses. So if the MeSH name has spaces the link works fine:
but if the name already has pluses in it, these were replaced by "%2B" and the link fails:
In order to get this to work, we need some sort of function that only replaces spaces with pluses, and for backwards compatibility, if pluses are already present, the function should leave these alone and return the string unchanged. I have tried a number of things (for example {{#replace:{{{1}}}| |+}} but nothing seems to work. Do you have any ideas? Boghog2 (talk) 19:46, 18 April 2009 (UTC)Reply
I believe that the necessary string parsing tools to do that exist in MediaWiki, but are disabled on this install. The best I can suggest is to keep MeshName2, and try it for a while and see if it is stable and meets your needs. If it does, then request a bot (or use one of the semi-automated tools) to update the template. --Arcadian (talk) 21:04, 18 April 2009 (UTC)Reply
Thanks for the explanation. This is not a big issue since I can always use the third parameter to suppress the display of the plus character in the displayed link. The syntax is a bit messier than it needs to be but I can live with it. The most pragmatic solution is probably to wait until the parsing tools are enabled. Cheers. Boghog2 (talk) 21:30, 19 April 2009 (UTC)Reply

Actualizar al año 2010

edit

Esta plantilla está anticuada. Sigue apareciendo el año 2009, cuando debería poner el año 2010.

Un cordial saludo: Raimundo Pastor (talk) 14:51, 4 September 2010 (UTC)Reply

Interwiki edit request

edit

Please insert the it: interwiki, which is it:Template:MeshName. I cannot do that by myself, as the page is protected. --151.56.85.118 (talk) 00:43, 14 April 2011 (UTC)Reply

Tweak appearance

edit

I don't think MeSH is a widely know acronym so the acronym and its meaning should be shown. Also, to follow an emerging convention the ext link should be placed before the internal link. Therefore rather than:

I would like to see it displayed as:

A bit more text explains what it is to those not familiar with the MeSH. -- Alan Liefting (talk - contribs)

  Done, though I'm wary that this may be used in places other than the external links section (such as in infoboxes). I trust that's been checked, but if this causes any problems anyone is more than welcome to revert. Chris Cunningham (user:thumperward) (talk) 09:33, 31 May 2012 (UTC)Reply

Another edit request (minor)

edit

Can we replace "US" with "U.S.", since the United States of America should not really be an initialism? Also you could consider linking United States National Library of Medicine, if you think it is necessary . --Eastlaw talk ⁄ contribs 02:44, 7 July 2012 (UTC)Reply

  Not done: please establish a consensus for this alteration before using the {{Edit fully-protected}} template. Wikipedia:Manual of Style/Abbreviations#Miscellaneous initialisms permits either form, but when abbreviations such as UK or UAE are also present, it encourages consistency with those. Since the template also includes MeSH - which (although not a country name) is inviolate - I believe that Unites States should be abbreviated to US to match. --Redrose64 (talk) 12:53, 7 July 2012 (UTC)Reply

Request to always reflect latest year

edit

Can this template be modified so it always links to the latest year, unless otherwise indicated in a parameter? Right now, it links to the 2011 version. –Temporal User (Talk) 09:56, 1 March 2013 (UTC)Reply

The site has changed, making this moot. Now a yearless URL brings up the current version ("MeSH Descriptor Data 2018"), with a link to access the previous version ("MeSH Descriptor Data 2017"). -A876 (talk) 03:16, 10 July 2018 (UTC)Reply

Requested modification to improve appearance

edit

Please sync main with the sandbox (see diff) so that "+" characters in the displayed MeSH names are automatically replaced with white spaces (see testcases). This change will make the use of the optional parameter "3" unnecessary (note to maintain backwards compatibility, the optional "3" parameter is still functional and if defined, overrides the automatic character substitution).

This was requested some time ago (see above), but limitations in the template scripting language made this request impossible to implement. The new WP:Lua based Module:String now makes this substitution easy. Thanks. Boghog (talk) 06:36, 16 March 2013 (UTC)Reply

While we are at it, I have also implemented in the sandbox, automatic substitution of white spaces with "+" when creating the external url link. Previously one needed to replace spaces with "+"s to get the link to work, but this ruined the appearance of the displayed name. Now it is unnecessary to add the "+"s in the first place. Furthermore both changes are fully backwards compatible. Boghog (talk) 07:23, 16 March 2013 (UTC)Reply

  Done; thanks. Chris Cunningham (user:thumperward) (talk) 11:23, 19 March 2013 (UTC)Reply

Template-protected edit request on 28 February 2014: Use protocol relative url for www.nlm.nih.gov

edit

I just found that this website supports HTTPS, so could we use protocol relative url for this site (i.e. http://www.nlm.nih.gov -> //www.nlm.nih.gov)? I made a change on the sandbox, and here is the testcases. Chmarkine (talk) 06:30, 28 February 2014 (UTC)Reply

  Done Jackmcbarn (talk) 20:06, 28 February 2014 (UTC)Reply

It looks like NIH changed their URL scheme again

edit

Today this template creates a link like this: https://www.nlm.nih.gov/cgi/mesh/2011/MB_cgi?mode=&term=Onium+compounds
Today the target site rewrites the above to this: https://meshb.nlm.nih.gov/record/ui?name=Onium%20compounds
(%20 is a space.) Use judgment. (The unnecessary traffic is a nanodollar cost to the target and a millisecond delay to the user, but the old format might someday stop working.) - A876 (talk) 03:16, 10 July 2018 (UTC)Reply

The good news, is MeSH still accepts the "+" instead of a space, but note, they have changed around the rest of the link as well. — xaosflux Talk 17:41, 10 July 2018 (UTC)Reply
  Done A876, please update the documentation. As your example shows, parameter 2 (2011) is now redundant.
  • {{MeSH name|Onium+compounds}}
Onium+compounds at the U.S. National Library of Medicine Medical Subject Headings (MeSH)
  • {{MeSH name|Onium compounds}}
Onium compounds at the U.S. National Library of Medicine Medical Subject Headings (MeSH)
  • {{MeSH name|Onium compounds|2011}}
Onium compounds at the U.S. National Library of Medicine Medical Subject Headings (MeSH)
  • {{MeSH name|Onium compounds|2011|Other text}}
Other text at the U.S. National Library of Medicine Medical Subject Headings (MeSH)
  • {{MeSH name|Onium compounds||Other text}}
Other text at the U.S. National Library of Medicine Medical Subject Headings (MeSH)
Cabayi (talk) 09:01, 16 July 2018 (UTC)Reply
  (Thanks. I updated the documentation.) Sorry to report: The most common usage is now broken. The first two (above) display the same when you hover, but they are not the same if you follow the links.
  • Link from "Onium+compounds" → URL with "Onium%2Bcompounds". (BAD LINK – does not retrieve contents.)
  • Link from "Onium compounds" → URL with "Onium+compounds" (Working link.) (Server rewrites to URI with "Onium compounds".)

It looks like {urlencode} is the problem. {urlencode} does "+" → "%2B" (which the server does not parse)! {urlencode} also does " " → "+" (which the server rewrites). I made a fixed version in the sandbox, going back to {#invoke:String|replace}, using it twice, to do " " → "%20" -and- "+" → "%20". - A876 (talk) 17:49, 16 July 2018 (UTC)Reply

Thanks A876,   Done, sandbox copied to live. Cabayi (talk) 20:45, 17 July 2018 (UTC)Reply

Template-protected edit request on 22 March 2023

edit

"US" to "U.S." per their name. BhamBoi (talk) 05:21, 22 March 2023 (UTC)Reply

  Completed. P.I. Ellsworth , ed. put'er there 16:56, 22 March 2023 (UTC)Reply

Template-protected edit request on 22 March 2023 (2)

edit

I think it would be better to have the links go to ncbi.nlm.nih.gov/mesh/?term=NAME instead of meshb.nlm.nih.gov/record/ui?name=NAME.

One thing to note is that this URL scheme uses pluses instead of a url-encoded space for spaces (ncbi.nlm.nih.gov/mesh/?term=Fetal+Resorption instead of meshb.nlm.nih.gov/record/ui?name=Fetal%20Resorption) This could be fixed super easily by changing the urlencode encoding type, so not really a major holdback factor in migration. Struck this out because turns out this isn't a problem as MeSH Browser accepts both encodings, and the template currently uses pluses.

Why? this is the MeSH URL scheme used by this template's sibling, Template:MeSH number.

This version of the MeSH site shows the exact same information from the same database, BUT still recursively has a link to the "MeSH Browser" (what this template currently links to) under "Related information", along with the page for the item in multiple other NLM sites; whereas the current links to "MeSH Browser" do not link back to this MeSH site, or to the item in any other NLM databases, making access to the listing on other NLM databases more difficult with the current state of the template rather than if it was migrated to this. BhamBoi (talk) 05:48, 22 March 2023 (UTC)Reply

Wait on this until I tinker with it in sandbox. BhamBoi (talk) 06:06, 22 March 2023 (UTC)Reply
Deactivated template until you are ready — Martin (MSGJ · talk) 18:37, 22 March 2023 (UTC)Reply
Unfortunately, I think the template would work more consistently if it is left as-is. As you could see with the testcases (the ones marked with  ), some term's done link directly to an item with this proposed change, when they do with the current state of the template. If I can find a way to make this work, I'll remake an edit request, but for now, the current state of the template is better that what is in this proposal. Please leave it, thanks for your patience! BhamBoi (talk) 18:43, 22 March 2023 (UTC)Reply