For faster navigation, this Iframe is preloading the Wikiwand page for Module:Infobox/Jeu vidéo.

Module:Infobox/Jeu vidéo

 Documentation[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 Jeu vidéo.

local jeu = require "Module:Infobox/Fonctions"
local wd = require("Module:Wikidata")
local localdata = require("Module:Infobox/Localdata")

-- Fonction permettant d'afficher une boîte déroulante
local function collapsiblebox()
	-- affiche la boîte déroulante
	local function navframe()
		if localdata["date détail"] then
			return '<div class="NavFrame collapsed" style="border:none;padding:0;"><div class="NavHead" style="font-size:105%; text-align:left; background:transparent;">Sorties détaillées</div><div class="NavContent" style="font-size:105%; text-align:left;">' ..
				localdata["date détail"] .. "</div></div>"
		end
	end

	return {
		type = "row",
		value = navframe
	}
end
local detail = collapsiblebox()

-- Fonction permettant l'affichage de la partie succession
local function buildsuccession()
	localdata["précédent"] =
		localdata["précédent"] or wd.formatStatements {property = "P179", showonlyqualifier = "P155"}
	localdata["suivant"] = localdata["suivant"] or wd.formatStatements {property = "P179", showonlyqualifier = "P156"}
	localdata["franchise"] = localdata["franchise"] or wd.formatStatements {property = "P179"}
	-- Fonction permettant de définir le titre de la partie succession
	local function titre(a, b, c)
		if c and (a or b) then
			return "<i>" .. c .. "</i>"
		end
	end

	-- Fonction permettant l'affichage des articles de la partie succession
	local function succession(a, b, c, d)
		succession = {}
		if (a and b) then
			succession["before"] = "<i>" .. a .. "</i> ([[" .. b .. " en jeu vidéo|" .. b .. "]])"
		elseif a then
			succession["before"] = "<i>" .. a .. "</i>"
		end
		if (c and d) then
			succession["after"] = "<i>" .. c .. "</i> ([[" .. d .. " en jeu vidéo|" .. d .. "]])"
		elseif c then
			succession["after"] = "<i>" .. c .. "</i>"
		end
		return succession
	end

	if localdata["précédent"] or localdata["suivant"] then
		return {
			type = "table",
			separator = true,
			rows = {
				{type = "row1col", value = titre(localdata["précédent"], localdata["suivant"], localdata["franchise"])}
			}
		}, {
			type = "table",
			separator = true,
			rows = {
				{
					type = "succession",
					color = transparent,
					value = succession(
						localdata["précédent"],
						localdata["date précédent"],
						localdata["suivant"],
						localdata["date suivant"]
					)
				}
			}
		}
	end
end

return {
	maincolor = "#004080",
	parts = {
		{
			type = "title",
			value = "titre",
			icon = "jeuvideo",
			style = {["color"] = "white"},
			italic = function(localdata)
				return not localdata["titre en italique"]
			end,
			setdisplaytitle = function(localdata)
				return not localdata["titre en italique"]
			end
		},
		{
			type = "images",
			imageparameters = {"image", "logo"},
			captionparameter = "légende",
			sizeparameter = {"taille", "taille image", "taille logo"},
			altparameter = "alternative"
		},
		{
			type = "images",
			imageparameters = {"image2"},
			captionparameter = "légende2",
			sizeparameter = {"taille2", "taille image2"},
			altparameter = "alternative2"
		},
		{
			type = "table",
			separator = true,
			rows = {
				{
					type = "row",
					label = "[[Développeur de jeux vidéo|Développeur]]",
					value = "développeur",
					property = "P178"
				},
				{
					type = "row",
					label = "[[Éditeur de jeux vidéo|Éditeur]]",
					value = "éditeur",
					property = "P123"
				},
				{
					type = "row",
					label = "[[Liste des distributeurs de jeux vidéo|Distributeur]]",
					value = "distributeur"
				},
				{
					type = "row",
					label = "Réalisateur",
					value = {"directeur", "concepteur", "réalisateur"},
					property = "P57"
				},
				{
					type = "row",
					label = "[[Scénariste de jeux vidéo|Scénariste]]",
					value = "scénariste",
					property = "P58"
				},
				{
					type = "row",
					label = "[[Musique de jeu vidéo|Compositeur]]",
					value = {"compositeur", "musique"},
					property = "P86"
				},
				{
					type = "row",
					label = "[[Producteur de jeux vidéo|Producteur]]",
					value = "producteur",
					property = "P162"
				}
			}
		},
		{
			type = "table",
			separator = true,
			rows = {
				{
					type = "row",
					label = "Début du projet",
					value = "début du projet",
					property = "P571"
				},
				{
					type = "row",
					label = "[[Accès anticipé]]",
					value = "accès anticipé"
				},
				{
					type = "row",
					label = "Date de sortie",
					value = "date"
				}
			}
		},
		{
			type = "table",
			rows = {
				detail
			}
		},
		{
			type = "table",
			rows = {
				{
					type = "row",
					label = "Date de fin",
					value = "date de fin",
					property = "P2669"
				},
				{
					type = "row",
					label = "Franchise",
					value = function(localdata)
						if (localdata["franchise"] and (localdata["précédent"] or localdata["suivant"])) then
							return
						elseif localdata["franchise"] then
							return "<i>" .. localdata["franchise"] .. "</i>"
						end
					end
				},
				{
					type = "row",
					label = "[[Genre de jeu vidéo|Genre]]",
					value = "genre",
					property = "P136"
				},
				{
					type = "row",
					label = "[[Mode de jeu]]",
					value = "mode",
					property = "P404"
				},
				{
					type = "row",
					label = "[[Plate-forme (informatique)|Plate-forme]]",
					value = {"plateforme", "plate-forme"},
					property = "P400"
				}
			}
		},
		{
			type = "table",
			separator = true,
			rows = {
				{
					type = "row",
					label = "Langue",
					value = "langue",
					property = "P407"
				},
				{
					type = "row",
					label = "[[Moteur de jeu|Moteur]]",
					value = {"moteur de jeu", "moteur"},
					property = "P408"
				},
				{
					type = "row",
					label = "[[Version d’un logiciel|Version]]",
					value = "version",
					wikidata = {
						property = 'P348',
						rank = valid,
						showqualifiers = {'P577'}
					}
				}
			}
		},
		{
			type = "table",
			separator = true,
			rows = {
				{
					type = "row",
					label = "Ventes",
					value = "ventes",
					
				},
				{
					type = "row",
					label = "[[Système d'évaluation des jeux vidéo|Évaluation]]",
					value = "évaluation",
					property = "P908"
				},
				{
					type = "row",
					label = "Site web",
					value = "site web",
					property = "P856"
				}
			}
		},
		buildsuccession()
	}
}
{{bottomLinkPreText}} {{bottomLinkText}}
Module:Infobox/Jeu vidéo
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Wikiwand 2.0 is here 🎉! We've made some exciting updates - No worries, you can always revert later on