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ś.
  • argstring abo number; Mě argumenta
  • assign – 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.
  • seekstring; Mě wariable, na pś. "PAGENAME"
  • numericboolean, 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.
  • requesttable; 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
  • Slědkdaśe: žedne
LuaWiki.isExisting( seek )
Eksistencu boka pśeglědaś; analognje #ifexist.
  • seekstring; dopołne mě boka
  • Slědkdaśe: boolean
LuaWiki.transclude( s, args )
Bok zawězujo bźez zmólki skripta pśi felujucem boku.
  • sstring; Mě boka (bźez mjenjowego ruma: Pśedłoga:)
  • argstable, 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

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.

  1. 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:
  2. 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.
  3. 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.
  4. 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.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.