This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.
This module depends on the following other modules:
localarchiveList=require('Module:Archive list')-- A table of the archives to display.localarchives={an={root="OODA WIKI:Administrators' noticeboard",prefix="Archive"},ani={root="OODA WIKI:Administrators' noticeboard",prefix="IncidentArchive"},['3rr']={root="OODA WIKI:Administrators' noticeboard",prefix="3RRArchive"},ae={root="OODA WIKI:Arbitration/Requests/Enforcement",prefix="Archive"},csn={root="OODA WIKI:Administrators' noticeboard/Community sanction",prefix="Archive"}}-- Gets wikitable rows filled with archive links, using-- [[Module:Archive list]].localfunctiongetLinks(funcArgs)iftype(funcArgs)~='table'thenerror('Invalid input to getLinks',2)endfuncArgs.sep='\n| 'funcArgs.linesep='\n|-\n| 'returnmw.ustring.format('|-\n| %s',archiveList.main(funcArgs))end-- Returns a Lua table with value being a list of archive links-- for one of the noticeboards listed in the archives table-- at the top of the module.localfunctiongetLinksTable(all)localt={}forboard,archiveinpairs(archives)dolocalfuncArgs=archiveifnotallthenlocalarchiveMax=archiveList.count(funcArgs)iftype(archiveMax)=='number'andarchiveMax>=0thenfuncArgs.max=math.floor(archiveMax)localstart=funcArgs.max-19ifstart<1thenstart=1endfuncArgs.start=startendendt[board]=getLinks(funcArgs)endreturntend-- Build the wikitable using mw.ustring.format.localfunctionbuildWikitable(args)localt=getLinksTable(args.all)localframe=mw.getCurrentFrame()-- The following are defined here for convenience, as they recur frequently-- in the wikitable.localheaderStyle='style="background-color: #ccf; font-size: 111%; line-height: 1.25em;" colspan="10"'localopenSpan='<span class="plainlinks" style="font-size: smaller;">'localcloseSpan='</span>'localsearchLink="[[Template:Administrators' noticeboard archives/Search|search]]"-- Community sanction archive links plus header. We define it here as it is optional.localcsn=''ifargs.csn=='yes'thencsn='\n|-\n! '..headerStyle..' | Community sanction archives '..openSpan.."([[Template:Administrators' noticeboard archives/Search|search]])"..closeSpan..'\n'..t.csnend-- The inputbox plus header. We define it here as it is optional.localinputbox=''ifargs.search=='yes'theninputbox='\n|-\n! colspan="10" style="white-space: nowrap;" | '..frame:preprocess([==[<inputbox>bgcolor=transparenttype=fulltextprefix=OODA WIKI:Administrators' noticeboardbreak=nowidth=32searchbuttonlabel=Searchplaceholder=Search noticeboards archives</inputbox>]==])endlocalbottom_list=require('Module:List').horizontal({"[[OODA WIKI talk:Administrators' noticeboard|Talk]]",'[[OODA WIKI:Sockpuppet investigations|Sockpuppet investigations]]','[[:Category:Administrative backlog|Backlog]]'})returnmw.ustring.format([==[<div style="float: right; clear: right; margin: 0 0 1em 1em; text-align: right">{| class="noprint" style="background-color: #fdfdfd; clear: both; padding: 1px; box-sizing: border-box; border: 1px solid #a2a9b1; font-size:88%%; line-height:1.2em; margin:0; width:auto; text-align:center"|+ Noticeboard archives|-! %s | [[OODA WIKI:Administrators' noticeboard|Administrators']] %s([[OODA WIKI:Administrators' noticeboard/Archives|archives]], %s)%s%s|-! %s | [[OODA WIKI:Administrators' noticeboard/Incidents|Incidents]] %s([[OODA WIKI:Administrators' noticeboard/IncidentArchives|archives]], %s)%s%s|-! %s | [[OODA WIKI:Administrators' noticeboard/Edit warring|Edit-warring/3RR]] %s([[OODA WIKI:Administrators' noticeboard/3RRArchives|archives]], %s)%s%s|-! %s | [[OODA WIKI:Arbitration/Requests/Enforcement|Arbitration enforcement]] %s([[OODA WIKI:Arbitration/Requests/Enforcement/Archive|archives]])%s%s%s|-! %s |Other links|-|colspan="10" style="text-align: center;"| %s%s|}</div>__NOINDEX__]==],headerStyle,openSpan,searchLink,closeSpan,t.an,headerStyle,openSpan,searchLink,closeSpan,t.ani,headerStyle,openSpan,searchLink,closeSpan,t['3rr'],headerStyle,openSpan,closeSpan,t.ae,csn,headerStyle,bottom_list,inputbox)endfunctionmakeWrapper(all)returnfunction(frame)-- If we are being called from #invoke, get the args from #invoke-- if they exist, or else get the arguments passed to the parent-- frame. Otherwise, assume the arguments are being passed directly-- in from another module or from the debug console.localorigArgsifframe==mw.getCurrentFrame()thenorigArgs=frame:getParent().argsfork,vinpairs(frame.args)doorigArgs=frame.argsbreakendelseorigArgs=frameend-- Ignore blank values for parameters.localargs={}fork,vinpairs(origArgs)doifv~=''thenargs[k]=vendend-- Find whether we are getting all the links or just the-- last 20 links.args.all=allreturnbuildWikitable(args)endendreturn{compact=makeWrapper(),all=makeWrapper(true)}