Module: Blog post 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 = {} -- -- -- Format a list of authors from the author or author parameters. -- Testing: -- =p.authorList({args={author='Foo'}}) -- =p.authorList({args={authors='Foo; Bar', format='plain'}}) p.authorList = function( frame ) -- Gather and normalise authors. local authors = {} if frame.args.author ~= nil and frame.args.author ~= '' then authors[1] = frame.args.author elseif frame.args.authors ~= nil and frame.args.authors ~= '' then authors = mw.text.split( frame.args.authors, ';', true ) end if #authors == 0 then return '' end for i, a in pairs( authors ) do authors[i] = mw.text.trim( a ) end -- Format output. if frame.args.format == 'plain' then return table.concat( authors, ' / ' ) else return ', <strong>[[' .. table.concat( authors, ']] / [[' ) .. ']]</strong>' end end return p Summary: Please note that all contributions to Christianpedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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 (see Christianpedia:Copyrights for details). Do not submit copyrighted work without permission! Cancel Editing help (opens in new window) Template used on this page: Module:Blog post/doc (view source) Discuss this page