"Module:Asbox": अवतरणों में अंतर

Content deleted Content added
imported>Codehydro
patch for note param causing gap in firefox; also streamlined asbox further
imported>Codehydro
place main category in article even if |tempsort=no
पंक्ति 95:
--Get category names and, if called by p.templatepage, the optional sort key
local tsort, cat = args['tempsort' .. v], mw.ustring.gsub(args['category' .. v], '[^%w%p%s]', '')--remove all hidden unicode chars
--Do not place template in main category if |tempsort = 'no';. For exampleHowever, ifDO stubplace articles of that template merelyin the main category.
table.insert(stubCats.v, page and
--adds |qualifier= to a meta stub and |category#= to a sub-category of meta's main category
page and (--p.templatepage passes page; p.main does not, i.e. articles are categorized without sort keys.
if tonumber(v) or tsort ~= 'no' then
v=='' and tsort == 'no'--if true, inserts 'true' in table, which category() will reject
--p.templatepage passes page; p.main does not, i.e. articles are categorized without sort keys.
or tsort and {cat, k = ' ', t = tsort}
table.insert(stubCats.v, page and
(tsort and {cat, k = ' ', t = tsort} or {cat, k = ' *', t = page.text})--note space in front of sort key
or cat
)
end or cat
)
--Check category existance only if on the template page (i.e. stub documentation)
if page then
"https://hi.wikipedia.org/wiki/Module:Asbox" से प्राप्त