Modul:ISBNT

Halaman yang dilindungi
Dari Wikipedia bahasa Indonesia, ensiklopedia bebas

-- This module implements [[Template:ISBNT]]

local p = {}

function p.link(frame)
	local check_isbn = require( "Module:Check isxn" ).check_isbn
	local isxns = mw.text.split(frame.args[1] or frame:getParent().args[1] or '', "%s*,%s*")
	local res = {}
	for i, isxn in ipairs(isxns) do
		table.insert(res, '[[Istimewa:Sumber_buku/' .. isxn .. '|' .. isxn .. ']]' 
			.. check_isbn({['args'] = {isxn, ['error'] = '<span class="error" style="font-size:88%">Periksa ISBN</span>' ..
				frame:preprocess('{{main other|[[Kategori:Halaman dengan galat ISBN]]}}')}})
			)
	end
	return table.concat(res, ', ')
end

return p