Module:Infobox/Notes de jeu vidéo
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 Notes de jeu vidéo.
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.
-- Module:Infobox/Notes de jeu vidéo
local generic = require("Module:Infobox/Fonctions")
-- local wikidatamodule = require("Module:Wikidata") -- si besoin pour Wikidata
local function parseNote(paramName)
-- exemple simple : si c'est "X/10" et X >= 8 => vert, etc.
return function(localdata)
local note = localdata[paramName]
if not note or note == '' or note == '-' then
return nil
end
local x, y = note:match("^(%d+)/(%d+)$")
if x and y then
local X = tonumber(x)
local Y = tonumber(y)
if X and Y and Y > 0 then
local ratio = X / Y
-- colorons la note
if ratio >= 0.8 then
return ('<span class="note-verte">%s</span>'):format(note)
elseif ratio >= 0.5 then
return ('<span class="note-orange">%s</span>'):format(note)
else
return ('<span class="note-rouge">%s</span>'):format(note)
end
end
end
-- Sinon, on ne modifie pas
return note
end
end
return {
maincolor = '#004080',
thirdcolor= 'white',
templatestyles = "Module:Infobox/Notes de jeu vidéo/styles.css",
class = "infobox-notes-jeu-video",
parts = {
{
type = 'title',
value = parseNote('titre'), -- => | titre= dans l’article
},
----------------------------------------------------------------------------
-- Agrégateurs de notes
----------------------------------------------------------------------------
{
type = 'table',
title = 'Agrégateur de note',
rows = {
----------------------------------------------------------------------------
-- En tête de colonne
----------------------------------------------------------------------------
{
type = 'subheader2col',
col1 = 'Média',
col2 = 'Note',
},
{
type = 'row',
label = '[[MetaCritic]] (US)',
value = parseNote('metacritic'),
},
{
type = 'row',
label = '[[OpenCritic]] (UK)',
value = parseNote('opencritic'),
},
{
type = 'row',
label = '[[GameRankings]]',
value = parseNote('gamerankings'),
},
{
type = 'row',
label = '[[MobyGames]]',
value = parseNote('mobygames'),
},
},
},
----------------------------------------------------------------------------
-- Presse Papier
----------------------------------------------------------------------------
{
type = 'table',
title = 'Presse papier',
rows = {
----------------------------------------------------------------------------
-- En tête de colonne
----------------------------------------------------------------------------
{
type = 'subheader2col',
col1 = 'Média',
col2 = 'Note',
},
{
type = 'row',
label = '[[EGM]] (US)',
value = parseNote('egm'),
},
{
type = 'row',
label = '[[PC Gamer]] (UK)',
value = parseNote('pcgamer'),
},
{
type = 'row',
label = '[[Am-Mag]] (FR)',
value = parseNote('ammag'),
},
{
type = 'row',
label = '[[Edge (magazine)|Edge]] (UK)',
value = parseNote('edge'),
},
{
type = 'row',
label = '[[CGMagazine]] (CA)',
value = parseNote('cgmagazine'),
},
{
type = 'row',
label = '[[Amstrad PC (magazine)|Amstrad PC]] (FR)',
value = parseNote('amstradpc'),
},
{
type = 'row',
label = '[[PlayStation Magazine]] (FR)',
value = parseNote('playstationmagazine'),
},
{
type = 'row',
label = '[[Joypad (magazine)|Joypad]] (FR)',
value = parseNote('joypad'),
},
{
type = 'row',
label = '[[Joystick (magazine)|Joystick]] (FR)',
value = parseNote('joystick'),
},
{
type = 'row',
label = '[[Official Xbox Magazine]] (US/UK/CA)',
value = parseNote('officialxboxmagazine'),
},
{
type = 'row',
label = '[[Official Nintendo Magazine]] (UK)',
value = parseNote('officialnintendomagazine'),
},
{
type = 'row',
label = '[[PC Jeux]] (FR)',
value = parseNote('pCjeux'),
},
{
type = 'row',
label = '[[ACE (magazine)|ACE]] (UK)',
value = parseNote('ace'),
},
{
type = 'row',
label = '[[Aktueller Software Markt]] (DE)',
value = parseNote('aktuellersoftwaremarkt'),
},
{
type = 'row',
label = '[[Amstar]] (FR)',
value = parseNote('amstar'),
},
{
type = 'row',
label = '[[Amstar & CPC]] (FR)',
value = parseNote('amstarcpc'),
},
{
type = 'row',
label = '[[Amstrad Action]] (UK)',
value = parseNote('amstradaction'),
},
{
type = 'row',
label = '[[Amstrad Cent pour cent]] (FR)',
value = parseNote('amstradcentpourcent'),
},
{
type = 'row',
label = '[[Amstradebdo]] (FR)',
value = parseNote('amstradebdo'),
},
{
type = 'row',
label = '[[Arcades Hebdo]] (FR)',
value = parseNote('arcadeshebdo'),
},
{
type = 'row',
label = '[[Atari ST User]] (UK)',
value = parseNote('ataristuser'),
},
{
type = 'row',
label = '[[Banzzai]] (IT)',
value = parseNote('banzzai'),
},
{
type = 'row',
label = '[[Canard PC]] (FR)',
value = parseNote('canardpc'),
},
{
type = 'row',
label = '[[CD Consoles]] (FR)',
value = parseNote('cdconsoles'),
},
{
type = 'row',
label = '[[Commodore Force]] (UK)',
value = parseNote('commodoreforce'),
},
{
type = 'row',
label = '[[Commodore Format]] (UK)',
value = parseNote('commodoreformat'),
},
{
type = 'row',
label = '[[Commodore User]] (UK)',
value = parseNote('commodoreuser'),
},
{
type = 'row',
label = '[[Computer Entertainer]] (US)',
value = parseNote('computerentertainer'),
},
{
type = 'row',
label = '[[Computer Games Magazine]] (US)',
value = parseNote('computergamesmag'),
},
{
type = 'row',
label = '[[Computer Gaming World]] (US)',
value = parseNote('computergamingworld'),
},
{
type = 'row',
label = '[[Consoles +]] (FR)',
value = parseNote('consolesplus'),
},
{
type = 'row',
label = '[[Crash (magazine)|Crash]] (UK)',
value = parseNote('crashmag'),
},
{
type = 'row',
label = '[[Computer and Video Games|CVG]] (UK)',
value = parseNote('cvg'),
},
{
type = 'row',
label = '[[Dragon Magazine]] (US)',
value = parseNote('dragonmag'),
},
{
type = 'row',
label = '[[Electronic Games]] (US)',
value = parseNote('electronicgames'),
},
{
type = 'row',
label = '[[Famitsu]] (ja)',
value = parseNote('famitsu'),
},
{
type = 'row',
label = '[[Game Informer]] (US)',
value = parseNote('gameinformer'),
},
{
type = 'row',
label = '[[Game Players]] (US)',
value = parseNote('gameplayers'),
},
{
type = 'row',
label = '[[GameFan]] (US)',
value = parseNote('gamefan'),
},
{
type = 'row',
label = '[[GameNow]] (US)',
value = parseNote('gamenow'),
},
{
type = 'row',
label = '[[GamePro]] (US)',
value = parseNote('gamepro'),
},
{
type = 'row',
label = '[[GamesTM]] (UK)',
value = parseNote('gamestm'),
},
{
type = 'row',
label = '[[Génération 4]] (FR)',
value = parseNote('generation4'),
},
{
type = 'row',
label = '[[Hardcore Gamer]] (US)',
value = parseNote('hardcoregamer'),
},
{
type = 'row',
label = '[[Jeux vidéo Magazine]] (FR)',
value = parseNote('jeuxvideomagazine'),
},
{
type = 'row',
label = '[[Mean Machines]] (UK)',
value = parseNote('meanmachines'),
},
{
type = 'row',
label = '[[Micro Kid\'s]] (FR)',
value = parseNote('microkids'),
},
{
type = 'row',
label = '[[Micro News]] (FR)',
value = parseNote('micronews'),
},
{
type = 'row',
label = '[[N64 Magazine]] (UK)',
value = parseNote('n64magazine'),
},
{
type = 'row',
label = '[[Next Generation (magazine)|Next Generation]] (US)',
value = parseNote('nextgeneration'),
},
{
type = 'row',
label = '[[NGC Magazine]] (UK)',
value = parseNote('ngcmagazine'),
},
{
type = 'row',
label = '[[Nintendo, le magazine officiel]] (FR)',
value = parseNote('nintendolemag'),
},
{
type = 'row',
label = '[[Nintendo Magazine System]] (UK)',
value = parseNote('nintendomagsystem'),
},
{
type = 'row',
label = '[[Nintendo Player]] (FR)',
value = parseNote('nintendoplayer'),
},
{
type = 'row',
label = '[[Nintendo Power]] (US)',
value = parseNote('nintendopower'),
},
{
type = 'row',
label = '[[PC Magazine]] (US)',
value = parseNote('pcmagazine'),
},
{
type = 'row',
label = '[[PC Zone]] (UK)',
value = parseNote('pczone'),
},
{
type = 'row',
label = '[[Player One]] (FR)',
value = parseNote('playerone'),
},
{
type = 'row',
label = '[[Playmag]] (FR)',
value = parseNote('playmag'),
},
{
type = 'row',
label = '[[Retro Gamer]] (UK)',
value = parseNote('retrogamer'),
},
{
type = 'row',
label = '[[Sega Pro]] (UK)',
value = parseNote('segapro'),
},
{
type = 'row',
label = '[[Sinclair User]] (UK)',
value = parseNote('sinclairuser'),
},
{
type = 'row',
label = '[[SNES Force]] (UK)',
value = parseNote('snesforce'),
},
{
type = 'row',
label = '[[ST Format]] (UK)',
value = parseNote('stformat'),
},
{
type = 'row',
label = '[[Super Play]] (UK)',
value = parseNote('superplay'),
},
{
type = 'row',
label = '[[Super Power (magazine)|Super Power]] (FR)',
value = parseNote('superpower'),
},
{
type = 'row',
label = '[[The Games Machine]] (UK)',
value = parseNote('thegamesmachine'),
},
{
type = 'row',
label = '[[The One (magazine)|The One]] (UK)',
value = parseNote('theone'),
},
{
type = 'row',
label = '[[Tilt (magazine)|Tilt]] (FR)',
value = parseNote('tilt'),
},
{
type = 'row',
label = '[[Total!]] (UK)',
value = parseNote('total'),
},
{
type = 'row',
label = '[[Ultimate Future Games]] (UK)',
value = parseNote('ultimatefuturegames'),
},
{
type = 'row',
label = '[[Ultra Player]] (en)',
value = parseNote('ultraplayer'),
},
{
type = 'row',
label = '[[VideoGames and Computer Entertainment]] (US)',
value = parseNote('videogamescomputent'),
},
{
type = 'row',
label = '[[VideoGames: The Ultimate Gaming Magazine]] (US)',
value = parseNote('videogamestugm'),
},
{
type = 'row',
label = '[[X64 (magazine)|X64]] (??)',
value = parseNote('x64mag'),
},
{
type = 'row',
label = '[[Your Sinclair]] (UK)',
value = parseNote('yoursinclair'),
},
{
type = 'row',
label = '[[Zzap!64]] (UK)',
value = parseNote('zzap64'),
},
},
},
----------------------------------------------------------------------------
-- Presse Numérique
----------------------------------------------------------------------------
{
type = 'table',
title = 'Presse numérique',
rows = {
----------------------------------------------------------------------------
-- En tête de colonne
----------------------------------------------------------------------------
{
type = 'subheader2col',
col1 = 'Média',
col2 = 'Note',
},
{
type = 'row',
label = '[[Eurogamer]] (UK)',
value = parseNote('eurogamer'),
},
{
type = 'row',
label = '[[Gamekult]] (FR)',
value = parseNote('gamekult'),
},
{
type = 'row',
label = '[[GamesRadar+]] (US)',
value = parseNote('gamesradar'),
},
{
type = 'row',
label = '[[Jeuxvideo.com]] (FR)',
value = parseNote('jeuxvideo.com'),
},
{
type = 'row',
label = '[[SensCritique]] (FR)',
value = parseNote('senscritic'),
},
{
type = 'row',
label = '[[GameSpot]] (US)',
value = parseNote('gamespot'),
},
{
type = 'row',
label = '[[Polygon (site web)|Polygon]] (US)',
value = parseNote('polygon'),
},
{
type = 'row',
label = '[[Kotaku]] (US)',
value = parseNote('kotaku'),
},
{
type = 'row',
label = '[[MGG (site web)|Millenium]] (FR)',
value = parseNote('millenium'),
},
{
type = 'row',
label = '[[JeuxActu]] (FR)',
value = parseNote('jeuxactu'),
},
{
type = 'row',
label = '[[GameHop]] (FR)',
value = parseNote('gamehop'),
},
{
type = 'row',
label = '[[Destructoid]] (US)',
value = parseNote('destructoid'),
},
{
type = 'row',
label = '[[Hardcore Gamer]] (US)',
value = parseNote('hardcoregamer'),
},
{
type = 'row',
label = '[[GameStar]] (DE)',
value = parseNote('gamestar'),
},
{
type = 'row',
label = '[[Famitsu]] (JA)',
value = parseNote('famitsu'),
},
{
type = 'row',
label = '[[Game Informer]] (US)',
value = parseNote('gameinformer'),
},
{
type = 'row',
label = '[[IGN (site web)|IGN]] (US)',
value = parseNote('ign'),
},
{
type = 'row',
label = '[[Gameblog]] (FR)',
value = parseNote('gameblog'),
},
{
type = 'row',
label = '[[Jeuxvideo.fr]] (FR)',
value = parseNote('jeuxvideo.fr'),
},
{
type = 'row',
label = '[[Internet Movie Database|IMDb]] (US)',
value = parseNote('imdb'),
},
{
type = 'row',
label = '[[TheSixthAxis]] (UK)',
value = parseNote('thesixthaxis'),
},
{
type = 'row',
label = '[[4Players]] (DE)',
value = parseNote('4players'),
},
{
type = 'row',
label = '[[1UP.com]] (US)',
value = parseNote('1upcom'),
},
{
type = 'row',
label = '[[Adventure Gamers]] (??)',
value = parseNote('adventuregamers'),
},
{
type = 'row',
label = '[[AllGame]] (US)',
value = parseNote('allgame'),
},
{
type = 'row',
label = '[[Electric Playground]] (??)',
value = parseNote('electricplayground'),
},
{
type = 'row',
label = '[[Engadget]] (US)',
value = parseNote('engadget'),
},
{
type = 'row',
label = '[[GameRevolution]] (US)',
value = parseNote('gamerevolution'),
},
{
type = 'row',
label = '[[GameSpy]] (US)',
value = parseNote('gamespy'),
},
{
type = 'row',
label = '[[GameTrailers]] (US)',
value = parseNote('gametrailers'),
},
{
type = 'row',
label = '[[Gamezebo]] (??)',
value = parseNote('gamezebo'),
},
{
type = 'row',
label = '[[GameZone]] (??)',
value = parseNote('gamezone'),
},
{
type = 'row',
label = '[[Giant Bomb]] (US)',
value = parseNote('giantbomb'),
},
{
type = 'row',
label = '[[Joystiq]] (US)',
value = parseNote('joystiq'),
},
{
type = 'row',
label = '[[KeenGamer]] (??)',
value = parseNote('keengamer'),
},
{
type = 'row',
label = '[[Nintendo Life]] (UK)',
value = parseNote('nintendolife'),
},
{
type = 'row',
label = '[[Pocket Gamer]] (??)',
value = parseNote('pocketgamer'),
},
{
type = 'row',
label = '[[TouchArcade]] (US)',
value = parseNote('toucharcade'),
},
{
type = 'row',
label = '[[GameRant]] (CA)',
value = parseNote('gamerant'),
},
{
type = 'row',
label = '[[PopMatters]] (US)',
value = parseNote('popmatters'),
},
{
type = 'row',
label = '[[NintendoWorldReport]] (US)',
value = parseNote('nintendoworldreport'),
},
{
type = 'row',
label = '[[CGMagazine]] (CA)',
value = parseNote('cgmagazine'),
},
{
type = 'row',
label = '[[USgamer]] (US)',
value = parseNote('usgamer'),
},
},
},
}
}