Template talk:ASG

From Geo Hashing
Jump to: navigation, search

Calculational Errors?[edit]

Not sure how the age is calculated, but last I checked 2008 - 1966 was 42, not 38... --Thomcat 17:59, 18 June 2008 (UTC)

Thomcat, might you be trying to use a date format other than YYYY-MM-DD? If not, can you paste the code you tried to use below inside <code>...</code> tags so that I can look into it? Thanks. --Tim P 21:16, 18 June 2008 (UTC)
Sorry, Tim, totally spaced this, and I write code for a living! This is still a problem; here's the code: {{ASG|birthdate=1966-05-10|gender=m|lat=47|lon=-122}} --Thomcat 19:33, 7 July 2008 (UTC)
It's using 1970 instead of 1966? Epoch fail? -- Moose Hole 00:01, 8 July 2008 (UTC)
DOH! Yes. Epoch fail. A lot of the code relies on PHP date()-like functionality. Although, to be fair, I took the age calculation code straight from a similar Wikipedia template. I'm sure there's a better one around, though, so I'll do a bit of looking and get back to you all here. --Tim P 02:45, 8 July 2008 (UTC)
So I'm the only old fart using this?... or the only one that noticed perhaps. --Thomcat 12:55, 8 July 2008 (UTC)
RESOLVED. I've updated the template to take the data a little differently. I'm now going around to userpages updating their template calls. You're first up with {{ASG|Y=1966|m=05|d=10|gender=m|lat=47|lon=-122}}. :) --Tim P 18:37, 8 July 2008 (UTC)
This is an excellent solution. It's no more work for the copy/paste style user, and the parts of the date are less ambiguous and people can put them in any order they choose. Also the categories by age is great. Nice work! -- Moose Hole 04:33, 9 July 2008 (UTC)
For those who were wondering, it's the {{#time:}} parser function that craps out before 1970-01-01. See how it was used in the previous version. --Tim P 19:09, 8 July 2008 (UTC)


Imho, [[Category:Geohashers]] should be taken off this template. It will potentially cause a clutter on the category page, and is somewhat redundant with Special:Listusers. On the other hand, [[Category:Geohashers in {{{lat}}},{{{lon}}}]] seems pretty useful, I propose [[Category:Geohashers by graticule]] for sorting these, similar to [[Category:Geohashers]] by location. Even better: automatically transclude the list of geohashers in the graticule onto the graticule page. --r0d3n7z 18:54, 18 June 2008 (UTC)

Category:Geohashers by Sex/Age[edit]

I think this template could be used to fill in a Geohashers by Sex category (or would that scare off all the Fs?). While we're at it, maybe also a Geohashers by Age. -- Moose Hole 00:10, 20 June 2008 (UTC)

Ok I put in the gender category. The age one needs a conditional for the birthdate thing, so I'll have to figure out exactly how that works I guess. -- Moose Hole 19:06, 7 July 2008 (UTC)
I removed it for now, as I don't think such a two-group division is necessary. Category:Geohashers groups together everyone with {{asg}, while the graticule categories group together by logical geographical means. Age might indeed be nice (if lumped into larger groups), but I just don't think a gender category is politically correct in this day and age, nor is it overly practical. --Tim P 19:17, 7 July 2008 (UTC)
Fair enough. We should have an algorithm that converts birthdates to age, and also groups age into groups, probably decades would be most convenient for grouping. -- Moose Hole 19:19, 7 July 2008 (UTC)
That would indeed be possible. Right now I'm working on automating Main Page, but I can definitely put this on my list of things to look into. Perhaps something like Geohashers in their 20s, and then sort by the second digit in the age? IMHO, that'd be nifty, and totally doable on my part... --Tim P 19:22, 7 July 2008 (UTC)
AGE CATEGORISING ADDED. Users are automatically added to decade-based categories, and are sorted within them by the units digit in their age. It's really interesting!!! See, for example, Category:Geohashers in their 20s. Caveat: People like Ciel are said to be in their "10s". Whatever; I think it's cute. --Tim P 19:05, 8 July 2008 (UTC)

Linking Age[edit]

I like the categories for age! Can you change the template to link to the category you're in? -- Jevanyn 20:21, 9 July 2008 (UTC)

ALREADY DOES. See categories at the bottom of your userpage for links! --Tim P 21:05, 9 July 2008 (UTC)
True, but I think he meant have the age in the box be a link to the category. Like the coordinates are linked to your graticule. -- Moose Hole 21:32, 9 July 2008 (UTC)
I'm sorry I misunderstood. That's something I'm not comfortable deciding on my own, although it most certainly can be done. In my opinion, I think the category link is sufficient, but I'm open to other opinions. Discussion/thoughts? --Tim P 22:25, 9 July 2008 (UTC)

Dynamic Width?[edit]

Hey I made my own copy of this template so that I could make it slightly wider so I could put some smart-ass thing in the S field. Would it be possible/feasible to estimate the width needed for this template by counting the characters or evaluating each character, since the font isn't fixed-width? -- Moose Hole 20:13, 7 July 2008 (UTC)

Hmm maybe it would be better if there were a default width, and people could input a custom width as a parameter? -- Moose Hole 04:34, 9 July 2008 (UTC)
Will do. Custom width will be available as a parameter soon. --Tim P 21:05, 9 July 2008 (UTC)
DONE. --Tim P 22:36, 9 July 2008 (UTC)


Why, I thought you meant altitude/system of units/graticule. That would have been elite. -- Relet 09:08, 29 July 2008 (UTC)