Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:HS listed building row/sandbox
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
require('strict') local genBuffer = require('Module:OutputBuffer') local getArgs = require('Module:Arguments').getArgs local delink = require('Module:Delink')._delink local coord -- lazily loaded local p = {} function p.row(frame) local getBuffer, print, printf = genBuffer() local args = getArgs(frame, {wrappers = 'Template:HS listed building row'}) local delinkedName = delink{args.name} printf('|- class="vcard %s;text-align:center"\n', args.image and 'with_image' or 'without_image') printf('| class="fn org" | %s\n', args.name or '') printf('| class="label" | %s\n', args.location or '') printf('| %s\n', args.date_listed or '') printf('| %s\n', args.grid_ref and frame:expandTemplate{title = 'Template:Gbmappingsmall', args = {args.grid_ref}} or '' ) local coordText if args.lat then if not coord then coord = require('Module:Coordinates/sandbox')._coord end coordText = coord{args.lat, args.lon, format = 'dms', display = 'inline', name = delinkedName} else coordText = '' end printf('| %s\n', coordText) printf('| class="note" | %s\n', args.notes or '') printf('| class="uid" | [http://data.historic-scotland.gov.uk/pls/htmldb/f?p=2200:15:0::::BUILDING:%s %s]\n', args.hb or '', args.hb or '') if args.image then printf( ' |[[File:%s|150x150px|%s]]<p class="plainlinks" style="margin: 0 auto;"><small>[//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=wlm-gb-sct&id=%s&descriptionlang=en&description=%s&lat=%s&lon=%s&categories=%s Upload another image]</small><br><small>%s</small></p>\n', args.image or '', args.name or '', mw.uri.encode(args.hb or ''), mw.uri.encode(delinkedName), args.lat or '', args.lon or '', mw.uri.encode(args.commonscat or ''), args.commonscat and ('[[:commons:Category:' .. args.commonscat .. '|See more images]]') or '' ) else printf('| style="vertical-align:middle;text-align:center" | %s\n', frame:expandTemplate{title = 'Template:UploadCampaignLink', args = {campaign = 'wlm-gb-sct', id = args.hb, description = delinkedName, lat = args.lat, lon = args.lon}} ) end return getBuffer() end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:HS listed building row/sandbox/doc
(
edit
)