Page MenuHomePhabricator

[Story] create demo infoboxes
Open, HighPublic


We need a number of demo infoboxes to show how the property parser function and Lua can be used. We should have examples showing:

  • parameter-less template
  • using values from Wikidata only if no local value is available
  • showing data from Wikidata based on the type of reference it has on Wikidata
  • adding a page to categories based on checks against Wikidata

Event Timeline

Lydia_Pintscher raised the priority of this task from to Medium.
Lydia_Pintscher updated the task description. (Show Details)
Lydia_Pintscher changed Security from none to None.
Lydia_Pintscher added subscribers: Lydia_Pintscher, hoo.
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
JanZerebecki lowered the priority of this task from High to Medium.May 16 2015, 5:21 PM
Lydia_Pintscher raised the priority of this task from Medium to High.May 17 2015, 11:12 AM

Some examples already exists and they are some users who can write some infoboxes based on lua and using WD. But the main questions is to define good practice in coding and espacially to avoid bad codes (too long, too many requests,...)

Jonas renamed this task from create demo infoboxes to [Story] create demo infoboxes.Sep 10 2015, 7:34 PM

The Wikimedia-Hackathon-2016 starts tomorrow and this task is featured at T119703. We want to use T130776: Wikimedia Hackathon 2016 Opening Session to promote these projects and help recruiting volunteers to work for them.

If this task is ripe for hackathon work, please follow these instructions. If it is not ready, remove it from T119703 in order to avoid volunteers' frustration. Thank you!

Some of the rows in the infobox biography at nowiki has both use of the property parser function and of Lua modules. It also has a lot of discussions about how to use (and not use) Wikidata and why and how it should be filtered and so forth. There are more discussions about this at Tinget (Cathedral) and Torget (Bazaar), check out this link.

Typical problems are use of property parser function where a single claim is expected, but several are returned. Also some specific ordering are expected but the actual order is mangled. Some entries might also be assumed to be "wrong" in some way given a specific context. Often the user complaining has some expectation about the entry which is not fulfilled, usually because the person has done additional work (like being born, having kids, and behold having a dayjob) that comes as a surprise to the user.

@Lydia_Pintscher added a project: Epic Jun 23 2015, 17:43

Please either remove Epic (title mentions story) or remove Story and retitle to epic. Thanks.

Could be useful, here's the list of infoboxes using Wikidata on the French Wikipédia : Modèle d'infobox utilisant Wikidata (53 right now)

  • Most could be parameter-less template,
  • (I didn't check but they should) all use Wikidata only if there isn't a local value,
  • All have some check categories.

Will work on this on Wikimania 2016 Wednesday Hackathon (22. June). I would especially like to create some demo infoboxes for Wikisource.

Started here:

Work in progress and help wanted.

On English Wikipedia we have and as examples of using Lua to get values from Wikidata. Each of them deals with multiple values for a property reasonably well in most cases, particularly when the values represent items that are internally wiki-linked.

The Wikidata module contains calls for use in upgrading infoboxes where the absence of a locally-supplied value causes a value to be fetched from Wikidata ("opt-out")

The WikidataIB module is intended for use in upgrading infoboxes where consensus is that they should only fetch Wikidata once enabled in an article. The operate in conjunction with a whitelist and a blacklist of fields, editable on a per-article basis.

@Andrei_Stroe has done some tremendously useful things on the Romanian Wikipedia using wikidata and LUA

Thanks, @Strainu for the praise and for letting me know of this discussion.
By now, we have many infoboxes that have been refactored into working both in parameter-less mode, and with local override.

I had to heavily enhance in order to make it expose some functions that provide exactly what is needed in an infobox starting from an item, such as getOneValue (returns one value from those with the highest rank), getOneValueNoRef (same without reference), getValueListWithSeparator, getTimestampedValueListWithSeparator, getDateValue, getPreferredValue.

An example of infobox that uses these functions is

Other infoboxes were rewritten in LUA, such as and was rewritten in LUA as a basic infobox for biographies (and takes multiple biographical data from Wikidata, such as birth date and place, occupation etc.). It can, however, be extended into more specific biography infoboxes, both in LUA, such as for politicians and for actors; and with basic parameters, such as for painters and other visual artists.

I avoided creating infoboxes for use with Wikidata that are separate from those with specified parameters in order to push the move towards Wikidata. The only example of such infobox is (LUA-based, only works with Wikidata as a parameter-less infobox) that is different than (which still works with parameters only) - this is a complex infobox in a field of which I know little (biological taxonomy), so I wanted to avoid intruding in such an area.

I hope this is useful, just tag me if there is more I can do in this area.