<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://ru.ru-skazki.ru/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AUniversal_infocard</id>
	<title>Модуль:Universal infocard - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://ru.ru-skazki.ru/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AUniversal_infocard"/>
	<link rel="alternate" type="text/html" href="http://ru.ru-skazki.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Universal_infocard&amp;action=history"/>
	<updated>2026-04-08T00:14:58Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>http://ru.ru-skazki.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Universal_infocard&amp;diff=4545&amp;oldid=prev</id>
		<title>Импортёр: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://ru.ru-skazki.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Universal_infocard&amp;diff=4545&amp;oldid=prev"/>
		<updated>2024-05-01T10:06:33Z</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;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 13:06, 1 мая 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Импортёр</name></author>
	</entry>
	<entry>
		<id>http://ru.ru-skazki.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Universal_infocard&amp;diff=4544&amp;oldid=prev</id>
		<title>ru&gt;Andras: Новая страница: «--   Lua code for universal infocard.   local isConfig, config = pcall( require, &#039;Module:Universal infocard/config&#039; ); if isConfig == false then 	config = { 		skipPropertyIds = { 			P31 = true, 			P279 = true, 		} 	}; end  local p = {}; local lang = mw.getContentLanguage(); local entityId = nil;  -- CSS classes. local classes = {}; if config and config.classes then 	for key, value in pairs( config.classes ) do 		classes[ key ] = value; 	end end 	 functio...»</title>
		<link rel="alternate" type="text/html" href="http://ru.ru-skazki.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Universal_infocard&amp;diff=4544&amp;oldid=prev"/>
		<updated>2023-06-24T12:13:56Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «--&lt;a href=&quot;/index.php?title=Lua_code_for_universal_infocard.&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Lua code for universal infocard. (страница не существует)&quot;&gt;Lua code for universal infocard. &lt;/a&gt;  local isConfig, config = pcall( require, &amp;#039;Module:Universal infocard/config&amp;#039; ); if isConfig == false then 	config = { 		skipPropertyIds = { 			P31 = true, 			P279 = true, 		} 	}; end  local p = {}; local lang = mw.getContentLanguage(); local entityId = nil;  -- CSS classes. local classes = {}; if config and config.classes then 	for key, value in pairs( config.classes ) do 		classes[ key ] = value; 	end end 	 functio...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
  Lua code for universal infocard.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local isConfig, config = pcall( require, &amp;#039;Module:Universal infocard/config&amp;#039; );&lt;br /&gt;
if isConfig == false then&lt;br /&gt;
	config = {&lt;br /&gt;
		skipPropertyIds = {&lt;br /&gt;
			P31 = true,&lt;br /&gt;
			P279 = true,&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local p = {};&lt;br /&gt;
local lang = mw.getContentLanguage();&lt;br /&gt;
local entityId = nil;&lt;br /&gt;
&lt;br /&gt;
-- CSS classes.&lt;br /&gt;
local classes = {};&lt;br /&gt;
if config and config.classes then&lt;br /&gt;
	for key, value in pairs( config.classes ) do&lt;br /&gt;
		classes[ key ] = value;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
function getClassString( type )&lt;br /&gt;
	local class;&lt;br /&gt;
	if classes[type] then&lt;br /&gt;
		class = classes[type];&lt;br /&gt;
	elseif type ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		class = &amp;#039;infobox-&amp;#039; .. type;&lt;br /&gt;
	else&lt;br /&gt;
		class = &amp;#039;infobox&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if class == &amp;#039;&amp;#039; then&lt;br /&gt;
		return &amp;#039;&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;#039; class=&amp;quot;&amp;#039;.. class .. &amp;#039;&amp;quot;&amp;#039;;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getTemplate( propertyId )&lt;br /&gt;
	if config and config.templates and config.templates[ propertyId ] then&lt;br /&gt;
		return config.templates[ propertyId ];&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if propertyId == &amp;#039;title&amp;#039; then&lt;br /&gt;
		return &amp;#039;{{PAGENAME}}&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if propertyId == &amp;#039;map&amp;#039; then&lt;br /&gt;
		return getMap;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if config and config.templates and config.templates.default then&lt;br /&gt;
		return config.templates.default;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if string.match( propertyId, &amp;#039;^P%d+$&amp;#039; ) then&lt;br /&gt;
		return &amp;#039;#statements:&amp;#039; .. propertyId;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return nil;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function expandTemplate( frame, title, args )&lt;br /&gt;
	if not title then&lt;br /&gt;
		return &amp;#039;&amp;#039;;&lt;br /&gt;
	elseif type( title ) == &amp;#039;function&amp;#039; then&lt;br /&gt;
		args.frame = frame;&lt;br /&gt;
		return title( args )&lt;br /&gt;
	elseif type( title ) == &amp;#039;string&amp;#039; then&lt;br /&gt;
		if string.match( title, &amp;#039;^#&amp;#039; ) then&lt;br /&gt;
			return frame:callParserFunction{ name = title, args = args };&lt;br /&gt;
		elseif string.match( title, &amp;#039;^{&amp;#039; ) then&lt;br /&gt;
			return frame:preprocess( title );&lt;br /&gt;
		else&lt;br /&gt;
			return frame:expandTemplate{ title = title, args = args };&lt;br /&gt;
		end&lt;br /&gt;
	elseif type( title ) == &amp;#039;table&amp;#039; then&lt;br /&gt;
		local realTitle = title[ 1 ];&lt;br /&gt;
		table.remove( title, 1 )&lt;br /&gt;
		return expandTemplate( frame, realTitle, title )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function splitLine( value1, value2 )&lt;br /&gt;
	local result = &amp;#039;&amp;#039;;&lt;br /&gt;
	if ( value1 and string.len( value1 ) ~= 0 ) or ( value2 and string.len( value2 ) ~= 0 ) then&lt;br /&gt;
		result = &amp;#039;&amp;lt;tr&amp;gt;&amp;#039;;&lt;br /&gt;
		if ( value1 and string.len( value1 ) ~= 0 ) then&lt;br /&gt;
			local colspan = &amp;#039;&amp;#039;;&lt;br /&gt;
			if ( not value2 or string.len( value2 ) == 0 ) then&lt;br /&gt;
				colspan = &amp;#039;colspan=&amp;quot;2&amp;quot;&amp;#039;;&lt;br /&gt;
			end&lt;br /&gt;
			result = result .. &amp;#039;&amp;lt;td &amp;#039; .. colspan .. getClassString( &amp;#039;split&amp;#039; ) .. &amp;#039;&amp;gt;&amp;#039;;&lt;br /&gt;
			result = result .. value1;&lt;br /&gt;
			result = result .. &amp;#039;&amp;lt;/td&amp;gt;&amp;#039;;&lt;br /&gt;
		end&lt;br /&gt;
		if ( value2 and string.len( value2 ) ~= 0 ) then&lt;br /&gt;
			local colspan = &amp;#039;&amp;#039;;&lt;br /&gt;
			if ( not value1 or string.len( value1 ) == 0 ) then&lt;br /&gt;
				colspan = &amp;#039;colspan=&amp;quot;2&amp;quot;&amp;#039;;&lt;br /&gt;
			end&lt;br /&gt;
			result = result .. &amp;#039;&amp;lt;td &amp;#039; .. colspan .. getClassString( &amp;#039;split&amp;#039; ) .. &amp;#039;&amp;gt;&amp;#039;;&lt;br /&gt;
			result = result .. value2;&lt;br /&gt;
			result = result .. &amp;#039;&amp;lt;/td&amp;gt;&amp;#039;;&lt;br /&gt;
		end&lt;br /&gt;
		result = result .. &amp;#039;&amp;lt;/tr&amp;gt;\n&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getLine( value, class, header )&lt;br /&gt;
	local result = &amp;#039;&amp;#039;;&lt;br /&gt;
	local tag = header and &amp;#039;th scope=&amp;quot;colgroup&amp;quot;&amp;#039; or &amp;#039;td&amp;#039;;&lt;br /&gt;
	if ( value and string.len( value ) ~= 0 ) then&lt;br /&gt;
		result = result .. &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;&amp;#039; .. tag .. &amp;#039; colspan=&amp;quot;2&amp;quot;&amp;#039;.. getClassString( class ) .. &amp;#039;&amp;gt;&amp;#039;;&lt;br /&gt;
		result = result .. value;&lt;br /&gt;
		result = result .. &amp;#039;&amp;lt;/&amp;#039; .. tag .. &amp;#039;&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;#039;;&lt;br /&gt;
		return result;&lt;br /&gt;
	end&lt;br /&gt;
	return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getValue( label, value )&lt;br /&gt;
	local result = &amp;#039;&amp;#039;;&lt;br /&gt;
	if ( value ~= nil and string.len( value ) ~= 0 ) then&lt;br /&gt;
		if label then&lt;br /&gt;
			result = result .. &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th scope=&amp;quot;row&amp;quot;&amp;#039; .. getClassString( &amp;#039;label&amp;#039; ) .. &amp;#039;&amp;gt;&amp;#039; .. label .. &amp;#039;&amp;lt;/th&amp;gt;&amp;#039;;&lt;br /&gt;
			result = result .. &amp;#039;&amp;lt;td&amp;#039; .. getClassString( &amp;#039;text&amp;#039; ) .. &amp;#039;&amp;gt;\n&amp;#039;;&lt;br /&gt;
		else&lt;br /&gt;
			result = result .. &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;#039; .. getClassString( &amp;#039;text&amp;#039; ) .. &amp;#039;&amp;gt;&amp;#039;;&lt;br /&gt;
		end&lt;br /&gt;
		result = result .. value;&lt;br /&gt;
		result = result .. &amp;#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;#039;;&lt;br /&gt;
		return result;&lt;br /&gt;
	end&lt;br /&gt;
	return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getMap( args )&lt;br /&gt;
	local entityId = args.entityId or mw.wikibase.getEntityIdForCurrentPage();&lt;br /&gt;
	local statements = mw.wikibase.getBestStatements( entityId, &amp;#039;P625&amp;#039; );&lt;br /&gt;
	&lt;br /&gt;
	if not statements or&lt;br /&gt;
		not statements[ 1 ] or&lt;br /&gt;
		not statements[ 1 ].mainsnak or&lt;br /&gt;
		statements[ 1 ].mainsnak.snaktype ~= &amp;#039;value&amp;#039; or&lt;br /&gt;
		statements[ 1 ].mainsnak.datavalue.value.globe ~= &amp;#039;http://www.wikidata.org/entity/Q2&amp;#039;&lt;br /&gt;
	then&lt;br /&gt;
		return &amp;#039;&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local coord = statements[ 1 ].mainsnak.datavalue.value;&lt;br /&gt;
	local title = expandTemplate( args.frame, getTemplate( &amp;#039;title&amp;#039; ), { from = entityId } );&lt;br /&gt;
&lt;br /&gt;
	local mapContent = [[ {&lt;br /&gt;
		&amp;quot;type&amp;quot;: &amp;quot;Feature&amp;quot;,&lt;br /&gt;
		&amp;quot;geometry&amp;quot;: {&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;Point&amp;quot;,&lt;br /&gt;
			&amp;quot;coordinates&amp;quot;: [&lt;br /&gt;
				]] .. coord[&amp;#039;longitude&amp;#039;] .. [[,&lt;br /&gt;
				]] .. coord[&amp;#039;latitude&amp;#039;] .. [[&lt;br /&gt;
			]&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;properties&amp;quot;: {&lt;br /&gt;
			&amp;quot;title&amp;quot;: &amp;quot;]] .. title .. [[&amp;quot;,&lt;br /&gt;
			&amp;quot;marker-symbol&amp;quot;: &amp;quot;star&amp;quot;,&lt;br /&gt;
			&amp;quot;marker-color&amp;quot;: &amp;quot;#3366cc&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
    }, {&lt;br /&gt;
		&amp;quot;type&amp;quot;: &amp;quot;ExternalData&amp;quot;,&lt;br /&gt;
		&amp;quot;service&amp;quot;: &amp;quot;geoline&amp;quot;,&lt;br /&gt;
		&amp;quot;ids&amp;quot;: &amp;quot;]] .. entityId .. [[&amp;quot;,&lt;br /&gt;
		&amp;quot;properties&amp;quot;: {&lt;br /&gt;
			&amp;quot;stroke&amp;quot;: &amp;quot;#FF9999&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
    }, {&lt;br /&gt;
		&amp;quot;type&amp;quot;: &amp;quot;ExternalData&amp;quot;,&lt;br /&gt;
		&amp;quot;service&amp;quot;: &amp;quot;geoshape&amp;quot;,&lt;br /&gt;
		&amp;quot;ids&amp;quot;: &amp;quot;]] .. entityId .. [[&amp;quot;,&lt;br /&gt;
		&amp;quot;properties&amp;quot;: {&lt;br /&gt;
			&amp;quot;fill&amp;quot;: &amp;quot;#FF0000&amp;quot;,&lt;br /&gt;
			&amp;quot;fill-opacity&amp;quot;: 0.1,&lt;br /&gt;
			&amp;quot;stroke&amp;quot;: &amp;quot;#FF9999&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	} ]];&lt;br /&gt;
&lt;br /&gt;
    return args.frame:extensionTag{&lt;br /&gt;
    	name = &amp;#039;mapframe&amp;#039;,&lt;br /&gt;
    	content = &amp;#039;[&amp;#039; .. mapContent .. &amp;#039;]&amp;#039;,&lt;br /&gt;
    	args = {&lt;br /&gt;
			&amp;#039;frameless&amp;#039;,&lt;br /&gt;
			align = &amp;#039;center&amp;#039;,&lt;br /&gt;
			latitude = coord[&amp;#039;latitude&amp;#039;],&lt;br /&gt;
			longitude = coord[&amp;#039;longitude&amp;#039;],&lt;br /&gt;
			zoom = 11,&lt;br /&gt;
			width = 300,&lt;br /&gt;
			height = 250,&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function renderValue( frame, propertyId, args )&lt;br /&gt;
	local tplArgs = { propertyId, from = entityId, entityId = entityId, nocat = frame.args[&amp;#039;nocat&amp;#039;] };&lt;br /&gt;
&lt;br /&gt;
	if args then&lt;br /&gt;
	    local k = nil;&lt;br /&gt;
	    repeat&lt;br /&gt;
	        k = next( args, k );&lt;br /&gt;
	        if k then&lt;br /&gt;
	            tplArgs[ k ] = args[ k ];&lt;br /&gt;
	        end&lt;br /&gt;
	    until not k&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return expandTemplate( frame, getTemplate( propertyId ), tplArgs );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Filter deprecated claims and returning only preferred ones if present.&lt;br /&gt;
function filterClaims( entity, propertyId )&lt;br /&gt;
	if ( entity.claims == nil or entity.claims[ propertyId ] == nil ) then&lt;br /&gt;
		return {};&lt;br /&gt;
	end&lt;br /&gt;
	local all = entity.claims[ propertyId ];&lt;br /&gt;
	local normal = {};&lt;br /&gt;
	local preferred = {};&lt;br /&gt;
	for _, claim in pairs( all ) do&lt;br /&gt;
		local rank = claim.rank or &amp;#039;normal&amp;#039;;&lt;br /&gt;
		if ( rank == &amp;#039;normal&amp;#039; ) then&lt;br /&gt;
			table.insert( normal, claim );&lt;br /&gt;
		end&lt;br /&gt;
		if ( rank == &amp;#039;preferred&amp;#039; ) then&lt;br /&gt;
			table.insert( preferred, claim );&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if ( #preferred &amp;gt; 0 ) then&lt;br /&gt;
		return preferred;&lt;br /&gt;
	end&lt;br /&gt;
	return normal;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Filter deprecated claims and returning only preferred ones if present.&lt;br /&gt;
function propertyHasEntity( claims, itemId )&lt;br /&gt;
	if not claims then&lt;br /&gt;
		return false;&lt;br /&gt;
	end&lt;br /&gt;
	for _, claim in pairs( claims ) do&lt;br /&gt;
		if claim.mainsnak&lt;br /&gt;
			and claim.mainsnak.datavalue&lt;br /&gt;
			and claim.mainsnak.datavalue.value&lt;br /&gt;
			and claim.mainsnak.datavalue.value.id&lt;br /&gt;
			and claim.mainsnak.datavalue.value.id == itemId then&lt;br /&gt;
				return true;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return false;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function propertyLabel( propertyId )&lt;br /&gt;
	local label, labelLang = mw.wikibase.getLabelWithLang( propertyId );&lt;br /&gt;
	label = lang:ucfirst( label );&lt;br /&gt;
	if labelLang ~= lang:getCode() then&lt;br /&gt;
		label = &amp;#039;[[d:Property:&amp;#039; .. propertyId .. &amp;#039;|&amp;#039; .. label .. &amp;#039;]]&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
	return label;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function simpleLabel( entityId )&lt;br /&gt;
	local label = mw.wikibase.label( entityId );&lt;br /&gt;
	label = lang:ucfirst( label );&lt;br /&gt;
	return label;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getErrorMessage( message )&lt;br /&gt;
	local result = &amp;#039;&amp;lt;table&amp;#039; .. getClassString( &amp;#039;error&amp;#039; ) .. &amp;#039;&amp;gt;\n&amp;#039;;&lt;br /&gt;
	result = result .. &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;#039; .. message .. &amp;#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;#039;;&lt;br /&gt;
	result = result .. &amp;#039;&amp;lt;/table&amp;gt;&amp;#039;;&lt;br /&gt;
	return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.render( frame )&lt;br /&gt;
	local i18n_error_emptyWikidataEntity = &amp;#039;&amp;#039;;&lt;br /&gt;
	local i18n_error_noWikidataEntity = &amp;#039;&amp;#039;;&lt;br /&gt;
	if config and config.i18n and config.i18n.error then&lt;br /&gt;
		if config.i18n.error.emptyWikidataEntity then&lt;br /&gt;
			i18n_error_emptyWikidataEntity = config.i18n.error.emptyWikidataEntity;&lt;br /&gt;
		end&lt;br /&gt;
		if config.i18n.error.noWikidataEntity then&lt;br /&gt;
			i18n_error_noWikidataEntity = config.i18n.error.noWikidataEntity;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local result = &amp;#039;&amp;lt;table&amp;#039; .. getClassString( &amp;#039;&amp;#039; );&lt;br /&gt;
	if config and config.i18n and config.i18n.dataName then&lt;br /&gt;
		result = result .. &amp;#039; data-name=&amp;quot;&amp;#039; .. config.i18n.dataName .. &amp;#039;&amp;quot;&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
	result = result .. &amp;#039;&amp;gt;\n&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
	local localImage = nil;&lt;br /&gt;
&lt;br /&gt;
	if ( frame ~= nil and frame:getParent() ~= nil ) then&lt;br /&gt;
		local p_frame = frame:getParent();&lt;br /&gt;
		if p_frame.args ~= nil then&lt;br /&gt;
			-- image under FU only in local&lt;br /&gt;
			localImage = p_frame.args.image;&lt;br /&gt;
		&lt;br /&gt;
			if p_frame.args.from ~= nil and p_frame.args.from ~= &amp;#039;&amp;#039; then&lt;br /&gt;
				entityId = p_frame.args.from;&lt;br /&gt;
			elseif p_frame.args[ 1 ] ~= nil and string.gmatch( p_frame.args[ 1 ], &amp;#039;^Q\d+$&amp;#039; ) then&lt;br /&gt;
				entityId = p_frame.args[ 1 ];&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local wdStatus, entity = pcall( mw.wikibase.getEntity, entityId );&lt;br /&gt;
	if wdStatus ~= true or entity == nil then&lt;br /&gt;
		return getErrorMessage( i18n_error_noWikidataEntity );&lt;br /&gt;
	elseif entity.claims == nil then&lt;br /&gt;
		return getErrorMessage( i18n_error_emptyWikidataEntity );&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- TODO: Need to consider how to display class properties (P31, P279, P361, ...).&lt;br /&gt;
	local skipPropertyIds = {};&lt;br /&gt;
	if config.skipPropertyIds then&lt;br /&gt;
		skipPropertyIds = mw.clone( config.skipPropertyIds );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local claims = entity.claims;&lt;br /&gt;
	local order = mw.wikibase.getPropertyOrder() or {};&lt;br /&gt;
&lt;br /&gt;
	-- Header.&lt;br /&gt;
	local entityLabel, entityLabelLang  = entity:getLabelWithLang( lang:getCode() );&lt;br /&gt;
	local label;&lt;br /&gt;
&lt;br /&gt;
	---- Name.&lt;br /&gt;
	local titleTemplate = getTemplate( &amp;#039;title&amp;#039; );&lt;br /&gt;
	-- TODO: Make it possible to specify a template for any value, not just Q5.&lt;br /&gt;
	if propertyHasEntity( claims.P31, &amp;#039;Q5&amp;#039; ) then&lt;br /&gt;
		local titleTemplateQ5 = getTemplate( &amp;#039;title_Q5&amp;#039; );&lt;br /&gt;
		if titleTemplateQ5 then&lt;br /&gt;
			titleTemplate = titleTemplateQ5;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if entityLabelLang == lang:getCode() then&lt;br /&gt;
		label = expandTemplate( frame, titleTemplate, { wdLabel, from = entityId } );&lt;br /&gt;
	else&lt;br /&gt;
		label = expandTemplate( frame, titleTemplate, { from = entityId } );&lt;br /&gt;
	end&lt;br /&gt;
	result = result .. getLine( label, &amp;#039;above&amp;#039;, true );&lt;br /&gt;
&lt;br /&gt;
	---- Original name.&lt;br /&gt;
	if claims.P1559 ~= nil then&lt;br /&gt;
		result = result .. getLine( expandTemplate( frame, getTemplate( &amp;#039;P1559&amp;#039; ), { from = entityId } ), &amp;#039;original&amp;#039; );&lt;br /&gt;
	elseif claims.P1705 ~= nil then&lt;br /&gt;
		result = result .. getLine( expandTemplate( frame, getTemplate( &amp;#039;P1705&amp;#039; ), { from = entityId } ), &amp;#039;original&amp;#039; );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	---- Flag and COA.&lt;br /&gt;
	if claims.P41 or claims.P94 then&lt;br /&gt;
		local flag = nil;&lt;br /&gt;
		local flagLabel = nil;&lt;br /&gt;
		local coa = nil;&lt;br /&gt;
		local coaLabel = nil;&lt;br /&gt;
&lt;br /&gt;
		if claims.P41 then&lt;br /&gt;
			flag = renderValue( frame, &amp;#039;P41&amp;#039; );&lt;br /&gt;
			if claims.P163 then&lt;br /&gt;
				flagLabel = renderValue( frame, &amp;#039;P163&amp;#039;, { text = simpleLabel( &amp;#039;Q14660&amp;#039; ) } );&lt;br /&gt;
			else&lt;br /&gt;
				flagLabel = simpleLabel( &amp;#039;Q14660&amp;#039; );&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if claims.P94 then&lt;br /&gt;
			coa = renderValue( frame, &amp;#039;P94&amp;#039; );&lt;br /&gt;
			if claims.P163 then&lt;br /&gt;
				coaLabel = renderValue( frame, &amp;#039;P237&amp;#039;, { text = simpleLabel( &amp;#039;Q14659&amp;#039; ) } );&lt;br /&gt;
			else&lt;br /&gt;
				coaLabel = simpleLabel( &amp;#039;Q14659&amp;#039; );&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		result = result .. splitLine( flagLabel, coaLabel );&lt;br /&gt;
		result = result .. splitLine( flag, coa );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Body.&lt;br /&gt;
	local propertyIds = {};&lt;br /&gt;
	for propertyId, claim in pairs( entity.claims ) do&lt;br /&gt;
		table.insert( propertyIds, propertyId );&lt;br /&gt;
	end&lt;br /&gt;
	local orderedProperties = mw.wikibase.orderProperties( propertyIds )&lt;br /&gt;
	&lt;br /&gt;
	local shownProperties = 0&lt;br /&gt;
	for i, propertyId in ipairs( orderedProperties ) do&lt;br /&gt;
		local propertyClaims = claims[ propertyId ];&lt;br /&gt;
		if not skipPropertyIds[ propertyId ]&lt;br /&gt;
				and propertyClaims&lt;br /&gt;
				and propertyClaims[ 1 ]&lt;br /&gt;
				and propertyClaims[ 1 ].mainsnak&lt;br /&gt;
				and propertyClaims[ 1 ].mainsnak.datatype&lt;br /&gt;
				and propertyClaims[ 1 ].mainsnak.datatype ~= &amp;#039;external-id&amp;#039;&lt;br /&gt;
				and propertyClaims[ 1 ].mainsnak.datatype ~= &amp;#039;tabular-data&amp;#039;&lt;br /&gt;
				and propertyClaims[ 1 ].mainsnak.datatype ~= &amp;#039;wikibase-property&amp;#039;&lt;br /&gt;
		then&lt;br /&gt;
			local label = propertyLabel( propertyId );&lt;br /&gt;
			if propertyClaims[ 1 ].mainsnak.datatype == &amp;#039;commonsMedia&amp;#039; then&lt;br /&gt;
				result = result .. getLine( renderValue( frame, propertyId, { alt = label } ), &amp;#039;image&amp;#039; );&lt;br /&gt;
			else&lt;br /&gt;
				result = result .. getValue( label, renderValue( frame, propertyId ) );&lt;br /&gt;
			end&lt;br /&gt;
			skipPropertyIds[ propertyId ] = true&lt;br /&gt;
			shownProperties = shownProperties + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Footer.&lt;br /&gt;
&lt;br /&gt;
	---- Map.&lt;br /&gt;
	if claims.P625 ~= nil then&lt;br /&gt;
		result = result .. getLine( renderValue( frame, &amp;#039;map&amp;#039; ), &amp;#039;text&amp;#039; );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	---- Commons.&lt;br /&gt;
	if claims.P373 ~= nil then&lt;br /&gt;
		result = result .. getLine( expandTemplate( frame, getTemplate( &amp;#039;P373&amp;#039; ), { from = entityId } ), &amp;#039;below&amp;#039; );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	result = result .. &amp;#039;&amp;lt;/table&amp;gt;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
	-- Coords.&lt;br /&gt;
	if claims.P625 ~= nil then&lt;br /&gt;
		result = result .. renderValue( frame, &amp;#039;P625&amp;#039;, { display = &amp;#039;title&amp;#039; } );&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Tracking category.&lt;br /&gt;
	if config and config.categories and config.categories[&amp;#039;few-properties-shown&amp;#039;] then&lt;br /&gt;
		if shownProperties &amp;lt; 4 then&lt;br /&gt;
			result = result .. &amp;#039;[[Category:&amp;#039; .. config.categories[&amp;#039;few-properties-shown&amp;#039;] .. &amp;#039;|&amp;#039; .. shownProperties .. &amp;#039;]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return result; &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p;&lt;/div&gt;</summary>
		<author><name>ru&gt;Andras</name></author>
	</entry>
</feed>