Module:Infobox/Film
Apparence
[voir] [modifier] [historique] [purger]
Cette page définit un module d'infobox. Pour les conseils sur l'usage de ce module, voyez Modèle:Infobox Film.
La documentation de ce module est générée par le modèle {{Documentation module}}.
Elle est incluse depuis la page Modèle:Documentation module d'infobox. Veuillez placer les catégories sur cette page-là.
Les éditeurs peuvent travailler dans le bac à sable (créer).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.
local localdata = require 'Module:Infobox/Localdata'
local general = require "Module:Infobox/Fonctions"
local person = require "Module:Infobox/Fonctions/Personne"
local wikidata = require "Module:Wikidata"
local linguistic = require "Module:Linguistique"
local convert = require "Module:Conversion"
local function italics(query)
local val = wikidata.formatAndCat(query)
if val then
return '<i>' .. val .. '</i>'
end
end
return
{
maincolor = "09C8BD",
secondcolor = "5CF8F0",
parts =
{
general.title( "cinema"),
general.mainimage{
cat = "Article à illustrer Arts et culture",
defaultimage = "Defaut 2.svg",
wikidata = {property = {"P3383", "P2716", "P18", "P10"}, numval = 1}
},
{type = "table", title = "Informations générales", rows = {
{type = "row", label = "Type", value = "type" , plurallabel = "Types", wikidata = {property = 'P31' , excludevalues = "Q11424,Q24869"}},
{type = "row", label = "Titre original", value = "titre original", plurallabel = "Titres originaux" , wikidata = function ( item )
return italics({entity = item, property = 'P1476', conjtype = 'new line' , showlang = true })--trouver un moyen de retirer lorsque le titre original est en français
end
},
{type = "row", label = "Date de production", value = "date de production", plurallabel = "Dates de sortie" , wikidata = {property = 'P571' , sorttype = 'chronological' , numval = 1 }},
{type = "row", label = "Date de sortie", value = "date de sortie", plurallabel = "Dates de sortie" , wikidata = {property = 'P577' , conjtype = 'new line' , sorttype = 'chronological' , showqualifiers = 'P291,P276' }},
{type = "row", label = "Diffuseur", value = "diffuseur", plurallabel = "Diffuseurs" , property = 'P449'},
{type = "row", label = "Durée", value = "durée", plurallabel = "Durées" , wikidata = {property = 'P2047' , showunit = 'long' }},
{type = "row", label = "Langue", value = "langue originale" , plurallabel = "Langues", property = 'P364'},
{type = "row", label = "Genre", value = "genre" , plurallabel = "Genres", property = 'P136'},
{type = "row", label = "Format", value = "format" , plurallabel = "Formats", wikidata = {property = 'P462' , excludevalues = "Q22006653"}},
{type = "row", label = "Basé sur", value = "basé sur" , wikidata = function ( item )
return italics({entity = item, property = 'P144'})
end
},
{type = "row", label = "Sujet", value = "sujet" , plurallabel = 'Sujets', property = 'P921'},
{type = "row", label = "Pays", value = "pays d\'origine" , property = 'P495'}, -- ça serait bien d'afficher le drapeau avant le pays. Peut-être en pouvant mettre en forme la propriété ainsi : {{propriété}}.
{type = "row", label = "Lieu de tournage", value = "lieu de tournage" , plurallabel = 'lieux de tournage' , property = 'P915'},
--{type = "row", label = "Format", value = "format", plurallabel = "Formats" , property = 'P3803'}, plus détaillé que nécessaire pour l'infobox
general.website
}
},
{type = "table", title = "Équipe du film", rows = {
{type = "row", label = "Scénario", value = "scénario", property = 'P58'},
{type = "row", label = "Production", value = "production", property = 'P272,P162'},
{type = "row", label = "Production déléguée", value = "production déléguée", property = 'P1431'},
{type = "row", label = "Storyboard", value = "storyboard", property = 'P3275'},
{type = "row", label = "Décors", value = "décors", property = 'P2554'},
{type = "row", label = "Costumes", value = "costumes", property = 'P2515'},
{type = "row", label = "Réalisation", value = "réalisation", property = 'P57'},
{type = "row", label = "Photographie", value = "photographie", property = 'P344'},
{type = "row", label = "Distribution", value = "distribution", wikidata = {property = 'P161' , conjtype = 'new line' , numval = 10}}, --problématique. Il y a souvent plus de 10 valeurs et les 10 premières ne sont pas nécessairement représentatives du poids dans l'oeuvre. Il faudrait une fonction qui place les 5 premiers noms par ordre décroissant d'interwikis existants (le plus grand nombre d'interwikis = les plus gros noms = les principaux remarqués) et place le reste en liste déroulante semblable à celle des distinctions. )
{type = "row", label = "Musique", value = "musique", property = 'P86'},
{type = "row", label = "Montage", value = "montage", property = 'P1040'},
}
},
{type = "table", title = "Économie", rows = {
--{type = "row", label = "Visa d'exploitation", value = "visa d'exploitation", wikidata = {property = 'P2755', urlpattern="http://www.cnc.fr/web/fr/rechercher-une-oeuvre/-/visa/$1"}}, plus détaillé que nécessaire pour une infobox
{type = "row", label = "Coût", value = "coût" , plurallabel = "Coûts", property = 'P2130'},
{type = "row", label = "[[Box-office]]", value = "box-office" , wikidata = {property = 'P2142' , showunit = 'short'}},
person.awards(),
}
},
{type = "table", title = "Séquence", rows = {
{type = "row", label = "Série", value = "série", plurallabel = "Séries" , wikidata = function ( item )
return italics({entity = item, property = 'P179', conjtype = 'new line' , showlang = true })
end
},
{type = "row", label = "Précédé par" , value = "précédent" , wikidata = function ( item )
return italics({entity = item, property = 'P155', conjtype = 'new line' , showlang = true })
end
},
{type = "row", label = "Suivi par" , value = "suivant" ,wikidata = function ( item )
return italics({entity = item, property = 'P156', conjtype = 'new line' , showlang = true })
end
},
},
}
}
}