×
Create a new article
Write your page title here:
We currently have 230 articles on Farthest Frontier. Type your article name above or create one of the articles listed here!



    Farthest Frontier

    Module:TNT: Difference between revisions

    Content added Content deleted
    m (1 revision imported)
    (updating to current TNT standard)
    Line 50:
    id = mw.text.trim(v)
    elseif type(k) == 'number' then
    table.insert(params[k - 2] =, mw.text.trim(v))
    elseif k == 'lang' and v ~= '_' then
    lang = mw.text.trim(v)
    Line 96:
    local data = loadData(dataset)
    local names = {}
    for _, field in ipairspairs(data.schema.fields) do
    table.insert(names, field.name)
    end
    Line 102:
    local params = {}
    local paramOrder = {}
    for _, row in ipairspairs(data.data) do
    local newVal = {}
    local name = nil
    for pos, columnNameval in ipairspairs(namesrow) do
    local columnName = names[pos]
    if columnName == 'name' then
    name = row[pos]val
    else
    newVal[columnName] = row[pos]val
    end
    end
    Line 156 ⟶ 157:
    -- Give helpful error to thirdparties who try and copy this module.
    if not mw.ext or not mw.ext.data or not mw.ext.data.get then
    error(string.format([['''Missing JsonConfig extension,; orCannot notload properlyhttps://commons.wikimedia.org/wiki/Data:' configured;.. dataset)
    Cannot load https://commons.wikimedia.org/wiki/Data:%s.
    See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates''']], dataset))
    end
     
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.