בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,382
רעדאגירונגען
(צופאסונג) צייכן: צוריקגעשטעלט |
(ניסוי) צייכן: מאנועל צוריקשטעל |
||
| שורה 94: | שורה 94: | ||
local function changeIntoEng(param) | local function changeIntoEng(param) | ||
if ( param == 'מרכז' or param == 'center' or param == ' | if ( param == 'מרכז' or param == 'center' or param == 'centre' ) then | ||
return 'center' | return 'center' | ||
elseif ( align == 'ימין' or param == 'right | elseif ( align == 'ימין' or param == 'right' ) then | ||
return 'right' | return 'right' | ||
elseif ( align == 'שמאל' or param == 'left | elseif ( align == 'שמאל' or param == 'left' ) then | ||
return 'left' | return 'left' | ||
else | else | ||
| שורה 108: | שורה 108: | ||
local pargs = frame:getParent().args | local pargs = frame:getParent().args | ||
local args = frame.args | local args = frame.args | ||
local width = removepx(pargs[' | local width = removepx(pargs['רוחב'] or '') | ||
local dir = pargs[' | local dir = pargs['כיוון'] or '' | ||
local border = pargs['גבול'] or args['גבול'] or '' | local border = pargs['גבול'] or args['גבול'] or '' | ||
local align = changeIntoEng(pargs[' | local align = changeIntoEng(pargs['יישור']) or changeIntoEng(args['יישור']) or 'left' | ||
local capalign = changeIntoEng(pargs[' | local capalign = changeIntoEng(pargs['יישור כותרת']) or changeIntoEng(args['יישור כותרת']) or '' | ||
local totalwidth = removepx(pargs[' | local totalwidth = removepx(pargs['רוחב כולל'] or args['רוחב כולל'] or '') | ||
local imgstyle = pargs['עיצוב | local imgstyle = pargs['עיצוב תמונה'] or args['עיצוב תמונה'] | ||
local header = pargs[' | local header = pargs['כותרת'] or pargs['כותרת'] or nil | ||
local footer = pargs[' | local footer = pargs['סיומת'] or nil | ||
local imagegap = tonumber(pargs['מרווח'] or '1') or 1 | local imagegap = tonumber(pargs['מרווח'] or '1') or 1 | ||
local perrow = nil | local perrow = nil | ||
| שורה 123: | שורה 123: | ||
["none"] = 'tnone', | ["none"] = 'tnone', | ||
["center"] = 'tnone', | ["center"] = 'tnone', | ||
[" | ["centre"] = 'tnone', | ||
["right"] = 'tright' | ["right"] = 'tright' | ||
} | } | ||
| שורה 133: | שורה 131: | ||
local imagecount = 0 | local imagecount = 0 | ||
for k, v in pairs( pargs ) do | for k, v in pairs( pargs ) do | ||
local i = tonumber(tostring(k):match( '^%s* | local i = tonumber(tostring(k):match( '^%s*תמונה([%d]+)%s*$' ) or '0') | ||
if( i > 0 and isnotempty(v) ) then | if( i > 0 and isnotempty(v) ) then | ||
table.insert( imagenumbers, i) | table.insert( imagenumbers, i) | ||
| שורה 162: | שורה 160: | ||
local i = imagenumbers[k] | local i = imagenumbers[k] | ||
if( isnotempty(totalwidth) ) then | if( isnotempty(totalwidth) ) then | ||
widths[k], heights[k] = getdimensions(pargs[' | widths[k], heights[k] = getdimensions(pargs['תמונה' .. i], pargs['רוחב' .. i], pargs['אורך' .. i]) | ||
else | else | ||
widths[k] = getWidth(width, pargs[' | widths[k] = getWidth(width, pargs['רוחב' .. i]) | ||
end | end | ||
widthsum[r] = widthsum[r] + widths[k] | widthsum[r] = widthsum[r] + widths[k] | ||
| שורה 230: | שורה 228: | ||
bodywidth = math.max( 100, bodywidth - 8); | bodywidth = math.max( 100, bodywidth - 8); | ||
local bg = pargs[' | local bg = pargs['רקע'] or '' | ||
-- create the array of images | -- create the array of images | ||
local root = mw.html.create('div') | local root = mw.html.create('div') | ||
| שורה 260: | שורה 258: | ||
:tag('div') | :tag('div') | ||
:addClass('theader') | :addClass('theader') | ||
:css('text-align', pargs[' | :css('text-align', pargs['יישור כותרת']) | ||
:css('background-color', pargs[' | :css('background-color', pargs['רקע כותרת']) | ||
:wikitext(header) | :wikitext(header) | ||
end | end | ||
| שורה 280: | שורה 278: | ||
end | end | ||
local i = imagenumbers[k] | local i = imagenumbers[k] | ||
local img = pargs[' | local img = pargs['תמונה' .. i] | ||
local w = widths[k] | local w = widths[k] | ||
imagediv:css('width', tostring(2 + w) .. 'px') | imagediv:css('width', tostring(2 + w) .. 'px') | ||
| שורה 292: | שורה 290: | ||
-- add the footer | -- add the footer | ||
if( isnotempty(footer) ) then | if( isnotempty(footer) ) then | ||
local falign = string.lower(changeIntoEng(pargs[' | local falign = string.lower(changeIntoEng(pargs['יישור סיומת']) or changeIntoEng(args['יישור סיומת']) or 'left') | ||
falign = (falign == 'centre') and 'center' or falign | falign = (falign == 'centre') and 'center' or falign | ||
div:tag('div') | div:tag('div') | ||
| שורה 300: | שורה 298: | ||
:addClass('thumbcaption') | :addClass('thumbcaption') | ||
:css('text-align', (falign ~= 'left') and falign or nil) | :css('text-align', (falign ~= 'left') and falign or nil) | ||
:css('background-color', pargs[' | :css('background-color', pargs['רקע סיומת']) | ||
:wikitext(footer) | :wikitext(footer) | ||
end | end | ||
| שורה 312: | שורה 310: | ||
nonautoscaledimages = false | nonautoscaledimages = false | ||
return frame:extensionTag {name = 'templatestyles', args = {src = ' | return frame:extensionTag {name = 'templatestyles', args = {src = 'תמונות מרובות/styles.css', wrapper = ".tmulti"}} | ||
.. renderMultipleImages( frame ) | .. renderMultipleImages( frame ) | ||
-- .. (autoscaledimages and '[[Category:Pages using multiple image with auto scaled images]]' or '') | -- .. (autoscaledimages and '[[Category:Pages using multiple image with auto scaled images]]' or '') | ||
רעדאגירונגען