10,594
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
--[[ | --[[ | ||
This module was created by User:CodeHydro (Alexander Zhikun He). | This module was created by User:CodeHydro (Alexander Zhikun He). | ||
User: | User:Muskit Gergous and User:WikiDwarf provided a great deal of assistance in writting p.main() | ||
p.main() draw heavily from the following version of Template:Asbox of the English | p.main() draw heavily from the following version of Template:Asbox of the English Bharatpedia, authored primarily by User:Rich_Farmbrough | ||
https://en. | https://en.bharatpedia.org/w/index.php?title=Template:Asbox&oldid=619510287 | ||
p.templatepage() is derived from the following revision of Template:Asbox/templatepage, authored primarily by User:MSGJ | p.templatepage() is derived from the following revision of Template:Asbox/templatepage, authored primarily by User:MSGJ | ||
https://en. | https://en.bharatpedia.org/w/index.php?title=Template:Asbox/templatepage&oldid=632914791 | ||
Both templates had significant contributions from numerous others listed in the revision history tab of their respective pages. | Both templates had significant contributions from numerous others listed in the revision history tab of their respective pages. | ||
Line 178: | Line 178: | ||
}) | }) | ||
:_((not p.demo or p.demo == 'doc') and--Add standard stub template documentation | :_((not p.demo or p.demo == 'doc') and--Add standard stub template documentation | ||
require('Module:Documentation').main{ | |||
content = Buffer(page.text ~= 'Stub' and--This comparison performed in {{Asbox/stubtree}} before it invokes Module:Asbox stubtree | |||
require('Module:Asbox stubtree').subtree{args = {pagename = page.text}} | |||
) | |||
:_in'\n== About this template ==\nThis template is used to identify a':_(args.subject):_'stub':_(args.qualifier):_out' '--space | |||
:_'. It uses {{[[Template:Asbox|asbox]]}}, which is a meta-template designed to ease the process of creating and maintaining stub templates.\n=== Usage ===\nTyping ' | |||
:_(mw.html.create'code' | |||
:wikitext('{{', page.text == 'Stub' and 'stub' or page.text, '}}') | |||
) | |||
:_' produces the message shown at the beginning, and adds the article to the following categor' | |||
:_(#stubCats > 1 and 'ies' or 'y') | |||
:_':\n' | |||
:_(population()) | |||
:_(pageDoc.exists and--transclusion of /doc if it exists | |||
frame:expandTemplate{title = pageDoc.text} | frame:expandTemplate{title = pageDoc.text} | ||
) | ) | ||
Line 183: | Line 197: | ||
:_(frame:expandTemplate{title = tStubDoc.text}) | :_(frame:expandTemplate{title = tStubDoc.text}) | ||
:_'\n\n'(), | :_'\n\n'(), | ||
['link box'] = Buffer'This documentation is automatically generated by [[Module:Asbox]].' | |||
:_in'The general information is transcluded from [[Template:Stub documentation]]. ' | |||
:_(mw.html.create'span' | |||
:cssText'font-size:smaller;font-style:normal;line-height:130%' | |||
:node(('([%s edit] | [%s history])'):format( | |||
tStubDoc:fullUrl('action=edit', 'relative'), | tStubDoc:fullUrl('action=edit', 'relative'), | ||
tStubDoc:fullUrl('action=history', 'relative') | tStubDoc:fullUrl('action=history', 'relative') | ||
)) | |||
) | |||
:_out() | :_out() | ||
:_(page.protectionLevels.edit and page.protectionLevels.edit[1] == 'sysop' and | :_(page.protectionLevels.edit and page.protectionLevels.edit[1] == 'sysop' and | ||
Line 191: | Line 212: | ||
.. '| /doc] subpage, which is not protected.' | .. '| /doc] subpage, which is not protected.' | ||
)' <br/>' | )' <br/>' | ||
} | |||
)() | |||
end | end | ||
Line 215: | Line 238: | ||
:wikitext( | :wikitext( | ||
Buffer'This':_(args.subject):_(args.article or 'article'):_(args.qualifier)' ',--space | Buffer'This':_(args.subject):_(args.article or 'article'):_(args.qualifier)' ',--space | ||
' is a [[ | ' is a [[Wikipedia:stub|stub]]. You can help Wikipedia by [', | ||
page:fullUrl('action=edit', 'relative'), | page:fullUrl('action=edit', 'relative'), | ||
' expanding it].' | ' expanding it].' |