Discussion module:Databox

Dernier commentaire : il y a 2 ans par Seudo dans le sujet Pourquoi ne pas afficher les images ?

New Swedish version

modifier

This nice module is currently under further development at Swedish Wikipedia. Recent versions of the Module code can be found at wikipedia:sv:Module:Databox and wikidata:Module:Databox/Sandbox. Feel free to copy it to this site.

For example, the new code can show several levels of parent and child objects as bullet lists, it may show numerical values, description, image caption and links to property names. It hides many properties not suitable for an encyclopedy, and can be adopted using several template parameters. Example infoboxes based both on the the old and the new code are shown side-by-side at wikidata:Template:Databox, but they can not show links to property names in local language since it is placed at wikidata.

Documentation in Swedish and improved template code can be found at wikipedia:sv:Template:Databox. The intention is to translate the documentation to English. Note that this template improves the layout in mobile view and places the coordinates in the top right corner of the desktop window. The template requires a css file and another module, but the Databox module still does not require any other module. Discussion in Swedish including a backlog/todolist can be found at wikipedia:sv:Malldiskussion:Databox. Tomastvivlaren (d) 1 juin 2020 à 12:30 (UTC)Répondre

Pourquoi ne pas afficher les images ?

modifier

Au lieu d’afficher les images, ce module affiche leur nom. Pourquoi ne pas modifier ainsi la ligne 65 :

propertyValue.value = propertyValue.value:gsub('%[%[([^%]|]*)%|[^%]]*%]%]', '[[%1|thumb|right]]')

Sans doute faudrait-il faire un test supplémentaire sur le média, pour ne faire ça que sur les images (voire sur l'image principale). Seudo (d) 9 mai 2022 à 17:14 (UTC)Répondre

Fait  . Au besoin on peut le modifier facilement (ex. réduire la taille si on la trouve trop grande). Seudo (d) 10 mai 2022 à 07:58 (UTC)Répondre
Revenir à la page « Databox ».