<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.noethoumy.fr/index.php?action=history&amp;feed=atom&amp;title=Module%3ASite_officiel</id>
	<title>Module:Site officiel - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.noethoumy.fr/index.php?action=history&amp;feed=atom&amp;title=Module%3ASite_officiel"/>
	<link rel="alternate" type="text/html" href="https://wiki.noethoumy.fr/index.php?title=Module:Site_officiel&amp;action=history"/>
	<updated>2026-04-27T18:15:06Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.noethoumy.fr/index.php?title=Module:Site_officiel&amp;diff=318&amp;oldid=prev</id>
		<title>Jaggerwock : Page créée avec « local Lien = { }  local Verif = require &quot;Module:Correction syntaxique&quot; local defaultLang = &#039;fr&#039;  local function caterreur(param) 	if mw.title.getCurrentTitle().namespace == 0 then 		return &#039;&#039; .. string.upper(param or &#039;?&#039;) .. &#039;&#039; 	else 		return &#039;&#039; 	end end  function Lien.siteOfficiel( frame ) 	local templateargs = frame:getParent().args 	local args = {} 	for k, v in pairs(templateargs) do 		if type(... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.noethoumy.fr/index.php?title=Module:Site_officiel&amp;diff=318&amp;oldid=prev"/>
		<updated>2024-09-20T14:10:55Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « local Lien = { }  local Verif = require &amp;quot;Module:Correction syntaxique&amp;quot; local defaultLang = &amp;#039;fr&amp;#039;  local function caterreur(param) 	if mw.title.getCurrentTitle().namespace == 0 then 		return &amp;#039;&lt;a href=&quot;/index.php?title=Cat%C3%A9gorie:Page_du_mod%C3%A8le_Site_officiel_comportant_une_erreur&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Catégorie:Page du modèle Site officiel comportant une erreur (page inexistante)&quot;&gt;&amp;#039; .. string.upper(param or &amp;#039;?&amp;#039;) .. &amp;#039;&lt;/a&gt;&amp;#039; 	else 		return &amp;#039;&amp;#039; 	end end  function Lien.siteOfficiel( frame ) 	local templateargs = frame:getParent().args 	local args = {} 	for k, v in pairs(templateargs) do 		if type(... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local Lien = { }&lt;br /&gt;
&lt;br /&gt;
local Verif = require &amp;quot;Module:Correction syntaxique&amp;quot;&lt;br /&gt;
local defaultLang = &amp;#039;fr&amp;#039;&lt;br /&gt;
&lt;br /&gt;
local function caterreur(param)&lt;br /&gt;
	if mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
		return &amp;#039;[[Catégorie:Page du modèle Site officiel comportant une erreur|&amp;#039; .. string.upper(param or &amp;#039;?&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Lien.siteOfficiel( frame )&lt;br /&gt;
	local templateargs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(templateargs) do&lt;br /&gt;
		if type(k) == &amp;#039;number&amp;#039; then&lt;br /&gt;
			v = mw.text.trim(v)&lt;br /&gt;
		end&lt;br /&gt;
		if v ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local nocaturl = args.nocaturl&lt;br /&gt;
&lt;br /&gt;
	local erreurs = &amp;#039;&amp;#039; -- les messages d&amp;#039;erreurs sont ajoutés ici&lt;br /&gt;
&lt;br /&gt;
	local erreursarguments = Verif.verif(args, {&amp;#039;titre&amp;#039;, &amp;#039;title&amp;#039;, 1, 2, &amp;#039;langue&amp;#039;, &amp;#039;lang&amp;#039;, &amp;#039;url&amp;#039;, &amp;#039;wikidata&amp;#039;, &amp;#039;entity&amp;#039;, &amp;#039;id&amp;#039;, &amp;#039;nocaturl&amp;#039;}, &amp;#039;Modèle Site officiel avec un paramètre inconnu‎&amp;#039;)&lt;br /&gt;
	if erreursarguments then&lt;br /&gt;
		erreurs = erreurs .. erreursarguments&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local titredefaut = &amp;#039;Site officiel&amp;#039;&lt;br /&gt;
	local titre = args[&amp;#039;titre&amp;#039;] or args[&amp;#039;title&amp;#039;] or titredefaut&lt;br /&gt;
	local langue = args[&amp;#039;langue&amp;#039;] or args[&amp;#039;lang&amp;#039;]&lt;br /&gt;
	local url = args[&amp;#039;url&amp;#039;] or args[2] or args[1]&lt;br /&gt;
&lt;br /&gt;
	if (not langue) and (args[2]) then&lt;br /&gt;
		langue = args[1]&lt;br /&gt;
	end&lt;br /&gt;
	local id = args.id or args.entity or args.wikidata&lt;br /&gt;
	if url and url:sub(1, 1) == &amp;#039;Q&amp;#039; then&lt;br /&gt;
		id = url&lt;br /&gt;
		url = nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- si pas d&amp;#039;URL, essayer Wikidata, et si ça marche, sortir de ce module&lt;br /&gt;
	if not url and (id ~= &amp;#039;-&amp;#039;) then&lt;br /&gt;
		local Wikidata = require &amp;quot;Module:Wikidata&amp;quot;&lt;br /&gt;
		local isinlang = defaultLang&lt;br /&gt;
		local links = Wikidata.getClaims{entity = id, property = &amp;#039;P856&amp;#039;, excludespecial = true, isinlang = isinlang}&lt;br /&gt;
		if not links then&lt;br /&gt;
			links = Wikidata.getClaims{entity = id, property = &amp;#039;P856&amp;#039;, excludespecial = true}&lt;br /&gt;
			isinlang = null&lt;br /&gt;
		end&lt;br /&gt;
		local Weblink = require &amp;#039;Module:Weblink&amp;#039;&lt;br /&gt;
		local statementformat = function(statement, args)&lt;br /&gt;
			if statement.mainsnak.snaktype == &amp;#039;value&amp;#039; then&lt;br /&gt;
				local value = statement.mainsnak.datavalue.value&lt;br /&gt;
				local title = Wikidata.getFormattedQualifiers(statement, {&amp;#039;P1476&amp;#039;}, {isinlang = &amp;#039;fr&amp;#039;})&lt;br /&gt;
				if not title then&lt;br /&gt;
					title = Wikidata.getFormattedQualifiers(statement, {&amp;#039;P1476&amp;#039;})&lt;br /&gt;
				end&lt;br /&gt;
				if not title then&lt;br /&gt;
					title = args.text&lt;br /&gt;
				end&lt;br /&gt;
				return Weblink.makelink(value, title)&lt;br /&gt;
			else&lt;br /&gt;
				return Wikidata.formatSnak( statement.mainsnak, args )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if links and (#links &amp;gt; 1) then&lt;br /&gt;
			return &amp;#039;&amp;lt;cite class=&amp;quot;ouvrage&amp;quot; id=&amp;quot;site_officiel&amp;quot; style=&amp;quot;font-style: normal;&amp;quot;&amp;gt;&amp;#039; .. &amp;quot;Sites officiels : &amp;quot; .. Wikidata.formatAndCat{claims = links, property = &amp;#039;P856&amp;#039;, displayformat = &amp;#039;weblink&amp;#039;, showlang = true, excludespecial = true, isinlang = isinlang, statementformat = statementformat} .. &amp;#039;&amp;lt;/cite&amp;gt;&amp;#039; .. erreurs&lt;br /&gt;
		elseif links then&lt;br /&gt;
			if not (titre == titredefaut) then&lt;br /&gt;
				statementformat = nil&lt;br /&gt;
			end&lt;br /&gt;
			return &amp;#039;&amp;lt;cite class=&amp;quot;ouvrage&amp;quot; id=&amp;quot;site_officiel&amp;quot; style=&amp;quot;font-style: normal;&amp;quot;&amp;gt;&amp;#039; .. Wikidata.formatAndCat{claims = links, property = &amp;#039;P856&amp;#039;, displayformat = &amp;#039;weblink&amp;#039;, showlang = true, text = titre, isinlang = isinlang, statementformat = statementformat} .. &amp;#039;&amp;lt;/cite&amp;gt;&amp;#039; .. erreurs&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- si toujours pas, ajouter les catégories d&amp;#039;erreur et sortir&lt;br /&gt;
	if not url then&lt;br /&gt;
		if not nocaturl then&lt;br /&gt;
			erreurs = erreurs .. caterreur(&amp;#039;url&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		return erreurs&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- nettoyage de l&amp;#039;URL&lt;br /&gt;
	url = url:gsub( &amp;#039;%[&amp;#039;, &amp;#039;%%5B&amp;#039; ):gsub( &amp;#039;%]&amp;#039;, &amp;#039;%%5D&amp;#039; )&lt;br /&gt;
	if not ( url:match( &amp;#039;^http&amp;#039; ) or url:match( &amp;#039;^//&amp;#039; ) ) then&lt;br /&gt;
			url = &amp;#039;http://&amp;#039; .. url&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- formatage de la langue&lt;br /&gt;
	local indicLangue = &amp;#039;&amp;#039;  -- langue telle qu&amp;#039;affichée dans le rendu final&lt;br /&gt;
	if langue then&lt;br /&gt;
		if langue ~= &amp;#039;fr&amp;#039; then&lt;br /&gt;
			local Langue = require &amp;quot;Module:Langue&amp;quot;&lt;br /&gt;
			indicLangue = Langue.indicationMultilingue{ langue } .. &amp;#039; &amp;#039;&lt;br /&gt;
			if indicLangue:find(&amp;#039;class=&amp;quot;error&amp;quot;&amp;#039;, nil, true) then&lt;br /&gt;
				erreurs = erreurs .. caterreur(&amp;#039;langue&amp;#039;)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;#039;&amp;lt;cite class=&amp;quot;ouvrage&amp;quot; id=&amp;quot;site_officiel&amp;quot; style=&amp;quot;font-style: normal;&amp;quot;&amp;gt;&amp;#039; .. indicLangue .. &amp;#039;[&amp;#039; .. url .. &amp;#039; &amp;#039; .. titre .. &amp;#039;]&amp;#039; .. &amp;#039;&amp;lt;/cite&amp;gt;&amp;#039; .. erreurs&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return Lien&lt;/div&gt;</summary>
		<author><name>Jaggerwock</name></author>
	</entry>
</feed>