Modul:Stadtwikis
Die Dokumentation für dieses Modul kann unter Modul:Stadtwikis/Doku erstellt werden
local p = {}
local c = require( "Module:Common" )
function p.Versuch(frame)
t = getAPIdata("https://www.fuerthwiki.de/wiki/api.php?action=query&meta=siteinfo&siprop=statistics&format=json")
x='<table class="wikitable"><tr>'..
'<th>Artikel</th>'..
'<th>Bilder</th>'..
'<th>Bearbeitungen</th>'..
'<th>Benutzer</th>'..
'<th>Aktive</th>'..
'<th>Adminis</th>'..
tabelizeData(t)..
'</table>'
return x
end
function tabelizeData(t)
h='<tr>'..
'<td>'..t['articles']..'</td>'..
'<td>'..t['images']..'</td>'..
'<td>'..t['edits']..'</td>'..
'<td>'..t['users']..'</td>'..
'<td>'..t['activeusers']..'</td>'..
'<td>'..t['admins']..'</td>'..
'</tr>'
return h
end
function getAPIdata(url)
t = mw.ext.externalData.getWebData {url=url}
return t
end
return p