Template talk:OCLC

(Redirected from Template talk:OCLC/sandbox)
Latest comment: 3 years ago by Howcheng in topic Error with short OCLC numbers

Don't put any spaces after pipe symbol

edit

I have found that you must not put any spaces after the pipe symbol, or it doesn't work. (It duplicates the number, and doesn't create a link). If I knew more about templates, perhaps I could diagnose this. The following works correctly: {{OCLC|3185581}} giving OCLC 3185581 while the following fails: {{OCLC| 3185581}} giving OCLC 3185581 EdJohnston 02:43, 27 November 2006 (UTC)Reply

It's because of how external links are sensitive to spaces. Let me see if I can hackaround to fix it. JesseW, the juggling janitor 09:33, 30 November 2006 (UTC)
Thanks, that seems to fix it! As you see, the example that I typed in above doesn't fail any more. EdJohnston 21:08, 30 November 2006 (UTC)Reply

Cite book

edit

I've inserted this template into {{cite book}} to add an explicit oclc=... field instead of id={{oclc|...}}, but, because of Bugzilla: 8446: Don't show conditionally included links on Whatlinkshere unless they're actually included, the What links here for Template:OCLC is useless. So I'm going to substitute it.

If you update this template, please also update {{cite book}} in the same way.Omegatron 15:26, 9 January 2007 (UTC)Reply

Heh

edit

OCLC 52075003Omegatron 00:45, 19 March 2007 (UTC)Reply

I wonder if Wikipedia should apply for its own ISSN. OCLC thinks we are published in Cambridge, MA but they are not sure. EdJohnston 03:59, 19 March 2007 (UTC)Reply
Woot!. OCLC tells me that if ever wikipedia goes down, I can trust that I go down to either University of Queensland or University of South Australia to find a copy. Both are a decent drive away, but at least Australia has two copies of this wonderful resource. John Vandenberg 04:45, 19 March 2007 (UTC)Reply
Apparently, "The Encyclopedia is the most popular biographical on the Network". — Omegatron 03:22, 20 March 2007 (UTC)Reply
Note that it thinks that the University of Queensland is in Canberra. Hawkeye7 (talk) 21:03, 7 April 2009 (UTC)Reply

Template improvement (esthetical)

edit

What do you think of improving the model as it is on the French Wikipedia (see fr:Modèle:OCLC) ?

It allows the OCLC ref to look like that:

  • Morón Villarreal, Jesus ; Gutiérrez and Magee, Tex-Mex heroes ; Houston, Tex. : J. Morón Villarreal, 1995. (OCLC 39126265)

rather than:

  • Morón Villarreal, Jesus ; Gutiérrez and Magee, Tex-Mex heroes ; Houston, Tex. : J. Morón Villarreal, 1995. OCLC 39126265

SalomonCeb (talk) 08:36, 6 February 2008 (UTC)Reply

Disambiguation

edit

{{editprotected}} What about disambiguating "OCLC" to "Online Computer Library Center"? — Cheers, JackLee talk 00:47, 12 February 2008 (UTC)Reply

OCLC, as an article name, is currently a redirect to the fully-spelled-out name of the center, so no disambiguation is needed or even possible. The *template* {{OCLC}} is intended for use in reference lists, and needs to be compact. If {{OCLC}} were to expand out to 'Online Computer Library Center' on each occasion of its use, it would blow up the size of reference lists unnecessarily. Can you say more about what you have in mind? EdJohnston (talk) 01:43, 12 February 2008 (UTC)Reply

I'm suggesting that the template be linked to "Online Computer Library Center" instead of "OCLC" to avoid the redirect. Isn't it generally the practice to avoid redirects? Your explanation is reasonable enough, but this is only an issue if the template is meant to be substituted and there are no instructions on the template page advising editors to do so. — Cheers, JackLee talk 02:11, 12 February 2008 (UTC)Reply

I don't quite see how your proposal would work. We *want* the occurrence of the template to present the redirect 'OCLC' in the visible reference list. To do that it has to stay as it is. If you edit the template to spell out 'Online Computer Library Center' then every single reference list will show that as fully spelled-out.
As a test, edit the page we are in now and type {{OCLC|3185581}}. Then hit the 'Preview' button, and tell me what you see. You ought to see is OCLC 3188581. What you see (if your change is adopted) will be Online Computer Library Center 3188581 if I've figured it out correctly. That is the expanded form that would show up in every reference list (that uses this template) if your proposal were adopted. I believe that subst will make no difference in what appears. If you disagree with this prediction, please create a test version of the template (with the change made), instantiate it, and see what it gives you. EdJohnston (talk) 02:52, 12 February 2008 (UTC)Reply

I think we're misunderstanding each other. I'm not suggesting that "OCLC" be spelt out in full in the template, just that the abbreviation is linked to the article "Online Computer Library Center" rather than the redirect "OCLC". The simple solution is to use a piped link, like this: "[[Online Computer Library Center|OCLC]]", which simply renders "OCLC". This will reduce server load as it is then not necessary to go through the "OCLC" redirect. — Cheers, JackLee talk 03:31, 12 February 2008 (UTC)Reply

  Not done, per WP:R2D - don't fix redirect links that aren't broken. עוד מישהו Od Mishehu 06:48, 12 February 2008 (UTC)Reply
It seems to be a reasonable request. Users curious about what OCLC stands for might hover over the link to see what article it links to, only to discover that it stands for, oh, OCLC. Neither of the arguments against disambiguating presented in the R2D guideline seems to apply cleanly here: if the OCLC page is indeed turned into an actual article or disambig page, we shouldn't be linking to it from this template, and the readability of articles while editing will not be altered by a slight change to a template. Removing the redirect won't have a significant impact on server load (unless you count the short term job queue), but will benefit readers' understanding. – Luna Santin (talk) 06:58, 12 February 2008 (UTC)Reply

Use of {{Documentation}} template

edit

{{editprotected}} Instead of transcluding the documentation page on to the template page using {{/doc}}, please use {{Documentation}} instead as this looks tidier, indicates to editors how they may edit the documentation, and is becoming the norm in Wikipedia. — Cheers, JackLee talk 20:19, 28 March 2008 (UTC)Reply

Can you give examples of any other templates where this change has already been made? I tried to test your proposed change but realized I didn't understand it well enough to know whether it was working right. This template is transcluded between 500 and 1000 times, and I didn't want to make a mistake. EdJohnston (talk) 21:15, 28 March 2008 (UTC)Reply
  Done I also added {{pp-template}} Happymelon 21:29, 28 March 2008 (UTC)Reply

Multiple OCLC entries

edit

{{editprotected}} As mentioned on the Universal Reference Formatter feedback page (User_talk:Smith609/Cite#Multiple_OCLC_entries), sometimes multiple OCLC entries are found for a single ISBN. Should this template be improved to handle this situation better?   — Chris Capoccia TC 08:22, 11 August 2008 (UTC)Reply

Yes, this template needs additional fields added for multiple OCLC codes which are added by the DOI bot. It should have additional code like 'If {{2}}' etc. Dhaluza (talk) 19:35, 21 September 2008 (UTC)Reply
  Done. Very straightforward to implement and a good thing to boot, but in the future I would request, instead of opening a discussion and adding the editprotected tag at the same time, that you let the discussion run its course, determine the best course of action, have the code written up and ready to go, then request editprotected, so the responding admin can more easily take care of your request. Cheers! :) Huntster (t@c) 10:00, 26 September 2008 (UTC)Reply
I have seen three OCLC codes added for an item, so it should probably go at least 3 deep. Dhaluza (talk) 23:46, 26 September 2008 (UTC)Reply
Alright, I'll work on that when I've got some time. Huntster (t@c) 08:37, 27 September 2008 (UTC)Reply
  Done. Huntster (t@c) 01:05, 29 September 2008 (UTC)Reply
  Done. The template now supports up to nine oclc codes. Slightly deviating from the previous format, the list entries will be shown separated by commas (","); this default is now also consistent with the output format of dozens of other "catalog lookup" templates. If, for linguistic reasons, the last comma in the row should be changed into something else, it is possible to change this using the optional 'leadout=text' parameter, e.g. 'leadout=and', 'leadout=or', 'leadout=as well as', etc.
--Matthiaspaul (talk) 04:44, 11 May 2016 (UTC)Reply

WorldCat URL format change

edit

{{editprotected}} I noticed that this template creates links to WorldCat using http://worldcat.org/... rather than http://www.worldcat.org/... Given that http://worldcat.org/... redirects to the http://www.worldcat.org/... version and is now the recomended format: [1], could this template please be changed to point to the www.worldcat.org version in the first place? :) -Paul1337 (talk) 01:08, 8 December 2008 (UTC)Reply

  Done. Huntster (t@c) 01:56, 8 December 2008 (UTC)Reply

Tweak for print

edit

{{edit protected}}

Simply copy-paste this. (I've tested the code in my sandboxes and it works just fine)

<!--
-->{{hide in print
    |[[Online Computer Library Center|OCLC]]&nbsp;[http://www.worldcat.org/oclc/{{urlencode:{{{1}}}}} {{{1}}}]<!--
  -->{{#if:{{{3|}}}
      |, [http://www.worldcat.org/oclc/{{urlencode:{{{2}}}}} {{{2}}}] and [http://www.worldcat.org/oclc/{{urlencode:{{{3}}}}} {{{3}}}]<!--
   -->|{{#if:{{{2|}}}
        |&#32;and [http://www.worldcat.org/oclc/{{urlencode:{{{2}}}}} {{{2}}}]<!--
     -->|<!--
    -->}}
     }}<!--
-->}}<!--
-->{{only in print
    |OCLC&nbsp;{{{1}}}<!--
  -->{{#if:{{{3|}}}
      |, {{{2}}} and {{{3}}}<!--
   -->|{{#if:{{{2|}}}
        |&#32;and{{{2}}}<!--
     -->|<!--
    -->}}<!--
  -->}}<!--
-->}}<!--
--><noinclude>
{{pp-template|small=yes}}
{{documentation}}
</noinclude>

This will cleanup the print version of articles (see explanation). Headbomb {talk / contribs / physics / books} 02:05, 5 March 2010 (UTC)Reply

  Done, but gods do I hate comment markup. Huntster (t @ c) 05:39, 5 March 2010 (UTC)Reply
Excellent. Thanks a bunch. Headbomb {talk / contribs / physics / books} 08:36, 5 March 2010 (UTC)Reply

All editions

edit

If you add '/editions' to the end of the url, all editions, formats and languages are shown. Compare one with all. I think it would be helpful to add that option, changing the current display from 'OCLC Number 55534889' to 'OCLC Number 55534889 all editions' so users can click on whichever they want to see. (I don't know if the current option for multiple OCLC numbers in the template was a workaround for that.) Flatterworld (talk) 06:59, 26 August 2010 (UTC)Reply

Sure, but how do you do that with the template?Racconish Tk 07:50, 5 June 2011 (UTC)Reply
  Done. This is now possible using the optional 'show=all' parameter. If the text displayed needs to be changed from the default, it can be specified as in 'show=text'.
--Matthiaspaul (talk) 04:33, 11 May 2016 (UTC)Reply

Use protocol relative URL

edit

Can we switch the URL for Worldcat from http://www.worldcat.org to //www.worldcat.org? Chmarkine (talk) 02:36, 8 November 2013 (UTC)Reply

Please also update Template:ISSN search link, Template:ISSN. Thanks! Chmarkine (talk) 03:03, 8 November 2013 (UTC)Reply
Why? I was under the strong impression that protocol relative URLs were A Bad Thing™. Why should they be used here? Huntster (t @ c) 04:10, 8 November 2013 (UTC)Reply
Thanks for your reply! Because if users browse Wikipedia in HTTPS, by using protocol relative URLs, they will stay in HTTPS mode when they click external links. So this is beneficial for those who really care about security. So in my opinion, as long as a website supports both HTTP and HTTPS (in this case https://www.worldcat.org works fine), then we should use protocol relative URL. Why do you think it's a bad thing? Chmarkine (talk) 05:13, 8 November 2013 (UTC)Reply
I've deactivated the request for now. This request isn't uncontroversial, so it will need a consensus before admins are authorised to enact it. If you find a consensus after further discussion, feel free to reactivate the request. If you don't get very much input to a discussion here, you can always try asking at WP:VPT. Best — Mr. Stradivarius ♪ talk ♪ 10:28, 8 November 2013 (UTC)Reply
Perhaps my question was a bit more terse than intended. I'd simply read somewhere(s) that PRUs should be discouraged and wondered what the benefit was here, and Chmarkine's explanation makes sense. Thanks for that. Huntster (t @ c) 11:46, 8 November 2013 (UTC)Reply
  • Support Why are protocol relative URLs "A Bad Thing™"? Surely they're a good thing, because some websites (Wikipedia and Worldcat included) permit both http: and https: access, and so protocol relative URLs permit users to follow links without needlessly switching between protocols. --Redrose64 (talk) 11:16, 8 November 2013 (UTC)Reply

Thank you all for your reply! Since now we have two supports and no objections, and actually there are already a lot of protocol relative URLs on Wikipedia and PRUs are recommended by Wikimedia Foundation, so I reactivated my request. Thanks! Chmarkine (talk) 21:20, 12 November 2013 (UTC)Reply

  Done. Ok, I have carried out the request. Let me know if you spot any issues with the code. — Mr. Stradivarius ♪ talk ♪ 22:01, 12 November 2013 (UTC)Reply
Thank you, Mr. Stradivarius! Chmarkine (talk) 01:12, 13 November 2013 (UTC)Reply

RFCs on citations templates and the flagging free-to-read sources

edit

See

Headbomb {talk / contribs / physics / books} 17:07, 29 October 2016 (UTC)Reply

Template-protected edit request on 16 September 2017

edit

Please change "//www.worldcat.org/" to "https://www.worldcat.org/". When using Special:LinkSearch to search for HTTP links, relative links are caught in there as well giving an inaccurate list of articles using http links. Jon Kolbert (talk) 04:13, 16 September 2017 (UTC)Reply

  Done — JJMC89(T·C) 06:33, 16 September 2017 (UTC)Reply

Error with short OCLC numbers

edit

{{OCLC|894}} creates OCLC 894 which goes to https://www.worldcat.org/oclc/%E2%80%8E894 (a 404), but https://www.worldcat.org/oclc/894 is a valid link. howcheng {chat} 17:29, 9 July 2021 (UTC)Reply

I can't reproduce the error. Biogeographist (talk) 22:21, 9 July 2021 (UTC)Reply
Odd, it seems to work now. Maybe there was a bug in a Lua script this was dependent on which got fixed. howcheng {chat} 17:17, 10 July 2021 (UTC)Reply