Home
Random
Log in
Settings
About Brighter Shores Wiki
Disclaimers
Search
Editing
Module:Transcript
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} function p.invoke_main(frame) local args = frame:getParent().args return p.main(args) end function p.main(args) local dtype = string.lower( args[1] or '' ) local pagetitle = mw.title.getCurrentTitle() local pagename = pagetitle.text local basepagename = pagetitle.baseText local ns3000 = pagetitle.namespace == 3000 -- Transcript namespace local linkarg = args.link local link = '[[' .. ( linkarg or pagename ) .. ']]' local linkb = args.linkb local linkband = linkb and ( '[[' .. linkb .. ']] and ' ) or '' local title = args.title or pagename if dtype == 'update' then link = string.format('[[Update:%s|%s]]', ( linkarg or pagename ):gsub('^Update:', ''), pagename) end local sentences = { ['item'] = 'the transcript of ' .. linkband .. link, ['scenery'] = 'dialogue related to ' .. linkband .. 'the scenery object ' .. link } local defaultText = 'dialogue related to ' .. linkband .. link local source = 'The content below is copied verbatim from \'\'Brighter Shores\'\' and thus copyrighted by [[Fen Research]].' local startTable = '{| class="messagebox standard-talk plainlinks" style="border-left:none; text-align:center;"\n|-\n| ' local line = 'This page contains ' .. ( sentences[dtype] or defaultText ) .. '.' local endTable = '<br clear="all" /><div style="font-size:0.85em; line-height:1.4em;">' .. source .. '</div>\n|-\n|}' local header = startTable .. line .. endTable local cats = { ['item'] = {'Item transcripts'}, ['npc'] = {'NPC transcripts'}, ['quest'] = {'Quest transcripts'}, ['scenery'] = {'Scenery transcripts'} } local setcat = '' local displayTitle = '' if ns3000 then local cat = cats[dtype] or {'Miscellaneous transcripts'} setcat = '[[Category:' .. table.concat(cat, ']][[Category:') .. ']]' local titleTypeIds = { ['npc'] = 1, ['item'] = 2, ['misc'] = 2, ['quest'] = 2 } local titleTypes = { 'Dialogue for ' .. title, 'Transcript of ' .. title } local newTitle = titleTypes[ titleTypeIds[dtype] or 2 ] displayTitle = mw.getCurrentFrame():callParserFunction{ name = 'DISPLAYTITLE', args = { newTitle } } -- set Transcript authors SMW if string.match(args.author or '', '%S') then local authors = {} for auth in string.gmatch(args.author, "[^;]+") do if string.lower(auth) == 'player' then table.insert(authors, 'Player character') else table.insert(authors, auth) end end mw.smw.set( { ['Transcript authors'] = authors } ) end end return header .. setcat .. displayTitle end return p
Summary:
Please note that all contributions to Brighter Shores Wiki are considered to be released under the CC BY-NC-SA 3.0 (see
Brighter Shores: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
Templates used on this page:
Template:DependencyList
(
edit
)
Template:Documentation
(
edit
)
Template:Extension DPL
(
edit
)
Template:No documentation
(
edit
)
Template:PageType
(
edit
)
Template:Transcript
(
edit
)
Template:Transcript/doc
(
edit
)
Module:Array
(
edit
)
Module:DPLlua
(
edit
)
Module:DependencyList
(
edit
)
Module:Documentation
(
edit
)
Module:Paramtest
(
edit
)
Module:Tooltip
(
edit
)
Module:Transcript
(
edit
)
Module:Transcript/doc
(
edit
)
Module:Yesno
(
view source
) (semi-protected)
This page is a member of a hidden category:
Category:Pages using DynamicPageList3 parser function