Module:File license: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
no edit summary
No edit summary
No edit summary
Line 57: Line 57:
copyrightHolderText = frame:preprocess(copyrightHolder)
copyrightHolderText = frame:preprocess(copyrightHolder)
end
end
end
local attributionText = attribution
if attributionText == "" then
attributionText = copyrightHolderText
end
if attributionText == "" then
attributionText = trademarkOwner
end
end
Line 69: Line 77:
end
end
licenseText = frame:preprocess(licenseData[license][11]) .. licenseText  .. " " .. frame:preprocess(licenseData[license][3])
licenseText = frame:preprocess(licenseData[license][11]) .. licenseText  .. " " .. frame:preprocess(licenseData[license][3])
local attributionText = attribution
if attributionText == "" then
attributionText = copyrightHolderText
end
if attributionText == "" then
attributionText = trademarkOwner
end
licenseMachinedata = '<span class="licensetpl"><span class="licensetpl_short">' .. licenseData[license][4] .. '</span><span class="licensetpl_long">' .. licenseData[license][5] .. '</span><span class="licensetpl_link">' .. frame:preprocess("<nowiki>" .. licenseData[license][6] .. "</nowiki>") .. '</span><span class="licensetpl_link_req">' .. tostring(licenseData[license][7]) .. '</span><span class="licensetpl_attr_req">' .. tostring(licenseData[license][8]) .. '</span><span class="licensetpl_attr">' .. attributionText .. '</span><span class="licensetpl_nonfree">' .. tostring(licenseData[license][9]) .. '</span></span>'
licenseMachinedata = '<span class="licensetpl"><span class="licensetpl_short">' .. licenseData[license][4] .. '</span><span class="licensetpl_long">' .. licenseData[license][5] .. '</span><span class="licensetpl_link">' .. frame:preprocess("<nowiki>" .. licenseData[license][6] .. "</nowiki>") .. '</span><span class="licensetpl_link_req">' .. tostring(licenseData[license][7]) .. '</span><span class="licensetpl_attr_req">' .. tostring(licenseData[license][8]) .. '</span><span class="licensetpl_attr">' .. attributionText .. '</span><span class="licensetpl_nonfree">' .. tostring(licenseData[license][9]) .. '</span></span>'
end
end
Line 107: Line 108:
local copyrightOwnedByText = ""
local copyrightOwnedByText = ""
if string.sub(license, 1, 2) == "PD" or string.sub(license, 1, 3) == "CC0" then
if licenseData[license][10] then
copyrightOwnedByText = "It is not under copyright, but some parties may still have other intellectual property rights over this image."
copyrightOwnedByText = "It is not under copyright, but some parties may still have other intellectual property rights over this image."
else
else
Line 113: Line 114:
end
end
local attributionText = ""
local attributionNotice = ""
if attribution ~= "" then
if attributionText ~= "" then
attributionText = "<hr/>While not required by the license, this " .. typeOfFile .. " can be attributed to " .. attribution .. "."
if licenseData[license][8] then
attributionNotice = "<hr/>When using this " .. typeOfFile .. ", it's creator/owner, " .. attributionText .. " must be attributed."
else
attributionNotice = "<hr/>While not required by the license, this " .. typeOfFile .. " can be attributed to " .. attributionText .. "."
end
end
end
local finalLicense = '<div id="license">' .. imageCode .. "This file is " .. typeOfFileArticle .. " '''" .. typeOfFile .. "'''" .. sourceText .. ". " .. copyrightOwnedByText .. extraCopyrightText .. "<hr/>" .. licenseText .. trademarkText .. attributionText .. '<span style="display:none;>" ' .. licenseMachinedata .. infoMachinedata .. "</span></div>"
local finalLicense = '<div id="license">' .. imageCode .. "This file is " .. typeOfFileArticle .. " '''" .. typeOfFile .. "'''" .. sourceText .. ". " .. copyrightOwnedByText .. extraCopyrightText .. "<hr/>" .. licenseText .. trademarkText .. attributionNotice .. '<span style="display:none;>" ' .. licenseMachinedata .. infoMachinedata .. "</span></div>"


return finalLicense
return finalLicense
Cookies help us deliver our services. By using our services, you agree to our use of cookies.