Revision as of 21:54, 22 January 2012 editCarcharoth (talk | contribs)Administrators73,576 edits →Alternative sandbox implementation and changes: comment← Previous edit | Latest revision as of 14:04, 15 September 2024 edit undoClueBot III (talk | contribs)Bots1,375,748 editsm Archiving 1 discussion to Template talk:Cite ODNB/Archive 1. (BOT) | ||
(96 intermediate revisions by 30 users not shown) | |||
Line 1: | Line 1: | ||
{{WikiProject banner shell| | |||
==The leading bullet== | |||
{{WikiProject Dictionary of National Biography}} | |||
The leading bullet here seems non-standard, and a bit awkward for use in footnotes. I'd like to remove it before matters go further. ] (]) 08:36, 8 November 2010 (UTC) | |||
}} | |||
:yes, definitely agree. ] (]) 09:39, 8 November 2010 (UTC) | |||
<!--2160 ÷24 = 90 days --> | |||
:agree that it should be done, anyway. If it is removed early will the 8K pages using it at present need to be repaired before doing anything else? ] (]) 09:41, 8 November 2010 (UTC) | |||
{{User:ClueBot III/ArchiveThis | |||
|age=2160 | |||
|archiveprefix=Template talk:Cite ODNB/Archive | |||
|archivebox=yes | |||
|box-advert=yes | |||
| numberstart=1 | |||
| maxarchsize=75000 | |||
| header={{Automatic archive navigator}} | |||
| minkeepthreads=5 | |||
| minarchthreads=1 | |||
| format= %%i | |||
}} | |||
== Author == | |||
It's not on 8,000 pages! Currently fewer than 100 occurrences by what links to the template page. So it's manageable by hand right now. ] (]) 13:28, 8 November 2010 (UTC) | |||
Recent ODNB entries nomally have a named author. It would be good to add first and lastname parameters so that we can give proper attribution where it's due. ] (]) 09:34, 8 December 2021 (UTC) | |||
:From the template's documentation: | |||
::This template supports all parameters that are supported by {{tlx|cite encyclopedia}}. | |||
:Can you show an example where {{para|author{{var|n}}}}, {{para|last{{var|n}}}}, {{para|first{{var|n}}}}, etc do not work with {{tlx|cite ODNB}}? | |||
:—] (]) 12:22, 8 December 2021 (UTC) | |||
::Ah, sorry, my mistake. I missed that. I read the documentation too quickly and just scanned the parameters that were specifically mentioned. ] (]) 18:42, 8 December 2021 (UTC) | |||
==Overriding automatic links== | |||
Done, and I've made a pass through all the places where the template is used. ] (]) 08:24, 10 November 2010 (UTC) | |||
The documentation states "Several parameters have pre-set defaults (but may be overridden)", but does not give any information on how to override, for example, the automatic link to Oxford Dictionary of National Biography. Could some let me now a. how to do this; and b. add this to the documentation so others can also do it. Many thanks - ] (]) 09:07, 3 April 2023 (UTC) | |||
:The documentation was wrong about overriding. I have fixed it. – ] (]) 11:16, 3 April 2023 (UTC) | |||
::OK, so can these be set so they ''can'' be overridden? At the moment I have a list of sources where no similar titles are linked, but there are four repeated links to the the ONDB. We need to be able to manage the output to some level if this template is to be used, or I will just go back to put everything in a different template so that the output can be managed appropriately. - ] (]) 11:37, 3 April 2023 (UTC) | |||
:: | |||
::{{tq|The documentation was wrong about overriding.}} Evidence to support that claim? Every parameter preset by this template should be overridable. If there are any that cannot be overridden, that should be fixed, not the documentation. | |||
::—] (]) 12:40, 3 April 2023 (UTC) | |||
:::The evidence is in the template code, as far as I can tell: | |||
<pre> | |||
|encyclopedia=] | |||
|edition=online | |||
|publisher=Oxford University Press | |||
</pre> | |||
:::{{Cite ODNB|encyclopedia=Foo|title=Bar|edition=Baz}} | |||
:::<s>If I am wrong, as I often am, corrections are welcome.</s> I added an example above, and overriding appears to work fine. Magic. – ] (]) 11:35, 4 April 2023 (UTC) | |||
::::Excellent - that works well and I won't get pulled up on it during a source review. Thanks very much! - ] (]) 12:15, 4 April 2023 (UTC) | |||
== Template-protected edit request on 19 March 2024 == | |||
== Links broken? == | |||
{{edit template-protected|Template:Cite ODNB|answered=yes}} | |||
When I use the template it creates the text perfectly fine, as well as links to the ODNB's WP article and the library subscription page on the external ODNB site. But the main link just points to which brings up a 404 page on the DOI website. No matter what is in the template it still seems to point to this URL. (see ] for a recent example of usage). | |||
The template is invoked on ] itself with a harmless but unsightly warning about a missing title parameter. With {{Tag|includeonly|o}} inserted at the code start and {{Tag|includeonly|c}} before the {{Tag|noinclude|o}}, the warning should go away (similar to the code for ]). The full text of the template should read: | |||
<syntaxhighlight lang="text"> | |||
<includeonly>{{#invoke:template wrapper|{{#if:{{{_debug|}}}|list|wrap}}|_template=cite encyclopedia | |||
|_exclude=freearticle, id, _debug | |||
|_alias-map=accessdate:access-date,authorlink:author-link,origyear:orig-date | |||
|encyclopedia=] | |||
Any idea what might be wrong? or have I made an error in usage? The link for the particlar article should point to . ] (]) 13:34, 18 January 2011 (UTC) | |||
|edition=online | |||
|publisher=Oxford University Press | |||
|doi={{#if:{{{id|}}}|10.1093/ref:odnb/{{{id|}}}}} | |||
|doi-access={{#if:{{{doi|}}}{{{id|}}}|{{#if:{{{freearticle|}}}|free}}}} | |||
|url-access={{#if:{{{url|}}}|{{#if:{{{freearticle|}}}||subscription}}}} | |||
}}{{#if:{{{freearticle|}}}| | {{ODNBsub|sentence=yes}}}}<!-- | |||
-->{{main other|]}}<!-- | |||
-->{{#if:{{both|{{{id|}}}|{{{doi|}}}}}|]|<!-- id with doi | |||
--> {{#if:{{{id|}}}|]}}}}<!-- id without doi | |||
--></includeonly><noinclude> | |||
{{Documentation}} | |||
</noinclude> | |||
</syntaxhighlight> ] (]) 06:01, 19 March 2024 (UTC) | |||
:I think I'd prefer the warning stay rather than lose all the output of the template on the page. If you can suppress the warning on the template without hiding everything else, that would be okay — Martin <small>(] · ])</small> 09:09, 19 March 2024 (UTC) | |||
:You can't omit the names of the fields; I have fixed that example. ] (]) 13:40, 18 January 2011 (UTC) | |||
::{{done}}<!-- Template:ETp --> — with <syntaxhighlight lang=wikitext inline>{{Cite ODNB|title={{{title}}}}}</syntaxhighlight> added to the <code>noinclude</code> section to still show an indication of the output per MSGJ. ] ] 13:38, 19 March 2024 (UTC) | |||
:::Nice — Martin <small>(] · ])</small> 13:42, 19 March 2024 (UTC) | |||
== Date parameter == | |||
==Documentation== | |||
The documentation on this appears to be out of date as using the example it does not work. ] (]) 01:51, 22 February 2011 (UTC) | |||
In the process of building out ], I found that <code>date=</code> does not work. It is present in ], so I figured that it was at least at some point functional on this template. There appears to have been discussion on the ODNB template back in 2011 on this parameter, but I don't quite understand the content of that technical discussion. Is there a way to insert a date of publication for a particular entry from the ODNB? ~ ] (]) 17:41, 12 May 2024 (UTC) | |||
:I've partially fixed the documentation now. ] (]) 20:13, 22 February 2011 (UTC) | |||
:What do you mean by {{tq|does not work}}? Here is an example from the template's doc page to which I have added {{para|date|2024}} (a bogus date): | |||
::Thanks. I will look again at using it. ] (]) 21:33, 22 February 2011 (UTC) | |||
::<syntaxhighlight lang="wikitext" inline="1">{{Cite ODNB|doi=10.1093/ref:odnb/29986|title=Worsley, Sir Richard |date=2024}}</syntaxhighlight> | |||
:::{{Cite ODNB|doi=10.1093/ref:odnb/29986|title=Worsley, Sir Richard |date=2024}} | |||
:Clearly, the 2024 date is rendered in the citation which suggests that {{para|date}} does work. | |||
:—] (]) 18:28, 12 May 2024 (UTC) | |||
::Using the Feather Taverns petition reference on ], adding <code>date=2005</code> renders "(2005)" but, as visible in the preview window, also introduces some sort of issue resulting in the following notice displayed at the top of the page: | |||
::* Script warning: One or more <nowiki>{{cite encyclopedia}}</nowiki> templates have maintenance messages; messages may be hidden (help). | |||
::What might be the cause of this issue? ~ ] (]) 18:52, 12 May 2024 (UTC) | |||
:::This one? – 'Feathers tavern' not 'Feather Taverns'. I've added {{para|date|2005}}: | |||
::::<syntaxhighlight lang="wikitext" inline="1">{{cite ODNB|doi=10.1093/ref:odnb/93823|title=Feathers tavern petitioners|first=Grayson M.|last=Ditchfield|edition=online|date=2005|ref={{harvid|Ditchfield|2005}}}}</syntaxhighlight> | |||
:::::{{cite ODNB|doi=10.1093/ref:odnb/93823|title=Feathers tavern petitioners|first=Grayson M.|last=Ditchfield|edition=online|date=2005|ref={{harvid|Ditchfield|2005}}}} | |||
:::As written, that template adds the article to {{cl|CS1 maint: ref duplicates default}} because the value assigned to {{para|ref}} (a <code>CITEREF</code> anchor id) is the same as the <code>CITEREF</code> anchor id that ] created from {{para|last|Ditchfield}} and {{para|date|2005}} so {{para|ref}} is redundant and should be removed. | |||
:::Follow the help link from the preview message you quoted to learn how to make maintenance messaging visible. | |||
:::—] (]) 19:12, 12 May 2024 (UTC) | |||
::::Thank you, my issue is resolved. ~ ] (]) 21:28, 12 May 2024 (UTC) | |||
== |
== Co-authors == | ||
How do we fit author2 into this template? '''<span style="font-family:Trebuchet MS;">]]</span>''' 10:27, 14 September 2024 (UTC) | |||
I've raised some issues with this template at ]. To briefly summarise what I said there, I'd like to see this template actually crediting the authors of the articles cited (that would be ethical) and to end up with a format like that seen ]. Probably best discussed there, but if discussed here, please leave a note at the other discussion location as well. ] (]) 23:44, 13 October 2011 (UTC) | |||
:Have you tried typing? {{cite ODNB|title=Foo|last=Smith|first=Kate|last2=Brown|first2=Sam}} – ] (]) 10:58, 14 September 2024 (UTC) | |||
::Thank you. I'll try that. '''<span style="font-family:Trebuchet MS;">]]</span>''' 17:48, 14 September 2024 (UTC) | |||
Now in sandbox: | |||
'''ODNBweb''' | |||
{{pre2|<nowiki>{{ODNBweb |doi=10.1093/ref:odnb/34601 |last=Stocker |first=Mark |month=September |year=2004 | |||
|title=Louise, Princess, duchess of Argyll (1848–1939) |publisher=] |edition=online, January 2008 |accessdate=23 January 2008 |id=34601 |ref={{sfnRef|Stocker 2004, Louise, Princess, duchess of Argyll}}}}</nowiki>}} | |||
:{{ODNBweb |doi=10.1093/ref:odnb/34601 |last=Stocker |first=Mark |month=September |year=2004 | |||
|title=Louise, Princess, duchess of Argyll (1848–1939) |publisher=] |edition=online, January 2008 |accessdate=23 January 2008 |id=34601 |ref={{sfnRef|Stocker 2004, Louise, Princess, duchess of Argyll}}}} | |||
'''Cite doi''' | |||
{{pre2|<nowiki>{{Cite doi/10.1093.2Fref:odnb.2F34601}}</nowiki>}} | |||
:{{Cite doi/10.1093.2Fref:odnb.2F34601}} | |||
'''ODNBweb/sandbox''' | |||
{{pre2|<nowiki>{{ODNBweb/sandbox |doi=10.1093/ref:odnb/34601 |last=Stocker |first=Mark |month=September |year=2004 | |||
|title=Louise, Princess, duchess of Argyll (1848–1939) |publisher=] |edition=online, January 2008 |accessdate=23 January 2008 |id=34601 |ref={{sfnRef|Stocker 2004, Louise, Princess, duchess of Argyll}}}}</nowiki>}} | |||
:{{ODNBweb/sandbox |doi=10.1093/ref:odnb/34601 |last=Stocker |first=Mark |month=September |year=2004 | |||
|title=Louise, Princess, duchess of Argyll (1848–1939) |publisher=] |edition=online, January 2008 |accessdate=23 January 2008 |id=34601 |ref={{sfnRef|Stocker 2004, Louise, Princess, duchess of Argyll}}}} | |||
---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 09:39, 14 October 2011 (UTC) | |||
::Many thanks for that. I'm not quite sure how the bots that fill in citations work, but I assume the above would have to be filled in by hand rather than bots doing it? Back at the other discussion (that I linked above) you said that 'cite doi' draws on 'cite journal', and I pointed out that 'cite encyclopedia' fits better. Does the above incorporate 'cite encyclopedia', or is it a template purely designed to replicate the ODNB-preferred citation style, with the 'subscription needed' details added? The other issues that sometimes come up with citing to the ODNB: | |||
::*People outside the UK sometimes access library volumes of the 2004 print edition, citing page numbers. Can that be incorporated somehow, along with a courtesy link to the current online version of the article, though that may be less desirable as it may be different from the initially published 2004 version of any particular article (see below). Also, as this template is named "ODNBweb" it makes less sense to incorporate page numbers from the print edition (future updates are, I think, intended to be entirely online). | |||
::*The online entries are updated periodically (around three times a year, I think). This is not all the entries, but a rolling program of updates. Also, new entries are also added that were written after the 2004 edition. The online versions are the most current ones (though sometimes with no actual changes made, presumably the update is to tell the reader that the article was checked even if not updated), but links are also provided to the previous versions of the articles (a typical example would be an initial version in 2004, a new version in 2008, and the latest version in 2011). The point here is that the version accessed online may vary from the one initially cited. What is the best way to handle this, and is there a way to make it easy for editors to update to the latest version if they verify that it still supports the material cited? Also, the author citation may change as extensive revisions bring in the new author and co-credits them and the initial author. | |||
::Thanks for doing this, and I hope the above isn't too complicated to consider. ] (]) 07:04, 15 October 2011 (UTC) | |||
:* {{tl|Cite doi}} uses {{tl|cite journal}} which in turn uses {{tl|citation/core}}. The current {{tl|ODNBweb}} uses {{tl|citation}} which uses {{tl|citation/core}}. The sandbox version uses {{tl|citation/core}} directly. The key is that they all give the same output. I did class it as 'encyclopedia' so that will show up in metadata. | |||
:* There is no guarantee that the print and online versions are the same. You need to cite the version that you actually read. We could have a variant for the print version but it needs to be a separate citation. | |||
:* If the online version is updated, you will have to manually update the citation. Since this site requires a subscription, a bot cannot do the updates. | |||
:---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 11:39, 15 October 2011 (UTC) | |||
::Many thanks for explaining all that. That also answers my question about the hundreds of uses of the template, which would have to be manually updated. Though I think some of the data can be accessed without a subscription? i.e. There is a public page for each entry that doesn't require a subscription (you can see this by following the links above). Maybe you are only referring to the edition date as needed a manual update, but I think that public page has that information anyway - the distinction will be between the most up-to-date page (which the doi link will presumably take you to anyway, and the access date). Anyway, I'm very happy with the sandbox version you have produced here. If it goes live, I presume it won't break any existing use, but will allow for addition of more citation information. I would like to get more input before any switch, though, so will leave notes with the three editors who have edited it most. ] (]) 03:24, 16 October 2011 (UTC) | |||
:::Thank you for inviting me to this conversation. I have had a look quick at the template in the sandbox (]) and I think you may be making a mistake. My initial thoughts are that it would be better to call {{tl|cite encyclopedia}} from this template, otherwise AFAICT there is a large maintenance overhead. I am open persuasion that that is not so. -- ] (]) 06:15, 16 October 2011 (UTC) | |||
::::So future editors would find it easier to edit a template based on {{tl|cite encyclopedia}} (which calls {{tl|citation/core}}) than to edit a template based on {{tl|citation/core}} directly? ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 12:53, 16 October 2011 (UTC) | |||
If we could just go back a bit: some of the features requested actually exist in the current {{tl|ODNBweb}}, and have done so for some time? In particular authors, and access date. ] (]) 17:29, 16 October 2011 (UTC) | |||
:Hmm. Yes. The documentation never got updated (I've just tried to do this, but the parameters confuse me so I stopped). FWIW, I agree with PBS (and said so somewhere above and ) that cite encyclopedia makes more sense. However, it depends on whether you want to cite the ODNB using a hybrid Misplaced Pages style, or cite the ODNB using something closely approximating the style they suggest on their site. What are the main options here? ] (]) 17:34, 16 October 2011 (UTC) | |||
I am a bit confused. The sandbox version is using encyclopedia, it is just using it directly instead of using {{tl|cite encyclopedia}} as an intermediate template. Perhaps this will help: | |||
;Current :{{tl|ODNBweb}} → {{tl|citation}} → {{tl|citation/core}} | |||
;Sandbox :{{tl|ODNBweb}} → {{tl|citation/core}} | |||
;Discussed :{{tl|ODNBweb}} → {{tl|cite encyclopedia}} → {{tl|citation/core}} | |||
I can switch it to {{tl|cite encyclopedia}}, but the output will be exactly the same. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 18:12, 16 October 2011 (UTC) | |||
:I had a brief look at the code in ], and it might be confusing matters that you have 'Title=]' along with a title parameter being used for the article title. In contrast, those used to using ] will be familiar with using 'title' for the title of the article and 'encyclopedia' for the name of the encyclopedia. Is this a leftover from the way the template structures evolved separately and then merged later when citation/core was developed? (I do realise that as this is an ODNB-specific template, there is no real need to specify or have a named parameter for the name of the 'encyclopedia', other than for metadata purposes, but it might be causing some of the confusion here). ] (]) 22:47, 16 October 2011 (UTC) | |||
{{collapse top |How citation/core works}} | |||
I am splitting this so we don't get too off track. When you examine the markup for a template like this one or {{tl|cite encyclopedia}}, the parameters in upper case (for the most part) are from {{tl|citation/core}}. Lets examine some parameters: | |||
Here {{para|Title}} and {{para|title}} are separate parameters. Citation/code describes {{para|Title}}= Title, to be displayed in italics after {{para|IncludedWorkTitle}}. This is the title of the main work. | |||
;cite encyclopedia :<nowiki>|Title={{{encyclopedia|{{{title|}}}}}}</nowiki> | |||
::You can use either {{para|encyclopedia}} or {{para|title}} to feed into citation/code. (There is something odd about how cite encyclopedia uses this, but lets get past that for the moment). | |||
;ODNBweb/sandbox : <nowiki>| Title=]</nowiki> | |||
::And here the title is fixed to the ODNB. | |||
From citation/core: {{para|IncludedWorkTitle}} Specific title, to be displayed in quotation marks. This is the title of an included work, such as a chapter or encyclopedia entry. | |||
;cite encyclopedia :<nowiki>|IncludedWorkTitle = {{{title|{{{article|}}}}}}</nowiki> | |||
;ODNBweb/sandbox :<nowiki>| IncludedWorkTitle={{{title|{{{article|{{PAGENAME}}}}}}}}</nowiki> | |||
::Both use {{para|title}} or {{para|article}} to pass the entry; ODNBweb will use the page name by default. | |||
Now, lets compare three different templates: | |||
'''Cite doi''' (which uses cite journal) | |||
{{Cite doi/10.1093.2Fref:odnb.2F34601}} | |||
'''ODNBweb/sandbox''' | |||
{{ODNBweb/sandbox |doi=10.1093/ref:odnb/34601 |last=Stocker |first=Mark |month=September |year=2004 |title=Louise, Princess, duchess of Argyll (1848–1939) |publisher=] |edition=online, January 2008 |accessdate=23 January 2008 |id=34601 |ref={{sfnRef|Stocker 2004, Louise, Princess, duchess of Argyll}}}} | |||
'''cite encyclopedia''' | |||
{{cite encyclopedia |doi=10.1093/ref:odnb/34601 |last=Stocker |first=Mark |month=September |year=2004 |title=Louise, Princess, duchess of Argyll (1848–1939) |encyclopedia=] |publisher=] |edition=online, January 2008 |accessdate=23 January 2008 |url=http://dx.doi.org/10.1093/ref:odnb/34601 |ref={{sfnRef|Stocker 2004, Louise, Princess, duchess of Argyll}}}} | |||
{{collapse bottom}} | |||
Notice they all have the same outputs, except for the ODNBweb subscription notice. If you check the metadata, they will all be the same. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 23:20, 16 October 2011 (UTC) | |||
:Thank-you. That makes things a little bit clearer for me. I've also previewed the same thing using the ODNBweb template, to see the difference with what is currently available. I do still have questions about how current usage of the template would be updated and how future use would be handled, but I'll wait on that until we are all on the same page here and PBS and Charles have had a chance to reply. ] (]) 23:48, 16 October 2011 (UTC) | |||
::I can hand write an output line to look just like the output of any of those templates. The trouble with that is when someone changes the output look of the template, if my line is to remain looking the same as those that use the template, I have to redo the output line (and I will have to do that every time the template is altered). In my opinion this template should end up looking like {{tl|cite encyclopedia}} (and tacking on the subscription bit at the end). All this template should be doing is filling in some of the fields for the person who would otherwise use {{tl|cite encyclopedia}}. If it calls {{tl|cite encyclopedia}} then maintenance is simplified. If it mimics/duplicates the internal workings of {{tl|cite encyclopedia}} then one is doubling up the maintenance effort required because any change to {{tl|cite encyclopedia}} has to be replicated here. Now in the short term that may be acceptable, but it is an unnecessary burden to place on future editors if we can design the interface in such a way that much of the maintenance is automatic. -- ] (]) 01:46, 17 October 2011 (UTC) | |||
:::Updated to {{tl|cite encyclopedia}} with no change in visual or metadata output. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 07:53, 17 October 2011 (UTC) | |||
::::If that has been resolved, could we discuss how existing uses of this template could be updated with extra citation information? And what about other citations to this publication done by hand? I was reading ] today, and that is a good example of the citation filled out by hand in a way that is almost (but not quite) like the way you did above. Is that a different style, or the same style but with bits missing? ] (]) 00:44, 19 October 2011 (UTC) | |||
:::::What extra fields are required? | |||
:::::That article uses a mix of standard ] and ] with a mix of manual citations and ]. For example: | |||
::::::{{pre2|<nowiki><ref name=DNB>Lovatt "" ''Oxford Dictionary of National Biography''</ref></nowiki>}} | |||
::::::{{pre2|<nowiki>{{cite encyclopedia |author=Lovatt, Marie |title=Geoffrey (1151?–1212)|encyclopedia=Oxford Dictionary of National Biography |publisher= Oxford University Press |year= 2004 |url=http://www.oxforddnb.com/view/article/10535 |edition= October 2007 revised |accessdate= 12 November 2007 |doi= 10.1093/ref:odnb/10535 |format= {{ODNBsub}} }}</nowiki>}} | |||
:::::So, it could use some cleanup there. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 01:30, 19 October 2011 (UTC) | |||
::::::I wasn't saying extra fields are required, I was enquiring as to the best way to add (e.g. author information) to existing uses of this template. For example: ], ], ]. In practice, how would the extra citation information (where it is missing) be added to those uses of this template, if your sandbox was implemented? ] (]) 01:44, 19 October 2011 (UTC) | |||
:::::::You would have to manually update these entries. You can look at getting a bot to do this, but that isn't one of my skills. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 12:00, 19 October 2011 (UTC) | |||
Looking at what is in the sandbox and I assume that is the code we are discussing. If so there are two settings for "|ref=". It seems to me that a lot of the code can be removed. I do not see the reason for the year complications or the date stuff. Why not just pass those complications on to encyclopedia to sort out? | |||
On that note to protect this template from causing problems due to bugs in the encyclopedia template (it does not handle the difference between null and empty parameters very well) you might like to consider setting parameters like this fragment of code: | |||
<nowiki> <!--Test below stops the setting of an empty named</nowiki> | |||
<nowiki> parameter not explicitly passed into this template--></nowiki> | |||
<nowiki> |{{#if:{{{year|}}} |year |HIDE_PARAMETER}}={{{year|}}}</nowiki> | |||
<nowiki> |{{#if:{{{date|}}} |date |HIDE_PARAMETER}}={{{date|}}}</nowiki> | |||
--] (]) 05:10, 19 October 2011 (UTC) | |||
::Thanks for catching that; markup now cleaned up. I don't understand the issue with null/empty; please provide an example. Is there someplace where your sample markup is used? Using a value like <nowiki>{{{year|}}}</nowiki> ensures that only a non-empty value is parsed. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 12:00, 19 October 2011 (UTC) | |||
{{od}} | |||
This was one that bit me earlier in the year. I was (still am?) setting up pairs of templates for PD sources. One is typically called <nowiki>{{Cite PDpedia}} and the other {{PDpedia}}</nowiki>. Usually <nowiki>{{Cite PDpedia}}</nowiki> is like this template and serves the same function see for example {{tl|cite EB1911}} they both add hidden categories for maintenance. The "cite" template of the two would work as expected but when called via another template would fail in what was for me at the time unexpected ways. | |||
{{collapse top|A demonstration}} | |||
This can be demonstrated using {{cite encyclopedia}} which has this "feature" in its design. If you create a test template in a sandbox in your user area eg ] and put in some code like this: | |||
<nowiki>{{cite encyclopedia </nowiki> | |||
<nowiki>|title= {{{title|}}}</nowiki> | |||
<nowiki>|encyclopedia=PD Old</nowiki> | |||
<nowiki>|last= {{{last|}}}</nowiki> | |||
<nowiki>|author= {{{author|}}}</nowiki> | |||
<nowiki>}}</nowiki> | |||
Now for some some tests: First using the parameter "last": | |||
<nowiki>{{User: Gadget850/test|last=ASMITH|title=An article}}</nowiki> | |||
<nowiki>{{cite encyclopedia|last=BSMITH|title=An article|encyclopedia=PD Old}}</nowiki> | |||
The code works as expected. Now for some tests using the parameter "author": | |||
<nowiki>{{User: Gadget850/test|author=CSMITH|title=an article}}</nowiki> | |||
<nowiki>{{cite encyclopedia|author=DSMITH|title=A title|encyclopedia=PD Old}}</nowiki> | |||
The author parameter value "CSMITH" is missing from test output but DSMITH is present in encyclopedia output. Why? Because in test we are passing in "last=" as an empty string (thanks to the line in the "user/test" template "<nowiki>|last= {{{last|}}}</nowiki>"). The problem lies in the mal-formed line in {{tl|cite encyclopedia}} that does not test the parameter "last" to see if it is empty it only tests to see if it exists. If it exists then it uses it (even though it is empty) and ignore the rest of the line so the output generated by test calling encycloped is that of last="" rather than author="CSMITH". | |||
{{collapse bottom}} | |||
At the time (last March) I was baffled and had to ask a question at ] where some patient people explained the error of my ways. Once I knew what to look for I came across this: | |||
*] (it includes in "see also" ]) | |||
Which explain it. | |||
The point I was making is that it is probably not a good idea to pass in parameters from one template to another that are not set by application page, because even if the template that is called (in this case {{tl|cite encyclopedia}} works as expected today when called from a wrapper template (this one), it may not work properly tomorrow. The reason I highlighted "year=" and "date=" is because they are used by {{tl|harv}} and if date= is present, year= is not displayed, but if year= is present then {{tl|harv}} uses its value even if date= is set. So to avoid possible unforeseen consequences, it is probably best not to set either to blank in this wrapper template if the application page using it does not explicitly set them. -- ] (]) 23:11, 20 October 2011 (UTC) | |||
::I still don't see it. If this were an issue, it would be well known and documented. I have dealt with many templates and never seen where a null value is passed as you describe. See the samples in ] using {{tl|ODNBweb/sandbox}}. The first includes all parameters with no values, the second fills all values. Looking at the HTML output, the first does not include any of the undefined values in either the regular HTML nor the COinS metadata. | |||
:::I suggest you try the code I placed above. -- ] (]) 10:33, 21 October 2011 (UTC) | |||
::The third uses date and year and produces the expected harv ref, as does the fourth using only the year. You are welcome to add an example illustrating the issues, especially if you can illustrate how {{tl|ODNBweb/sandbox}} fails in either manner. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 00:45, 21 October 2011 (UTC) | |||
:::{{tl|citation/core}} uses Year else Date else nothing, so if you provide both only year is parsed for the ref id. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 03:51, 21 October 2011 (UTC) | |||
::::I suggested that you created the template and try the above because it would become self evident. | |||
{{collapse top|examples}} | |||
::::The reason why the template {{tl|ODNBweb/sandbox}} works as expected is because you have lifted some of the logic out of {{tl|cite encyclopedia}} for example you have to near replicate the the line | |||
::::*<nowiki>| last={{{last|{{{last1|{{{author|{{{author1|{{{authors|}}}}}}}}}}}}}}}</nowiki> | |||
::::*<nowiki>|Surname1 = {{{last|{{{surname|{{{last1|{{{surname1|{{{author1|{{{author|{{{authors|}}}}}}}}}}}}}}}}}}}}}</nowiki> | |||
::::But to do that you have to go and look into the workings of encyclopedia and duplicate the logic found there, and if someone writes a template that calls {{tl|ODNBweb/sandbox}} if they use the same method they will have to duplicate the same logic or it will fail. So one is then left with the problem that when the logic is changed low down chain, all the calling templates in the stack also have to be changed to remain compatible. If someone does not look at the logic of the underlying template and replicate it (or "fix" it in another way) and implements as simple template to call another (which is the reasonable thing to do) then it fails because with no knowledge of the inner workings of {{tl|ODNBweb/sandbox}} it can not work: | |||
<nowiki>{{ODNBweb/sandbox </nowiki> | |||
<nowiki> |last= {{{last|}}}</nowiki> | |||
<nowiki> |author= {{{author|}}}</nowiki> | |||
<nowiki>}}</nowiki> | |||
::::I have placed it in <s>]</s><small>struck out as I may alter the content of the template ] (]) 08:50, 24 November 2011 (UTC)</small> . I am calling it twice once with last=LAST and then again with author=AUTHOR. The second time around it fails to work as expected because although no value is passed into last=, last is initiated in test3, so the logic in ODNBweb/sandbox passes on an empty setting of last="" to {{tl|cite encyclopedia}] and never gets to test if author has a value. | |||
:::*<s>{{user:Philip Baird Shearer/test35|last=LAST}}</s><small>struck out as I may alter the content of the template ] (]) 08:50, 24 November 2011 (UTC)</small> | |||
:::*<s>{{user:Philip Baird Shearer/test35|author=AUTHOR}}</s><small>struck out as I may alter the content of the template ] (]) 08:50, 24 November 2011 (UTC)</small> | |||
:::If the line in the test template | |||
<nowiki>|last= {{{last|}}}</nowiki> | |||
:::is replaced with (see <s>]</s><small>struck out as I may alter the content of the template ] (]) 08:50, 24 November 2011 (UTC)</small>) | |||
<nowiki>|{{#if:{{{last|}}} |last |HIDE_PARAMETER}}={{{last|}}}</nowiki> | |||
:::etc. The the template work like one would expect: | |||
:::*<s>{{user:Philip Baird Shearer/test45|last=LAST}}</s><small>struck out as I may alter the content of the template ] (]) 08:50, 24 November 2011 (UTC)</small> | |||
:::*<s>{{user:Philip Baird Shearer/test45|author=AUTHOR}}</s><small>struck out as I may alter the content of the template ] (]) 08:50, 24 November 2011 (UTC)</small> | |||
{{collapse bottom}} | |||
:::: -- ] (]) 10:33, 21 October 2011 (UTC) | |||
::::I am sure that there is something to this, but it is not an issue with these templates. I feel my work is done here, and I see no further issues. If you have fixes you wish to apply, then go ahead. Simply copy the sandbox to the current template when done. ---'''''— ]<span style="color:darkblue"> '''''</span><sup>]</sup> 12:09, 21 October 2011 (UTC) | |||
== Alternative sandbox implementation and changes == | |||
I reverted to the sandbox made on 26 October 2011. This revert changed underlying template back to {{tl|cite encyclopedia}} from | |||
{{tl|citation/core}}. | |||
I then added a new parameter "origyear=" because in many instances the original 2004 version has been updated since and the editors at the ODNB promise a rolling update of their articles. | |||
Having done that I put in a simple test into ]. Everything seemed to work as expected. But a lot more test cases are needed. | |||
Then I implemented a large change to the ]. As discussed in the previous section, I changed the way parameters were handled only passing on to {{tl|cite encyclopedia}} those parameters that are set by editors who places this template into an article. This means that there is no need to handle any interrelation between the parameters in this template unless they are none standard. This should reduce maintenance on this template. Two parameters are handled in a none standard way: | |||
*encyclopedia=] unless an override is set. | |||
*publisher=] uless an override is set. | |||
There are two none standard parameters "id" and "urlname" if either or both are set they set a value for | |||
*chapter-url=http://dx.doi.org/10.1093/ref:odnb/''id or urlname value'' | |||
Charles it was you who this logic, with | |||
<code><nowiki>contribution-url=http://www.oxforddnb.com/view/article/{{{id|{{{urlname|default}}}}}}.htm</nowiki></code> What was the idea behind the "default" part because as it was implemented in the sandbox before my change it defaulted to an error page, as does the page generated by the current production version . If however it is left out then the string would be and that url automatically redirects to the home page. So whichever version is implemented the "default" needs to be removed. In my most recent version I have not implemented the logic for always supplying a string to "chapter-url=". The reason for this, is that if one uses the "doi=" parameter then I see no reason to set the other. However if it is wanted it is not difficult to do particularly if we remove "urlname". As the "urlname" parameter as it is not documented I suggest we remove it. | |||
In the sandbox version I replaced there were three parameters not used by "cite encyclopedia": "author1link=" "author2link=" "author2link=" so IMO which ever version is implemented these can be removed. | |||
Both the sandbox version I have just overwritten and my current implementation does not include the string "on the website of the" is that a feature that is wanted? | |||
-- ] (]) 00:32, 6 November 2011 (UTC) | |||
:So what I did is mentioned on ] right at the end: I just copied in from what is now ] some relevant bits. I'm not really competent to enter these template discussions at a technical level. ] (]) 22:24, 13 November 2011 (UTC) | |||
::It is not so much the technical level but the look of it. Do we drop the "on the website of the" | |||
::I now know what the default is used for, in other templates. If it is set then it hides the real name behind a façade of whatever default=''name' is. ---] (]) | |||
:Judging by how the ODNB self-describes , it would be more accurate to say "in the online edition of the". ] (]) 16:13, 14 November 2011 (UTC) | |||
::I agree that "in the online edition of the" would be more accurate. And a brief aside to PBS: it is 'non-standard', not 'none-standard'. I was intending to use this template in an article, but as the year and publisher parameters don't seem to be working (I used them both but no output was produced), I've going to use 'cite encyclopedia' directly as in noe of the examples above. Hopefully someone can get this template to produce what is needed. Is it all in a sandbox at the moment? ] (]) 21:54, 22 January 2012 (UTC) |
Latest revision as of 14:04, 15 September 2024
This template does not require a rating on Misplaced Pages's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Archives (Index) |
This page is archived by ClueBot III. |
Author
Recent ODNB entries nomally have a named author. It would be good to add first and lastname parameters so that we can give proper attribution where it's due. MichaelMaggs (talk) 09:34, 8 December 2021 (UTC)
- From the template's documentation:
- This template supports all parameters that are supported by
{{cite encyclopedia}}
.
- This template supports all parameters that are supported by
- Can you show an example where
|authorn=
,|lastn=
,|firstn=
, etc do not work with{{cite ODNB}}
? - —Trappist the monk (talk) 12:22, 8 December 2021 (UTC)
- Ah, sorry, my mistake. I missed that. I read the documentation too quickly and just scanned the parameters that were specifically mentioned. MichaelMaggs (talk) 18:42, 8 December 2021 (UTC)
Overriding automatic links
The documentation states "Several parameters have pre-set defaults (but may be overridden)", but does not give any information on how to override, for example, the automatic link to Oxford Dictionary of National Biography. Could some let me now a. how to do this; and b. add this to the documentation so others can also do it. Many thanks - SchroCat (talk) 09:07, 3 April 2023 (UTC)
- The documentation was wrong about overriding. I have fixed it. – Jonesey95 (talk) 11:16, 3 April 2023 (UTC)
- OK, so can these be set so they can be overridden? At the moment I have a list of sources where no similar titles are linked, but there are four repeated links to the the ONDB. We need to be able to manage the output to some level if this template is to be used, or I will just go back to put everything in a different template so that the output can be managed appropriately. - SchroCat (talk) 11:37, 3 April 2023 (UTC)
The documentation was wrong about overriding.
Evidence to support that claim? Every parameter preset by this template should be overridable. If there are any that cannot be overridden, that should be fixed, not the documentation.- —Trappist the monk (talk) 12:40, 3 April 2023 (UTC)
- The evidence is in the template code, as far as I can tell:
|encyclopedia=] |edition=online |publisher=Oxford University Press
- "Bar". Foo (Baz ed.). Oxford University Press. (Subscription or UK public library membership required.)
If I am wrong, as I often am, corrections are welcome.I added an example above, and overriding appears to work fine. Magic. – Jonesey95 (talk) 11:35, 4 April 2023 (UTC)- Excellent - that works well and I won't get pulled up on it during a source review. Thanks very much! - SchroCat (talk) 12:15, 4 April 2023 (UTC)
Template-protected edit request on 19 March 2024
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The template is invoked on Template:Cite ODNB itself with a harmless but unsightly warning about a missing title parameter. With <includeonly>
inserted at the code start and </includeonly>
before the <noinclude>
, the warning should go away (similar to the code for Template:Cite OED). The full text of the template should read:
<includeonly>{{#invoke:template wrapper|{{#if:{{{_debug|}}}|list|wrap}}|_template=cite encyclopedia |_exclude=freearticle, id, _debug |_alias-map=accessdate:access-date,authorlink:author-link,origyear:orig-date |encyclopedia=] |edition=online |publisher=Oxford University Press |doi={{#if:{{{id|}}}|10.1093/ref:odnb/{{{id|}}}}} |doi-access={{#if:{{{doi|}}}{{{id|}}}|{{#if:{{{freearticle|}}}|free}}}} |url-access={{#if:{{{url|}}}|{{#if:{{{freearticle|}}}||subscription}}}} }}{{#if:{{{freearticle|}}}| | {{ODNBsub|sentence=yes}}}}<!-- -->{{main other|]}}<!-- -->{{#if:{{both|{{{id|}}}|{{{doi|}}}}}|]|<!-- id with doi --> {{#if:{{{id|}}}|]}}}}<!-- id without doi --></includeonly><noinclude> {{Documentation}} </noinclude>
73.37.211.177 (talk) 06:01, 19 March 2024 (UTC)
- I think I'd prefer the warning stay rather than lose all the output of the template on the page. If you can suppress the warning on the template without hiding everything else, that would be okay — Martin (MSGJ · talk) 09:09, 19 March 2024 (UTC)
- Done — with
{{Cite ODNB|title={{{title}}}}}
added to thenoinclude
section to still show an indication of the output per MSGJ. SilverLocust 💬 13:38, 19 March 2024 (UTC)- Nice — Martin (MSGJ · talk) 13:42, 19 March 2024 (UTC)
- Done — with
Date parameter
In the process of building out Free and Candid Disquisitions, I found that date=
does not work. It is present in Template:Cite encyclopedia, so I figured that it was at least at some point functional on this template. There appears to have been discussion on the ODNB template back in 2011 on this parameter, but I don't quite understand the content of that technical discussion. Is there a way to insert a date of publication for a particular entry from the ODNB? ~ Pbritti (talk) 17:41, 12 May 2024 (UTC)
- What do you mean by
does not work
? Here is an example from the template's doc page to which I have added|date=2024
(a bogus date):{{Cite ODNB|doi=10.1093/ref:odnb/29986|title=Worsley, Sir Richard |date=2024}}
- "Worsley, Sir Richard". Oxford Dictionary of National Biography (online ed.). Oxford University Press. 2024. doi:10.1093/ref:odnb/29986. (Subscription or UK public library membership required.)
- Clearly, the 2024 date is rendered in the citation which suggests that
|date=
does work. - —Trappist the monk (talk) 18:28, 12 May 2024 (UTC)
- Using the Feather Taverns petition reference on Free and Candid Disquisitions, adding
date=2005
renders "(2005)" but, as visible in the preview window, also introduces some sort of issue resulting in the following notice displayed at the top of the page:- Script warning: One or more {{cite encyclopedia}} templates have maintenance messages; messages may be hidden (help).
- What might be the cause of this issue? ~ Pbritti (talk) 18:52, 12 May 2024 (UTC)
- This one? – 'Feathers tavern' not 'Feather Taverns'. I've added
|date=2005
:{{cite ODNB|doi=10.1093/ref:odnb/93823|title=Feathers tavern petitioners|first=Grayson M.|last=Ditchfield|edition=online|date=2005|ref={{harvid|Ditchfield|2005}}}}
- Ditchfield, Grayson M. (2005). "Feathers tavern petitioners". Oxford Dictionary of National Biography (online ed.). Oxford University Press. doi:10.1093/ref:odnb/93823.
{{cite encyclopedia}}
: CS1 maint: ref duplicates default (link) (Subscription or UK public library membership required.)
- Ditchfield, Grayson M. (2005). "Feathers tavern petitioners". Oxford Dictionary of National Biography (online ed.). Oxford University Press. doi:10.1093/ref:odnb/93823.
- As written, that template adds the article to Category:CS1 maint: ref duplicates default because the value assigned to
|ref=
(aCITEREF
anchor id) is the same as theCITEREF
anchor id that Module:Citation/CS1 created from|last=Ditchfield
and|date=2005
so|ref=
is redundant and should be removed. - Follow the help link from the preview message you quoted to learn how to make maintenance messaging visible.
- —Trappist the monk (talk) 19:12, 12 May 2024 (UTC)
- Thank you, my issue is resolved. ~ Pbritti (talk) 21:28, 12 May 2024 (UTC)
- This one? – 'Feathers tavern' not 'Feather Taverns'. I've added
- Using the Feather Taverns petition reference on Free and Candid Disquisitions, adding
Co-authors
How do we fit author2 into this template? Tim riley talk 10:27, 14 September 2024 (UTC)
- Have you tried typing? Smith, Kate; Brown, Sam. "Foo". Oxford Dictionary of National Biography (online ed.). Oxford University Press. (Subscription or UK public library membership required.) – Jonesey95 (talk) 10:58, 14 September 2024 (UTC)
- Thank you. I'll try that. Tim riley talk 17:48, 14 September 2024 (UTC)