Jump to content

Editing Module:Handbook

Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 13: Line 13:
if args[1] and type(args[1]) == 'string' then
if args[1] and type(args[1]) == 'string' then
for page in lib.gsplit(args[1], ';', { removeEmpty = true }) do
for page in lib.gsplit(args[1], ';', { removeEmpty = true }) do
local handbookArgs = getTemplateArgs('Handbook/' .. page, { only = 'Handbook Entry' })
local handbookArgs = getTemplateArgs('Handbook/' .. page, { only = 'Handbook' })
if lib.isEmpty(handbookArgs) then
if lib.isEmpty(handbookArgs) then
html:tag('strong'):addClass('error'):wikitext('The page [[Handbook/', page, ']] is not a valid Handbook Entry.')
html:tag('strong'):addClass('error'):wikitext('The page [[Handbook/', page, ']] is not a valid Handbook Entry.')
Line 37: Line 37:
if args.about then
if args.about then
args.about = lib.split(args.about, ';')
args.about = lib.split(args.about, ';')
if title.rootText == 'Handbook' then
if title.rootText == 'Handbook Entry' then
out:tag('i'):wikitext(require('Module:Hatnote').main(args.about))
out:tag('i'):wikitext(require('Module:Hatnote').main(args.about))
end
end
Line 43: Line 43:
local size = args.size or '200px'
local size = args.size or '200px'
if (title.rootText == 'Handbook') then
if (title.rootText == 'Handbook Entry') then
size = '400px'
size = '400px'
end
end
Line 65: Line 65:
-- add categories if correct page
-- add categories if correct page
local subpage = args.title or title.subpageText
local subpage = args.title or title.subpageText
if (not args['table'] and title.baseText == 'Handbook' and (subpage ~= nil and not lib.inArray({ 'Planar Travel', 'Nexus Battle', 'Uncategorized' }, subpage))) then
if (not args['table'] and title.baseText == 'Handbook Entry' and (subpage ~= nil and not lib.inArray({ 'Planar Travel', 'Nexus Battle', 'Uncategorized' }, subpage))) then
local cat = mw.html.create()
local cat = mw.html.create()
cat:wikitext('[[Category:Handbook Entries|', subpage, ']]')
cat:wikitext('[[Category:Handbook Entries|', subpage, ']]')
Line 140: Line 140:
count,
count,
"'''",
"'''",
(count == 1 and ' [[Handbook Entry]] ' or ' [[Handbook Entries]] '),
(count == 1 and '[[Handbook Entry]] ' or '[[Handbook Entries]] '),
(args[1] and ('that match' .. (count == 1 and 'es' or '') .. ' the category selection:') or ' are in ' .. title)
(args[1] and ('that match' .. (count == 1 and 'es' or '') .. ' the category selection:') or ' are in ' .. title)
)
)
Please note that all contributions to Honkai: Nexus Anima Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Honkai Nexus Anima Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.

Parser Functions:{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}





Pages included on this page: