Module talk:Databox
Better commented
Could the code please be better commented?
- The French comment should probably be translated to English,
-- On fait un hack pour générer une valeur par défaut pour la latitude et la longitude
- In this comment "Utlity" -> "Utility" and "buil" -> build
--Utlity function to buil maps
- In p.databox you lost me in the code after
property_blacklist_hash['P31'] = true
Empty cell if all values of a property are deprecated
@Tpt: All P361 statements on the Q153 item are deprecated, which produces the infobox on the right. To remove the useless empty row, I made a simple change to the module sandbox. Please consider adding this fix to the main module. --LennardHofmann (talk) 19:43, 6 April 2022 (UTC)
Map broken
The maps generated with <mapframe> currently seem to be broken. I think this is caused by a known issue with Kartotherian not accepting the auto-zoom parameter (https://phabricator.wikimedia.org/T305121). Lagewi (talk) 09:55, 19 June 2022 (UTC)
Map broken on KS Wiki
We have used this module to generate infoboxes on kswiki but the maps are broken which need to be fixed. Kindly fix them as soon as possible as it is used in many pages now. Thankyou. 511KeV (talk) 08:04, 29 June 2022 (UTC)
Coord translation
Hi @Tpt:,
Would it be possible to translate coordinates directions?
For instance on gd.wp (eg. gd:Turnberry) or br.wp (eg. br:Sagrada Família), it used the English "NSEW" where it should be respectively the Scottish Gaelic TDEI and the Breton NSKR (@Caoimhin: who pointed me to this problem). VIGNERON (talk) 14:57, 3 July 2022 (UTC)
- And the same problem on ga.wp (e.g. ga:An Spidéal), where it should be TDOI. Caoimhin (talk) 15:22, 3 July 2022 (UTC)
- Hi @VIGNERON:, @Caoimhin:. The Databox code relies on the Kartographer coordinates formatting code. The i18n message to edit on Translatewiki are
kartographer-coord-dms,kartographer-coord-lat-positive,kartographer-coord-lat-negative,kartographer-coord-lon-positive,kartographer-coord-lon-negative,kartographer-coord-combined. Tpt (talk) 13:34, 4 July 2022 (UTC)
Suggestion for more extensive version
A more extensive version of the Databox module is stored at the Swedish Wikipedia site, sv:Module:Databox, where it currently is utilized in 1778 articles. The documentation page is in Swedish, but the code is supposed to work on other wiki sites and in other languages. It is further developed, originally with the purpose to add features to Databox that also are provided by Template:Wikidata Infobox (which also is a generic infobox template, originally developed at commons, but is much more complicated since it depends on a huge amount of other modules and templates.). A lot of criticism was expressed at the Swedish Wikipedia during the years when the template was introduced, but many issues have been addressed by the revised code, and by do's and don'ts discussed in the documention. Some of the reasons that people prefer Databox over Wikidata Infobox at Swedish Wikipedia is that it does not show the words "Is instance of", that the layout is more similar to our other infobox templates, and that it allows the content to be adopted a little bit to the local language. Feel free to test it! Tomastvivlaren (talk) 10:28, 16 June 2023 (UTC)
- The extended version is also used at Danish Wikipedia (where you find a summary in Danish of the documentation) and at North Frisian Wikipedia. I don't know where to place the English translation of the documentation of the extended version.
- I really like the concept behind this module, and the idea that it does not depend on any other modules. A few years ago I made a couple of attempts to contact you user:Tpt and asked if I could extend the original version. I don't think I got any response, and now I do not find the discussion. I have uploaded the Lua code to Wikidata.org module:Databox/sandbox twice. See the initial version list in the Lua code for a list of added features.
- This version of the documentation page at Wikidata showed the result of the two module versions side-by-side, for a comparison, but was reverted. I am sorry if I did not verify sufficiently before doing that. Note that the extended version shows different content in different languages, for example based on property "short names" (short name (P1813)), and monolingual datatype text content and media that has caption or content in the current language of the user interface. The short names may have to be adjusted in your language, and media captions added. The code should work in every language, but may be fine-tuned to improve the hyphenation and with automatic categorization. Tomastvivlaren (talk) 14:20, 13 July 2023 (UTC)
How do we override the displayed name?
Not all wikis that use this are English. Is there an override to use the page name or a manual input? Kwamikagami (talk) 21:53, 2 April 2026 (UTC)
- Hello @Kwamikagami, do you have an example page/Wikidata item to show?
- When invoked on a local Wiki, databox will match the Label language output against the Wikidata item's entry...but if the entered label content/value is in English, then the output will be in English, often the case with proper Nouns. You can navigate to the Wikidata item and suggest/edit in your own translation for the specified language for Label, Description and aliases box. Best, --Danny Benjafield (WMDE) (talk) 09:23, 24 April 2026 (UTC)
- 3 weeks on, I don´t remember the specific example, but it was a minor wiki language that didn´t appear on Wikidata. In such cases we need to be able to override the English default, unless we want several hundred titles on Wikidata. Kwamikagami (talk) 10:12, 24 April 2026 (UTC)
- Thanks @Kwamikagami, ah like an incubator language, I see. Yes in that case some form of parameter override would be helpful. We are running a survey to collect feedback like this, if you have a few minutes it would be helpful for us to hear your thoughts, please consider taking it: Databox Survey 2026. Thanks, --Danny Benjafield (WMDE) (talk) 15:00, 28 April 2026 (UTC)
- Done. Kwamikagami (talk) 23:28, 28 April 2026 (UTC)
- Thanks @Kwamikagami, ah like an incubator language, I see. Yes in that case some form of parameter override would be helpful. We are running a survey to collect feedback like this, if you have a few minutes it would be helpful for us to hear your thoughts, please consider taking it: Databox Survey 2026. Thanks, --Danny Benjafield (WMDE) (talk) 15:00, 28 April 2026 (UTC)
- 3 weeks on, I don´t remember the specific example, but it was a minor wiki language that didn´t appear on Wikidata. In such cases we need to be able to override the English default, unless we want several hundred titles on Wikidata. Kwamikagami (talk) 10:12, 24 April 2026 (UTC)
Databox survey - share your thoughts about this Wikidata-powered infobox
Hello everyone, the Wikidata For Wikimedia Projects team worked on improving the Databox Template and Module earlier this year. We are now asking Wikimedians to answer a short survey about their experiences with Databox, and would appreciate your input.
The survey should take less than 10 minutes to answer.
Here is a link to the survey
Here you can find more information about the changes made to Databox.
For any questions, please feel free to contact me on my meta user talk page.
Thank you for your attention, Danny Benjafield (WMDE) (talk) 07:50, 24 April 2026 (UTC) on behalf of the Wikidata For Wikimedia Projects team.