Module:Books and Writers

தமிழர்விக்கியிலிருந்து
imported>Sukanthi பயனரால் செய்யப்பட்ட 08:33, 11 சூலை 2024 அன்றிருந்தவாரான திருத்தம் ("local p = {} function p.externallink(frame) local pframe = frame:getParent() local args = pframe.args local tname = "Books and Writers" -- name of calling template. Change if template is renamed. local id = nil -- author ID local name = nil -- display name (default: article title) local url = nil local tagline = "at ''Books and W..."-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது)
(வேறுபாடு) ← பழைய திருத்தம் | ஆக அண்மைய திருத்தம் (வேறுபாடு) | புதிய திருத்தம் → (வேறுபாடு)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Books and Writers/doc

local p = {}
 
function p.externallink(frame)
  
  local pframe = frame:getParent()
  local args = pframe.args
 
  local tname = "Books and Writers" -- name of calling template. Change if template is renamed.
 
  local id      = nil -- author ID
  local name    = nil -- display name (default: article title)
  local url     = nil
  local tagline = "at ''Books and Writers''"
--  local urlhead = "https://web.archive.org/web/20130704043115/http://www.kirjasto.sci.fi/"
  local urlhead = "https://greencardamom.github.io/BooksAndWriters/"
  local deadurl = "http://www.kirjasto.sci.fi/"
 
  id = trimArg(args[1]) or trimArg(args.id)
  if not id then
    error("Error in Temple:" .. tname .. " - id missing - please see documentation for [[Template:" .. tname .. "]]")
  end 

  name = trimArg(args[2]) or trimArg(args.name)
  if not name then
    name = mw.title.getCurrentTitle().text:gsub('%s+%([^%(]-%)$', '') -- Current page name without the final parentheses
  end 

  url = "Petri Liukkonen. [" .. urlhead .. id .. ".htm \"" .. name .. "\"]. ''Books and Writers'' (kirjasto.sci.fi). Archived from [" .. deadurl .. id .. ".htm the original] on 4 July 2013."

  return url
 
end

function trimArg(arg)

  if arg == "" or arg == nil then
    return nil
  else
    return mw.text.trim(arg)
  end

end
 
return p
"https://tamilar.wiki/w/index.php?title=Module:Books_and_Writers&oldid=102639" இலிருந்து மீள்விக்கப்பட்டது