Moduł:Test
To jest moduł testowy - po zakończeniu prac pozostaw następujący Kod Początkowy Modułu:
Kod początkowy[edytuj]
-- To jest moduł testowy - po zakończeniu prac pozostaw kod podany w dokumentacji local p = {} function p.hello() return "Hello, world!" end return p
-- To jest moduł testowy - po zakończeniu prac pozostaw kod podany w dokumentacji
local p = {}
function p.hello(frame)
ala = frame:extensionTag( 'DynamicPageList', 'category=Jerzy Żuławski/regał' .. '\n' .. 'mode=inline', { } )
bela = frame:callParserFunction{ name = '#tag', args = { 'DynamicPageList', 'category=Jerzy Żuławski/regał' .. '\n' .. 'mode=inline' } }
ala = frame:preprocess{ text = ala }
cela = frame:newParserValue( bela )
mw.log(ala, '\n', cela:expand())
return ala .. '\n' .. cela:expand()
end
-- Returns all sitelinks of a given data item and wiki.
-- @param string|nil id the item id (default: the item linked to the current page)
-- @param string|nil site the site (default: the current site)
function p.allsitelink(frame)
if not frame.args.id then
item = mw.wikibase.getEntityObject()
if not item then
return ""
end
else
item = mw.wikibase.getEntityObject(frame.args.id)
end
local lista = ""
for k, v in pairs( mw.language.fetchLanguageNames() ) do
if k~='pl' then
lista = lista .. (item:getSitelink(k .. frame.args.wiki or nil) and ("[["..k..":"..item:getSitelink(k .. frame.args.wiki or nil).."]]") or "")
end
end
return lista
-- end
-- return wikibase.sitelink(frame.args.id)
end
return p