Module:Sandbox/Aidan9382: Difference between revisions

Content deleted Content added
callin it p
Weird behaviour, lets note it down
Tag: Reverted
Line 20:
function p:namecall()
return self
end
 
function p.pipeProcessingAbsurdityTest(frame)
-- To do with [[Module:Random slideshow]]
-- {{#tag:gallery|' .. galleryContent .. '|mode=slideshow|class=switcher-container}}
local inputUnpiped = [==[File:MH-60S Helicopter dumps water onto Fire.jpg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 1</span></span>Water is used for [[fire fighting{{!}}fighting]] [[wildfire]]s. (from '''[[Water]]''')
File:Water molecule (1).svg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 2</span></span>A water molecule consists of two hydrogen atoms and one oxygen atom (from '''[[Water]]''')
File:Water withdrawals per capita, OWID.svg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 3</span></span>Total water withdrawals for agricultural, industrial and municipal purposes per capita, measured in cubic metres (m³) per year in 2010 (from '''[[Water]]''')
File:Icosahedron-spinoza.jpg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 4</span></span>[[Icosahedron]] as a part of [[Baruch Spinoza{{!}}Spinoza]] monument in [[Amsterdam]]. (from '''[[Water]]'''){{!}}alt{{=}}Icosahedron as a part of Spinoza monument in Amsterdam.
File:Sterilewater.jpg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 5</span></span>Sterile water for injection (from '''[[Water]]''')]==]
-- just the first five images given out by galleryContent in Random slideshow.makeOutput()
local inputPiped = string.gsub(inputUnpiped,"{{!}}","|")
local results = {}
results[#results+1] = frame:preprocess("{{#tag:gallery|" .. inputUnpiped .. "|mode=slideshow|class=switcher-container}}")
results[#results+1] = frame:preprocess("{{#tag:gallery|" .. inputPiped .. "|mode=slideshow|class=switcher-container}}")
results[#results+1] = frame:preprocess("{{#tag:gallery|{{#invoke:Text|concatParams|" .. inputPiped .. "}}|mode=slideshow|class=switcher-container}}")
return table.concat(results,"\n\n")
end