Anasayfa
Rastgele
Oturum aç
Ayarlar
Sanarşiv hakkında
Sorumluluk reddi
Ara
"
Modül:Wikidata/media
" sayfasını değiştirmektesiniz
Uyarı:
Oturum açmadınız. Bir düzenleme yaptığınızda, sizin için geçici bir hesap oluşturulur.
Daha fazla bilgi
. Bu hesabın süresi dolduğunda bildirimler almaya devam etmek ve diğer özelliklere erişmek için
oturum açın
ya da
hesap oluşturun
.
Anti spam denetimi. Bunu
doldurmayın
!
local p = {} local contentLanguageCode = mw.getContentLanguage():getCode(); function p.formatCommonsCategory( context, options, value ) local link = 'commons:Category:' .. value local title = value .. ' Vikianbarda' if ( options['text'] and options['text'] ~= '' ) then title = options['text'] end commons = '[[' .. link .. '|' .. title .. ']]' --Commons icon if ( not options['icon'] or options['icon'] ~= '-' ) then local icon_size = '15px' if ( options['icon_size'] and options['icon_size'] ~= '' ) then icon_size = options['icon_size'] end commons = '[[Fayl:Commons-logo.svg|' .. icon_size .. '|link=' .. link .. '|alt=Vikianbarın loqosu]] ' .. commons end --Text before and after link if ( options['text_before'] and options['text_before'] ~= '' ) then if ( options['text_before'] ~= '-' ) then commons = options['text_before'] .. ' ' .. commons end end if ( options['text_after'] and options['text_after'] ~= '' ) then if ( options['text_after'] ~= '-' ) then commons = commons .. ' ' .. options['text_after'] end end return commons end local config; local function getCategoryByCode( code, sortkey ) if config == nil then config = require( 'Modul:Wikidata/config' ); end; local value = config[ 'categories' ][ code ]; if not value or value == '' then return ''; end return '[[Category:' .. value .. ']]'; end local function getCaption( context, options ) local caption = '' if options.qualifiers and options.qualifiers.P2096 then for i, qualifier in pairs( options.qualifiers.P2096 ) do if ( qualifier and qualifier.datavalue and qualifier.datavalue.type == 'monolingualtext' and qualifier.datavalue.value and qualifier.datavalue.value.language == contentLanguageCode ) then caption = qualifier.datavalue.value.text break end end end if options['appendTimestamp'] and options.qualifiers and options.qualifiers.P585 and options.qualifiers.P585[1] then local moment = context.formatValueDefault( context, options, options.qualifiers.P585[1].datavalue ) if not caption or caption == '' then caption = moment else caption = caption .. ', ' .. moment end end local localValue = ''; if options[ 'value' ] and options[ 'value' ] ~= '' then localValue = options[ 'value' ]; end local localCaption = ''; if options[ 'caption' ] and options[ 'caption' ] ~= '' then localCaption = options[ 'caption' ]; end if localValue ~= '' then caption = localCaption; end local formattedCaption = '' if caption ~= '' then formattedCaption = context.wrapQualifier( caption, 'P2096', { class = 'media-caption', style = 'display:block' } ); end if localValue == '' and localCaption ~= '' then formattedCaption = formattedCaption .. getCategoryByCode( 'media-contains-local-caption' ) if options.frame:preprocess('{{REVISIONID}}') == '' then formattedCaption = formattedCaption .. '<span class="error" style="font-size:94%;">Şəkil Vikiverilənlərdən götürüldüyü için lokal izah göstərilmir</span>' end end return caption, formattedCaption end function p.formatCommonsMediaValue( context, options, value ) local image = value; local caption, formattedCaption = getCaption( context, options ) if not string.find( value, '[%[%]%{%}]' ) and not string.find( value, 'UNIQ%-%-imagemap' ) then image = '[[Fayl:' .. value .. '|frameless'; if options[ 'border' ] and options[ 'border' ] ~= '' then image = image .. '|border'; end local size = options[ 'size' ]; if size and size ~= '' then if not string.match( size, 'px$' ) and not string.match( size, 'pks$' ) then size = size .. 'px' end -- временно if string.match( size, 'pxpx' ) then image = '[[Kateqoriya:Sanarsivya:Şəklin ölçüsü "pxpx" kimi verilən səhifələr]]' .. image end else size = fileDefaultSize; end image = image .. '|' .. size; if options[ 'alt' ] and options[ 'alt' ] ~= '' then image = image .. '|alt=' .. options[ 'alt' ]; end if caption ~= '' then image = image .. '|' .. caption end image = image .. ']]'; if formattedCaption ~= '' then image = image .. '<br>' .. formattedCaption; end else image = image .. formattedCaption .. getCategoryByCode( 'media-contains-markup' ); end if options.entity and options.fixdouble then local page = mw.title.getCurrentTitle() local txt = page:getContent() if txt and txt:match(':' .. value) and mw.title.getCurrentTitle():inNamespace(0) then if options.frame:preprocess('{{REVISIONID}}') == '' then image = image .. '<span class="error">Bu şəklin eynisi mətnin daxilində aşkarlandı. Zəhmət olmasa, onlardan birini silin.</span>' end image = image .. getCategoryByCode( 'media-contains-local-double' ) end end return image end return p
Özet:
Sanarşiv web sitesine yapılan tüm katkıların diğer katılımcılar tarafından düzenlenebileceğini, değiştirilebileceğini veya kaldırılabileceğini lütfen unutmayın. Yazınızın acımasızca düzenlenmesini istemiyorsanız, buraya göndermeyin.
Ayrıca, bunu kendiniz yazdığınızı veya herkese açık bir alandan veya benzeri ücretsiz bir kaynaktan kopyaladığınıza söz veriyorsunuz (ayrıntılar için
Sanarşiv:Telif hakları
sayfasına bakın).
Telif hakkıyla korunan eseri izinsiz göndermeyin!
İptal
Değişiklik yardımı
(yeni pencerede açılır)
Bu sayfada yer alan sayfa:
Modül:Wikidata/media/belge
(
değiştir
)