Extension:Capiunto/fr
From Linux Web Expert
Capiunto État de la version : stable |
|
---|---|
Description | Fournit des fonctionnalités de base de type Infobox pour Scribunto. |
Auteur(s) | Marius Hoch (Hoo mantalk) |
Politique de compatibilité | Versions ponctuelles alignées avec MediaWiki. Le master n'est pas compatible arrière. |
MediaWiki | 1.25+ |
Modifie la base de données |
Non |
Licence | Aucune licence spécifiée |
Téléchargement | |
Téléchargements trimestriels | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Utilisé par les wikis publics | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Traduire l’extension Capiunto sur translatewiki.net si elle y est disponible | |
Problèmes | Tâches ouvertes · Signaler un bogue |
L'extension Capiunto (Latin: "they shall contain") fournit une fonctionnalité de base de type Infobox pour Scribunto.
Un aperçu des méthodes Lua fournies par Capiunto est disponible sur /Infobox.
Capiunto fournit une fonctionnalité Infobox flexible pour Scribunto et génère du HTML pour les fonctionnalités Infobox telles que les en-têtes et les lignes.
Capiunto est conçu pour des infobox propres et modernes. Utilisant Lua comme langage de script pour les modèles d'Infobox, il a été développé pour créer des Infobox:
- propre et sans encombrement
- utilisable dans différentes versions linguistiques
- basé sur les données de Wikidata
- facile à maintenir et à enrichir
Avec le code Capiunto Lua pour créer une infobox de base, cela pourrait ressembler à:
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' )
Prérequis
Capiunto nécessite l'extension Scribunto.
Installation
- <translate> [[<tvar name=2>Special:ExtensionDistributor/Capiunto/fr</tvar>|Download]] and move the extracted <tvar name=name>
Capiunto/fr
</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%2Ffr - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'Capiunto/fr' );
- 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>
Exemple d'utilisation
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 }} |
Voir aussi
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/fr
- Extensions with invalid or missing type/fr
- Extensions with manual MediaWiki version
- Extensions with no license specified/fr
- Extensions in Wikimedia version control/fr
- All extensions/fr
- Extensions not in ExtensionJson
- Extensions used on Wikimedia/fr
- Scribunto extensions/fr
- Infobox extensions/fr