Template talk:Citation/core

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search


Support for COinS was removed in 2012 due to performance issues. The majority of CS1 templates have been migrated to Lua, but a few of the lesser used CS1 templates still use core, as well as a number of specific-source templates. Given that the use per page is going to be fairly low, I think we can restore COinS support. --  Gadget850 talk 13:43, 10 March 2014 (UTC)

  • Support re-adding COinS: I agree it would be better to restore the COinS metadata, removed to reduce wp:post-expand include size by ~20% (in pages which had used hundreds of CS1 cites). Some Bots need the COinS data to validate the cites & weblinks. -Wikid77 14:40, 10 March 2014 (UTC)
  • Agree as a Zotero user. Shyamal (talk) 08:58, 12 March 2014 (UTC)
  • Support AIUI, removal was only every supposed to be temporary. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:16, 12 March 2014 (UTC)

 Done -- Gadget850 talk 07:29, 28 March 2015 (UTC)

Template:Citation: CS1 or CS2?[edit]

Template:Citation/core includes this:

These templates have been converted to use Module:Citation/CS1 so no longer use {{citation/core}}

This implies that Template:Citation is CS1. I thought Template:Citation is CS2. Clarification, please. —Anomalocaris (talk) 07:40, 21 January 2015 (UTC)

It implies no such thing. It implies that {{citation}} uses the same underlying software module as the CS1 citations. The module's name happens to have "CS1" in it. That's not the same thing as being part of the same style. —David Eppstein (talk) 07:42, 21 January 2015 (UTC)

Protected edit request on 27 March 2015[edit]

Broken link in reference

  • |Citation class= adds the specified HTML class to the span that encloses the citation. The name must be one word (separate words are separate classes) and must meet the name rules.

ref "HTML class Attribute". w3schools.com. /ref

should be,

"HTML class Attribute". w3schools.com. ,i.e. http://www.w3schools.com/tags/att_global_class.asp

Sechinsic (talk) 21:36, 27 March 2015 (UTC) Sechinsic (talk) 21:36, 27 March 2015 (UTC)

You are correct on how classes work. The template applies two classes: citation which has CSS for highlighting and a specific class for each template. Where is the problem? -- Gadget850 talk 21:48, 27 March 2015 (UTC)
I think that Sechinsic (talk · contribs) means that of the two w3schools links that they posted above, the first one throws a HTTP 404 error. --Redrose64 (talk) 22:16, 27 March 2015 (UTC)
Aha! The link in the unprotected documentation is bad. -- Gadget850 talk 22:18, 27 March 2015 (UTC)
Fixed -- Gadget850 talk 22:20, 27 March 2015 (UTC)
Thanks. Editing past my bedtime.Sechinsic (talk) 22:26, 27 March 2015 (UTC)

Throw an error if template is used directly?[edit]

There's really no reason for why this should be used directly on articles. We should throw an error and tell people to use either {{citation}} or {{cite xxx}}. Headbomb {t · c · p · b} 14:18, 19 June 2017 (UTC)

I don't think that's possible. Templates don't know how they are called. Templates know nothing of the outside world and can only 'see' the parameters that they are given.
Trappist the monk (talk) 14:34, 19 June 2017 (UTC)
Have a dummy |subtemplate=♥ parameter set in the templates which suppresses the error, kinda like what {{AFD}} does to detect if it's been substed?Headbomb {t · c · p · b} 14:46, 19 June 2017 (UTC)
Yeah, I thought about that but didn't relish the thought of changing some 70ish templates and then still needing to fix the 850ish articles that use {{Citation/core}}. If I were to spend any time at all on this problem, better I think to automate fixes to article space; which job has been on my queue of things to do for a while now. But, if you want modify these templates and {{citation/core}}, I don't object.
Trappist the monk (talk) 15:34, 19 June 2017 (UTC)
It involves dealing with LUA. I couldn't code my way out of a paper bag in LUA, otherwise I'd have made a bunch of easy-to-fix things in these templates like the DOI linking when they are inactive a long time ago. Headbomb {t · c · p · b} 15:38, 19 June 2017 (UTC)
I think you are mistaken. {{Citation/core}} is wikitext and so are most, if not all, of the templates that call it. However, {{citation/core}} is protected but its sandbox is not. When you're ready, let me know and I'll sync the live version from its sandbox.
Trappist the monk (talk) 15:48, 19 June 2017 (UTC)

I just did this because it caused IABot to stumble with automated archiving, and I don't think IABot (and other tools) should need to know how to deal with this template. It seems reasonable to convert them to other standard templates, but it seems work intensive to automate. There are about 3500 instances. Should we make a bot request? I doubt anyone will, but worth a try.. @Trappist the monk: -- GreenC 16:17, 1 December 2017 (UTC)

If I had any time to devote to this but, I don't; I'm tied up with {{lang}} and the {{Template talk:Citation/core}} templates right now. Given that, perhaps we should reconsider adding a parameter to the relatively few remaining templates that call {{citation/core}} to tell {{citation/core}} that it is being called by another template. That parameter not being set where {{citation/core}} is called directly in article space would return an error message and a category:
in a calling template ({{cite wikisource}} for example), add this line to the {{citation/core}} call:
in {{citation/core}} add something like this (this version would replace the citation with an error message in much the same way that cite.php errors do) with help text on the category page:
{{#ifeq:{{{do-not-call-directly-from-article-space}}}|ok-I-won't|<...existing citation/core code goes here...>|{{error|{{tld|citation/core}} called directly ([[:category:citation core called directly|help]])|tag=span}}[[category:citation core called directly]]}}
Of course, spoofing is possible but we would hope that editors would not do that.
Trappist the monk (talk) 18:29, 1 December 2017 (UTC)

GreenC, there are 3,900 instances, but not all of them are because of direct usage in templates. It looks like 2,500 of them are {{cite wikisource}} (I could be wrong). It might be best to convert that template to use CS1 (or tag it somehow to locate direct citation/core calls) before proceeding further. – Jonesey95 (talk) 20:09, 1 December 2017 (UTC)

It looks like there are about 956 pages in article space using citation/core directly. – Jonesey95 (talk) 20:37, 1 December 2017 (UTC)