Template talk:Infobox drug
| Template:Infobox drug is permanently protected from editing as 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 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) 08:22, 11 December 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]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
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)- Just need to add the class parameter
bodyclass=ib-drug(long overdue) and then target.ib-drug .infobox-header {}in the stylesheet.
- Just need to add the class parameter
- What's the purpose of the
bodyclassin this case?- Also, I can't find basically any documentation regarding inline styling being preferred.
- Template:Infobox/doc#CSS_styling
- Also plenty of the examples in the documentation are using it.
- Inline styles are listed in the Module:infobox code as deprecated for instance.
- I see a comment here, but it's cryptic. Would be nice if there's clear information in Template:Infobox/doc regarding what's deprecated and what should actually be used and why.
- QuaTaC (talk) 22:53, 2 November 2025 (UTC)
- The bodyclass parameter adds the given text to the class attribute of the Infobox <table> element.
- WP:TemplateStyles doesn't state a preference for stylesheets over inline styling, but mw:Help:TemplateStyles lists convincing reasons to migrate styling out of Wikitext. So, I suppose my stance isn't supported by guidelines per se, but it makes the template easier to use and maintain. No real reason not to do it. ⇌ Synpath 01:52, 3 November 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
Not done for now—Please reactivate the request if and when consensus is reached. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:39, 8 December 2025 (UTC)
Peak effects field
[edit]Hello. I was wondering if we could consider adding a peak (i.e., time to peak effects) field to the pharmacokinetics section that can be used for relevant drug articles? Thinking mainly for psychoactive drug pages. This field would go along with the onset and duration fields and would be quite handy. I don't have template editor rights so I wouldn't be able to implement it myself and someone else would need to do so. – AlyInWikiWonderland (talk, contribs) 08:37, 3 November 2025 (UTC)
Edit request 8 December 2025
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Bioavailability needs to be disambiguated to Bioavailability (medicine). An editor moved the article, and now the base title is a disambiguation page. Natg 19 (talk) 20:24, 8 December 2025 (UTC)
Done DMacks (talk) 20:34, 8 December 2025 (UTC)
- @DMacks sorry, please revert the change. The article move was reverted per RMT. Natg 19 (talk) 20:56, 8 December 2025 (UTC)