<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.moltenaether.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3APortal-inline</id>
	<title>Module:Portal-inline - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.moltenaether.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3APortal-inline"/>
	<link rel="alternate" type="text/html" href="https://wiki.moltenaether.com/w/index.php?title=Module:Portal-inline&amp;action=history"/>
	<updated>2026-04-20T19:39:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://wiki.moltenaether.com/w/index.php?title=Module:Portal-inline&amp;diff=18329&amp;oldid=prev</id>
		<title>Cyclops: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.moltenaether.com/w/index.php?title=Module:Portal-inline&amp;diff=18329&amp;oldid=prev"/>
		<updated>2023-05-22T19:58:44Z</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;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;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:58, 22 May 2023&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key buwiki:diff::1.12:old-18328:rev-18329 --&gt;
&lt;/table&gt;</summary>
		<author><name>Cyclops</name></author>
	</entry>
	<entry>
		<id>https://wiki.moltenaether.com/w/index.php?title=Module:Portal-inline&amp;diff=18328&amp;oldid=prev</id>
		<title>wikipedia&gt;Hike395: automatically call Module:Portal/sandbox under test + new interface to getImageName</title>
		<link rel="alternate" type="text/html" href="https://wiki.moltenaether.com/w/index.php?title=Module:Portal-inline&amp;diff=18328&amp;oldid=prev"/>
		<updated>2022-06-05T03:25:23Z</updated>

		<summary type="html">&lt;p&gt;automatically call &lt;a href=&quot;/w/index.php?title=Module:Portal/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:Portal/sandbox (page does not exist)&quot;&gt;Module:Portal/sandbox&lt;/a&gt; under test + new interface to getImageName&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- determine whether we're being called from a sandbox&lt;br /&gt;
local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true)&lt;br /&gt;
local sandbox = isSandbox and '/sandbox' or ''&lt;br /&gt;
&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
local portalModule = require('Module:Portal'..sandbox)&lt;br /&gt;
local getImageName = portalModule._image&lt;br /&gt;
local checkPortals = portalModule._checkPortals&lt;br /&gt;
local processPortalArgs = portalModule._processPortalArgs&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Function to format error message and tracking category&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   errMsg: string, or nil/false if no error&lt;br /&gt;
--   trackingCat: string for tracking category (or empty string)&lt;br /&gt;
local function formatError(errMsg, trackingCat)&lt;br /&gt;
	local result = trackingCat or ''&lt;br /&gt;
	if errMsg then&lt;br /&gt;
		local errTag = mw.html.create('span')&lt;br /&gt;
		errTag:addClass(&amp;quot;error&amp;quot;)&lt;br /&gt;
		errTag:css(&amp;quot;font-size&amp;quot;,'100%')&lt;br /&gt;
		errTag:wikitext(&amp;quot;Error: &amp;quot;..errMsg)&lt;br /&gt;
		result = tostring(errTag)..result&lt;br /&gt;
	end&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function image(portal, args)&lt;br /&gt;
	local size = args.size == &amp;quot;tiny&amp;quot; and &amp;quot;16x16px&amp;quot; or &amp;quot;32x28px&amp;quot;&lt;br /&gt;
	return string.format('[[File:%s|class=noviewer|%s]]',getImageName(portal,true), size)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function link(portal, args)&lt;br /&gt;
	local displayName = &amp;quot;&amp;quot;&lt;br /&gt;
	if not (args.text == &amp;quot;&amp;quot; or args.text == nil) then&lt;br /&gt;
		displayName = args.text&lt;br /&gt;
	elseif args.short then&lt;br /&gt;
		displayName = portal&lt;br /&gt;
	else&lt;br /&gt;
		displayName = portal .. &amp;quot;&amp;amp;#32;portal&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return string.format('[[Portal:%s|%s]]',portal,displayName)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(portals, args)&lt;br /&gt;
	mw.logObject(args)&lt;br /&gt;
	&lt;br /&gt;
	-- Normalize all arguments&lt;br /&gt;
	if args.redlinks == 'include' then args.redlinks = true end&lt;br /&gt;
	for key, default in pairs({tracking=true,redlinks=false,short=false}) do&lt;br /&gt;
		if args[key] == nil then args[key] = default end&lt;br /&gt;
		args[key] = yesno(args[key], default)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local trackingCat = ''&lt;br /&gt;
	local errMsg = nil&lt;br /&gt;
	&lt;br /&gt;
	-- Check for existing categories, drop if not. &lt;br /&gt;
	-- Possible generate tracking category &amp;amp; error message if needed&lt;br /&gt;
	args.minPortals = args.minPortals or 1&lt;br /&gt;
	args.maxPortals = args.maxPortals or 1&lt;br /&gt;
	portals, trackingCat, errMsg = checkPortals(portals,args)&lt;br /&gt;
	-- use more specific tracking cat for inline portal&lt;br /&gt;
	trackingCat = mw.ustring.gsub(trackingCat,&amp;quot;Portal templates&amp;quot;,&amp;quot;Portal-inline template&amp;quot;)&lt;br /&gt;
	-- either too many/few portals, or no portals left after filtering, then return&lt;br /&gt;
	if errMsg or #portals == 0 then&lt;br /&gt;
		return formatError(errMsg, trackingCat)&lt;br /&gt;
	end&lt;br /&gt;
	return image(portals[1],args)..'&amp;amp;nbsp;'..link(portals[1],args)..(trackingCat or '')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = getArgs(frame)&lt;br /&gt;
	local portals, args = processPortalArgs(origArgs)&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>wikipedia&gt;Hike395</name></author>
	</entry>
</feed>