<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ko">
	<id>https://wiki.theeum.com/index.php?action=history&amp;feed=atom&amp;title=%EB%AA%A8%EB%93%88%3APortal_bar</id>
	<title>모듈:Portal bar - 편집 역사</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.theeum.com/index.php?action=history&amp;feed=atom&amp;title=%EB%AA%A8%EB%93%88%3APortal_bar"/>
	<link rel="alternate" type="text/html" href="https://wiki.theeum.com/index.php?title=%EB%AA%A8%EB%93%88:Portal_bar&amp;action=history"/>
	<updated>2026-04-04T02:08:19Z</updated>
	<subtitle>이 문서의 편집 역사</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.theeum.com/index.php?title=%EB%AA%A8%EB%93%88:Portal_bar&amp;diff=11767&amp;oldid=prev</id>
		<title>HyunJongSu: &quot;모듈:Portal bar&quot; 문서를 보호했습니다 ([편집=관리자만 허용] (무기한) [이동=관리자만 허용] (무기한))</title>
		<link rel="alternate" type="text/html" href="https://wiki.theeum.com/index.php?title=%EB%AA%A8%EB%93%88:Portal_bar&amp;diff=11767&amp;oldid=prev"/>
		<updated>2023-12-22T09:59:06Z</updated>

		<summary type="html">&lt;p&gt;&amp;quot;&lt;a href=&quot;/wiki/%EB%AA%A8%EB%93%88:Portal_bar&quot; title=&quot;모듈:Portal bar&quot;&gt;모듈:Portal bar&lt;/a&gt;&amp;quot; 문서를 보호했습니다 ([편집=관리자만 허용] (무기한) [이동=관리자만 허용] (무기한))&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;ko&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;2023년 12월 22일 (금) 18:59 판&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key eumwiki-eumwk_:diff::1.12:old-11766:rev-11767 --&gt;
&lt;/table&gt;</summary>
		<author><name>HyunJongSu</name></author>
	</entry>
	<entry>
		<id>https://wiki.theeum.com/index.php?title=%EB%AA%A8%EB%93%88:Portal_bar&amp;diff=11766&amp;oldid=prev</id>
		<title>HyunJongSu: 새 문서: -- This module implements {{portal bar}}.  require(&#039;strict&#039;)  local p = {} local function checkPortalExists(portal) 	return not (mw.title.makeTitle(100, portal).id == 0) end local getImageName = require( &#039;Module:Portal&#039; ).image local yesno = require( &#039;Module:Yesno&#039; )  local trackingInThisNamespace = false  local function checkNamespace() 	local thisPage = mw.title.getCurrentTitle() 	if (thisPage.namespace == 2) -- User 		or (thisPage.namespace == 3) -- User talk 		or (thisPage.n...</title>
		<link rel="alternate" type="text/html" href="https://wiki.theeum.com/index.php?title=%EB%AA%A8%EB%93%88:Portal_bar&amp;diff=11766&amp;oldid=prev"/>
		<updated>2023-12-22T09:59:01Z</updated>

		<summary type="html">&lt;p&gt;새 문서: -- This module implements {{portal bar}}.  require(&amp;#039;strict&amp;#039;)  local p = {} local function checkPortalExists(portal) 	return not (mw.title.makeTitle(100, portal).id == 0) end local getImageName = require( &amp;#039;Module:Portal&amp;#039; ).image local yesno = require( &amp;#039;Module:Yesno&amp;#039; )  local trackingInThisNamespace = false  local function checkNamespace() 	local thisPage = mw.title.getCurrentTitle() 	if (thisPage.namespace == 2) -- User 		or (thisPage.namespace == 3) -- User talk 		or (thisPage.n...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;새 문서&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{portal bar}}.&lt;br /&gt;
&lt;br /&gt;
require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
local function checkPortalExists(portal)&lt;br /&gt;
	return not (mw.title.makeTitle(100, portal).id == 0)&lt;br /&gt;
end&lt;br /&gt;
local getImageName = require( &amp;#039;Module:Portal&amp;#039; ).image&lt;br /&gt;
local yesno = require( &amp;#039;Module:Yesno&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
local trackingInThisNamespace = false&lt;br /&gt;
&lt;br /&gt;
local function checkNamespace()&lt;br /&gt;
	local thisPage = mw.title.getCurrentTitle()&lt;br /&gt;
	if (thisPage.namespace == 2) -- User&lt;br /&gt;
		or (thisPage.namespace == 3) -- User talk&lt;br /&gt;
		or (thisPage.namespace == 5) -- Wikipedia talk&lt;br /&gt;
		or (thisPage.namespace == 7) -- File talk&lt;br /&gt;
		or (thisPage.namespace == 11) -- Template talk&lt;br /&gt;
		or (thisPage.namespace == 15) -- Category talk&lt;br /&gt;
		or (thisPage.namespace == 101) -- Portal talk&lt;br /&gt;
		or (thisPage.namespace == 829) -- Module talk&lt;br /&gt;
		then&lt;br /&gt;
		trackingInThisNamespace = true&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
	trackingInThisNamespace = false&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Builds the portal bar used by {{portal bar}}.&lt;br /&gt;
function p._main( portals, args )&lt;br /&gt;
	&lt;br /&gt;
	if #portals &amp;lt; 1 then return &amp;#039;&amp;#039; end -- Don&amp;#039;t display a blank navbox if no portals were specified.&lt;br /&gt;
	&lt;br /&gt;
	local nav = mw.html.create( &amp;#039;div&amp;#039; )&lt;br /&gt;
		:addClass( &amp;#039;noprint metadata&amp;#039; )&lt;br /&gt;
		:attr( &amp;#039;role&amp;#039;, &amp;#039;navigation&amp;#039; )&lt;br /&gt;
		:attr( &amp;#039;aria-label&amp;#039; , &amp;#039;Portals&amp;#039; )&lt;br /&gt;
		:css( &amp;#039;font-weight&amp;#039;, &amp;#039;bold&amp;#039; )&lt;br /&gt;
	if yesno( args.border ) == false then&lt;br /&gt;
		nav&lt;br /&gt;
			:css( &amp;#039;padding&amp;#039;, &amp;#039;0.3em 1.7em 0.1em&amp;#039; )&lt;br /&gt;
			:css( &amp;#039;font-size&amp;#039;, &amp;#039;88%&amp;#039; )&lt;br /&gt;
			:css( &amp;#039;text-align&amp;#039;, &amp;#039;center&amp;#039; )&lt;br /&gt;
	else&lt;br /&gt;
		nav&lt;br /&gt;
			:addClass( &amp;#039;navbox&amp;#039; )&lt;br /&gt;
			:css( &amp;#039;padding&amp;#039;, &amp;#039;0.4em 2em&amp;#039; )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	checkNamespace()&lt;br /&gt;
&lt;br /&gt;
	-- scan for nonexistent portals, if they exist remove them from the portals table. If redlinks=yes, then don&amp;#039;t remove&lt;br /&gt;
	local portallen = #portals&lt;br /&gt;
	-- traverse the list backwards to ensure that no portals are missed (table.remove also moves down the portals in the list, so that the next portal isn&amp;#039;t checked if going fowards.&lt;br /&gt;
	-- going backwards allows us to circumvent this issue&lt;br /&gt;
	for i=portallen,1,-1 do&lt;br /&gt;
		-- the use of pcall here catches any errors that may occour when attempting to locate pages when the page name is invalid&lt;br /&gt;
		-- if pcall returns true, then rerun the function to find if the page exists&lt;br /&gt;
		if not pcall(checkPortalExists, portals[i]) or not checkPortalExists(portals[i]) then&lt;br /&gt;
			-- Getting here means a redlinked portal has been found&lt;br /&gt;
			if (args.redlinks == &amp;#039;yes&amp;#039;) or (args.redlinks == &amp;#039;y&amp;#039;) or (args.redlinks == &amp;#039;true&amp;#039;) or (args.redlinks == &amp;#039;include&amp;#039;) then&lt;br /&gt;
				-- if redlinks as been set to yes (or similar), add the cleanup category and then break the loop before the portal is removed from the list&lt;br /&gt;
				if not (trackingInThisNamespace) then&lt;br /&gt;
					nav:wikitext(&amp;#039;[[분류:깨진 포털이 있는 포털 틀]]&amp;#039;) -- Category:Portal templates with redlinked portals&lt;br /&gt;
				end&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
			-- remove the portal (this does not happen if redlinks=yes)&lt;br /&gt;
			table.remove(portals,i)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- if the length of the table is different, then rows were removed from the table, so portals were removed. If this is the case add the cleanup category&lt;br /&gt;
	if not (portallen == #portals) then&lt;br /&gt;
		if #portals == 0 then&lt;br /&gt;
        	if not (trackingInThisNamespace) then&lt;br /&gt;
				return &amp;#039;[[분류:깨진 포털이 있는 포털 틀]]&amp;#039; -- Category:Portal templates with all redlinked portals&lt;br /&gt;
			else&lt;br /&gt;
				return &amp;quot;&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
        end&lt;br /&gt;
		if not (trackingInThisNamespace) then&lt;br /&gt;
			nav:wikitext(&amp;#039;[[분류:깨진 포털이 있는 포털 틀]]&amp;#039;) -- Category:Portal templates with redlinked portals&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local list = mw.html.create( &amp;#039;ul&amp;#039; )&lt;br /&gt;
		:css( &amp;#039;margin&amp;#039;, &amp;#039;0.1em 0 0&amp;#039; )&lt;br /&gt;
	for _, portal in ipairs( portals ) do&lt;br /&gt;
		list&lt;br /&gt;
			:tag( &amp;#039;li&amp;#039; )&lt;br /&gt;
				:css( &amp;#039;display&amp;#039;, &amp;#039;inline&amp;#039; )&lt;br /&gt;
				:tag( &amp;#039;span&amp;#039; ) -- Inline-block on inner span for IE6-7 compatibility.&lt;br /&gt;
					:css( &amp;#039;display&amp;#039;, &amp;#039;inline-block&amp;#039; )&lt;br /&gt;
					:css( &amp;#039;white-space&amp;#039;, &amp;#039;nowrap&amp;#039; )&lt;br /&gt;
					:tag( &amp;#039;span&amp;#039; )&lt;br /&gt;
						:css( &amp;#039;margin&amp;#039;, &amp;#039;0 0.5em&amp;#039; )&lt;br /&gt;
						:wikitext( string.format( &amp;#039;[[파일:%s|24x21px]]&amp;#039;, getImageName{ portal } ) )&lt;br /&gt;
						:done()&lt;br /&gt;
					:wikitext( string.format( &amp;#039;[[포털:%s|%s 포털]]&amp;#039;, portal, portal ) )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	nav&lt;br /&gt;
		:node( list )&lt;br /&gt;
	&lt;br /&gt;
	return tostring( nav )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Processes external arguments and sends them to the other functions.&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
	-- If called via #invoke, use the args passed into the invoking&lt;br /&gt;
	-- template, or the args passed to #invoke if any exist. Otherwise&lt;br /&gt;
	-- assume args are being passed directly in from the debug console&lt;br /&gt;
	-- or from another Lua module.&lt;br /&gt;
	local origArgs&lt;br /&gt;
	if type( frame.getParent ) == &amp;#039;function&amp;#039; then&lt;br /&gt;
		origArgs = frame:getParent().args&lt;br /&gt;
		for k, v in pairs( frame.args ) do&lt;br /&gt;
			origArgs = frame.args&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		origArgs = frame&lt;br /&gt;
	end&lt;br /&gt;
	-- Process the args to make an array of portal names that can be used with ipairs. We need to use ipairs because we want to list&lt;br /&gt;
	-- all the portals in the order they were passed to the template, but we also want to be able to deal with positional arguments&lt;br /&gt;
	-- passed explicitly, for example {{portal|2=Politics}}. The behaviour of ipairs is undefined if nil values are present, so we&lt;br /&gt;
	-- need to make sure they are all removed.&lt;br /&gt;
	local portals, args = {}, {}&lt;br /&gt;
	for k, v in pairs( origArgs ) do&lt;br /&gt;
		if type( k ) == &amp;#039;number&amp;#039; and type( v ) == &amp;#039;string&amp;#039; then -- Make sure we have no non-string portal names.&lt;br /&gt;
			if mw.ustring.find( v, &amp;#039;%S&amp;#039; ) then -- Remove blank values.&lt;br /&gt;
				table.insert( portals, k )&lt;br /&gt;
				end&lt;br /&gt;
			elseif type( k ) ~= &amp;#039;number&amp;#039; then -- Separate named arguments from portals.&lt;br /&gt;
			if type( v ) == &amp;#039;string&amp;#039; then&lt;br /&gt;
				v = mw.text.trim( v )&lt;br /&gt;
			end&lt;br /&gt;
			args[ k ] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort( portals )&lt;br /&gt;
	for i, v in ipairs( portals ) do&lt;br /&gt;
		portals[ i ] = mw.text.trim( origArgs[ v ] ) -- Swap keys with values, trimming whitespace.&lt;br /&gt;
	end&lt;br /&gt;
	return p._main( portals, args )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>HyunJongSu</name></author>
	</entry>
</feed>