உள்ளடக்கத்துக்குச் செல்

Module:Portal-inline

கட்டற்ற கலைக்களஞ்சியமான விக்கிப்பீடியாவில் இருந்து.
en>Dreamy Jazz பயனரால் செய்யப்பட்ட 16:48, 6 சனவரி 2019 அன்றிருந்தவாரான திருத்தம் (start module)

Documentation for this module may be created at Module:Portal-inline/doc

local getImageName = require( 'Module:Portal' ).image

local p = {}

local function checkPortalExists(portal)
	return not (mw.title.makeTitle(100, portal).id == 0)
end

function p._main(portal)
	-- If no portals have been specified, display an error and add the page to a tracking category.
	if not portal then
		root:wikitext('<span style="font-size:100%;" class="error">error: missing portal name.</span></strong>[[Category:Portal templates without a parameter]]')
		return tostring(root)
	end
	
	if not pcall(checkPortalExists, portal) or not checkPortalExists(portal) then
		-- Getting here means a redlinked portal has been found
		if not ((args.redlinks == 'yes') or (args.redlinks == 'y') or (args.redlinks == 'true') or (args.redlinks == 'include')) then
			-- just return if redlinks is not "yes" or similar
			root:wikitext('[[Category:Portal templates all redlinked portals]]')
			return tostring(root)
		end
		root:wikitext('[[Category:Portal templates all redlinked portals]]')
	end
	
	-- display portal-inline content
	
end
"https://ta.wikipedia.org/w/index.php?title=Module:Portal-inline&oldid=2862937" இலிருந்து மீள்விக்கப்பட்டது