Extension:Capiunto/pl
From Linux Web Expert
Capiunto Status wydania: stabilne |
|
---|---|
Opis | Provides basic Infobox functionality for Scribunto. |
Autor(zy) | Marius Hoch (Hoo mantalk) |
Polityka zgodności | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.25+ |
Zmiany w bazie danych | Nie |
Licencja | Nie określono |
Pobieranie | |
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
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:
local capiunto = 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
- <translate> [[<tvar name=2>Special:ExtensionDistributor/Capiunto/pl</tvar>|Download]] and move the extracted <tvar name=name>
Capiunto/pl
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Capiunto%2Fpl - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'Capiunto/pl' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Example usage
Module (Module:CapiuntoTest) |
Template (Template:CapiuntoTest) |
Article |
---|---|---|
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
local args = frame:getParent().args
local headerStyle
if args.headerstyle and args.headerstyle ~= '' then
headerStyle = string.format('background-color:%s;', args.headerstyle)
else
headerStyle = 'background-color:grey;'
end
local retval = 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 )
return retval
end
return p
|
<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ż
File:Wikimedia-logo black.svg | <translate> This {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension|skin}} is being used on one or more [[<tvar name=2>m:Special:MyLanguage/Wikimedia projects</tvar>|Wikimedia projects]].</translate> <translate> This probably means that the {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension|skin}} is stable and works well enough to be used by such high-traffic websites.</translate> <translate> Look for this {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension's|skin's}} name in Wikimedia's <tvar name=2>CommonSettings.php</tvar> and <tvar name=3>InitialiseSettings.php</tvar> configuration files to see where it's installed.</translate> <translate> A full list of the {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extensions|skins}} installed on a particular wiki can be seen on the wiki's <tvar name=ver>Special:Version</tvar> page.</translate> |
File:OOjs UI icon information-progressive.svg |
Categories:
- Pages with script errors
- Pages with broken file links
- Stable extensions/pl
- Extensions with invalid or missing type/pl
- Extensions with manual MediaWiki version
- Extensions with no license specified/pl
- Extensions in Wikimedia version control/pl
- All extensions/pl
- Extensions not in ExtensionJson
- Extensions used on Wikimedia/pl
- Scribunto extensions/pl
- Infobox extensions/pl