Editing Module:Video

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 2: Line 2:


function p.file( frame )
function p.file( frame )
if frame.args[2] and frame.args[2] ~= 'none' then
-- fileexists = frame:expandTemplate{title = 'exist', args = {'file:'..frame.args[1]..'.webm', 'yes'}}
fileexists = frame:expandTemplate{title = 'exist', args = {'file:'..frame.args[1]..'-'..frame.args[2]..'-voice.webm', 'yes'}}
-- fileexists = frame:expandTemplate{title = 'exist', args = {'file:'..frame.args[1]..'.ogg', 'yes'}}
if fileexists == 'yes' then
return frame.args[1]..'-'..frame.args[2]..'-voice.webm'
end
end
for _, source in pairs({'RoE', 'AB', 'SoD', 'HC', 'HotA'}) do
if frame.args[1]:match('^' .. source) == source then
fileexists = frame:expandTemplate{title = 'exist', args = {'file:'..frame.args[1]..'-'..source..'-voice.webm', 'yes'}}
if fileexists == 'yes' then
return frame.args[1]..'-'..source..'-voice.webm'
end
break
end
end
 
fileexists = frame:expandTemplate{title = 'exist', args = {'file:'..frame.args[1]..'.webm', 'yes'}}
if fileexists == 'yes' then
return frame.args[1]..'.webm'
end
local lines = p.split(frame.args[1], '-')
local lines = p.split(frame.args[1], '-')
local parent2 = ''
local result = ''
for i, line in ipairs(lines) do
for i, line in ipairs(lines) do
  parent2 = parent2 .. line
if i + 0 >= #lines then
if i + 2 >= #lines then
break
break
else
parent2 = parent2 .. '-'
end
end
  result = result .. line
end
end
 
return (result)
return parent2..'.gif'
-- fileexists = frame:expandTemplate{title = 'exist', args = {'file:'..frame.args[1]..'.png', 'yes'}}
-- if frame.args[1] == 'if'  then
-- return 'if'
-- elseif frame.args[1] == 'elseif'  then
-- return 'elseif'
-- else
-- return 'else'
-- end
end
end


Please note that all contributions to Heroes 3 wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)