<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki-data.rcsi.science/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3ALua_banner</id>
	<title>Модуль:Lua banner - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-data.rcsi.science/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3ALua_banner"/>
	<link rel="alternate" type="text/html" href="https://wiki-data.rcsi.science/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Lua_banner&amp;action=history"/>
	<updated>2026-04-03T17:52:48Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki-data.rcsi.science/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Lua_banner&amp;diff=510&amp;oldid=prev</id>
		<title>Admin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="https://wiki-data.rcsi.science/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Lua_banner&amp;diff=510&amp;oldid=prev"/>
		<updated>2021-11-15T12:53:47Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия 12:53, 15 ноября 2021&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff::1.12:old-509:rev-510 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki-data.rcsi.science/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Lua_banner&amp;diff=509&amp;oldid=prev</id>
		<title>ru&gt;Andrybak: bypass redirect on Commons for :File:Lua-Logo.svg – requested by User:Christian75 in Special:Diff/1043853071</title>
		<link rel="alternate" type="text/html" href="https://wiki-data.rcsi.science/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Lua_banner&amp;diff=509&amp;oldid=prev"/>
		<updated>2021-09-12T17:48:53Z</updated>

		<summary type="html">&lt;p&gt;bypass redirect on Commons for &lt;a href=&quot;/index.php?title=%D0%A4%D0%B0%D0%B9%D0%BB:Lua-Logo.svg&amp;amp;action=tinymceedit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Файл:Lua-Logo.svg (страница не существует)&quot;&gt;File:Lua-Logo.svg&lt;/a&gt; – requested by &lt;a href=&quot;/index.php?title=%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Christian75&amp;amp;action=tinymceedit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Участник:Christian75 (страница не существует)&quot;&gt;User:Christian75&lt;/a&gt; in &lt;a href=&quot;/index.php/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F/1043853071&quot; title=&quot;Служебная:Изменения/1043853071&quot;&gt;Special:Diff/1043853071&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&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;
			local maybeSandbox = mw.title.new(module .. '/sandbox')&lt;br /&gt;
			if maybeSandbox.exists then&lt;br /&gt;
				moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList('bulleted', moduleLinks)&lt;br /&gt;
		local title = mw.title.getCurrentTitle()&lt;br /&gt;
		if title.subpageText == &amp;quot;doc&amp;quot; then&lt;br /&gt;
			title = title.basePageTitle&lt;br /&gt;
		end&lt;br /&gt;
		if title.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			boxArgs.text = 'This module depends on the following other modules:' .. moduleList&lt;br /&gt;
		else&lt;br /&gt;
			boxArgs.text = 'This template  uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = 'notice'&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = '[[File:Lua-Logo.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 not subpageBlacklist[titleObj.subpageText] then&lt;br /&gt;
		local protCatName&lt;br /&gt;
		if titleObj.namespace == 10 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;
			protCatName = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
		elseif titleObj.namespace == 828 then&lt;br /&gt;
			protCatName = &amp;quot;Modules depending on under-protected modules&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		if not args.noprotcat and protCatName then&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;
				if module ~= &amp;quot;WP:libraryUtil&amp;quot; then&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] = protCatName&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&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>ru&gt;Andrybak</name></author>
	</entry>
</feed>