Content deleted Content added
No edit summary |
No edit summary |
||
Line 17:
get_name_list -- adapted from getAuthors code taken from [[Module:RexxS]]
arguments:
nl_type - type of name list to fetch: nl_type = '
args - pointer to the parameter arguments table from the template call
qid - value from |qid= parameter; the Q-id of the source (book, etc.) in qid
Line 29:
local propertyID = "P50"
if '
propertyID = 'P50'; -- for authors
elseif '
propertyID = 'P98'; -- for editors
else
Line 119:
end
-- if there's anything to return, then
-- in the form |author1=firstname secondname |author2= ...
if #out > 0 then
▲ for k,v in ipairs(out) do
for k,v in pairs(link) do -- author-linkn or editor-linkn
▲ args[parameter_name] = v
▲ end
end
end
Line 173 ⟶ 159:
if is_set (qid) then
if not is_set (citeq_args.author) and not is_set (citeq_args.author1) then -- if neither are set, try to get authors from wikidata
get_name_list ('
end
if not is_set (citeq_args.editor) and not is_set (citeq_args.editor1) then -- if neither are set, try to get editors from wikidata
get_name_list ('
end
end
|