Difference between revisions of "Template:Meetup global"

From Geohashing
imported>Jiml
m (Adjust Coord display)
imported>Benjw
m (see if this works)
Line 1: Line 1:
<includeonly>{{#vardefine:historic|}}{{#vardefine:date|{{#time:Y-m-d|{{{date}}}}}}}{{#ifeq:{{#var:date}}|1970-01-01|{{#vardefine:historic|1}}{{#vardefine:date|{{{date}}}}}|}}<table class="infobox" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin: 0.5em 0 0.5em 1em; padding: 0.2em; float: right; clear: right;">
+
<includeonly>{{#vardefine:historic|}}{{#vardefine:date|{{#time:Y-m-d|{{{date}}}}}}}{{#ifeq:{{#var:date}}|1970-01-01|{{#vardefine:historic|1}}{{#vardefine:date|{{{date}}}}}|}}
 +
 
 +
{{#vardefine:globlat|{{#expr ({{Coordinates/30Wadjusted/latOnly|{{#var:date}}}} * 180) - 90}}}}
 +
{{#vardefine:globlon|{{#expr ({{Coordinates/30Wadjusted/lonOnly|{{#var:date}}}} * 360) - 180}}}}
 +
 
 +
<table class="infobox" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin: 0.5em 0 0.5em 1em; padding: 0.2em; float: right; clear: right;">
 
<tr>
 
<tr>
<td colspan="3" style="text-align:center;">{{{map|{{#tag:mapimg||lat={{{Globalhash/Coordinates/latOnly}}}|lon={{{Globalhash/Coordinates/lonOnly}}}}}}}}</td>
+
<td colspan="3" style="text-align:center;">{{{map|{{#tag:mapimg||lat={{#expr: ({{#var:globlat}} round 0)}}|lon={{#expr: ({{#var:globlon}} round 0)}}|date={{#var:date}}}}}}}</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
 
<td colspan="3" style="text-align:center;">
 
<td colspan="3" style="text-align:center;">
{{date link|{{#var:date}}|D j M Y}} on Earth:<br/>
+
Globalhash on {{date link|{{#var:date}}|D j M Y}}:<br/>
{{#if:{{#var:historic}}|''(ancient coords unavailable)''|'''{{{Globalhash/Coordinates/latOnly}}}'''}}<br/>
+
{{#if:{{#var:historic}}|''(ancient coords unavailable)''|'''{{#var:globlat}},{{#var:globlon}}'''}}
{{meetup links|{{#var:date}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 
 
</td>
 
</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
{{#ifeq:{{{nocategory|0}}}|1||{{#ifeq:{{{retro|0}}}|1|[[Category:Retro meetup]]|[[Category:Meetup on {{#var:date}}]]}}
+
{{#ifeq:{{{nocategory|0}}}|1||[[Category:Meetup on {{#var:date}}]][[Category:Globalhash]]}}
 
}}
 
}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Meetup global/Documentation}} <!-- Documentation is elsewhere -->
 
{{Meetup global/Documentation}} <!-- Documentation is elsewhere -->
 
</noinclude>
 
</noinclude>

Revision as of 18:20, 9 August 2010


Globalhash on Sun 28 Mar 2010:
47.273778,-116.52138

 google osm crox


Edit the documentation (it isn't part of the template page)


Usage

{{ meetup global | date=2010-03-28 }}

Optional parameters: none.

This template is designed for GLOBALHASH "meetup pages", pages with names that look like "2010-03-28 global". For now, it contains a map of the globalhash graticule (although without a pin showing the globalhash itself) and category links. It may evolve to contain more useful information.

The map is automagically generated, based on the date parameter. No lat and lon parameters are needed as the globalhash is the same wherever you are.

It is to be hoped that at some point a pin showing the location of the globalhash can be placed onto the map. For now you'll have to make do with just the graticule as a whole. Watch this space.