<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wicri-demo.istex.fr/Wicri/Informatique/fr/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox%2FFonctions</id>
	<title>Module:Infobox/Fonctions - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wicri-demo.istex.fr/Wicri/Informatique/fr/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox%2FFonctions"/>
	<link rel="alternate" type="text/html" href="https://wicri-demo.istex.fr/Wicri/Informatique/fr/index.php?title=Module:Infobox/Fonctions&amp;action=history"/>
	<updated>2026-04-27T01:01:46Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.31.10</generator>
	<entry>
		<id>https://wicri-demo.istex.fr/Wicri/Informatique/fr/index.php?title=Module:Infobox/Fonctions&amp;diff=2597&amp;oldid=prev</id>
		<title>imported&gt;Jacques Ducloy : Page créée avec « -- Fonctions communes à diverses infobox local localdata = require( 'Module:Infobox/Localdata' ) local wikidata = require( 'Module:Wikidata' ) local item = localdata.item... »</title>
		<link rel="alternate" type="text/html" href="https://wicri-demo.istex.fr/Wicri/Informatique/fr/index.php?title=Module:Infobox/Fonctions&amp;diff=2597&amp;oldid=prev"/>
		<updated>2019-06-06T16:50:15Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « -- Fonctions communes à diverses infobox local localdata = require( &amp;#039;Module:Infobox/Localdata&amp;#039; ) local wikidata = require( &amp;#039;Module:Wikidata&amp;#039; ) local item = localdata.item... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Fonctions communes à diverses infobox&lt;br /&gt;
local localdata = require( 'Module:Infobox/Localdata' )&lt;br /&gt;
local wikidata = require( 'Module:Wikidata' )&lt;br /&gt;
local item = localdata.item&lt;br /&gt;
local coordfunctions  -- = require 'Module:Infobox/Fonctions/Géolocalisation'&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.title(icon, style, subtitleparam, subtitlequery)&lt;br /&gt;
	return {&lt;br /&gt;
		type = 'title',&lt;br /&gt;
		value = function() &lt;br /&gt;
			return localdata['nom'] or localdata['association_nom'] or localdata['nom_think'] or localdata['acronymelaboratoire']&lt;br /&gt;
				or wikidata.getLabel(localdata.item) and mw.language.getContentLanguage():ucfirst( wikidata.getLabel(localdata.item) )&lt;br /&gt;
				or mw.title.getCurrentTitle().text&lt;br /&gt;
		end,&lt;br /&gt;
		subtitle = function() return localdata[subtitleparam] end,&lt;br /&gt;
		wikidatasubtitle = subtitlequery,&lt;br /&gt;
		icon = icon,&lt;br /&gt;
		style = style,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mainimage(args, defaultimage)&lt;br /&gt;
	if type( args ) ~= 'table' then&lt;br /&gt;
		args = { cat = args, defaultimage = defaultimage }&lt;br /&gt;
	end&lt;br /&gt;
	return {&lt;br /&gt;
		type = 'images',&lt;br /&gt;
		imageparameters =  {'image', 'photo'},&lt;br /&gt;
		defaultimages = args.defaultimage,&lt;br /&gt;
		defaultimagelink = 'Aide:Insérer une image',&lt;br /&gt;
		sizeparameter = 'taille image',&lt;br /&gt;
		uprightparameter = 'upright',&lt;br /&gt;
		defaultupright = args.upright,&lt;br /&gt;
		defaultsize = 	args.size,&lt;br /&gt;
		maintenancecat = args.cat or 'Article à illustrer',&lt;br /&gt;
		captionparameter = {'légende', 'légende image'},&lt;br /&gt;
		altparameter = args.altparameter or 'alternative image',&lt;br /&gt;
		defaultalt = args.alt,&lt;br /&gt;
		defaultimagealt = args.defaultimagealt,&lt;br /&gt;
		wikidata = args.wikidata or {property = {'P18'}},&lt;br /&gt;
		numval = 1,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.logo(upright)&lt;br /&gt;
	return {&lt;br /&gt;
		type = 'images',&lt;br /&gt;
		imageparameters =  {'logo', 'association_logo'},&lt;br /&gt;
	--	defaultimage = {},&lt;br /&gt;
	--	maintenancecat =&lt;br /&gt;
		captionparameter = 'légende logo',&lt;br /&gt;
		property = 'P154',&lt;br /&gt;
		defaultupright = upright or '0.6',&lt;br /&gt;
		uprightparameter = 'upright logo',&lt;br /&gt;
		sizeparameter = 'taille logo',&lt;br /&gt;
		numval = 1,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.blason(upright)&lt;br /&gt;
	return {&lt;br /&gt;
		type = 'images',&lt;br /&gt;
		imageparameters =  {'blason', 'sceau'},&lt;br /&gt;
	--	defaultimage = {},&lt;br /&gt;
	--	maintenancecat =&lt;br /&gt;
		captionparameter = {'légende blason', 'légende sceau'},&lt;br /&gt;
		property = {'P94', 'P158'},&lt;br /&gt;
		defaultupright = upright or '0.8',&lt;br /&gt;
		uprightparameter = {'upright blason', 'upright sceau'},&lt;br /&gt;
		sizeparameter = {'taille blason', 'taille sceau'},&lt;br /&gt;
		numval = 1,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.flag(upright, id)&lt;br /&gt;
	local drapeau = wikidata.formatStatements{entity = id, property = 'P163', defaultlink = '-'}&lt;br /&gt;
	return {&lt;br /&gt;
		type = 'images',&lt;br /&gt;
		imageparameters =  {'drapeau'},&lt;br /&gt;
	--	defaultimage = {},&lt;br /&gt;
	--	maintenancecat =&lt;br /&gt;
		captionparameter = drapeau or 'légende drapeau',&lt;br /&gt;
		property = 'P41',&lt;br /&gt;
		defaultupright = upright or '1',&lt;br /&gt;
		uprightparameter = 'upright drapeau',&lt;br /&gt;
		sizeparameter = 'taille drapeau',&lt;br /&gt;
		numval = 1,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.sign(upright)&lt;br /&gt;
	return {&lt;br /&gt;
		type = 'images',&lt;br /&gt;
		imageparameters =  {'signalisation'},&lt;br /&gt;
	--	defaultimage = {},&lt;br /&gt;
	--	maintenancecat =&lt;br /&gt;
		captionparameter = 'légende signalisation',&lt;br /&gt;
		property = 'P14',&lt;br /&gt;
		defaultupright = upright or '0.4',&lt;br /&gt;
		uprightparameter = 'upright signalisation',&lt;br /&gt;
		sizeparameter = 'taille signalisation',&lt;br /&gt;
		numval = 1,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.bathymetricmap(upright)&lt;br /&gt;
	return {&lt;br /&gt;
		type = 'images',&lt;br /&gt;
		imageparameters =  {'carte bathymétrique'},&lt;br /&gt;
	--	defaultimage = {},&lt;br /&gt;
	--	maintenancecat =&lt;br /&gt;
		captionparameter = 'légende carte bathymétrique',&lt;br /&gt;
		property = 'P207',&lt;br /&gt;
		defaultupright = upright or '1',&lt;br /&gt;
		uprightparameter = 'upright carte bathymétrique',&lt;br /&gt;
		sizeparameter = 'taille carte bathymétrique',&lt;br /&gt;
		numval = 1,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Liens externes&lt;br /&gt;
function p.website(localparam) -- texte libre [http://example.org example.org] ou url seule localparam est désigne le paramètre utilisé historiquement dans le modèle pour le site web (legacy)&lt;br /&gt;
	return { &lt;br /&gt;
		type = 'mixed',&lt;br /&gt;
		label = '[[Site web]]', &lt;br /&gt;
		plurallabel = '[[Site web|Sites web]]',&lt;br /&gt;
		wikidata = function()&lt;br /&gt;
				local values, num = wikidata.formatAndCat {&lt;br /&gt;
					entity = localdata.item,&lt;br /&gt;
					displayformat = 'weblink',&lt;br /&gt;
					conjtype = '&amp;lt;br /&amp;gt;',&lt;br /&gt;
					property = 'P856',&lt;br /&gt;
					isinlang = 'fr',&lt;br /&gt;
					rank = 'valid',&lt;br /&gt;
					excludespecial = true, -- excludespecial car il peut y avoir marqué &amp;quot;aucune valeur&amp;quot; pour le français, mais y avoir un site en anglais&lt;br /&gt;
					returnnumberofvalues = true,&lt;br /&gt;
				}&lt;br /&gt;
				if not values then&lt;br /&gt;
					values, num = wikidata.formatAndCat {&lt;br /&gt;
						entity = localdata.item,&lt;br /&gt;
						displayformat = 'weblink',&lt;br /&gt;
						conjtype = '&amp;lt;br /&amp;gt;',&lt;br /&gt;
						property = 'P856',&lt;br /&gt;
						showlang = true,&lt;br /&gt;
						excludespecial = true,&lt;br /&gt;
						returnnumberofvalues = true,&lt;br /&gt;
					}&lt;br /&gt;
				end&lt;br /&gt;
				return values, num&lt;br /&gt;
			end,&lt;br /&gt;
		value = &lt;br /&gt;
			function()&lt;br /&gt;
				local siteurl = localdata[localparam] or localdata['site web'] or localdata['site_web'] or localdata['site officiel'] or localdata['site internet'] or localdata['web']&lt;br /&gt;
				local sitename = localdata['nom site']&lt;br /&gt;
				if siteurl then&lt;br /&gt;
					if siteurl:find(&amp;quot;url&amp;quot;) then&lt;br /&gt;
					return siteurl&lt;br /&gt;
				else&lt;br /&gt;
					return require(&amp;quot;Module:Weblink&amp;quot;).makelink(siteurl, sitename)&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Son, prononciation&lt;br /&gt;
function p.selectSound(prop)&lt;br /&gt;
	-- priorité au français&lt;br /&gt;
	if wikidata.getClaims{entity = localdata.item, property = prop, qualifier = {'P407'}, qualifiervalue  = {'Q150'} } then&lt;br /&gt;
		return {property = prop, qualifier = {'P407'}, qualifiervalue  = {'Q150'} }&lt;br /&gt;
	end&lt;br /&gt;
	return {property = prop}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.prononciation()&lt;br /&gt;
	return {&lt;br /&gt;
		type		     = 'images',&lt;br /&gt;
		style            = {['padding-top'] = '25px'},&lt;br /&gt;
		defaultcaption   = 'Prononciation',&lt;br /&gt;
		captionparameter = 'légende prononciation',&lt;br /&gt;
		value		     = 'prononciation',&lt;br /&gt;
		defaultsize      = '280',&lt;br /&gt;
		wikidata         = p.selectSound('P443'),&lt;br /&gt;
		numval           = 1,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Fonctions de géolocalisation&lt;br /&gt;
function p.country(default)&lt;br /&gt;
	local coordfunctions = coordfunctions or require 'Module:Infobox/Fonctions/Géolocalisation'&lt;br /&gt;
	return coordfunctions.country(default)	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.geoloc(params)&lt;br /&gt;
	local coordfunctions = coordfunctions or require 'Module:Infobox/Fonctions/Géolocalisation'&lt;br /&gt;
	return coordfunctions.geoloc(params)	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.coordinates(params)&lt;br /&gt;
	local coordfunctions = coordfunctions or require 'Module:Infobox/Fonctions/Géolocalisation'&lt;br /&gt;
	return coordfunctions.coordinates(params)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.locationmap(params)&lt;br /&gt;
	local coordfunctions = coordfunctions or require 'Module:Infobox/Fonctions/Géolocalisation'&lt;br /&gt;
	return coordfunctions.locationmap(params)	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Jacques Ducloy</name></author>
		
	</entry>
</feed>