Module:File license: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
no edit summary
No edit summary
No edit summary
Line 9: Line 9:
local typeOfFile = args["type of file"] or "image"
local typeOfFile = args["type of file"] or "image"
local source = args["source"] or ""
local source = args["source"] or ""
local subject = args["subject"] or ""
local license = args["license"] or ""
local license = args["license"] or ""
local copyrightHolder = args["copyright holder"] or ""
local copyrightHolder = args["copyright holder"] or ""
Line 36: Line 37:
if source ~= "" then
if source ~= "" then
sourceText = " from " .. source
sourceText = " from " .. source
end
local subjectText = ""
if subject ~= "" then
subjectText = " of " .. source
end
end
Line 174: Line 180:
end
end
local finalLicense = '<div id="license">' .. imageCode .. "This file is " .. typeOfFileArticle .. " '''" .. typeOfFile .. "'''" .. sourceText .. ". " .. copyrightOwnedByText .. extraCopyrightText .. endorsementNotice .. "<hr/>" .. licenseText .. trademarkText .. attributionNotice .. "</div>"
local finalLicense = '<div id="license">' .. imageCode .. "This file is " .. typeOfFileArticle .. " '''" .. typeOfFile .. "'''" .. subjectText .. sourceText .. ". " .. copyrightOwnedByText .. extraCopyrightText .. endorsementNotice .. "<hr/>" .. licenseText .. trademarkText .. attributionNotice .. "</div>"
local infoMachinedata = '<span class="fileinfotpl"><span class="fileinfotpl_desc" style="display:none;">' .. string.sub(typeOfFileArticle, 1, 1):upper() .. string.sub(typeOfFileArticle, 2, -1) .. ' ' .. typeOfFile .. sourceText .. '.</span><span class="fileinfotpl_src" style="display:none;">' .. source .. '</span><span class="fileinfotpl_aut" style="display:none;">' .. copyrightHolderText .. '</span><span class="fileinfotpl_perm">' .. finalLicense .. '</span></span>'
local infoMachinedata = '<span class="fileinfotpl"><span class="fileinfotpl_desc" style="display:none;">' .. string.sub(typeOfFileArticle, 1, 1):upper() .. string.sub(typeOfFileArticle, 2, -1) .. ' ' .. typeOfFile .. sourceText .. '.</span><span class="fileinfotpl_src" style="display:none;">' .. source .. '</span><span class="fileinfotpl_aut" style="display:none;">' .. copyrightHolderText .. '</span><span class="fileinfotpl_perm">' .. finalLicense .. '</span></span>'
Cookies help us deliver our services. By using our services, you agree to our use of cookies.