Template talk:Infobox drug
| Template:Infobox drug is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
| This is the talk page for discussing improvements to the Infobox drug template. |
|
| Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19Auto-archiving period: 3 months |
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
Infobox drug: Changes log
| ||
|---|---|---|
|
Edit request 28 February 2025
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change: Fix broken section link in documentation at top of page:
Diff:
| − | and for [[#Combination | + | and for [[#Combination of drugs (type=combo)]] |
AlyInWikiWonderland (talk, contribs) 00:35, 28 February 2025 (UTC)
Done, thanks! AlyInWikiWonderland: Template documentation is actually stored on a separate page, which is not protected. Therefore, in the future, you can make these types of edits yourself :) ⟲ Three Sixty! (talk, edits) 02:00, 28 February 2025 (UTC)
Error under "legal status"
[edit]I've noticed that under "legal status", the text "WARNING" is appearing before the drug's schedule. The text WARNING refers to a legal requirement of a black-box warning, which should be given lower priority than a drug's scheduling.
I can try fixing this in sandbox, but I just wanted to confirm that this is indeed an error before doing so.
Kieranvolbrecht (talk) 11:53, 25 March 2025 (UTC)
- @Kieranvolbrecht: I agree that this (badly) needs to be changed! Your strategy sounds good to me. Since the Infobox drug template page is currently template-protected, you'll need to get an administrator or a user with the template editor user right implement this change for you. The best way to do that would be by using the
{{Edit template-protected}}template on this talk page after you've finished fixing this in the sandbox. Garzfoth (talk) 23:07, 7 April 2025 (UTC)
Edit request 8 April 2025
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change:
Short summary description:
Fix the erroneous inclusion of the text "WARNING" prepended to the drug's schedule.
Full in-depth description:
The current template is causing the text "WARNING" to appear before the drug's schedule.
This behavior is only triggered for drugs which carry a boxed warning. However that fact is not clearly disclosed or readily apparent without examining the actual source code of this template.
Although the "WARNING" text does link to the boxed warning Wikipedia article and a reference to the FDA website page for boxed warnings is injected after the "WARNING" text, this still does not make it clear to the reader just exactly what the "WARNING" is about. The obvious inference would be that the text is a modifier to the legal status (which is completely and utterly false), or that this is an error (which is not entirely inaccurate).
Altering the output of the legal_US field in this way is needlessly confusing and substantially worsens the readability/legibility of the legal status section. This is not only due to the hijacking of this field for an unrelated purpose, but also due to the way in which the hijacking was done – specifically, the injected text is prepended to the actual value of the legal_US field. Changing to appending instead of prepending would be slightly less problematic from a readability standpoint, but this would not resolve any of the larger issues relating to this inappropriate hijacking of the legal status field for the display of an unrelated factoid.
Using the legal_US field for displaying this type of information is in fact inherently nonsensical, given that boxed warnings relate solely to drug labeling, and have absolutely zero bearing on or relation to a drug's legal status (which in the US is established primarily by the controlled substance act).
The legal_US field is a field with a very clearly and narrowly defined purpose – to communicate to the reader the legal status of the drug in the specified country.
As the presence or absence of a boxed warning in a drug's package insert has absolutely zero impact whatsoever on a drug's legal status, it is clearly inappropriate to hijack the legal status field in this way to insert what is in effect nothing more than a totally unrelated factoid.
Lastly, the way this was implemented does not respect the long-standing consensus regarding acceptable usage of Wikidata within Wikipedia, as there is no way to manually control or override this Wikidata-derived parameter locally without resorting to editing Wikidata directly. Did the consensus on acceptable usage of Wikidata change significantly recently? By my understanding, the current implementation is wildly out of line with the existing consensus, and would not be considered acceptable absent certain mitigating circumstances (none of which appear to apply here).
I propose to address all of the above issues by reverting the behavior of the legal_US parameter to its original form, as shown in the below diff.
Diff:
| − | + | |legal_US={{{legal_US|}}} |
Garzfoth (talk) 00:36, 8 April 2025 (UTC)
- Pinging Pppery, who added the warning in Special:Diff/1188836802 (based on Template talk:Infobox drug/Archive 19#Edit request 15 November 2023). --Ahecht (TALK
PAGE) 15:23, 21 April 2025 (UTC)- I don't have the motivation to look closely into this, other than to point out that that was done by the request of a now-indeffed user, but no objection to reverting that if another template editor thinks it's justified. * Pppery * it has begun... 15:24, 21 April 2025 (UTC)
- I don't think this information should be removed, but it might be a good idea to improve it. If you want to see what it looks like in practice, Fluoxetine has a boxed warning. This is country-specific information, and it's illegal to sell or market the drug without a boxed warning, so it's not unreasonable to flag this as part of the Legal status for the US.
- However, I wonder whether a bit of re-formatting would help. Maybe instead of "WARNING[1] Rx-only[2]", it should say "Rx-only[2] with a boxed warning[1]". WhatamIdoing (talk) 16:21, 21 April 2025 (UTC)
- Unfortunately, it would end up like "Rx-only with a boxed warning[1][2]" (with both/all references attached to the boxed warning). There is no way to make that happen without altering the whole template structure, and I don't think that's worth the downsides. By the way, as far as I see, the edit request also has valid motivations and consensus, so I'm inclined to accept it. Est. 2021 (talk · contribs) 16:42, 24 April 2025 (UTC)
- I don't think that would be a bad outcome, though I see you've already removed it. WhatamIdoing (talk) 18:48, 24 April 2025 (UTC)
- Unfortunately, it would end up like "Rx-only with a boxed warning[1][2]" (with both/all references attached to the boxed warning). There is no way to make that happen without altering the whole template structure, and I don't think that's worth the downsides. By the way, as far as I see, the edit request also has valid motivations and consensus, so I'm inclined to accept it. Est. 2021 (talk · contribs) 16:42, 24 April 2025 (UTC)
- I don't have the motivation to look closely into this, other than to point out that that was done by the request of a now-indeffed user, but no objection to reverting that if another template editor thinks it's justified. * Pppery * it has begun... 15:24, 21 April 2025 (UTC)
I agree that the warning should be removed. --Whywhenwhohow (talk) 00:19, 22 April 2025 (UTC)
- @Garzfoth and Whywhenwhohow:
Done. Est. 2021 (talk · contribs) 16:46, 24 April 2025 (UTC)
- @Garzfoth and Whywhenwhohow:
Parameter change
[edit]Could we change the parameters Uuo, Uup, Uus, and Uut to Og, Mc, Ts, and Nh (reflecting recent element name changes)? SeaDragon1 (talk) 15:01, 30 October 2025 (UTC)
Addiction liability
[edit]I don't believe this is a good parameter for an infobox given its not really a simple answer. This is probably the parameter I see modified/edit warred over the most. The parameter guideline is odd too, why should only opioids and benzodiazepines have this information? Traumnovelle (talk) 09:27, 21 October 2025 (UTC)
Edit request 27 October 2025 - proper header background color for both themes
[edit]| It is requested that an edit be made to the template-protected template at Template:Infobox drug. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · test cases · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the template's sandbox and test them thoroughly here before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
Description of suggested change:
Instead of using a hard-coded value for the headerstyle, we can use a variable. On top of that, we should add a !important, otherwise the dark theme of "Vector (2022)" overwrites the color.
I have a sandbox setup with the change: User:QuaTaC/Template:Infobox_drug/test
Diff: Special:Diff/1319111692/1319118548
QuaTaC (talk) 22:30, 27 October 2025 (UTC)
- New styling should be added to the stylesheet: Template:Infobox drug/styles.css. ⇌ Synpath 22:50, 27 October 2025 (UTC)
- I can get it working in Template:Infobox drug/styles.css only by hard coding the class names and use as much specificity as possible, but the issue with that is, if they change for whatever reason in the future, the style will break again. That's why I decided to use
headerstylesince it's the officially documented way of changing the header style for an infobox. - QuaTaC (talk) 19:13, 28 October 2025 (UTC)
- There is no danger of instability as the CSS classes are introduced by the underlying Module:Infobox. Just need to add the class parameter
bodyclass=ib-drug(long overdue) and then target.ib-drug .infobox-header {}in the stylesheet. Optionally, the!importantflag can be limited to only dark mode with a couple extra lines. Tweaking specificity nonwithstanding. Also, I can't find basically any documentation regarding inline styling being preferred. More the opposite. Inline styles are listed in the Module:infobox code as deprecated for instance. ⇌ Synpath 22:17, 29 October 2025 (UTC)
- There is no danger of instability as the CSS classes are introduced by the underlying Module:Infobox. Just need to add the class parameter
- I can get it working in Template:Infobox drug/styles.css only by hard coding the class names and use as much specificity as possible, but the issue with that is, if they change for whatever reason in the future, the style will break again. That's why I decided to use