<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wikinabia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ALua_banner</id>
	<title>Module:Lua banner - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wikinabia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ALua_banner"/>
	<link rel="alternate" type="text/html" href="https://wikinabia.com/index.php?title=Module:Lua_banner&amp;action=history"/>
	<updated>2026-04-28T05:02:48Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>https://wikinabia.com/index.php?title=Module:Lua_banner&amp;diff=3361&amp;oldid=prev</id>
		<title>Docteurmarty : 1 révision importée</title>
		<link rel="alternate" type="text/html" href="https://wikinabia.com/index.php?title=Module:Lua_banner&amp;diff=3361&amp;oldid=prev"/>
		<updated>2019-10-07T20:10:55Z</updated>

		<summary type="html">&lt;p&gt;1 révision importée&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version du 7 octobre 2019 à 20:10&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;fr&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Aucune différence)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Docteurmarty</name></author>
		
	</entry>
	<entry>
		<id>https://wikinabia.com/index.php?title=Module:Lua_banner&amp;diff=3360&amp;oldid=prev</id>
		<title>wiki&gt;Johnuniq : use 0 for protection level of current page if it does not exist yet (for preview while creating a template), per Template talk:Lua#Lua error when a template page does not exist yet</title>
		<link rel="alternate" type="text/html" href="https://wikinabia.com/index.php?title=Module:Lua_banner&amp;diff=3360&amp;oldid=prev"/>
		<updated>2019-09-16T08:10:35Z</updated>

		<summary type="html">&lt;p&gt;use 0 for protection level of current page if it does not exist yet (for preview while creating a template), per &lt;a href=&quot;/index.php?title=Discussion_mod%C3%A8le:Lua&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Discussion modèle:Lua (page inexistante)&quot;&gt;Template talk:Lua#Lua error when a template page does not exist yet&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
local mList = require('Module:List')&lt;br /&gt;
local mTableTools = require('Module:TableTools')&lt;br /&gt;
local mMessageBox = require('Module:Message box')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match('^%s*(.-)%s*$')&lt;br /&gt;
		if v ~= '' then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = '&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;'&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format('[[:%s]]', module)&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList('bulleted', moduleLinks)&lt;br /&gt;
		boxArgs.text = 'This ' ..&lt;br /&gt;
			(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..&lt;br /&gt;
			' uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = 'notice'&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=|link=]]'&lt;br /&gt;
	return mMessageBox.main('mbox', boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cats = {}&lt;br /&gt;
&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = 'Lua templates with errors'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if titleObj.namespace == 10&lt;br /&gt;
		and not subpageBlacklist[titleObj.subpageText]&lt;br /&gt;
	then&lt;br /&gt;
		local category = args.category&lt;br /&gt;
		if not category then&lt;br /&gt;
			local categories = {&lt;br /&gt;
				['Module:String'] = 'Lua String-based templates',&lt;br /&gt;
				['Module:Math'] = 'Templates based on the Math Lua module',&lt;br /&gt;
				['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',&lt;br /&gt;
				['Module:Citation'] = 'Lua-based citation templates'&lt;br /&gt;
			}&lt;br /&gt;
			categories['Module:Citation/CS1'] = categories['Module:Citation']&lt;br /&gt;
			category = modules[1] and categories[modules[1]]&lt;br /&gt;
			category = category or 'Lua-based templates'&lt;br /&gt;
		end&lt;br /&gt;
		cats[#cats + 1] = category&lt;br /&gt;
		local protLevels = {&lt;br /&gt;
			autoconfirmed = 1,&lt;br /&gt;
			extendedconfirmed = 2,&lt;br /&gt;
			templateeditor = 3,&lt;br /&gt;
			sysop = 4&lt;br /&gt;
		}&lt;br /&gt;
		local currentProt&lt;br /&gt;
		if titleObj.id ~= 0 then&lt;br /&gt;
			-- id is 0 (page does not exist) if am previewing before creating a template.&lt;br /&gt;
			currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
		end&lt;br /&gt;
		if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			local moduleProt = mw.title.new(module).protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
			if moduleProt &amp;lt; currentProt then&lt;br /&gt;
				cats[#cats + 1] = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format('[[Category:%s]]', cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wiki&gt;Johnuniq</name></author>
		
	</entry>
</feed>