Template talk:PLANTS

(Redirected from Template talk:PLANTS/doc)
Latest comment: 1 year ago by AragonChristopherR17Z in topic Option for external link sections

Allow switching citation styles

edit

Please switch the citation template from {{cite web}} to {{citation}} and add the parameter | mode = {{{mode|CS1}}} to allow the citation mode to be changed, as is done in {{eFloras}}. I added |mode=cs2 to change this template to citation mode 2 in Helenium autumnale (which uses that citation style), so that it's ready when the feature is added. — Eru·tuon 03:07, 10 July 2018 (UTC)Reply

{{Cite web}} supports |mode=. I've enabled it here. — JJMC89(T·C) 04:31, 10 July 2018 (UTC)Reply
Oh, I didn't know that. Thank you! (Hmm, hadn't seen Module:Template wrapper before.) — Eru·tuon 05:31, 10 July 2018 (UTC)Reply

Version that uses Wikidata properties

edit

I've created a new version of the template in {{PLANTS/sandbox}}. I've tested it with Special:ExpandTemplates and I think it's ready now.

It uses the relevant Wikidata properties (USDA PLANTS ID and taxon name) if the parameters for these have not been given, so a bare template {{PLANTS}} will work in many cases. As for error categories, Articles using Template:PLANTS with missing parameters is added if both ID and taxon were not provided and one of them is absent on Wikidata, and Articles using Template:PLANTS with incorrect parameters is added if either the ID or the taxon is missing and the other parameter does not match the corresponding Wikidata property. For instance, putting {{PLANTS/sandbox|id=ANCA8}}, with the ID for Anemone canadensis, in the article on Sassafras would be flagged as incorrect. I'm not totally sure this is sufficient, but it is pretty good.

If there are no problems, could someone copy Template:PLANTS/sandbox to the main template? I can update the documentation once that is done. — Eru·tuon 20:29, 13 July 2018 (UTC) — Eru·tuon 20:29, 13 July 2018 (UTC)Reply

I have template-editor rights and will be happy to do this if there are no objections. Ping me in seven days to give page watchers time to respond. – Jonesey95 (talk) 22:00, 13 July 2018 (UTC)Reply

Adjust template's title= to match target <title>

edit

Please change the title output to more closely match the the page <title> at the USDA site. Change:

| title = ''{{{name|{{{taxon}}}}}}''

to

| title = Plants Profile for ''{{{name|{{{taxon}}}}}}''

To make an exact match of the <title> when using as a ref citation, editors should be using the full |taxon=Anthyllis vulneraria (common kidneyvetch) (whereas Anthyllis vulneraria uses only |taxon=Anthyllis vulneraria), but that's a matter of documentation (which I can adjust myself) and editor discipline (which I can't). Thanks, — JohnFromPinckney (talk) 11:16, 29 April 2021 (UTC)Reply

I don't accept that this is right. The value of a webpage's <title> tag often doesn't match the actual title as shown on the webpage, which is what we should be using. (As an example, the World Spider Catalog has "NMBE - World Spider Catalog" in the title tags for every webpage, for families, genera, species, statistics, etc., so it's useless as the title in a citation.) The page for Anthyllis vulneraria shows the page actually has a two-line title:
Anthyllis vulneraria L.
common kidneyvetch
which can't be displayed like this in a citation. I don't see the problem with using only the first line. The other problem with displaying something like "Anthyllis vulneraria L. | common kidneyvetch" is the current automatic italic formatting of the taxon name. The template could be altered to have two extra parameters, e.g. |auth= and |english=, so that the formatting could be applied only to the taxon name, I guess, but is it really worthwhile? I'm happy to add |auth= if others agree that it would be desirable. Peter coxhead (talk) 12:30, 29 April 2021 (UTC)Reply

None of these work anymore!

edit

Links using this template no longer work, as the database they link to has apparently moved to here: [1]. Can someone PLEASE fix this? - Sumanuil (talk) 00:07, 22 May 2021 (UTC)Reply

  Done after testing in the sandbox and on the testcases page. – Jonesey95 (talk) 02:19, 22 May 2021 (UTC)Reply

PLANTS template used for Sfn causes "Harv and Sfn no-target errors"

edit

The PLANTS template when used for shortened footnotes (Sfn) causes "Harv and Sfn no-target errors". I set a last name using the last parameter (also tried last1 and author1), and a date using the date parameter (also tried year). Then I used Sfn with the last name and the year. The error reads as follows in the Citation (Reflist) area:

| last = NRCS
| date = 2014


3. ^ NRCS 2014. sfn error: no target: CITEREFNRCS2014 (help)

I also tried using the | ref = parameter, setting the value with SfnRef template to try to make it work that way. Got the same error.

The Wikilinks are built properly (it appears) and clicking on the citation number in the prose as well as the Wikilink in the Citations area to get to the full reference both work.

Eewilson (talk) 01:17, 20 December 2021 (UTC)Reply

This is a false positive error message. A workaround to avoid it is to use the redirect {{Cite PLANTS}}, as shown in this edit. – Jonesey95 (talk) 05:26, 20 December 2021 (UTC)Reply
Thanks, Jonesey! Didn't know there was a Cite PLANTS. Got told about Cite eFloras earlier today and I've been cleaning up. Is there a Cite IPNI? It may have a similar problem. Eewilson (talk) 05:34, 20 December 2021 (UTC)Reply
There is now!Jonesey95 (talk) 05:55, 20 December 2021 (UTC)Reply
Yer the best!!! Hmmm... what about Michigan Flora? (See Symphyotrichum ciliolatum). And maybe no spaces in the first name initials... :) And Jepson eFlora (Symphyotrichum chilense)? (I'm finding a small list now that I turned on errors.) Eewilson (talk) 05:59, 20 December 2021 (UTC)Reply
Another one showing up is BSBI 2007. Don't know how important it is, or how I'd work around the notarget errors. Eewilson (talk) 06:03, 20 December 2021 (UTC)Reply
Jonesey95, I did all of these myself! :) There now exists workaround templates for Sfn citing as follows:
There are a couple of things a user has to do to make a couple of them work. Where should that be documented?
Additionally, in the Illinois Wildflowers code and the Michigan Flora code, I modified them to allow the ability to specify values with defaults as they were previously. It seemed to be necessary, as I was not able to set the values.
If or when I come upon more issues with no-target errors and citation templates, I will create the workaround redirects, and if that doesn't take care of the problem, I will contact you if that's okay. Eewilson (talk) 08:10, 20 December 2021 (UTC)Reply
Nicely done. Feel free to contact me or to post at Module talk:Footnotes, which is where these errors are discussed. – Jonesey95 (talk) 13:44, 20 December 2021 (UTC)Reply

PROTECTED EDIT REQUEST: Proposing changes from sandbox

edit

I've been working on some changes to the template which are in Template:PLANTS/sandbox, with test cases in Template:PLANTS/testcases. See https://plants.sc.egov.usda.gov/home/help for Citing the PLANTS Database. This change will cite the author, work, publisher, and location as requested on the PLANTS DB help page.

The change also will enable simple, consistent, and portable {{Sfn}} usage with a call such as {{Sfn|USDA, NRCS|2021}}. It will help editors who use shortened footnotes in that they will no longer need to set last1 and author-link1 (or related) every single time.

Here are the changes as well as some notes.

  • PLANTS currently sets the following:
| url       = https://plants.sc.egov.usda.gov/home/plantProfile?symbol={{Trim|{{{id|{{{symbol}}}}}}}}
| title     = ''{{{name|{{{taxon}}}}}}''
| publisher = [[Natural Resources Conservation Service]] PLANTS Database. [[United States Department of Agriculture|USDA]]
  • PLANTS/sandbox sets the following:
| last1      = ((USDA, NRCS))
| author-link1 = Natural Resources Conservation Service
| date      = {{{date|n.d.}}}
| url       = https://plants.sc.egov.usda.gov/home/plantProfile?symbol={{Trim|{{{id|{{{symbol|}}}}}}}}
| title     = ''{{{name|{{{taxon|{{{id|{{{symbol|Search}}}}}}}}}}}}''
| website   = The PLANTS Database (plants.usda.gov)
| publisher = National Plant Data Team
| location  = Greensboro, North Carolina
| language  = en

If date is not specified, it will default to n.d., which is logical, but a nice default could be to the year of the access-date/accessdate if that value is set, then to n.d. if none of the dates are set. To do all of that, I was calling {{YEAR}} to get the year from access-date or accessdate, which all worked quite well, until I added the n.d. default. Then I got lost in the braces and was getting an error, probably because I was sending a non-date value to YEAR without intending to. Not sure.

Additionally, can existing pages using the PLANTS template which create errors like the ones shown in the test cases for the sandbox be put in a maintenance category? Eewilson (talk) 05:26, 23 December 2021 (UTC)Reply

With no comments or objections received, I'll make the changes from the sandbox. If there are problems, we can revert or fix. There are many test cases. – Elizabeth (Eewilson) (tag or ping me) (talk) 01:21, 16 January 2022 (UTC)Reply
  Done.I'm curious about what the ((USDA, NRCS)) is for? — Martin (MSGJ · talk) 21:27, 27 January 2022 (UTC)Reply
Thank you! Late response here. USDA is the acronym for United States Department of Agriculture. NRCS is the acronym for Natural Resources Conservation Services, which is a subdivision of the USDA. The PLANTS website requests using USDA, NRCS as the author when citing from it. The double parentheses are to avoid an error that could be caused by the comma in the last1 field. You can see that this does not print. – Elizabeth (Eewilson) (tag or ping me) (talk) 15:57, 15 June 2022 (UTC)Reply

Which URL is the best?

edit

The both go to the PLANTS database. I think the second one is better. What do you think? (talk) 12:54, 15 June 2022 (UTC)Reply

I agree the second one is simpler. I also see that they both seem to give the same result. As long as it works, and it appears to, the second one would be fine. – Elizabeth (Eewilson) (tag or ping me) (talk) 16:02, 15 June 2022 (UTC)Reply
edit

Hello,

I'm wondering if it would be possible for someone set up an option for this template to be displayed for external link sections as opposed to just as a citation. An example of this is Template:Calflora which has the |link=1 parameter so that the template looks better in external link sections. Christopher Arturo Aragón Vides (talk) 07:24, 1 November 2023 (UTC)Reply