Modul:Category described in year: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
←Membuat halaman berisi 'require('Module:No globals') local conf = require( 'Module:Category described in year/conf' ) --configuration module --[[============================================...' |
Tidak ada ringkasan suntingan |
||
Baris 44:
local categories = {}
local trackingCategories = {
[1] = '', --placeholder for [[
[2] = '', --placeholder for [[
}
local outString = nil
Baris 62:
else --currQID & currCat both nil
if currentTitle.fullText ~= 'Template:Category described in year' then --ignore self...
trackingCategories[2] = '[[
end
end
Baris 153:
currYDCF = 'decade'
bConfError = true
trackingCategories[2] = '[[
elseif currCent then
currYDCF = 'century'
Baris 160:
else
bConfError = true
trackingCategories[2] = '[[
end
Baris 169:
if conf[currGroup] == nil then
bConfError = true
trackingCategories[2] = '[[
elseif conf[currGroup][currYDCF] == nil then
bConfError = true
trackingCategories[2] = '[[
else
if conf[currGroup][currYDCF].description == nil then
bConfError = true
trackingCategories[2] = '[[
end
if conf[currGroup][currYDCF].parent1 == nil then
bConfError = true
trackingCategories[2] = '[[
end
end
Baris 230:
if parent == 'century' then
if isNilOrEmpty(sortkey) then sortkey = currYear end --default to currYear
categories[iparent] = '[[
elseif parent == 'biology' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
if tonumber(currYear) < 1865 then
categories[iparent] = '[[
else
categories[iparent] = '[[
end
elseif parent == 'paleontology' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[
elseif parent == 'environment' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[
elseif mw.ustring.match(parent, '^%u[%l ]+') then --e.g. Animals/Insects/Fossil taxa
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[
else
trackingCategories[2] = '[[
end
Baris 267:
if parent == 'formal' then
if isNilOrEmpty(sortkey) then sortkey = addOrd(currCent) end --default to currCent
categories[iparent] = '[[
elseif parent == 'biology' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
if tonumber(currCent) < 19 then
categories[iparent] = '[[
else
categories[iparent] = '[[
end
elseif parent == 'paleontology' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[
elseif parent == 'environment' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[
elseif mw.ustring.match(parent, '^%u[%l ]+') then --e.g. Animals/Insects/Fossil taxa
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[
else
trackingCategories[2] = '[[
end
Baris 299:
if parent == 'Group' then
if isNilOrEmpty(sortkey) then sortkey = ' Year' end --default to " Year"
categories[iparent] = '[[
elseif parent == 'Animals' or parent == 'Insects' or parent == 'Molluscs' then
if isNilOrEmpty(sortkey) then sortkey = ' ' end --default to " "
categories[iparent] = '[[
elseif parent == 'Species' or parent == 'Taxa' or parent == 'Fossil taxa' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[
elseif parent == 'paleontology' then
if isNilOrEmpty(sortkey) then sortkey = ' ' end --default to " "
categories[iparent] = '[[
else
trackingCategories[2] = '[[
end
--[[========================= Error ==========================]]
else
trackingCategories[2] = '[[
end
Baris 329:
local cat = mw.ustring.match(category, '%[%[Category:([%w%s]+)')
if mw.title.new(cat, 14).exists == false then
trackingCategories[1] = '[[
break
end
|