<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Module%3AFootball_manager_history</id>
	<title>Module:Football manager history - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Module%3AFootball_manager_history"/>
	<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Module:Football_manager_history&amp;action=history"/>
	<updated>2026-06-10T20:44:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Module:Football_manager_history&amp;diff=13086&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Module:Football_manager_history&amp;diff=13086&amp;oldid=prev"/>
		<updated>2022-09-10T16:23:35Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:53, 10 September 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Module:Football_manager_history&amp;diff=13085&amp;oldid=prev</id>
		<title>wikipedia&gt;Black Kite: per discussion at WT:FOOTY</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Module:Football_manager_history&amp;diff=13085&amp;oldid=prev"/>
		<updated>2022-01-19T08:28:52Z</updated>

		<summary type="html">&lt;p&gt;per discussion at WT:FOOTY&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Implement [[Template:Football manager history]] to avoid articles being&lt;br /&gt;
-- added to [[:Category:Pages where template include size is exceeded]]&lt;br /&gt;
-- when the template is used many times.&lt;br /&gt;
&lt;br /&gt;
local function clean(text, default)&lt;br /&gt;
	-- Return text, if not empty, after trimming leading/trailing whitespace.&lt;br /&gt;
	-- Otherwise return default which is nil unless set by caller.&lt;br /&gt;
	if text then&lt;br /&gt;
		text = text:match(&amp;quot;^%s*(.-)%s*$&amp;quot;)&lt;br /&gt;
		if text ~= '' then&lt;br /&gt;
			return text&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return default&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function yes(parameter)&lt;br /&gt;
	-- Return true if parameter should be interpreted as &amp;quot;yes&amp;quot;.&lt;br /&gt;
	-- Do not want to accept mixed upper/lowercase.&lt;br /&gt;
	return ({ Y = true, y = true, yes = true, T = true, ['true'] = true })[parameter]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function collection()&lt;br /&gt;
	-- Return a table to hold items.&lt;br /&gt;
	return {&lt;br /&gt;
		n = 0,&lt;br /&gt;
		add = function (self, item)&lt;br /&gt;
			self.n = self.n + 1&lt;br /&gt;
			self[self.n] = item&lt;br /&gt;
		end,&lt;br /&gt;
		addif = function (self, item, fmt)&lt;br /&gt;
			if item then&lt;br /&gt;
				self.n = self.n + 1&lt;br /&gt;
				self[self.n] = fmt and string.gsub(fmt, '%%s', item) or item&lt;br /&gt;
			end&lt;br /&gt;
		end,&lt;br /&gt;
		join = function (self, sep)&lt;br /&gt;
			return table.concat(self, sep)&lt;br /&gt;
		end,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function message(msg, caller, nocat)&lt;br /&gt;
	-- Return formatted message text for an error.&lt;br /&gt;
	-- Can append &amp;quot;#FormattingError&amp;quot; to URL of a page with a problem to find it.&lt;br /&gt;
	-- If given, caller is the title of the navbox which has the error.&lt;br /&gt;
	local anchor = '&amp;lt;span id=&amp;quot;FormattingError&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;'&lt;br /&gt;
	local category&lt;br /&gt;
	if not nocat and mw.title.getCurrentTitle():inNamespaces(0, 10) then&lt;br /&gt;
		-- Category only in namespaces: 0=article, 10=template.&lt;br /&gt;
		category = '[[Category:Football template errors]]'&lt;br /&gt;
	else&lt;br /&gt;
		category = ''&lt;br /&gt;
	end&lt;br /&gt;
	return anchor ..&lt;br /&gt;
		'&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: ' ..&lt;br /&gt;
		msg ..&lt;br /&gt;
		(caller and (' at [[Template:' .. caller .. ']]') or '') ..&lt;br /&gt;
		'&amp;lt;/strong&amp;gt;' ..&lt;br /&gt;
		category .. '\n'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function make_entry(name, from, to, islast)&lt;br /&gt;
	local result =&lt;br /&gt;
		'*&amp;lt;span class=&amp;quot;vevent&amp;quot;&amp;gt;' ..&lt;br /&gt;
		'&amp;lt;span class=&amp;quot;agent attendee vcard&amp;quot;&amp;gt;' ..&lt;br /&gt;
		'&amp;lt;span class=&amp;quot;fn org summary&amp;quot;&amp;gt;' ..&lt;br /&gt;
		name ..&lt;br /&gt;
		'&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;amp;nbsp;(&amp;lt;span class=&amp;quot;dtstart&amp;quot;&amp;gt;' ..&lt;br /&gt;
		from ..&lt;br /&gt;
		'&amp;lt;/span&amp;gt;'&lt;br /&gt;
	if to then&lt;br /&gt;
		result = result .. '–' .. to&lt;br /&gt;
	elseif islast then&lt;br /&gt;
		result = result .. '–'&lt;br /&gt;
	end&lt;br /&gt;
	result = result .. ')&amp;lt;/span&amp;gt;'&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function make_list(text, note, dissolved)&lt;br /&gt;
	-- Return a list of formatted items.&lt;br /&gt;
	-- Input is a string of multiple lines, one item per line.&lt;br /&gt;
	-- Each item is 'NAME FROM to TO' or 'NAME FROM', where&lt;br /&gt;
	--   NAME = manager name (any text)&lt;br /&gt;
	--   FROM = four digits (from year)&lt;br /&gt;
	--     TO = 1, 2, 3 or 4 digits (to year), or empty&lt;br /&gt;
	-- Alternatively, an item can use syntax (TEXT is any text, possibly empty):&lt;br /&gt;
	--   NAME from=TEXT&lt;br /&gt;
	--   NAME from=TEXT to=TEXT&lt;br /&gt;
	-- The code detects the end of NAME from the start of FROM.&lt;br /&gt;
	-- A dash is added to the last line (to show the manager is continuing) if&lt;br /&gt;
	-- no 'to' year is given, but no dash is added if the club is dissolved.&lt;br /&gt;
	text = text or ''&lt;br /&gt;
	if text:find('&amp;lt;span class=', 1, true) then&lt;br /&gt;
		-- To allow a transition period where some navboxes use the old syntax, the&lt;br /&gt;
		-- given text is used if it appears to have come from the old subtemplates.&lt;br /&gt;
		return text&lt;br /&gt;
	end&lt;br /&gt;
	-- Get the non-blank lines first so can tell when am processing the last line.&lt;br /&gt;
	-- Each line is left- and right-trimmed.&lt;br /&gt;
	local lines = collection()&lt;br /&gt;
	for line in string.gmatch(text .. '\n', '[\t ]*(.-)[\t\r ]*\n') do&lt;br /&gt;
		if line ~= '' then&lt;br /&gt;
			lines:add(line)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if lines.n &amp;lt;= 0 then&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
	local ilast = dissolved and -1 or lines.n&lt;br /&gt;
	local entries = collection()&lt;br /&gt;
	entries:add('&amp;lt;div&amp;gt;')&lt;br /&gt;
	for i, line in ipairs(lines) do&lt;br /&gt;
		-- Need to detect lines like &amp;quot;Name from=1930 &amp;amp; 1935&amp;quot; (probably should&lt;br /&gt;
		-- not be like that, but that is not up to the template to enforce).&lt;br /&gt;
		local name, from, to = line:match('^([^=]-)%s+(%d%d%d%d)%s+to%s+(%d%d?%d?%d?)$')&lt;br /&gt;
		if not name then&lt;br /&gt;
			name, from = line:match('^([^=]-)%s+(%d%d%d%d)$')&lt;br /&gt;
			if not name then&lt;br /&gt;
				name, from, to = line:match('^(.-) from=(.-) to=(.*)')&lt;br /&gt;
				if not name then&lt;br /&gt;
					name, from = line:match('^(.-) from=(.*)')&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		name = clean(name)&lt;br /&gt;
		from = clean(from, '')&lt;br /&gt;
		to = clean(to)&lt;br /&gt;
		if ((name or '=') .. (from or '=') .. (to or '')):find('=', 1, true) then&lt;br /&gt;
			-- name and from must be defined (from can be ''); to is optional.&lt;br /&gt;
			-- Reject '=' to avoid typos in items like 'to=x' or 'from=xto=y'&lt;br /&gt;
			-- from being displayed.&lt;br /&gt;
			error('Invalid line &amp;quot;' .. mw.text.nowiki(line) .. '&amp;quot;', 0)&lt;br /&gt;
		end&lt;br /&gt;
		entries:add(make_entry(name, from, to, i == ilast))&lt;br /&gt;
	end&lt;br /&gt;
	entries:add('&amp;lt;/div&amp;gt;')&lt;br /&gt;
	entries:addif(note)&lt;br /&gt;
	return entries:join('\n')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function arg_style(bgcolor, textcolor, bordercolor)&lt;br /&gt;
	local result = collection()&lt;br /&gt;
	result:addif(clean(bgcolor), 'background:%s;')&lt;br /&gt;
	result:addif(clean(textcolor), 'color:%s;')&lt;br /&gt;
	result:addif(clean(bordercolor), &lt;br /&gt;
		'box-shadow: inset 1px 1px 0 %s,' ..&lt;br /&gt;
		'inset -1px -1px 0 %s;')&lt;br /&gt;
	result:add('width: 87%;')&lt;br /&gt;
	return result:join(' ')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function arg_title(title, teamname, managerlist, textcolor, american_english)&lt;br /&gt;
	title = clean(title)&lt;br /&gt;
	teamname = clean(teamname, 'MISSING &amp;quot;teamname&amp;quot;')&lt;br /&gt;
	managerlist = clean(managerlist)&lt;br /&gt;
	textcolor = clean(textcolor)&lt;br /&gt;
	american_english = clean(american_english)&lt;br /&gt;
	local spancolor = textcolor and ('&amp;lt;span style=&amp;quot;color:' .. textcolor .. ';&amp;quot;&amp;gt;') or '&amp;lt;span&amp;gt;'&lt;br /&gt;
	local mgr = spancolor .. (american_english and 'Head coaches' or 'managers') .. '&amp;lt;/span&amp;gt;'&lt;br /&gt;
	return&lt;br /&gt;
		'&amp;lt;span class=&amp;quot;fn org&amp;quot;&amp;gt;[[' .. teamname .. '|' ..&lt;br /&gt;
		spancolor ..&lt;br /&gt;
		(title or teamname) .. '&amp;lt;/span&amp;gt;]]&amp;lt;/span&amp;gt; – ' ..&lt;br /&gt;
		(managerlist and ('[[' .. managerlist .. '|' .. mgr .. ']]') or mgr)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function _main(args)&lt;br /&gt;
	-- Return wikitext for a navbox.&lt;br /&gt;
	-- Code does not do much checking of inputs but will throw an error&lt;br /&gt;
	-- if input is found to be invalid.&lt;br /&gt;
	local style = arg_style(args.bgcolor, args.textcolor, args.bordercolor)&lt;br /&gt;
	local dissolved = args.dissolved&lt;br /&gt;
	if dissolved then&lt;br /&gt;
		-- May be a number of two or more digits (year club was dissolved; compatible&lt;br /&gt;
		-- with {{Infobox football club}}), or an alias for 'yes'.&lt;br /&gt;
		dissolved = dissolved:match('^%d%d+$') and true or yes(args.dissolved)&lt;br /&gt;
	end&lt;br /&gt;
	local navargs = {&lt;br /&gt;
		bodyclass = 'vcard',&lt;br /&gt;
		name = clean(args.name),&lt;br /&gt;
		state = clean(args.state, 'autocollapse'),&lt;br /&gt;
		titlestyle = style,&lt;br /&gt;
		title = arg_title(args.title, args.teamname, args.managerlist, args.textcolor, args.american_english),&lt;br /&gt;
		listclass = 'hlist',&lt;br /&gt;
		nowrapitems = 'yes',&lt;br /&gt;
		list1 = make_list(args.list, clean(args.note), dissolved),&lt;br /&gt;
		belowstyle = style,&lt;br /&gt;
		below = clean(args.below),&lt;br /&gt;
	}&lt;br /&gt;
	local navbox = require('Module:Navbox')._navbox&lt;br /&gt;
	return navbox(navargs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function main(frame)&lt;br /&gt;
	-- Return wikitext for a navbox or an error message.&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	-- Read arguments in order of output (Module:Navbox says this puts&lt;br /&gt;
	-- reference numbers in the right order).&lt;br /&gt;
	local _&lt;br /&gt;
	_ = args.title&lt;br /&gt;
	_ = args.list&lt;br /&gt;
	_ = args.below&lt;br /&gt;
	local success, result = pcall(_main, args)&lt;br /&gt;
	if success then&lt;br /&gt;
		return result&lt;br /&gt;
	end&lt;br /&gt;
	return message(result, clean(args.name), clean(args.nocat))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return { main = main, _main = _main }&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Black Kite</name></author>
	</entry>
</feed>