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:PropertyLink

bullvar_katip

Administrator
Katılım
21 Mayıs 2024
Mesajlar
532,105
function getProperty( propertyName ) local entity = mw.wikibase.getEntityObject if not entity or not entity.claims then return end--the entity doesnt exist or have no claims local property = entity.claims[propertyName] if not property then return end--no such property for this item property = property[0] local propValue = property.mainsnak and property.mainsnak.datavalue if not propValue then return end --property doesnt exist if propValue['type'] 'wikibase-entityid' then local linkTarget mw.wikibase.sitelink( "Q" .. propValue.value['numeric-id'] ) local linkTitle mw.wikibase.label( "Q" ..propValue.value['numeric-id'] ) return linkTarget and linkTitle and mw.ustring.format( "%s", linkTarget, linkTitle ) or linkTitle elseif propValue and propValue['type'] 'string' then return propValue.value end end function property( frame ) return getProperty(string.lower(frame.args[1])) end function getLabel( propertyName ) local entity = mw.wikibase.getEntity if not entity or not entity.claims then return end--the entity doesnt exist or have no claims local property = entity.claims[propertyName] if not property then return end--no such property for this item property = property[0] local propValue = property.mainsnak.datavalue if not propValue then return end --property doesnt exist if propValue['type'] 'wikibase-entityid' then return mw.wikibase.label( "Q" ..propValue.value['numeric-id'] ) elseif propValue['type'] 'string' then return propValue.value end end -- Return the label for property, or the label of the linked entiy of that property function label( frame ) return getLabel( string.lower(frame.args[1] )) end function getImageLink( propName, width) local entity = mw.wikibase.getEntity if not entity or not entity.claims then return end --the entity doesnt exist or have no claims local property = entity.claims[propName or "p18"] if property then local width = width or "220" return mw.ustring.format( , property[0].mainsnak.datavalue.value, width ) end end --use this function to get associated image to be used in the article function imageLink( frame ) return getImageLink( string.lower(frame.args[1]), frame.args["width"]) end return { imageLink = imageLink, Image = imageLink, File = imageLink, label = label, Label = label, property = property, Property = property, getProperty = getProperty, getImageLink = getImageLink, getLabel = getLabel }
 

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