Module:Infobox/Extension

Version datée du 6 juin 2026 à 12:45 par Kims (discussion | contributions) (Page créée avec « local p = {} p.name = 'Extension' p.class = 'avt-infobox-extension' p.style = { ['width'] = '22em' } p.parts = { { type = 'title', value = 'nom', style = { ['background-color'] = '#3b1e08', ['color'] = '#ffd700' }, }, { type = 'images', imageparameters = { 'image' }, defaultupright = '1', }, { type = 'table', rows = { { type = 'row', label = 'État', value = function(localdata) return localdata['état']... »)
(diff) ← Version précédente | Version actuelle (diff) | Version suivante → (diff)

La documentation pour ce module peut être créée à Module:Infobox/Extension/doc

local p = {}

p.name  = 'Extension'
p.class = 'avt-infobox-extension'
p.style = { ['width'] = '22em' }

p.parts = {

	{
		type  = 'title',
		value = 'nom',
		style = { ['background-color'] = '#3b1e08', ['color'] = '#ffd700' },
	},

	{
		type            = 'images',
		imageparameters = { 'image' },
		defaultupright  = '1',
	},

	{
		type = 'table',
		rows = {
			{
				type  = 'row',
				label = 'État',
				value = function(localdata)
					return localdata['état'] or localdata['etat']
				end,
			},
			{
				type  = 'row',
				label = 'Type',
				value = function(localdata)
					local types = {}
					for i = 1, 15 do
						local t = localdata['type' .. i]
						if t then table.insert(types, t) else break end
					end
					if #types == 0 then return nil end
					return table.concat(types, ', ')
				end,
			},
			{
				type  = 'row',
				label = 'Hooks utilisés',
				value = function(localdata)
					local hooks = {}
					for i = 1, 30 do
						local h = localdata['hook' .. i]
						if h then table.insert(hooks, h) else break end
					end
					if #hooks == 0 then return nil end
					return '* ' .. table.concat(hooks, '\n* ')
				end,
			},
			{ type = 'row', label = 'Description',      value = 'description' },
			{ type = 'row', label = 'Auteur(s)',         value = 'auteur' },
			{ type = 'row', label = 'Dernière version',  value = 'dernière version' },
			{ type = 'row', label = 'Licence',           value = 'licence' },
			{ type = 'row', label = 'Téléchargement',    value = 'download' },
			{ type = 'row', label = 'MediaWiki',         value = 'mediawiki' },
			{ type = 'row', label = 'PHP',               value = 'php' },
			{ type = 'row', label = 'Exemple',           value = 'exemple' },
		},
	},
}

return p