View source for Module:Wide image

From HandWiki

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in one of the groups: Users, Bureaucrats.
  • You do not have permission to edit pages in the Module namespace.

You can view and copy the source of this page.

-- This module implements [[template:wide image]] and [[template:panorama]]
local p = {}
local function getfilename(s)
s = mw.ustring.gsub(s or '', '^%s*[Ff][Ii][Ll][Ee]%s*:%s*', '')
s = mw.ustring.gsub(s or '', '^%s*[Ii][Mm][Aa][Gg][Ee]%s*:%s*', '')
return s
end
local function getwidth(s, w, h)
w = mw.ustring.gsub(w or '0', '^%s*(%d+)%s*[Pp][Xx]*%s*$', '%1')
h = mw.ustring.gsub(h or '0', '^%s*(%d+)%s*[Pp][Xx]*%s*$', '%1')
w = tonumber(w) or 0
h = tonumber(h) or 0
if w > 0 then
return w
end
local file = s and mw.title.new('File:' .. mw.uri.decode(mw.ustring.gsub(s,'%|.*$',''), 'WIKI'))
file = file and file.file or {width = 0, height = 0}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:Wide image.