Wikibøker
nowikibooks
https://no.wikibooks.org/wiki/Hovedside
MediaWiki 1.47.0-wmf.20
first-letter
Medium
Spesial
Diskusjon
Bruker
Brukerdiskusjon
Wikibøker
Wikibøker-diskusjon
Fil
Fildiskusjon
MediaWiki
MediaWiki-diskusjon
Mal
Maldiskusjon
Hjelp
Hjelpdiskusjon
Kategori
Kategoridiskusjon
Kokebok
Kokebok-diskusjon
Undertekster
Undertekstdiskusjon
Modul
Moduldiskusjon
Arrangement
Arrangementsdiskusjon
MediaWiki:Gadgets-definition
8
3849
46706
40028
2026-09-18T21:18:32Z
NguoiDungKhongDinhDanh
4975
Remove deprecated option. See [[:phab:T298199|T298199]] for more information. ([[:m:GS|global sysop]] action)
46706
wikitext
text/x-wiki
== interface ==
* Perbook|predef.js|Perbook.js
* Personalper|predef.js|Personalper.js
==navigation-and-edit==
* Add-purge|Add-purge.js
<div id="kunadmins">
==administrators==
* EnhancedUndelete|EnhancedUndelete.js
</div>
398vtg8cb688ptjlmdb8xopk4j34kxs
Naturfag
0
4702
46705
40992
2026-09-18T20:20:58Z
Wkee4ager
4794
Erstatter siden med: {{Forside}}
46705
wikitext
text/x-wiki
{{Forside}}
sqrm9itvhwub1zz8cmrptx87x910ps5
Modul:Message box/dok
828
7852
46704
46629
2026-09-18T19:52:24Z
Wkee4ager
4794
46704
wikitext
text/x-wiki
Dette er en meta-modul som implementerer beskjedboks-malene {{tl|mboks}}, {{tl|amboks}}, {{tl|cmboks}}, {{tl|fmboks}}, {{tl|imboks}}, {{tl|omboks}}, and {{tl|tmboks}}. Hvis du ønsker å bruke denne modulen på en wikiside er det best å bruke disse malene.
== Bruk ==
For å bruke denne modulen fra en annen Lua-modul, må du laste den inn først.
<syntaxhighlight lang="lua">
local messageBox = require('Module:Message box')
</syntaxhighlight>
For å lage en beskjedboks brukes <code>main</code>-funksjonen. Den tar to parametre: 1) typen boks <code>boxType</code>, 2) en tabell som inneholder beskjedboksens parametre.
<syntaxhighlight lang="lua">
local box = messageBox.main( boxType, {
param1 = param1,
param2 = param2,
-- Flere parametre...
})
</syntaxhighlight>
Det er 7 ulike typer beskjedbokser:
{| class="wikitable"
! boxType !! Mal !! Hensikt
|-
| <code>mbox</code> || {{tl|mboks}} || Til bruk i ulike navnerom
|-
| <code>ambox</code> || {{tl|amboks}} || Til bruk i hovednavnerommet
|-
| <code>cmbox</code> || {{tl|cmboks}} || Til bruk i kategori-navnerommet
|-
| <code>fmbox</code> || {{tl|fmboks}} || Til bruk i grensesnitt-navnerommet
|-
| <code>imbox</code> || {{tl|imboks}} || Til bruk i fil-navnerommet
|-
| <code>tmbox</code> || {{tl|tmboks}} || Til bruk i diskusjon-navnerommet
|-
| <code>ombox</code> || {{tl|omboks}} || Til bruk i de andre navnerommene
|}
Se den aktuelle malsiden for dokumentasjon av de ulike parametrene.
== Bruk via #invoke ==
I tillegg til <code>main</code>-funksjonen, inneholder denne modulen individuelle funksjoner for hver type boks. Det er adgang til dem ved å bruke <code><nowiki>{{#invoke:Message box|mboks|...}}</nowiki></code>, <code><nowiki>{{#invoke:Message box|amboks|...}}</nowiki></code> osv. Selv om det mulig å gjøre det på denne måten er det mindre effektivt enn <code>main</code>-funksjonen.
== Tekniske detaljer ==
Modulen bruker samme grunnleggende kode for hver av malene listet opp overfor. Forskjellene mellom boksene konfigureres ved hjelp av dataene i [[Modul:Message box/configuration]]. Under angis de forskjellige valgmulighetene og hva de betyr:
* <code>types</code> - a table containing data used by the type parameter of the message box. The table keys are the values that can be passed to the type parameter, and the table values are tables containing the class and the image used by that type.
* <code>default</code> - the type to use if no value was passed to the type parameter, or if an invalid value was specified.
* <code>showInvalidTypeError</code> - whether to show an error if the value passed to the type parameter was invalid.
* <code>allowBlankParams</code> - usually blank values are stripped from parameters passed to the module. However, whitespace is preserved for the parameters included in the allowBlankParams table.
* <code>allowSmall</code> - whether a small version of the message box can be produced with "small=yes".
* <code>smallParam</code> - a custom name for the small parameter. For example, if set to "left" you can produce a small message box using "small=left".
* <code>smallClass</code> - the class to use for small message boxes.
* <code>substCheck</code> - whether to perform a subst check or not.
* <code>classes</code> - an array of classes to use with the message box.
* <code>imageEmptyCell</code> - whether to use an empty td cell if there is no image set. This is used to preserve spacing for message boxes with a width of less than 100% of the screen.
* <code>imageEmptyCellStyle</code> - whether empty image cells should be styled.
* <code>imageCheckBlank</code> - whether "image=blank" results in no image being displayed.
* <code>imageSmallSize</code> - usually, images used in small message boxes are set to 30x30px. This sets a custom size.
* <code>imageCellDiv</code> - whether to enclose the image in a div enforcing a maximum image size.
* <code>useCollapsibleTextFields</code> - whether to use text fields that can be collapsed, i.e. "issue", "fix", "talk", etc. Currently only used in ambox.
* <code>imageRightNone</code> - whether imageright=none results in no image being displayed on the right-hand side of the message box.
* <code>sectionDefault</code> - the default name for the "section" parameter. Depends on <code>useCollapsibleTextFields</code>.
* <code>allowMainspaceCategories</code> - allow categorisation in the main namespace.
* <code>templateCategory</code> - the name of a category to be placed on the template page.
* <code>templateCategoryRequireName</code> - whether the <code>name</code> parameter is required to display the template category.
* <code>templateErrorCategory</code> - the name of the error category to be used on the template page.
* <code>templateErrorParamsToCheck</code> - an array of parameter names to check. If any are absent, the <code>templateErrorCategory</code> is applied to the template page.
kyelr4wukftd4xzoua70cudqi6glc8o
Mal:Lua/dok
10
7884
46701
44686
2026-09-18T12:05:51Z
Wkee4ager
4794
46701
wikitext
text/x-wiki
{{Dokumentasjon underside}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{Lua|Module:Lua banner}}
== TemplateData ==
{{TemplateData header}}
{{#invoke:TNT|doc|Lua banner}}
<includeonly>
<!-- Categories below this line; interwikis at Wikidata -->
}}</includeonly>
okmu2np5p5x5l2jd1jzoo2ff5xi4459
46703
46701
2026-09-18T12:25:19Z
Wkee4ager
4794
46703
wikitext
text/x-wiki
{{Dokumentasjon underside}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{Lua|Module:Lua banner}}
== TemplateData ==
{{TemplateData header}}
{{#invoke:TNT|doc|Lua banner}}
<includeonly>
<!-- Kategorier kan føyes til under linjen her -->
</includeonly>
oeeyiim5tvrar0ewx0m56vyjrhvbxzx
Modul:TNT/config
828
8137
46702
46700
2026-09-18T12:24:33Z
Wkee4ager
4794
46702
Scribunto
text/plain
local p = {};
-- The tracking category name for global TemplateData pages located on Commons
-- under "Data:Templatedata/" instead of "Data:TemplateData/",
-- defaults to `"Templates using legacy global TemplateData table name"`
-- when not set; set to `false` to disable all categorisation
p.legacyTemplateDataCategoryName = nil;
-- Whether to add the language subtag to the template name using {{#translation:}},
-- defaults to `false`
p.translatableCategoryLink = false;
return p;
jda9h43jhyc2igojpr8mtazgz70ikj7