Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.
Änderungen
Zur Navigation springen
Zur Suche springen
Zeile 1:
Zeile 1:
− +
Zeile 552:
Zeile 552:
− +
+
+
+
− +
+
+
Zeile 591:
Zeile 596:
− +
− r = ""+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
− +
− if type( opt.template ) == "string" then +
− s = s:gsub( "@@@", opt.template )+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
− local i
− local cats = mw.text.split( s, "%s*#%s*" )
− for i = 1, #cats do
− s = mw.text.trim( cats[ i ] )
− if #s > 0 then
− r = string.format( "%s[[Category:%s]]", r, s )
− end
− end -- for i
Zeile 916:
Zeile 943:
+
Zeile 930:
Zeile 958:
+
Zeile 1.166:
Zeile 1.195:
+
Zeile 1.177:
Zeile 1.207:
+
Zeile 1.227:
Zeile 1.258:
+
Modul:TemplatePar (Quelltext anzeigen)
Version vom 20. Februar 2015, 15:40 Uhr
, 15:40, 20. Feb. 2015neue Version von PerfektesChaos
--[=[ TemplatePar 2015-02-09
--[=[ TemplatePar 2015-02-14
Template parameter utility
Template parameter utility
* assert
* assert
if type( s ) == "string" and
if type( s ) == "string" and
s ~= "" and s ~= "0" and s ~= "-" then
s ~= "" and s ~= "0" and s ~= "-" then
lazy = false
if lazy then
show = ""
lazy = false
end
if not frame then
if not frame then
frame = mw.getCurrentFrame()
frame = mw.getCurrentFrame()
end
end
if frame:preprocess( "{{REVISIONID}}" ) == "" then
if frame:preprocess( "{{REVISIONID}}" ) == "" then
if s ~= "1" then
if s == "1" then
show = "*"
else
show = s
show = s
end
end
s = opt.cat
s = opt.cat
if type( s ) == "string" then
if type( s ) == "string" then
if not r then
if opt.errNS then
local ns = mw.title.getCurrentTitle().namespace
local st = type( opt.errNS )
if st == "string" then
local space = string.format( ".*%%s%d%%s.*", ns )
local spaces = string.format( " %s ", opt.errNS )
if spaces:match( space ) then
opt.errNS = false
end
elseif st == "table" then
for i = 1, #opt.errNS do
if opt.errNS[ i ] == ns then
opt.errNS = false
break -- for i
end
end -- for i
end
end
end
if s:find( "@@@" ) then
if opt.errNS then
r = ""
else
if not r then
r = ""
end
end
if s:find( "@@@" ) then
if type( opt.template ) == "string" then
s = s:gsub( "@@@", opt.template )
end
end
local i
local cats = mw.text.split( s, "%s*#%s*" )
for i = 1, #cats do
s = mw.text.trim( cats[ i ] )
if #s > 0 then
r = string.format( "%s[[Category:%s]]", r, s )
end
end -- for i
end
end
end
end
end
end
optional = { "2",
optional = { "2",
"cat",
"cat",
"errNS",
"low",
"low",
"max",
"max",
local s
local s
options = { cat = frame.args.cat,
options = { cat = frame.args.cat,
errNS = frame.args.errNS,
low = frame.args.low,
low = frame.args.low,
format = frame.args.format,
format = frame.args.format,
"opt",
"opt",
"cat",
"cat",
"errNS",
"low",
"low",
"format",
"format",
optional = fill( frame.args.opt ),
optional = fill( frame.args.opt ),
cat = frame.args.cat,
cat = frame.args.cat,
errNS = frame.args.errNS,
low = frame.args.low,
low = frame.args.low,
format = frame.args.format,
format = frame.args.format,
local r = false
local r = false
local options = { cat = frame.args.cat,
local options = { cat = frame.args.cat,
errNS = frame.args.errNS,
low = frame.args.low,
low = frame.args.low,
format = frame.args.format,
format = frame.args.format,