Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Module:Toolbar

From mediawiki.org
Module documentation
This module is rated asready for general use. It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other resources as an option for new users to learn. To reduce server load and bad output, it should be improved bysandbox testing rather than repeated trial-and-error editing.

Implements {{Toolbar}}

The abovedocumentation istranscluded fromModule:Toolbar/doc.(edit |history)
Editors can experiment in this module’s sandbox(create |mirror) and testcases(create) pages.
Subpages of this module.

-- This module implements {{toolbar}}.localmArguments-- Lazily initialise [[Module:Arguments]]localmTableTools=require('Module:TableTools')localyesno=require('Module:Yesno')localp={}functionp.main(frame)mArguments=require('Module:Arguments')localargs=mArguments.getArgs(frame,{wrappers={'Template:Toolbar',},})returnp._main(args)endfunctionp._main(args)localtoolbarItems=p.makeToolbarItems(args)ifnottoolbarItemsthen-- Return the blank string if no arguments were specified, rather than-- returning empty brackets.return''elseifyesno(args.span)==falsethenreturnstring.format('(%s)',toolbarItems)elsereturnstring.format('<span class="plainlinks%s"%s>(%s)</span>',type(args.class)=='string'and' '..args.classor'',type(args.style)=='string'andstring.format(' style="%s"',args.style)or'',toolbarItems)endendfunctionp.makeToolbarItems(args)localnums=mTableTools.numKeys(args)localsep=(args.separatoror'pipe')..'-separator'ifsep=="dot-separator"thensep=" · "elsesep=mw.message.new(sep):plain()endlocalret={}fori,vinipairs(nums)doret[#ret+1]=mw.ustring.gsub(args[v],"%[%[::+(.-)%]%]","[[:%1]]")endif#ret>0thenreturntable.concat(ret,sep)elsereturnnilendendreturnp
Retrieved from "https://www.mediawiki.org/w/index.php?title=Module:Toolbar&oldid=4752218"
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp