Module:Infobox/Configs/Plugin
De Nefald
Autres actions
La documentation pour ce module peut être créée à Module:Infobox/Configs/Plugin/doc
local config = {
titre = function(args)
return args.nom or '{{PAGENAME}}'
end,
icone = {
type = 'fas',
nom = 'puzzle-piece'
},
image = function(args)
if args.image then
return {
nom = args.image,
taille = args.tailleimage or "280x200px",
legende = args.legende or args.nom or '{{PAGENAME}}'
}
end
return nil
end,
-- Configuration du champ "type" (utilisée par le Core)
typeField = {
required = true,
allowedValues = {
['économie'] = {
display = 'Économie',
category = 'Plugins d\'économie'
},
['pvp'] = {
display = 'PvP',
category = 'Plugins de PvP'
},
['roleplay'] = {
display = 'Roleplay',
category = 'Plugins de roleplay'
},
['administration'] = {
display = 'Administration',
category = 'Plugins d\'administration'
},
['protection'] = {
display = 'Protection',
category = 'Plugins de protection'
},
['cosmétique'] = {
display = 'Cosmétique',
category = 'Plugins cosmétiques'
},
['communication'] = {
display = 'Communication',
category = 'Plugins de communication'
},
['utilitaire'] = {
display = 'Utilitaire',
category = 'Plugins utilitaires'
},
['mini-jeu'] = {
display = 'Mini-jeu',
category = 'Plugins de mini-jeux'
},
['monde'] = {
display = 'Monde',
category = 'Plugins de monde'
},
['inventaire'] = {
display = 'Inventaire',
category = 'Plugins d\'inventaire'
},
['transport'] = {
display = 'Transport',
category = 'Plugins de transport'
},
['magie'] = {
display = 'Magie',
category = 'Plugins de magie'
},
['mob'] = {
display = 'Mob',
category = 'Plugins de mobs'
}
},
errorMessage = 'Type de plugin non reconnu. Types autorisés : économie, pvp, roleplay, administration, protection, cosmétique, communication, utilitaire, mini-jeu, monde, inventaire, transport, magie, mob'
},
sections = {
{
champs = {
{ cle = 'type', label = 'Type' },
{ cle = 'dev', label = 'Développeur' },
{ cle = 'status', label = 'Statut' },
{ cle = 'grade', label = 'Grade requis' }
}
},
{
titre = 'Téléchargements',
champs = {
{ cle = 'bukkit', label = 'Bukkit' },
{ cle = 'hangar', label = 'Hangar (PaperMC)' },
{ cle = 'modrinth', label = 'Modrinth' },
{ cle = 'builtbybit', label = 'BuiltByBit' },
{ cle = 'spigot', label = 'Spigot' },
{ cle = 'sources', label = 'Code source' }
}
},
{
titre = 'Compatibilité',
champs = {
{ cle = 'dépendance', label = 'Dépendances' },
{ cle = 'compatibilité', label = 'Compatible avec' }
}
}
}
}
return config