<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://ru.structorica.wiki/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3ATemplateOrCopy</id>
	<title>Модуль:TemplateOrCopy - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://ru.structorica.wiki/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3ATemplateOrCopy"/>
	<link rel="alternate" type="text/html" href="https://ru.structorica.wiki/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:TemplateOrCopy&amp;action=history"/>
	<updated>2026-06-18T01:24:17Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://ru.structorica.wiki/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:TemplateOrCopy&amp;diff=250&amp;oldid=prev</id>
		<title>Ivan в 16:17, 16 января 2026</title>
		<link rel="alternate" type="text/html" href="https://ru.structorica.wiki/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:TemplateOrCopy&amp;diff=250&amp;oldid=prev"/>
		<updated>2026-01-16T16:17:16Z</updated>

		<summary type="html">&lt;p&gt;&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;Версия от 16:17, 16 января 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot;&gt;Строка 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	for k, v in pairs(args) do&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	for k, v in pairs(args) do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		-- Skip the first argument (template name), pass others&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		-- Skip the first argument (template name), pass others&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		if &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;k &lt;/del&gt;&amp;gt; 1 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and type(k) == &quot;number&quot; &lt;/del&gt;then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		local numK = tonumber(k)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			templateArgs[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;k &lt;/del&gt;- 1] = v&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		if &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;numK and numK &lt;/ins&gt;&amp;gt; 1 then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			templateArgs[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;numK &lt;/ins&gt;- 1] = v&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		-- Pass named arguments as-is&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		-- Pass named arguments as-is&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;elseif type(k) ~= &quot;number&quot; then&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;else&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			templateArgs[k] = v&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			templateArgs[k] = v&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key structorica_wiki_ru:diff:1.41:old-148:rev-250:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Ivan</name></author>
	</entry>
	<entry>
		<id>https://ru.structorica.wiki/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:TemplateOrCopy&amp;diff=148&amp;oldid=prev</id>
		<title>Ivan: Новая страница: «local p = {}  -- Editcopy suffixes in priority order (first match wins) local EDITCOPY_SUFFIXES = { 	&quot;editcopy&quot;, -- English 	&quot;Копия&quot;, -- Russian }  function p.templateHelper(frame) 	local args = frame:getParent().args 	local templateName = mw.text.trim(args[1] or &quot;&quot;) 	if templateName == &quot;&quot; then 		return &quot;&quot; 	end  	-- Add namespace prefix if not present 	if not templateName:match(&quot;^Template:&quot;) then 		templateName = &quot;Template:&quot; .. templateName 	end...»</title>
		<link rel="alternate" type="text/html" href="https://ru.structorica.wiki/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:TemplateOrCopy&amp;diff=148&amp;oldid=prev"/>
		<updated>2026-01-15T12:27:16Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «local p = {}  -- Editcopy suffixes in priority order (first match wins) local EDITCOPY_SUFFIXES = { 	&amp;quot;editcopy&amp;quot;, -- English 	&amp;quot;Копия&amp;quot;, -- Russian }  function p.templateHelper(frame) 	local args = frame:getParent().args 	local templateName = mw.text.trim(args[1] or &amp;quot;&amp;quot;) 	if templateName == &amp;quot;&amp;quot; then 		return &amp;quot;&amp;quot; 	end  	-- Add namespace prefix if not present 	if not templateName:match(&amp;quot;^Template:&amp;quot;) then 		templateName = &amp;quot;Template:&amp;quot; .. templateName 	end...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Editcopy suffixes in priority order (first match wins)&lt;br /&gt;
local EDITCOPY_SUFFIXES = {&lt;br /&gt;
	&amp;quot;editcopy&amp;quot;, -- English&lt;br /&gt;
	&amp;quot;Копия&amp;quot;, -- Russian&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p.templateHelper(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local templateName = mw.text.trim(args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	if templateName == &amp;quot;&amp;quot; then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add namespace prefix if not present&lt;br /&gt;
	if not templateName:match(&amp;quot;^Template:&amp;quot;) then&lt;br /&gt;
		templateName = &amp;quot;Template:&amp;quot; .. templateName&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
	-- If on editcopy page, try to find editcopy version of template&lt;br /&gt;
	local isEditcopyPage = false&lt;br /&gt;
&lt;br /&gt;
	local title = mw.title.getCurrentTitle()&lt;br /&gt;
	for _, suffix in ipairs(EDITCOPY_SUFFIXES) do&lt;br /&gt;
		if title.subpageText == suffix then&lt;br /&gt;
			isEditcopyPage = true&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Try to find existing editcopy template&lt;br /&gt;
	if isEditcopyPage then&lt;br /&gt;
		for _, suffix in ipairs(EDITCOPY_SUFFIXES) do&lt;br /&gt;
			local testTitle = mw.title.new(templateName .. &amp;quot;/&amp;quot; .. suffix)&lt;br /&gt;
			if testTitle ~= nil and testTitle.exists then&lt;br /&gt;
				templateName = templateName .. &amp;quot;/&amp;quot; .. suffix&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local templateArgs = {}&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		-- Skip the first argument (template name), pass others&lt;br /&gt;
		if k &amp;gt; 1 and type(k) == &amp;quot;number&amp;quot; then&lt;br /&gt;
			templateArgs[k - 1] = v&lt;br /&gt;
&lt;br /&gt;
		-- Pass named arguments as-is&lt;br /&gt;
		elseif type(k) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
			templateArgs[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return frame:expandTemplate({ title = templateName, args = templateArgs })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Ivan</name></author>
	</entry>
</feed>