Jump to content

Template talk:Citation/core

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

COinS

[edit]

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)[reply]

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

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)[reply]

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)[reply]

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)[reply]

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)[reply]
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)[reply]
Aha! The link in the unprotected documentation is bad. -- Gadget850 talk 22:18, 27 March 2015 (UTC)[reply]
 Fixed -- Gadget850 talk 22:20, 27 March 2015 (UTC)[reply]
Thanks. Editing past my bedtime.Sechinsic (talk) 22:26, 27 March 2015 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]

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)[reply]

If I had any time to devote to this but, I don't; I'm tied up with {{lang}} and the {{lang-??}} 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:
|do-not-call-directly-from-article-space=ok-I-won't
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)[reply]

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)[reply]

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

translating citation/core

[edit]

Coming back to this after a long while – {{citation/core}} does not belong in article space.

With that declaration made, I have cobbled up an awb script that brute-force translates {{citation/core}} to {{citation}}. It is not for the script to interpret anything, it only renames existing {{citation/core}} parameters to cs1|2 parameters (empty parameters are removed). Parameters that are not listed in the {{citation/core}} documentation are not translated; misspelled parameters are ignored. The script does not touch parameter values except for |At= when that parameter looks like either of these (from substing of {{Literatur}}):

|At=p.&nbsp;... (where the ... is any and all text between the &nbsp; and the next | or })
|At=pp.&nbsp;...

When these occur, they are replaced with the appropriate |page= or |pages= (by translating the p. and pp.).

Machine translations are never perfect so templates translated by this script may be flawed because {{citation/core}} allows parameter combinations that cs1|2 do not; swallows undefined parameters that cs1|2 will reject; no doubt there are other reasons for flawed results. For example, this:

{{citation/core|Surname1=Laura Lotz|Periodical=Rheinische Post|Title=Wie RP-Redakteur Hurtmanns auf die „Fohlenelf“ kam|Issue=189|Publisher=Rheinische Post Verlagsgesellschaft mbH|PublicationPlace=Mönchengladbach|At=pp. C2|IncludedWorkTitle=Serie Gladbacher Erfindungen (5)|Date=15 August 2012|language=German}}
Laura Lotz (15 August 2012), Serie Gladbacher Erfindungen (5), "Wie RP-Redakteur Hurtmanns auf die „Fohlenelf“ kam" (in German), Rheinische Post (Mönchengladbach: Rheinische Post Verlagsgesellschaft mbH) (189): pp. C2 

translates to this:

{{citation|surname1=Laura Lotz|periodical=Rheinische Post|title=Wie RP-Redakteur Hurtmanns auf die „Fohlenelf“ kam|issue=189|publisher=Rheinische Post Verlagsgesellschaft mbH|publication-place=Mönchengladbach|pages=C2|contribution=Serie Gladbacher Erfindungen (5)|date=15 August 2012|language=German}}
Laura Lotz (15 August 2012), "Wie RP-Redakteur Hurtmanns auf die „Fohlenelf" kam", Rheinische Post (in German), no. 189, Mönchengladbach: Rheinische Post Verlagsgesellschaft mbH, pp. C2 {{citation}}: |contribution= ignored (help)

I leave it to someone who has German to figure out what should be done with that.

The edit summary for edits made by this script will link to this discussion and also make the suggestion that interested editors should check the edit results and repair any errors.

Trappist the monk (talk) 00:19, 17 December 2018 (UTC)[reply]

Added a tweak to the awb script so that it deletes |Year=yyyy when there is also a |Date=yyyy and yyyy in both is the same.
Trappist the monk (talk) 18:16, 17 December 2018 (UTC)[reply]
I am neither familiar with templates nor with citations but the "IncludedWorkTitle"-parameter in your example above seems to refer to the title of a series of articles or books and could possibly also be interpreted as a "subtitle". (But you had probably figured that out already ...)
best, KaiKemmann (talk) 03:45, 13 January 2019 (UTC)[reply]

Reduce protection?

[edit]

Hi. Currently, the template appears to only have 188 transclusions due to the migration to Module:Citation/CS1 - maybe full protection is too much? --DannyS712 (talk) 05:34, 12 June 2019 (UTC)[reply]