Module:File license: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
no edit summary
No edit summary
No edit summary
Line 88: Line 88:
while not done do
while not done do
if args["license" .. tostring(i)] and args["license" .. tostring(i)] ~= "" and licenseData[args["license" .. tostring(i)]] then
if args["license" .. tostring(i)] and args["license" .. tostring(i)] ~= "" and licenseData[args["license" .. tostring(i)]] then
extraLicenses = extraLicenses .. licenseData[args["license" .. tostring(i)]][5]
if licenseData[args["license" .. tostring(i)]][6] ~= "" then
extraLicenses = extraLicenses .. "[" .. frame:preprocess("<nowiki>" .. licenseData[args["license" .. tostring(i)]][6] .. "</nowiki>") .. " " .. licenseData[args["license" .. tostring(i)]][5] .. "], "
else
extraLicenses = extraLicenses .. licenseData[args["license" .. tostring(i)]][5] .. ", "
end
licenseMachinedata = licenseMachinedata .. '<span class="licensetpl"><span class="licensetpl_short">' .. licenseData[args["license" .. tostring(i)]][4] .. '</span><span class="licensetpl_long">' .. licenseData[args["license" .. tostring(i)]][5] .. '</span><span class="licensetpl_link">' .. frame:preprocess("<nowiki>" .. licenseData[args["license" .. tostring(i)]][6] .. "</nowiki>") .. '</span><span class="licensetpl_link_req">' .. tostring(licenseData[args["license" .. tostring(i)]][7]) .. '</span><span class="licensetpl_attr_req">' .. tostring(licenseData[args["license" .. tostring(i)]][8]) .. '</span><span class="licensetpl_attr">' .. attributionText .. '</span><span class="licensetpl_nonfree">' .. tostring(licenseData[args["license" .. tostring(i)]][9]) .. '</span></span>'
licenseMachinedata = licenseMachinedata .. '<span class="licensetpl"><span class="licensetpl_short">' .. licenseData[args["license" .. tostring(i)]][4] .. '</span><span class="licensetpl_long">' .. licenseData[args["license" .. tostring(i)]][5] .. '</span><span class="licensetpl_link">' .. frame:preprocess("<nowiki>" .. licenseData[args["license" .. tostring(i)]][6] .. "</nowiki>") .. '</span><span class="licensetpl_link_req">' .. tostring(licenseData[args["license" .. tostring(i)]][7]) .. '</span><span class="licensetpl_attr_req">' .. tostring(licenseData[args["license" .. tostring(i)]][8]) .. '</span><span class="licensetpl_attr">' .. attributionText .. '</span><span class="licensetpl_nonfree">' .. tostring(licenseData[args["license" .. tostring(i)]][9]) .. '</span></span>'
i = i + 1
i = i + 1
Line 101: Line 105:
extraLicensesText = extraLicensesText .. "s"
extraLicensesText = extraLicensesText .. "s"
end
end
extraLicensesText = extraLicensesText .. extraLicenses
extraLicensesText = extraLicensesText .. ": " .. extraLicenses
else
else
extraLicensesText = "<br/>This file is also available under the following additional license"
extraLicensesText = "<br/>This file is also available under the following additional license"
Line 107: Line 111:
extraLicensesText = extraLicensesText .. "s"
extraLicensesText = extraLicensesText .. "s"
end
end
extraLicensesText = extraLicensesText .. extraLicenses
extraLicensesText = extraLicensesText .. ": " .. extraLicenses
end
end
licenseText = licenseText .. extraLicensesText
licenseText = licenseText .. extraLicensesText
Cookies help us deliver our services. By using our services, you agree to our use of cookies.