Wikipedia:Lua/Modul/LuaWiki/dsb
Wikipedia:Lua Modul LuaWiki dsb
| Vorlagen- programmierung |
Diskussionen | Lua | Unterseiten | ||||||
| Modul | Deutsch | English
|
Esperanto | Dolnoserbski | Hornjoserbsce | Modul: | WP:Lua | ||
LuaWiki – Modul z funkcijami za Lua-programěrowanje we Wikijowem projekśe.
Funkcije za pśedłogi
Žedne wužyśe w pśedłogach zmysłapołne.
Funkcije za Lua-module
Zawězanje do swójskego modula z require() ako slědujo:
local LuaWiki = require( "Module:LuaWiki" )
if type( LuaWiki ) ~= "table" then
-- pśigódne wobjadnanje ze zmólkami, na pś. konkretne powěsći pśi funkcijami za pśedłogi
end
Pótom stoje funkcije k dispoziciji.
- LuaWiki.getArg( arg, assign )
- Parameter pśedłogi wucytaś.
arg– string abo number; Mě argumentaassign– opcionalny; Rückfallwert někakego typa, jolic w zawězanju pśedłogi njejo pśidany- Slědkdaśe: rěd znamješkow (zawěsćone) abo howacej Rückfallwert
- Jolic w zawězanju pśedłogi njejo pśidany a žedna Rückfallwert, pótom:
{{{<arg>}}} - LuaWiki.getVariable( seek, numeric )
- Projektowu wariablu wucytaś; glědaj de:Hilfe:Parserfunktionen.
seek– string; Mě wariable, na pś."PAGENAME"numeric– boolean, opcionalny; numeriska gódnota slědkdaśa- Slědkdaśe: Rěd znamješkow abo numeriski
- Zachadna inicializacija z initVariables póspěšujo, ale njejo nuzna.
- LuaWiki.initVariables( request )
- Inicializacija pótrjebowanych projektowych wariablow k póspěšenju.
request– table; Mě wariable- Kuždy element pó žycenju:
- string; Mě wariable, na pś.
"PAGENAME" - table; Wariabla se pśecej z numeriskeju gódnotu dawa
- [1] string; Mě wariable
- [2]
true
- string; Mě wariable, na pś.
- Kuždy element pó žycenju:
- Slědkdaśe: žedne
- LuaWiki.isExisting( seek )
- Eksistencu boka pśeglědaś; analognje
#ifexist.seek– string; dopołne mě boka- Slědkdaśe: boolean
- LuaWiki.transclude( s, args )
- Bok zawězujo bźez zmólki skripta pśi felujucem boku.
s– string; Mě boka (bźez mjenjowego ruma:Pśedłoga:)args– table, opcionalny; argumenty- Slědkdaśe: Rěd znamješkow; Zawězanje abo powěsć zmólki pśi felujucem boku
Wužyśe
Powšykna biblioteka; nic zagranicowana.
Znate wužyśa
- Modul:Vorlage:LuaModuleDoc – pśikład wužyśa
Wótwisnosć
Žedna.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.