Module:RSP/sandbox

-- {{RSP row|name=Aaron Is Awesome|alias1=AIA|status=gu|deprecated=y|
-- summary={insert wikitext here}|domain1=example.org|domain2=example.com|
-- discussions=[[link|1]]<br/>[[VGRS link|A]]|last=2018|nid=334|nyr=2021}}

local p = {}

function make_shortcut(frame, shortcut)
	return '<br/>' ..
		frame:extensionTag(
			'templatestyles',
			'',
			{ src = "Wikipedia:Reliable sources/Perennial sources/Shortcut/styles.css" }
		) ..
	    -- NOTE: Original WP:RSPSHORTCUT template used {{no redirect|WP:WHATEVER}}
	    '<span class="wp-rsp-sc">[[' .. shortcut .. ']]&nbsp;📌</span>'
end

function make_rsnl(frame, notice_id, name, notice_year, rfc)
	return frame:expandTemplate{
		title = 'rsnl',
		args = { notice_id, name, notice_year, rfc = rfc }
	}
end

p.row = function(frame)
	local name = frame.args.name
	local altname = frame.args.altname
	local stat = frame.args.status
	local shortcut = frame.args.shortcut
	local discussions = frame.args.disc or ''
	local comments = frame.args.comments
	local notice_id = frame.args.nid
	local notice_year = frame.args.nyr
	local notice_is_stale = frame.args.nstale
	local rfc = frame.args.rfc or 'y'
	local url = frame.args.url
	
	local rsnl = make_rsnl(frame, notice_id, name, notice_year, rfc)
	
	local altline = ''
	if altname then
		altline = '<small>' .. altname .. '</small>'
	end
	
	if shortcut then
		altline = altline .. ' ' .. make_shortcut(frame, shortcut)
	end

	local output = '\n|- class="s-' .. stat .. '" id="' .. name ..'"'
          output = output .. '\n| ' .. '[[' .. name .. ']]' .. altline
          output = output .. '\n| ' .. frame:expandTemplate{title = 'WP:RSPSTATUS', args = { stat }}
          output = output .. '\n| ' .. rsnl .. '\n' .. discussions
		  output = output .. '\n| ' .. frame:expandTemplate{title = 'WP:RSPLAST', args = { notice_year, stale = notice_is_stale }}
          output = output .. '\n| ' .. comments
          output = output .. '\n| ' .. frame:expandTemplate{title = 'WP:RSPUSES', args = { url }}
	return output
end

return p

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.