This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing.
localp={}functionp.author(frame)localpframe=frame:getParent()localargs=pframe.argslocaltname="Gutenberg author"-- name of calling template. Change if template is renamed.localid=nil-- author name, or author number. The later will go direct to the author page, the former to a search results page.localname=nil-- display name on Wikipedia (default: article title)localurl=nillocaltagline="at [[Project Gutenberg]]"localurlheadname="//www.gutenberg.org/author/"localurlheadnumb="http://www.gutenberg.org/ebooks/author/"-- SSL problems. See [[Template_talk:Gutenberg_author#https_problem]]localurlhead=nilid=trimArg(args[1])ortrimArg(args.id)ifnotidthenerror("Parameter id is missing. See [[Template:"..tname.."]] documentation")elseiftonumber(id)then-- it's a numberurlhead=urlheadnumbelseurlhead=urlheadnameendendname=trimArg(args[2])ortrimArg(args.name)ifnotnamethenname=mw.title.getCurrentTitle().text:gsub('%s+%([^%(]-%)$','')-- Current page name without the final parenthesesendurl="["..urlhead..id.." Works by "..name.."] "..taglinereturnurlendfunctiontrimArg(arg)ifarg==""orarg==nilthenreturnnilelsereturnmw.text.trim(arg)endendreturnp