Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Modül:Ototaksonkutu

bullvar_katip

Administrator
Katılım
21 Mayıs 2024
Mesajlar
532,105
--************************************************************************* Bu modül Otomatik Taksonkutu sisteminin ana modülüdür. tarafından kullanılmaktadır. Özellikle sağladığı şey, taksonomi hiyeraşisini otomatik olarak taksonomi şablonlarında listelemektir ("Şablon:Taksonomi/TAKSON_ADI" biçimindeki şablonları kullanarak), şablon genişletme hatalarına sebep olmadan.sayfasına bağlanır require('Modül:No globals') local veri = require("Modül:Ototaksonkutu/veri") local TaksonItalik = require('Modül:Taksonİtalik') -- Modül:Taksonİtalik'ten takson adını italik göstermek için bir fonksiyon local TabloSatiri = '|-\n' local TabloSonu = '|}\n' local p = {} -- dışarıdan erişilebilen fonksiyonlar local l = {} -- modül içinde kullanılan fonksiyonlar, ayrıştırmak için local colour = -- taksonkutu ve toksan listelemeleri için renk -- = Bir taksonomi hiyeraşisinin çıkabileceği en yüksek takson derinliğini belirler; işlem yapma süresini azaltır ve yanlış belirlenmiş hiyeraşilere karşı koruma sağlar, örneğin döngüler. Bu değer dışarıdan şu şekilde çağırılabilir: local MaksAramaSeviyesi = 100 function p.getirMaksAramaSeviyesi return MaksAramaSeviyesi end -- = taksonkutuRengi Bir taksonkutu için gösterilen rengi belirler, taksonomi hiyeraşisindeki en üst taksona çıkarak en baş taksonun rengini getirir ('incertae sedis' bir istisnadır, bu direk kendi rengini belirler). Geçerli bir taksonkutu renginin CSS rgb biçimini kullandığı kabul edilmiştir, tüm renkler bu biçimdedir. Eğer taksonkutu için hiçbir renk bulunamadıysa, 'transparent' (yani renksiz) görünür ama taksonomi hiyeraşisi çok yukarı gidiyorsa, hata rengi görünür. Kullanımı: function p.taksonkutuRengi(frame, taxon) return p.getirTaksonkutuRengi(frame, taxon or frame.args[1] or ) end function p.getirTaksonkutuRengi(frame, currTaxon, cats) -- renkler bu fonksiyon için küreseldir; varsayılan değeri ise string türündedir local i = 1 -- sayma işlemi başlatılıyor local searching = currTaxon ~= -- hala renk aranıyor mu? local foundICTaxon = false -- bir 'incertae sedis' var mı diye kontrol et while searching and i <= MaksAramaSeviyesi do local plainCurrTaxon, dummy = l.kirpFazlaliklar(currTaxon) -- gereksiz yazıları soyutla / if string.lower(plainCurrTaxon) 'incertae sedis' then foundICTaxon true else local possibleColour veri.getirTabloyaGore(plainCurrTaxon, "renkler") if possibleColour and string.sub(possibleColour,1,3) 'rgb' then colour = possibleColour searching = false end end if searching then local ok, parent = p.getirTaksonBilgiOgesi(frame, currTaxon, 'ebeveyn') if ok and parent ~= then currTaxon = parent i = i + 1 else searching = false -- hiyeraşinin en üst katmanına çık veya var olmayan taksonomi şablonlarını kullanmaya çalış end end end if colour == then if foundICTaxon then colour = veri.getirTabloyaGore("incertae sedis", "renkler") table.insert(cats, "Kategori:Incertae sedis rengine sahip taksonkutular") elseif searching then -- MaksAramaSeviyesi'ni aşan hiyeraşi seviyeleri colour = "transparent; text-align:center; border: 2px solid red; error:colour" table.insert(cats, "Kategori:Hata rengine sahip taksonkutular") else colour = 'transparent' table.insert(cats, "Kategori:Rengi olmayan taksonkutular") end end return colour end --= = = = = = = = = = = = = ustSeviyeTakson = = = = = = = = = = = = = = = Burası herhangi bir takson hiyeraşisinde en üste gelebilecek takson gruplarını belirler. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.ustSeviyeTakson(taxon) return taxon 'Life' or taxon 'Veterovata' or taxon == 'Ichnos' end -- = taksonkutuListe Girilen taksonun hiyeraşisini en üste kadar bulup, bunu otomatik taksonkutuya yansıtmada yardımcı olur. Kullanım: function p.taksonkutuListe(frame, moduleTable) if moduleTable then frame.args = moduleTable end local currTaxon = frame.args[1] or if currTaxon then return end local displayN (tonumber(frame.args['taks_üst_sayısı']) or 1) + 1 local authTable {} authTable[1] frame.args['sıralama'] or authTable[2] frame.args['üst_sıralama'] or authTable[3] frame.args['büst_sıralama'] or authTable[4] frame.args['bbüst_sıralama'] or authTable[5] frame.args['bbbüst_sıralama'] or local boldFirst frame.args['seçili_kalın'] or 'link' -- değeri 'link' veya 'kalın' local virus frame.args['virüs'] or 'hayır' -- değeri 'evet' veya 'hayır' local offset tonumber(frame.args['offset'] or 0) -- eğer 'sıralama' parametresi bahsi geçen taksondan daha alt seviyedeki -- bir takson içinse, sıralamaların hepsini kaydır if offset ~ 0 then for i 1, 5 do local j i + offset if j < 5 then authTable authTable[j] else authTable end end end local taxonTable, taxonRankTable l.yapTablo(frame, currTaxon) local res local topTaxonN taxonTable.n -- eğer mümkünse büyük büyük büyük ebeveynin üstündeki tüm taksonları -- sıralamasız (sıralamasını belirleyen yazar olmadan) göster for i topTaxonN, 6, -1 do res res .. p.gosterTakson(frame, taxonTable, taxonRankTable, topTaxonN i, , displayN >= i, , virus) end -- ebeveynin üstündeki tüm taksonları eğer -- sıralamaları (sıralamasını belirleyen yazarlar) ile birlikte göster for i = math.min(topTaxonN, 5), 2, -1 do res = res .. p.gosterTakson(frame, taxonTable, taxonRankTable, topTaxonN i, authTable, displayN > i, , virus) end -- hedef taksonu göster, her daim kalın ve gösterilir res res .. p.gosterTakson(frame, taxonTable[1], taxonRankTable[1], topTaxonN 1, authTable[1], true, boldFirst, virus) return res end --= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bir taksonkutudaki tek bir takson satırını oluştur. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function p.gosterTakson(frame, taxon, rank, isTopTaxon, auth, force, boldFirst, virus) -- eğer bir üst seviye taksonda değilsek (mesela "Life" değilse) ve ebeyevn yoksa bu bir hatadır if isTopTaxon then if l.ustSeviyeTakson(taxon) then return -- bir üst seviye takson gösterme elseif mw.title.new('Taksonomi/'..taxon, 'Şablon').exists then -- bu taksonomi şablonunda bir ebeveyn tanımlanmamış return l.taksonomiOlustur(taxon, 'Taksonomi şablonunda bir ebeveyn belirtilmemiş') .. '\n' .. TabloSatiri else -- bu taksonun bir taksonomi şablonu mevcut değil return l.taksonomiOlustur(taxon, 'Eksik taksonomi şablonu') .. '\n' .. TabloSatiri end else -- if showing is not already forced, force if it's a principal rank or an authority is specified force = force or l.getirEsasSira(rank) 'evet' or auth ~ if not force then -- if showing is still not already forced, force if the taxonomy template has 'always_display' set local ok, alwaysDisplay p.getirTaksonBilgiOgesi(frame, taxon, 'hep_görüntüle') force alwaysDisplay 'evet' or alwaysDisplay 'true' end if force then local res l.tabloHucresi("') local bold 'hayır' if boldFirst 'kalın' then bold = 'evet' end if auth ~= then auth = elseif bold == "evet" then auth = end local res = res .. l.tabloHucresi(l.getirTaksonBag(frame, taxon, rank, bold, , , virus) .. auth) -- italic, abbreviated return res .. TabloSatiri else return end end end function l.taksonKaynak(frame, taxon) -- taksonun kaynağı belirtilmişse onu çağır local ok, taksonKaynak = p.getirTaksonBilgiOgesi(frame, taxon, 'kaynak') if ok and taksonKaynak ~= "" then taksonKaynak = frame:extensionTag{ name = 'ref', content = taksonKaynak, args = { name = taxon..'-kaynak' } } end return taksonKaynak end -- = taksonomiListe Returns the cells of the taxonomy table displayed on the right hand side of "Template:Taxonomy...." pages. Kullanımı: function p.taksonomiListe(frame) return l._taksonomiListe(frame, frame.args[1] or ) end function l._taksonomiListe(frame, currTaxon) local cats = {} if currTaxon then return '{|class "infobox biota"\n' .. TabloSatiri .. l.tabloHucresi .. l.tabloHucresi('HATA: hiçbir takson girilmedi') .. TabloSonu end local taxonTable, taxonRankTable l.yapTablo(frame, currTaxon) local rankValTable l.getirSiraTablosu local lastRankVal 1000000 local orderOk true -- check whether the taxonomy is for viruses; use already determined taxon colour if possible local virus 'hayır' local taxoColour colour if taxoColour then if taxonTable[taxonTable.n] 'Ichnos' or taxonTable[taxonTable.n] 'Veterovata' then taxoColour = p.getirTaksonkutuRengi(frame, taxonTable[taxonTable.n], cats) else taxoColour = p.getirTaksonkutuRengi(frame, taxonTable[taxonTable.n - 1], cats) end end if taxoColour p.getirTaksonkutuRengi(frame, "virüs", cats) then virus 'evet' end -- add information message local res '\n' -- start table res res .. '{| class "infobox biota" style "text-align: left; font-size:100%"\n' .. TabloSatiri .. '! colspan 4 style "text-align: center; background-color: ' .. taxoColour .. '"|Ata taksonlar\n' -- deal first with the top level taxon; if there are no errors, it should be Life/Veterovata/Ichnos, which are -- not displayed local taxon taxonTable[taxonTable.n] if not l.ustSeviyeTakson(taxon) then local msg 'Taksonomi şablonu eksik' if mw.title.new('Taksonomi/'..taxon, 'Şablon').exists then msg 'Ebeveyn takson gerekli' end res res .. TabloSatiri .. l.tabloHucresi('colspan 2', l.taksonomiOlustur(taxon, msg)) end -- now output the rest of the table local currRankVal for i taxonTable.n-1, 1, -1 do -- check ranks are in right order in the hierarchy taxon taxonTable local rank taxonRankTable currRankVal l.araSiraDegeri(rankValTable, rank) if currRankVal then orderOk currRankVal < lastRankVal if orderOk then lastRankVal currRankVal end else orderOk true end -- see if the row will be displayed in a taxobox; bold the rank if so local boldRank false local ok, alwaysDisplay p.getirTaksonBilgiOgesi(frame, taxon, 'hep_görüntüle') if ok and (alwaysDisplay 'evet' or alwaysDisplay 'true') then boldRank true else boldRank l.getirEsasSira(rank) 'evet' end -- now return a row of the taxonomy table with anomalous ranks marked local errorStr = if not orderOk then errorStr = 'evet' end local link = l.getirTaksonBag(frame, taxon, rank, , , , virus) -- bold, italic, abbreviated res = res .. l.taksonomiListeSatiri(taxon, rank, link, boldRank, errorStr) end -- close table res = res .. TabloSonu -- error-tracking for taxonomy templates -- if the last row has an anomalous rank, put the page in an error-tracking category if not orderOk then table.insert(cats, 'Kategori:Aykırı sıra gösteren taksonomi şablonları') end -- if the last row has a taxon name in the page name that does not match the link text, -- put the taxonomy template in a tracking category local dummy, linkText = p.getirTaksonBilgiOgesi(frame, taxon, 'bağ_yazı') local match = l.matchTaxonLink(taxon, linkText, currRankVal and currRankVal < rankValTable['cins']) if not match then table.insert(cats, .. taxon .. ) end if cats[1] then res = res .. frame:expandTemplate{ title = 'Şablon diğer', args = { table.concat(cats)} } end return res end --= = = = = = = = = = = = = = taxonomyListRow = = = = = = = = = = = = = = Returns a single row of the taxonomy table displayed on the right hand side of "Template:Taxonomy...." pages. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.taksonomiListeSatiri(taxon, rank, link, boldRank, error) local res = if taxon or rank then return res end local baseTaxon, qualifier = l.kirpFazlaliklar(taxon) -- if appropriate, make it clear that some taxa have been skipped via a ... row if qualifier '/geç' then res res .. TabloSatiri .. l.tabloHucresi('.....') .. l.tabloHucresi('.....') end -- now generate a row of the table res res .. TabloSatiri local cellContent local anglicizedRank l.getirCeviriSira(rank) if boldRank then cellContent cellContent .. else cellContent cellContent .. end if error 'evet' then cellContent = end res = res .. l.tabloHucresi(cellContent) .. l.tabloHucresi .. l.tabloHucresi .. l.tabloHucresi return res end -- cagirTaksonomiAnahtari === Prepares for, and then calls, Template:Taxonomy key to display a taxonomy template page. It does this by building up the information the template requires, following one 'aynısı' link, if required. Kullanımı: local PARENT = 1 local RANK = 2 local LINK_TARGET = 3 local LINK_TEXT = 4 local ALWAYS_DISPLAY = 5 local EXTINCT = 6 local SAME_AS = 7 local REFS = 8 function p.cagirTaksonomiAnahtari(frame) local taxon = frame.args['takson'] or local parent = frame.args['ebeveyn'] or local rank = frame.args['sıra'] or local extinct = string.lower(frame.args['tükenmiş']) or local alwaysDisplay = string.lower(frame.args['hep_görüntüle']) or local linkTarget = frame.args['bağ_sayfa'] or local linkText = frame.args['bağ_yazı'] or -- this is the "raw" link text, and can be local refs = frame.args['kaynak'] or local sameAsTaxon = frame.args['aynısı'] or if sameAsTaxon ~= then -- try using the 'aynısı' taxon; it's an error if it doesn't exist local ok, sameAsInfoStr = pcall(frame.expandTemplate, frame, { title = 'Şablon:Taksonomi/' .. sameAsTaxon, args = {['makine kodu'] = 'hepsi' } }) if ok then local sameAsInfo = mw.text.split(sameAsInfoStr, '$', true) --'aynısı' taxon's taxonomy template must not have a 'aynısı' link if sameAsInfo[SAME_AS] then if parent then parent = sameAsInfo[PARENT] end if rank then rank sameAsInfo[RANK] end if extinct then extinct = string.lower(sameAsInfo[EXTINCT]) end if alwaysDisplay then alwaysDisplay string.lower(sameAsInfo[ALWAYS_DISPLAY]) end if linkTarget then linkTarget = sameAsInfo[LINK_TARGET] end if linkText then linkText sameAsInfo[LINK_TEXT] end if refs and parent sameAsInfo[PARENT] then refs sameAsInfo[REFS] end else return ': , but Şablon:Taksonomi/' .. sameAsTaxon .. ' also has a parameter.' end else return l.eksikTaksonomiAnahtari(sameAsTaxon, 'given as the value of ') end end local link linkTarget if linkText ~ and linkText ~ linkTarget then link link .. "|" .. linkText end -- check consistency of extinct status; if this taxon is not extinct, parent must not be either local extinctError 'hayır' if parent ~ and (extinct or extinct 'hayır' or extinct 'false') then local ok, parentExtinct = p.getirTaksonBilgiOgesi(frame, parent, 'tükenmiş') if ok and (parentExtinct 'evet' or parentExtinct 'true') then extinctError = 'evet' end end -- taksonomi anahtarını oluşturmaya başlayalım local taksAna = {} table.insert(taksAna, l._taksonomiListe(frame, taxon)) if mw.title.new('Taksonomi/'..parent, 'Şablon').exists then if linkTarget then if mw.title.new(linkTarget).exists then table.insert(taksAna, "__NOINDEX__") else table.insert(taksAna, "Vikipedi'de henüz "..linkTarget.." isimli bir madde bulunmamakta. " .."Bu maddeyi oluşturarak yardımcı olabilirsiniz. Şu anda bulunduğunuz sayfa " ..""..linkTarget.." bilimsel sınıflandırması hakkında size bilgi vermektedir." ..""..l.secSon(mw.title.getCurrentTitle.text).."") end end else table.insert(taksAna, "" .. " Eğer aşağıdaki tablo doğru görünüyorsa, seçilmiş takson için gerekli bilgiler mevcut demektir.\n" .. l.eksikTaksonomiAnahtari(parent, " değeri olarak girildi")) end local ok, parRefs = p.getirTaksonBilgiOgesi(frame, parent, "kaynak") table.insert(taksAna, "\nNiye burada olduğundan emin değil misin? Otomatik taksonkutu sistemini öğrenmeye başla." .. "\n" .. (extinctError == "evet" and ""..taxon.."" or "")) -- mevcut sayfanın vikiveri ögesini bulalım local ID = mw.wikibase.getEntityIdForCurrentPage local oge = ID and mw.wikibase.getEntity(ID) if not oge then table.insert(taksAna, ""..taxon.."") else -- vikiveri'de taksonomi şablonu için herhangi bir etiket girilmiş mi? local vikiveriEtiket = oge:getLabel("tr") if vikiveriEtiket then else table.insert(taksAna, ""..taxon.."") end -- vikiveri'de taksonomi şablonu için herhangi bir açıklama girilmiş mi? local vikiveriAciklama = oge:getDescription("tr") if vikiveriAciklama then else table.insert(taksAna, ""..taxon.."") end end return table.concat(taksAna) end function l.eksikTaksonomiAnahtari(takson, mesaj) return mw.title.new("Şablon:Taksonomi/"..takson).exists and "" or end -- taksonBilgi Extracts and returns information from Şablon:Taksonomi/TAXON, following one 'aynısı' link if required. Kullanımı: GİRDİ şunlardan biridir: 'ebeveyn', 'sıra', 'bağ_sayfa', 'bağ_yazı', 'tükenmiş', 'hep_görüntüle', 'kaynak', 'aynısı' veya 'hepsi'. Eğer GİRDİ belirlenmediyse, varsayılan değer 'hepsi' olur - tüm bilgiler tek bir satırda '$' ile ayrılarak yazılır. function p.taksonBilgi(frame) local taxon = frame.args[1] or local item = frame.args[2] or if item == then item = 'hepsi' end local ok, info = p.getirTaksonBilgiOgesi(frame, taxon, item) return info end --= = = = = = = = = = = getirTaksonBilgiOgesi = = = = = = = = = = = = = = = Utility function to extract an item of information from a taxonomy template, following one 'aynısı' link if required. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function p.getirTaksonBilgiOgesi(frame, taxon, item) local ok, info -- item 'hançer' is a special case if item 'hançer' then ok, info = p.getirTaksonBilgiOgesi(frame, taxon, 'tükenmiş') if ok then if info 'evet' or info 'true' then info = else info = end end -- item ~= 'hançer' else ok, info = pcall(frame.expandTemplate, frame, { title = 'Şablon:Taksonomi/' .. taxon, args = {['makine kodu'] = item } }) if ok then if info then -- try 'aynısı' local sameAsTaxon frame:expandTemplate{ title 'Şablon:Taksonomi/' .. taxon, args {['makine kodu'] 'aynısı' } } if sameAsTaxon ~ then ok, info pcall(frame.expandTemplate, frame, { title 'Şablon:Taksonomi/' .. sameAsTaxon, args {['makine kodu'] item } }) end end end end if ok then -- if item is 'bağ_yazı', trim info and check whether '(?)' needs to be added if item 'bağ_yazı' then -- there is a newline at the end of linkText when taxonomy template has "|link = LINK_TARGET|LINK_TEXT" info = mw.text.trim(info) if string.sub(taxon, -2) == '/?' and not string.find(info, '?', 1, true) then info = info .. end end else info = 'Şablon:Taksonomi/' .. taxon .. --error indicator in code before conversion to Lua end return ok, info end --= = = = = = = = = = = = = = getirTaksonBag = = = = = = = = = = = = = = = Internal function to drive l.yapBag. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.getirTaksonBag(frame, taxon, rank, bold, italic, abbreviated, virus) local ok, extinct = p.getirTaksonBilgiOgesi(frame, taxon, 'tükenmiş') if italic == and taxon ~= "Virus" then italic = p.getirItalikTakson(rank, virus) end local ok, linkTarget = p.getirTaksonBilgiOgesi(frame, taxon, 'bağ_sayfa') local ok, linkText = p.getirTaksonBilgiOgesi(frame, taxon, 'bağ_yazı') return l.yapBag(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText) end --= = = = = = = = = = = = = = yapBag = = = = = = = = = = = = = = = = = = = = Actually make the link. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.yapBag(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText) local dummy -- if link text is missing, try to find a replacement if linkText then if string.find(taxon, 'Incertae sedis', 1, true) then linkText "incertae sedis" linkTarget 'Incertae sedis' else linkText, dummy l.kirpFazlaliklar(taxon) end end if linkTarget then linkTarget = linkText end if italic 'evet' then linkText TaksonItalik.italicizeTaxonName(linkText, false, abbreviated 'evet') end local link = if bold 'evet' then link else if linkTarget linkText then link = linkText else link = linkTarget .. '|' .. linkText end link = .. link .. end if (extinct 'evet' or extinct 'true') and not string.find(link, '†', 1, true) then link = .. link end if string.sub(taxon, -2) == '/?' and not string.find(link, '?', 1, true) then link = link .. end return link end -- gosterSiraTablosu Returns a wikitable showing the ranks and their values as set up by getRankTable. Kullanımı: function p.gosterSiraTablosu local rankTable = l.getirSiraTablosu local res = '{| class="wikitable sortable"\n|+ Taksonomi şablonlarında değerlendirilen sıralar\n! Sıra !! Görüntüsü !! Değeri\n' for k, v in pairs(rankTable) do local rankShown = l.getirCeviriSira(k) res = res .. TabloSatiri .. l.tabloHucresi(k) .. l.tabloHucresi(rankShown) .. l.tabloHucresi(v) end return res .. TabloSonu end -- bul Returns the taxon above the specified taxon with a given rank. Kullanımı: function p.bul(frame) local currTaxon = frame.args[1] or if currTaxon then return end local rank frame.args[2] or if rank then return end local inHierarchy = true -- still in the taxonomic hierarchy or off the top? local searching = true -- still searching while inHierarchy and searching do local ok, parent = p.getirTaksonBilgiOgesi(frame, currTaxon, 'ebeveyn') if ok and parent ~= then currTaxon = parent local ok, currRank = p.getirTaksonBilgiOgesi(frame, currTaxon, 'rank') if currRank == rank then searching = false end else inHierarchy = false end end if inHierarchy and not searching then return currTaxon else return end end -- ninci External utility function primarily intended for use in checking and debugging. Returns the nth level above a taxon in a taxonomic hierarchy, where the taxon itself is counted as the first level. Kullanımı: function p.ninci(frame) local currTaxon = frame.args[1] or if currTaxon == then return 'ERROR: no taxon supplied' end local n = tonumber(frame.args['n'] or 1) if n > MaksAramaSeviyesi then return 'Exceeded maximum number of levels allowed (' .. MaksAramaSeviyesi .. ')' end local i = 1 local inHierarchy = true -- still in the taxonomic hierarchy or off the top? while i < n and inHierarchy do local ok, parent = p.getirTaksonBilgiOgesi(frame, currTaxon, 'ebeveyn') if ok and parent ~= then currTaxon = parent i = i + 1 else inHierarchy = false end end if inHierarchy then return currTaxon else return 'Level ' .. n .. ' is past the top of the taxonomic hierarchy' end end -- nSeviyeler External utility function primarily intended for use in checking and debugging. Returns number of levels in a taxonomic hierarchy, starting from the supplied taxon as level 1. Kullanımı: function p.nSeviyeler(frame) local currTaxon = frame.args[1] or if currTaxon == then return 'ERROR: no taxon supplied' end local i = 1 local inHierarchy = true -- still in the taxonomic hierarchy or off the top? while inHierarchy and i < MaksAramaSeviyesi do local ok, parent = p.getirTaksonBilgiOgesi(frame, currTaxon, 'ebeveyn') if ok and parent ~= then currTaxon = parent i = i + 1 else inHierarchy = false end end if inHierarchy then return MaksAramaSeviyesi .. '+' else return i end end -- siralaHepsi External utility function primarily intended for use in checking and debugging. Returns a comma separated list of a taxonomic hierarchy, starting from the supplied taxon. Kullanımı: function p.siralaHepsi(frame) local currTaxon = frame.args[1] or if currTaxon == then return 'ERROR: no taxon supplied' end return l.doListAll(l.yapTablo(frame, currTaxon)) end function l.doListAll(taxonTable, taxonRankTable) local lst = taxonTable[1] .. '-' .. tostring(taxonRankTable[1]) for i = 2, taxonTable.n, 1 do lst = lst .. ', ' .. taxonTable .. '-' .. taxonRankTable end return lst end -- cogulSira Kullanımı: function p.getirCogulSira(deger) local islem = veri.getirTabloyaGore(deger, "çeviri sıra") return veri.getirTabloyaGore(islem, "çoğul sıra") or "" end function p.cogulSira(frame) return p.getirCogulSira(frame.args[1]) end -- altSira == Kullanımı: function p.getirAltSira(deger) local islem = veri.getirTabloyaGore(deger, "çeviri sıra") return veri.getirTabloyaGore(islem, "alt sıra") or "" end function p.altSira(frame) return p.getirAltSira(frame.args[1]) end -- esasSira Kullanımı: function l.getirEsasSira(deger) local yazi = mw.ustring.gsub(mw.ustring.gsub( mw.getContentLanguage:lc(deger), "ichno", "" ), "oo", "") return veri.getirTabloyaGore(yazi, "esas sıra") or "hayır" end function p.esasSira(frame) return l.getirEsasSira(frame.args[1]) end -- ceviriSira Kullanımı: function l.getirCeviriSira(deger, kontrol) local yazi deger local sayfaAdi mw.title.getCurrentTitle.text if mw.ustring.sub( mw.getContentLanguage:lc(yazi), 1, 7 ) "sırasız" then yazi = "(sırasız)" else yazi = mw.ustring.gsub( yazi, "/(.*)", "" ) if veri.getirTabloyaGore(yazi, "çeviri sıra") then yazi = veri.getirTabloyaGore(yazi, "çeviri sıra") else yazi = (kontrol "evet" and "" or "") .. (mw.ustring.gsub( sayfaAdi, "/(.*)", "" ) "Taksonomi" and "Kategori:Tanınmayan sıra kullanan taksonomi şablonları" or "") end end if kontrol "evet" and mw.ustring.gsub( sayfaAdi, "/(.*)", "" ) "Taksonomi" then yazi = yazi .. (mw.getContentLanguage:lcfirst(deger) == deger and "" or "Kategori:Baş harfi büyük sıra adı kullanan taksonomi şablonları") end return mw.getContentLanguage:ucfirst(yazi) end function p.ceviriSira(frame) return l.getirCeviriSira(frame.args[1], frame.args[2] or "hayır") end -- italikTakson Kullanımı: function p.getirItalikTakson(deger, virus) if virus "evet" then return veri.getirTabloyaGore(deger, "italik virüs") or "evet" else return veri.getirTabloyaGore(deger, "italik takson") or "hayır" end end function p.italikTakson(frame) return p.getirItalikTakson(frame.args[1], frame.args[2] or "hayır") end -- = Modülde kullanılan fonksiyonlar --= = = = = = = = = = = = = = = = Önyükleme = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function p.onyukleme(frame) return l.taksonomiOlustur("Denimilia") end function l.onyukleme(takson) local bir = l.secIlk(takson) local iki = l.secSon(takson) local uc = mw.ustring.find(iki, "/") and l.secSon(iki) or "" iki = mw.ustring.find(iki, "/") and l.secIlk(l.secSon(takson)) or iki local sonuc if iki "?" or uc "?" then sonuc = "önyükleme/?" .. (iki "?" and uc or "") elseif mw.getContentLanguage:lc(bir) "incertae sedis" or mw.getContentLanguage:lc(bir) == "belirsiz yerleştirme" then sonuc = "önyükleme/belirsiz_yerleştirme" else sonuc = iki ~= "" and "aynısı" or "önyükleme" end return sonuc end function l.secIlk(baslik) return mw.ustring.gsub(baslik, "/+[^/]*", "") end function l.secSon(baslik) return mw.ustring.gsub(baslik, "^[^/]*/*", "") end function l.taksonomiOlustur(takson, mesaj) local sonuc = "|-\n|" if l.secSon(mw.title.getCurrentTitle.text) takson then sonuc sonuc .. "Şu anda oluşturduğunuz takson:" else sonuc sonuc .. " :" end sonuc sonuc .. "\n|"..takson.."" .. ((mw.title.getCurrentTitle.namespace 0 or mw.title.getCurrentTitle.nsText == "Şablon") and "Kategori:Otomatik taksonkutu temizleme" or "") .. "\n|-" return sonuc end function l.taksonomiOlusturBag(takson) return "//tr.wikipedia.org/w/index.php?action=edit&title=Şablon:Taksonomi/" .. mw.uri.encode(mw.getContentLanguage:ucfirst(takson)) .. "&preload=Şablon:Taksonomi/" .. l.onyukleme(takson) end --= = = = = = = = = = = = birTaksonuDuzenle = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.birTaksonuDuzenle(taksonAdi) local baglanti = "" end return baglanti end --= = = = = = = = = = = = kirpFazlaliklar = = = = = = = = = = = = = = = = = Internal utility function to strip off any extra parts of a taxon name, i.e. anything after a '/'. Thus 'Felidae/?' would be split into 'Felidae' and '?'. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.kirpFazlaliklar(taxonName) local i = mw.ustring.find(taxonName, '/', 1, true) if i then return mw.ustring.sub(taxonName, 1, i-1), mw.ustring.sub(taxonName, i, -1) else return taxonName, end end --= = = = = = = = = = = = splitTaxonName = = = = = = = = = = = = = = = = = Internal utility function to split a taxon name into its parts and return them. Possible formats include: taxon taxon (disambig) taxon (Subgenus) taxon/qualifier combinations, e.g. taxon (disambig)/qualifier = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.ayirTaksonAdlari(taxon) -- get any qualifier present local qualifier = local i = mw.ustring.find(taxon, '/', 1, true) if i then qualifier = mw.ustring.sub(taxon, i+1, -1) taxon = mw.ustring.sub(taxon, 1, i-1) end -- get any disambiguator or subgenus local disambig = local subgenus = i = mw.ustring.find(taxon, ' (', 1, true) if i then local parenTerm = mw.ustring.sub(taxon, i+2, -2) taxon = mw.ustring.sub(taxon, 1, i-1) local char1 = mw.ustring.sub(parenTerm, 1, 1) if char1 == mw.ustring.lower(char1) then disambig = parenTerm else subgenus = parenTerm end end return taxon, disambig, subgenus, qualifier end --[[= = = = = = = = = = = = matchTaxonLink = = = = = = = = = = = = = = = = = Function to determine whether the taxon name derived from the name of the taxonomy template (passed in the parameter taxon) matches the link text (passed in the parameter linkText). The taxon name may have any of the formats: baseTaxon/qualifier baseTaxon (disambig) baseTaxon (Subgenus) [distinguished by the capital letter] a qualifier may be present after the previous two formats. Examples of matches (baseTaxon ~ linkText): Pinus ~ Pinus Pinus sect. Trifoliae ~ Pinus sect. Trifoliae Pinus sect. Trifoliae ~ Pinus sect. Trifoliae [italic markers ignored] Pinus sect. Trifoliae ~ P. sect. Trifoliae [abbreviated genus name matches] Bombus (Pyrobombus) ~ Bombus (Pyrobombus) Bombus (Pyrobombus) ~ B. (Pyrobombus) Bombus (Pyrobombus) ~ Pyrobombus [link text may just be the subgenus] Heteractinida ~ "Heteractinida" [double-quotes are ignored in link text] "Heteractinida" ~ Heteractinida [double-quotes are ignored in base taxon name] Incertae sedis ~ anything [link text is ignored for matching in this case] Cetotheriidae with qualifier=? ~ Cetotheriidae (?) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.matchTaxonLink(taxon, linkText, rankBelowGenus) local dummy linkText, dummy = mw.ustring.gsub(linkText, "", ) -- remove any italic wikitext in the link text linkText, dummy = mw.ustring.gsub(linkText, '<.->', ) -- strip all tags used to format the link text linkText, dummy = mw.ustring.gsub(linkText, '"', ) -- remove any occurrences of " in the link text local baseTaxon, disambig, subgenus, qualifier = l.ayirTaksonAdlari(taxon) -- split up the taxon name baseTaxon, dummy = mw.ustring.gsub(linkText, '"', ) -- remove any occurrences of " in the base taxon name local match = linkText baseTaxon or linkText subgenus or linkText baseTaxon .. ' (' .. subgenus .. ')' or linkText mw.ustring.sub(baseTaxon, 1, 1) .. '. (' .. subgenus .. ')' or baseTaxon 'Incertae sedis' or rankBelowGenus and linkText mw.ustring.gsub(baseTaxon, '([A-Z]).- (.*)', '%1. %2') or mw.ustring.find(qualifier, '?', 1, true) and mw.ustring.find(linkText, baseTaxon, 1, true) == 1 return match end --= = = = = = = = = = = = yapKaynaklariGoster = = = = = = = = = = = = = = = Show the refs field in a taxonomy template. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.yapKaynaklariGoster(taxonName, refs) if mw.text.split(taxonName, '/', true)[1] 'Incertae sedis' then refs 'gösterilemez ' elseif refs then refs = '–' end return refs end --[[= = = = = = = = = = = = = makeTable = = = = = = = = = = = = = = = = = = = Internal utility function to return a table (array) constructed from a taxonomic hierarchy stored in "Şablon:Taksonomi/..." templates. TABLE.n holds the total number of taxa; TABLE[1]..TABLE[TABLE.n] the taxon names. The last taxon in the table will either (a) have a taxonomy template but with no parent given (e.g. 'Life') or (b) not have a taxonomy template. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.yapTablo(frame, currTaxon) local taxonTable = {} local taxonRankTable = {} local ok, rank, parent local i = 1 local topReached = false -- reached the top of the taxonomic hierarchy? repeat taxonTable = currTaxon ok, rank = p.getirTaksonBilgiOgesi(frame, currTaxon, 'sıra') if ok then taxonRankTable = string.lower(rank) else taxonRankTable = end ok, parent = p.getirTaksonBilgiOgesi(frame, currTaxon, 'ebeveyn') if ok and parent ~= then currTaxon = parent i = i + 1 else topReached = true -- reached the top of the hierarchy or tried to use a non-existent taxonomy template end until topReached or i > MaksAramaSeviyesi taxonTable.n = math.min(i, MaksAramaSeviyesi) return taxonTable, taxonRankTable end --= = = = = = = = = = = = getRankTable = = = = = = = = = = = = = = = = = = Internal utility function to set up a table of numerical values corresponding to 'Linnaean' ranks, with upper ranks having higher values. In a valid taxonomic hierarchy, a lower rank should never have a higher value than a higher rank. The actual numerical values are arbitrary so long as they are ordered. The ranks should correspond to those in Şablon:Taksonkutu/Çeviri sıralama. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.getirSiraTablosu return { ['sınıf'] = 1400, cohort = 1100, ['bölüm'] = 1500, domain = 1700, familya = 800, forma = 100, ['cins'] = 600, grandordo = 1005, ['grandordo-mb'] = 1002, hyperfamilia = 805; ['infrasınıf'] = 1397, infralegio = 1197, ['infratakım'] = 997, ['infraşube'] = 1497, infraalem = 1597, infraoymak = 697, legio = 1200, magnordo = 1006, ['mikroşube'] = 1495, ['mikrotakım'] = 995, mirordo = 1004, ['mirordo-mb'] = 1001, nanophylum = 1494, nanordo = 994, ['takım'] = 1000, parafamilia = 800, parvclassis = 1396; -- same as subterclassis parvordo = 996, ['şube'] = 1500, alem = 1600, seksiyon = 500, --seri = 400, used too inconsistently to check ['tür'] = 300, ['altsınıf'] = 1398, subcohort = 1098, ['altbölüm'] = 1498, altfamilya = 798, altcins = 598, sublegio = 1198, ['alttakım'] = 998, ['altşube'] = 1498, altalem = 1598, altseksiyon = 498, ['alttür'] = 298, subterclassis = 1396; -- same as parvclassis altoymak = 698, ['üstsınıf'] = 1403, supercohort = 1103, ['üstbölüm'] = 1503, superdomain = 1703, ['üstfamilya'] = 803, superlegio = 1203, ['üsttakım'] = 1003, ['üstşube'] = 1503, ['üstalem'] = 1603, ['üstoymak'] = 703, oymak = 700, varyete = 200, zoodivisio = 1300, zoosectio = 900, zoosubdivisio = 1298, zoosubsectio = 898, } end --= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Function to look up the arbitrary numerical value of a rank in a rank value table. "Ichno" and "oo" ranks are not stored separately, so if present the prefix is removed. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.araSiraDegeri(rankValTable, rank) local rankVal = rankValTable[rank] if not rankVal then -- may be an "ichno" or "oo" ranks rank = mw.ustring.gsub(mw.ustring.gsub(rank, '^ichno', ), '^oo', ) if rank == 'rdo' then rank = 'ordo' end rankVal = rankValTable[rank] end return rankVal end --= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function l.tabloHucresi(arg1, arg2) local text, style if arg2 then style = arg1 text = arg2 else style = text = arg1 end local res = '|' if style ~= '' then res = res .. style .. '|' end return res .. text .. '\n' end return p
 

Tema özelleştirme sistemi

Bu menüden forum temasının bazı alanlarını kendinize özel olarak düzenleye bilirsiniz.

Zevkine göre renk kombinasyonunu belirle

Tam ekran yada dar ekran

Temanızın gövde büyüklüğünü sevkiniz, ihtiyacınıza göre dar yada geniş olarak kulana bilirsiniz.

Izgara yada normal mod

Temanızda forum listeleme yapısını ızgara yapısında yada normal yapıda listemek için kullanabilirsiniz.

Forum arkaplan resimleri

Forum arkaplanlarına eklenmiş olan resimlerinin kontrolü senin elinde, resimleri aç/kapat

Sidebar blogunu kapat/aç

Forumun kalabalığında kurtulmak için sidebar (kenar çubuğunu) açıp/kapatarak gereksiz kalabalıklardan kurtula bilirsiniz.

Yapışkan sidebar kapat/aç

Yapışkan sidebar ile sidebar alanını daha hızlı ve verimli kullanabilirsiniz.

Radius aç/kapat

Blok köşelerinde bulunan kıvrımları kapat/aç bu şekilde tarzını yansıt.

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Geri