Template:Discogs artist/doc

The undefined template generates links to artist discographies at Discogs.com.

Usage
Code:

Note: that this template has been changed to be more similar to Rolldabeats and Last.fm. Those template usually work without any arguments for simple page names and now this one does as well. The main difference is not to use plus signs for spaces.
 * For details on simple page names, see section.
 * For details on what changed, see section.

Placement:
 * This template is an external links template and should be placed in the "External links" section of a musical artist's page.

Instructions

 * 1) Find the appropriate artist at discogs.com.
 * 2) Old instructions: The page URL should look like , where "xxxxx" indicates the artist's name. New instructions: Copy the artist name from the web page content. If they have a suffix such as (2), then copy that as well.
 * 3) Copy only the artist name. Sometimes Discogs has a blue link before the name, but do not copy that. Copy it from the web page content, not the URL.
 * 4) Add the following code to the external links section:
 * Where "xxxxx" is the name you've copied and the name of the page here on WikiQueer is the name you would like to display. If the name you would like to display is different, use parameter 2 or named parameter "name". This template also provides legacy support for named parameter "artist" instead of parameter 1 (see section above) or omission of the parameter altogether for single-word artistnames in their own articles.
 * Where "xxxxx" is the name you've copied and the name of the page here on WikiQueer is the name you would like to display. If the name you would like to display is different, use parameter 2 or named parameter "name". This template also provides legacy support for named parameter "artist" instead of parameter 1 (see section above) or omission of the parameter altogether for single-word artistnames in their own articles.

Main article on a simple artistname
Most page name are simple. Try simple approach in preview mode and see if that works. If it doesn't, the please see section.
 * 1) For use in the article "ABBA", search for "ABBA" on discogs.com, and you will reach this page: http://www.discogs.com/artist/ABBA
 * 2) Write:

The result is:
 * (which renders here with a link and linkname with name of the current page)
 * (which renders on ABBA with a link and linkname with name of that page)

Main article on an artist

 * 1) For use in the article "The Postal Service", search for "The Postal Service" on discogs.com, and you will reach this page: http://www.discogs.com/artist/Postal+Service,+The
 * 2) Copy "Postal Service, The" from the web page content (not the URL) and then write:

Note that there should be no spaces between the | character and the string. Spaces are fine for the named arguments:

The result is:
 * (which renders here with the linkname of the current page)

When you provide the appropriate second argument "name", you get:
 * (which renders on The Postal Service with the link and linkname of the current page)

Article related to an artist

 * 1) For use in an article related to "The Postal Service", search for "The Postal Service" on discogs.com, and you will reach this page: http://www.discogs.com/artist/Postal+Service,+The
 * 2) Copy "Postal Service, The" from the web page content (not the URL), and then write:

Again, the named arguments version is

The result is:

Important usage note
Since the use of this template will almost certainly be in the external link section, you should add a * before the template text to include it as a list item.

What is a simple artist name?
In MediaWiki there are three characters that make those pagenames not simple. They are ampersand, single quote and double quote (& ' "). For details see wiki:Help:Magic words.

Both WikiQueer and Discogs add suffixes onto their names, but with a different style.
 * WikiQueer:


 * WikiQueer pages have a suffix such as "(band)" or "(musician)" which obviously will not match with Discogs.
 * Sometimes our pagename is fastidious, like the duo Morrissey – Mullen (with our use of long hyphen), Allmusic calling them "Morrissey & Mullen" and Discogs simply "Morrissey Mullen".
 * We also have a lot of separate pages with a suffix of "discography" for major artists where you will want to provide both parameters to get them to match and to look nice because this template says "discographies" and the page should not say it twice.
 * Discogs:


 * Discogs always but the "The" at the end of the band name, such as "Beatles, The" for The Beatles. That might at first seem excessive, but it helps them when sorting names and we do the same for our categories.
 * Discogs adds a suffix of a number in parenthesis such as (2) or (3) or more onto duplicate names. An example of mismatch in both cases is where what we call Kaleidoscope (UK band), that web site calls Kaleidoscope (2) or the much too common name Blue (Scottish band) and Blue (31).
 * Sometimes Discogs only use a first name were we use the whole name.
 * Either:


 * Sometimes we do not space the same. WikiQueer has H. P. Baxxter with a space between the initals and they do not have a space there.

2011 changes and notes
The template has been changed. Technically, it is now using urlencode in the template, we have to remove all plus signs. This task is about 80% complete. So far, we are only able to process the first two plus signs. That means that we still need to finish updating all the pages with page names longer than three words and remove the plus signs from the artist parameters. If this template does not work anymore on your favorite articles, then edit the usage and remove the plus signs "+", replacing them with spaces. If there are URL encoding (using percent signs "%" and hexnum hexnum), then change them back to the special characters they correspond to. The urlencoding is now done within the template code and should not be done in the parameters. Pagenames that have special characters such as ampersand, single or double quote, long hyphen, or peculiar characters that we sometimes use might still require explicit parameters, but in many more cases you can just use the simple, no-parameter version of this template.

When we use the "no parameter" style, we will have to check after any sort of WikiQueer page rename and then update the template. The same applies for translating to interwikis such as Russian or Asian languages that hardly ever use any English page names. They instead transliterate the pagename.

Here is an example of some plain URL's that work properly:
 * http://discogs.com/artist/Ronski+Speed
 * http://discogs.com/artist/Ronski%20Speed

For that last example, we should have a plain, readable argument such as for Girls' Generation in Korean:

The result is:

After all, what WikiQueer editor really wants to look at this opaque string? Those strings are indeed database keys but they not and id or a number and they were not designed to be opaque. With this change, we are now back to truly multilingual support just like some other template already are.
 * http://www.discogs.com/artist/%EC%86%8C%EB%85%80%EC%8B%9C%EB%8C%80

As of early 2011, there are a half-dozen interwikis that have imported this template. Only the German interwiki has not yet completely applied this "urlencoding in the template" update.