Jump to content
MediaWiki

Extension:Capiunto/pl

From mediawiki.org
This page is a translated version of the page Extension:Capiunto and the translation is 12% complete.
Podręcznik rozszerzeń MediaWiki
Capiunto
Status wydania: stabilne
Opis Provides basic Infobox functionality for Scribunto.
Autor(zy) Marius Hoch (Hoo man dyskusja )
Polityka zgodności Snapshots releases along with MediaWiki. Master nie jest kompatybilny wstecznie.
MediaWiki 1.25+
Zmiany w bazie danych Nie
Licence Licencja GNU General Public License 2.0 lub nowsza
Pobieranie
Przetłumacz rozszerzenie Capiunto jeżeli jest dostępne na translatewiki.net
Problemy Otwarte zadania · Zgłoś błąd

The Capiunto (Latin: "they shall contain ") extension provides a basic Infobox functionality for Scribunto.

An overview of the Lua methods which Capiunto provides can be found at /Infobox.

Capiunto provides flexible Infobox functionality for Scribunto and generates HTML for Infobox features such as headers and rows.

Capiunto is designed for clean and modern Infoboxes. Using Lua as a scripting language for Infobox templates, it was developed to make Infoboxes:

  • clean and clutter-free
  • usable across different language versions
  • driven by data from Wikidata
  • easy to maintain and extend

With Capiunto Lua code to create a basic Infobox might look like this:

localcapiunto=require'capiunto'
capiunto.create({
title='Title of the Infobox'
})
:addRow('A label','some data')
:addHeader('A header between the data rows')
:addRow('Another label','more data')

Requirements

Capiunto depends on the Scribunto extension.

Instalacja

  • Pobierz i umieść plik(i) w katalogu o nazwie Capiunto w folderze extensions/.
    Developers and code contributors should install the extension from Git instead, using:
    cdextensions/
    gitclonehttps://gerrit.wikimedia.org/r/mediawiki/extensions/Capiunto
    
  • Dodaj poniższy kod na dole twojego pliku LocalSettings.php :
    wfLoadExtension( 'Capiunto' );
    
  • Yes Zrobione – Przejdź do Special:Version na twojej wiki, aby sprawdzić czy rozszerzenie zostało pomyślnie zainstalowane.

Example usage

Module
(Module:CapiuntoTest)
Template
(Template:CapiuntoTest)
Article
localcapiunto=require'capiunto'
localp={}
functionp.main(frame)
localargs=frame:getParent().args
localheaderStyle
ifargs.headerstyleandargs.headerstyle~=''then
headerStyle=string.format('background-color:%s;',args.headerstyle)
else
headerStyle='background-color:grey;'
end
localretval=capiunto.create({
title=args.title,
headerStyle=headerStyle,
})
:addImage(args.image,args.caption)
:addRow('Foo',args.foo)
:addHeader('A header between the data rows')
:addRow('Bar',args.bar)
returnretval
end
returnp
<includeonly>{{#invoke:CapiuntoTest|main}}</includeonly>
{{CapiuntoTest
| title = The title
| headerstyle = (defaults to background-color:grey)
| image = [[File:Example.svg|200px]]
| caption = An example image
| foo = Something
| ("A header between the data rows")
| bar = Something else
}}

Zobacz też

To rozszerzenie jest dołączone do następujących farm/hostów wiki lub pakietów:

AltStyle によって変換されたページ (->オリジナル) /