Movatterモバイル変換


[0]ホーム

URL:


Jump to content
විකිපීඩියා
හොයන්න

Module:Large category TOC

විකිපීඩියා වෙතින්
ප්‍රලේඛනය අයිකොනය මොඩියුල ප්‍රලේඛනය[නරඹන්න] [සංස්කරණය] [ඉතිහාසය] [විරේචනය]
ProtectedThis module issubject to page protection. It is ahighly visible module in use by a very large number of pages, or issubstituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it isprotected from editing.

This module implementsTemplate:Large category TOC and similar templates. It is used on categories with many members to provide a means of indexing them by first letter and first two letters

For full lists (Template:Large category TOC):

{{#invoke:Large category TOC|aejot}}

For collapsible lists (Template:Collapsible large category TOC):

{{#invoke:Large category TOC|collapsible}}
ඉහත ප්‍රලේඛනයModule:Large category TOC/doc වෙතින්අන්තහ්කරණය කොට ඇත .(සංස්කරණය |ඉතිහාසය)
මෙම මොඩියුලයෙහි වැලිපිල්ල(තනන්න |ආදර්ශය) සහ පරික්ෂණ අවස්ථා(තනන්න) පිටුවල, සංස්කාරක වරුන්ට පර්යේෂණ සිදු කල හැක.
මොඩියුලෙහී උපපිටු.

localp={}localazupper=mw.text.split('අආඇඈඉඊඋඌඍඎඑඒඓඔඕඖඅංඅඃ','')localazlower=mw.text.split('අආඇඈඉඊඋඌඍඎඑඒඓඔඕඖඅංඅඃ','')localaejot=mw.text.split('aejot','')functionp.scrollable(frame)returnmain('scrollable')endfunctionp.collapsible(frame)returnmain('collapsible')endfunctionp.aejot(frame)returnmain('aejot')endfunctionmain(toc_type)-- It should be much faster to only process these once, and just re use them as variableslocalpageurl=mw.title.getCurrentTitle():fullUrl()localtoc=mw.message.new('Toc'):plain()-- Highest level divlocaltoc_frame=mw.html.create('div'):addClass('plainlinks'):addClass('hlist'):addClass('toc')-- :attr('id','toc'):css({display='block !important',background='WhiteSmoke',clear='both',width='98%'})-- Contains "Content: Top 0-9 A - Z"localheader=toc_frame:tag('div'):attr('id','toctitle'):css('background','WhiteSmoke')-- Contains all the restlocalbody_wrapperlocalbody=toc_frame:tag('div'):css('text-align','center')iftoc_type=='collapsible'thentoc_frame:addClass('NavFrame')header:addClass('NavHead')body:addClass('NavContent'):css({background='white',display='none'})elseiftoc_type=='scrollable'thenbody:css({['overflow-x']='scroll',['overflow-y']='hidden',['white-space']='nowrap'})endlocalheader_content={'<strong>',toc,':</strong>',' [',pageurl,' Top]',' [',pageurl,'?from=0 0–9]'}for_,vinipairs(azupper)dotable.insert(header_content,string.format(' [%s?from=%s %s]',pageurl,v,v))endheader:wikitext(table.concat(header_content))localbody_content={}iftoc_type=='collapsible'thentable.insert(body_content,'<b>#</b> ')body_wrapper=body:tag('code'):css('background','White')elsetable.insert(body_content,'['..pageurl..'?from=* <b>*</b>] <b>#</b> ')body_wrapper=body:tag('span')endfori=0,9dotable.insert(body_content,string.format(' [%s?from=%s %s]',pageurl,i,i))endlocalfunctionatoz(letter)localazlist={}localletterlistiftoc_type=='aejot'thenletterlist=aejotelseletterlist=azlowerendiftoc_type=='aejot'ortoc_type=='scrollable'thentable.insert(azlist,' • <b>'..letter..'</b> ')elsetable.insert(azlist,'<br /><b>'..letter..'</b> ')endfor_,vinipairs(letterlist)dotable.insert(azlist,string.format(' [%s?from=%s%s %s%s] ',pageurl,letter,v,letter,v))endreturntable.concat(azlist)endfor_,vinipairs(azupper)dotable.insert(body_content,atoz(v))endbody_wrapper:wikitext(table.concat(body_content))return'__NOTOC__\n'..tostring(toc_frame)endreturnp
"https://si.wikipedia.org/w/index.php?title=Module:Large_category_TOC&oldid=330645" වෙතින් සම්ප්‍රවේශනය කෙරිණි
ප්‍රවර්ගය:

[8]ページ先頭

©2009-2025 Movatter.jp