Cannabis Ruderalis

Content deleted Content added
Docu (talk | contribs)
m close discussion, bug fixed
→‎Magic words: new section
Line 219: Line 219:
::-- User:Docu
::-- User:Docu
</div>
</div>

== Magic words ==

I don't know if this is the best place to start with this question but here goes.

The problem is that there are many templates including one that I've been working on, {{tlx|Infobox Protected area}}. When a template wants to display a map with mark at a specific location based on geo data, all kinds of nasty kludging is required. They call templates like {{tl|superimpose}} and {{tl|Location map|}} to get the job done. They work but are not elegant.

My dream would be that there would be a way to access the latitude and longitude information. I noted when examining the source HTML code for articles using {{tl|coord}} that [[vcard]] geo data is always embedded in decimal format. If that data could be accessible to a template coder things would get very simple.

It appears that the [http://www.mediawiki.org/wiki/Extension:VariablesExtension VariablesExtension] is not likely to be implemented anytime in the near future. See [[bugzilla:7865]]. I've tried to think of other ways like writing a parser template that would extract the data from the coord template but that would not be easy for me and must have been done already while writing this template.

The dream way would be for the coord template to create a two [[wikimedia:Manual:Magic words|magic words]]. See also [[wikimedia:Manual:Variable|Manual:Variable]]. Something like <nowiki>{{LATITUDE}}</nowiki>
{{<nowiki>{{LONGITUDE}}</nowiki>. This would require some javascript. As I say this is a dream thing and I have no idea if it is feasible.

I would be more than happy with a parser templates. Something like <nowiki>{{latitude|{{{coords}}}}</nowiki> and <nowiki>{{longitude|{{{coords}}}}</nowiki> but this might add unnecessary and redundant overhead.

Any thoughts or comments would be greatly appreciated. --[[User:Droll|DRoll]] ([[User talk:Droll|talk]]) 03:43, 9 March 2009 (UTC)

Revision as of 03:43, 9 March 2009

Microformats
Coord is part of, or of interest to, WikiProject Microformats, which encourages the deployment of microformats in Wikipedia, and documents them in the article space. If you would like to participate, visit the project page.
WikiProject iconGeographical coordinates
WikiProject iconCoord is of interest to WikiProject Geographical coordinates, which encourages the use of geographical coordinates in Wikipedia. If you would like to participate, please visit the project page, where you can join the project and see a list of open tasks.

Categorising faulty co-ordinates

Whilst editing or browsing, I occasionally come across articles such as this one, which produces an error message in large red letters across the top of the screen. I'm not an expert on the intricacies of this template, so I haven't fixed it. (I tried previewing it changing the O to an E, but it didn't work). What would be useful would be for the template to automatically add a category to any faults it finds, say Category:Pages with faulty co-ordinates or something. This would allow editors experienced with this template to easily target and fix the problems. Is this possible? —  Tivedshambo  (t/c) 17:31, 5 January 2009 (UTC)[reply]

It used to be possible with the old templates, but they were unfortunately deleted. Since this template attempts to be everything the old ones were together, there are space constraints with multiple transclusions and I doubt we can add the error checking functionality here. User:Dispenser however runs a daily check on all coordinates with an external tool to produce error logs: see tools:~dispenser/view/File_viewer and click on coord-enwiki.log. --Para (talk) 17:47, 5 January 2009 (UTC)[reply]
The categories which were deleted were those for the deprecated coor * templates; they were deleted by the correct, consensual process. Category:Coord template needing repair still exists. Note also that the categoeies were only added to the coor * templates while they were being deprecated; over 18 months after {{Coord}} was created to replace them. I have fixed the coordinates on Lokomotivfabrik Floridsdorf. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 22:28, 5 January 2009 (UTC)[reply]
I've produced a template, {{repair coord}}, that can be added to an article which has faulty or inaccurate coordinates (i.e. either the syntax is incorrect or the coordinates point to the wrong location). It categorises articles into Category:Coordinates templates needing maintenance. —  Tivedshambo  (t/c) 13:37, 14 January 2009 (UTC)[reply]

Globe Icon

Cleanup of this page is needed : an unwanted picture appears ; a problem with the template itself, or one of the subtemplates ? Baronnet (talk) 19:08, 11 January 2009 (UTC)[reply]

What picture are you referring to?! The blue globe? --Dschwen 19:38, 11 January 2009 (UTC)[reply]
I'm not a big fan of the globe. It can be very intrusive; take a look at Pole of inaccessibility. Can we make it more subtle and less in-your-face? 86.134.10.5 (talk) 05:16, 16 January 2009 (UTC).[reply]
The globe is indeed very intrusive, and in fact rather unaesthetic (it disrupts the reading flow and influences the spacing between lines of text). But unfortunately requests for alterations have been rejected. Cush (talk) 06:54, 16 January 2009 (UTC)[reply]
Can we request a compromise - have it in the header but not in-line? —  Tivedshambo  (t/c) 07:31, 16 January 2009 (UTC)[reply]
That sounds like a good compromise to me. -- The Anome (talk) 12:11, 17 January 2009 (UTC)[reply]
What do you mean by "in the header"? Do you mean when the coordinates appear at the extreme top right of an article? I think we need some sort of link to the pop-up map in inline use; it would be a shame to lose that feature. Just something more discreet than the big blue splodge. 86.133.242.226 (talk) 00:57, 18 January 2009 (UTC).[reply]
I concur. The loud globe icon makes the article above look awful. I think making it smaller inline would only be a slight improvement but still bad. But the pop-up map function is useful. Could change the icon to something in the more-subtle style of the external link icon, so that it won't grab your eye unless you're actually reading that part of the text. Or the only other idea I have would be to have no icon inline. Clicking on the coordinates would pop up the map instead of taking you to the toolserver, and there would then be a link on the map to take you on to the full server if this preview isn't sufficient. This also avoids an immediate external link in the text which is normally considered poor style. If no JavaScript, it falls back to present mode of going to toolserver if you click on the coordinates.
I actually prefer this latter idea over using any icon, as an icon is not needed to label the coordinates (unlike the external link icon). Its only purpose is as something different to click on. No icon at all would be cleaner functionally and also better style aesthetically. --GregU (talk) 04:18, 18 January 2009 (UTC)[reply]
How about just [map]? (I agree the icon is ugly) Orderinchaos 04:59, 18 January 2009 (UTC)[reply]
[outdent] I must admit, I'd never realised the globe was clickable before. Having said that, I don't think much of the pop-up it produces either - Britain looks pretty squashed, and the maps and satellite/aerial views are of poor quality compared with Google maps or UK streetmap. I wouldn't be in favour of having the pop-up map come up as the default, but on the other hand I suspect other users will protest if that functionality is lost. The only other suggestion I can make is to have an in-line link like "Erdington 52°31′25″N 1°50′16″W (Popup)", where popup brings up the pop-up map. And without the globe, which seems to have appeared in the link when I previewed the message even without using the coord template. Odd. —  Tivedshambo  (t/c) 08:31, 18 January 2009 (UTC)[reply]
I agree that the quality of the pop-up map isn't great. It seems to use some kind of weirdly distorted projection for higher latitudes. For me, the link overlays are pretty dreadful too -- they frequently overlap and/or are illegible due to clipping or being overlaid on a too-similar colour in the case of some of the aerial photos. Nevertheless, I still think the best option is to lose the globe, have the pop-up map come up when you click the coordinates, and have on the pop-up map a link to "Other maps" (or whatever) that takes you to the "Map sources/GeoHack" page. Incidentally, can we also change the "GeoHack" name? With the connotations of "hack", it doesn't exactly make it sound like a quality product. 86.134.55.56 (talk) 04:33, 21 January 2009 (UTC)[reply]
Following my previous post, with my unexpected discovery that the globe appears even in a direct external link, I've been looking in detail at the code of this template. I've come to the conclusion that the globe must be produced either by a css or js script somewhere, or directly by the wiki software. As yet, I'm not sure which, though i'm still looking. Either way, this is probably not the best place to request a change. If it's in the software, then it should be raised in Bugzilla. If it's a script, then it should be discussed on the appropriate talk page. Could a developer of this template point us in the right direction please? —  Tivedshambo  (t/c) 06:18, 21 January 2009 (UTC)[reply]
The icon is added by meta:WikiMiniAtlas, called in MediaWiki:Common.js. See #Image size of the globe above. Wikipedias in some languages have changed it in their MediaWiki:Common.js to a different size or image. --Para (talk) 15:18, 21 January 2009 (UTC)[reply]
Thanks for that - it means disabling the blue globe is fairly straightforward if users want to do it. I've added the code to Template:UF-coord-classes. I suggest we leave the globe enabled by default, but registered users can switch it off if they so desire. —  Tivedshambo  (t/c) 16:05, 21 January 2009 (UTC)[reply]
If the consensus is that the globe is overly intrusive then any solution needs to work for everyone. A fix that relies on users customising their accounts is unsatisfactory; most Wikipedia readers won't benefit from it. 86.133.240.160 (talk) 02:04, 22 January 2009 (UTC).[reply]
The globe has been here way over a year. It'll take a lot more than a few complainers to get a consensus. Furthermore it annoys me quite a bit that this discussion takes place under the heading "Bug". --Dschwen 04:10, 22 January 2009 (UTC)[reply]
And to elaborate. The Wikiminiatlas is opened about 4000 times a day from over 2500 distinct IPs each day (recurring users on different days). Just to get you an idea about "consensus". --Dschwen 04:18, 22 January 2009 (UTC)[reply]
I said if (though, as it happens, I don't see anyone here supporting it; in fact, I see a lot of people agreeing that it's ugly and intrusive). I have no idea what point you are trying to make with your stats. The heading is wrong; the discussion veered off. Change it if it bothers you. 86.133.240.160 (talk) 04:51, 22 January 2009 (UTC).[reply]
The fact that the globe has been there for a year does not mean it is beautiful. It still could be changed to a version that does not disrupt text flow and does not impact line height. Just let somebody with taste re-design it. Cush (talk) 15:02, 25 January 2009 (UTC)[reply]
I agree with the above comments on intrusiveness and aesthetics, and would support some redesign. Knepflerle (talk) 16:33, 26 January 2009 (UTC)[reply]

On the german Wikipedia I had replaced the blue globe with a unicode symbol (♁, which is the symbol for earth) for all inline coordinates (the blue globe remains in the title coords on the top right of the page). --Dschwen 16:42, 26 January 2009 (UTC)[reply]

I think a set of incomprehensible blue numbers in the middle of text is distracting, and icons don't make it much worse anymore. The references tag supports multiple groups now, and inline coordinates could be taken out from text but still kept linked from there. For example, these links to some place[coord 1] with an inline icon or without icon[coord 2] contain the coordinates in wikitext already, they are just shown later on, like with references. Here:

  • Coordinates section somewhere near the end of the article
  1. ^ Place is at coordinates 1°N 2°E / 1°N 2°E / 1; 2
  2. ^ Another place is at coordinates 1°S 2°W / 1°S 2°W / -1; -2

It would be nice to be able to hide the group name from the visible link, somehow. It might be possible to put some of the wikitext into the coord template to have it create the ref tags (if possible?). We could add another display parameter for that, and the user would have to add <references group="coord" /> or {{coordlist}} to the end of the article to make sure the coordinates will be visible. I'm not sure I like it myself, but this is one possibility. --Para (talk) 18:45, 26 January 2009 (UTC)[reply]

Hmm, that is actually a pretty decent idea. I think i might support such a change. --TheDJ (talk • contribs) 00:32, 28 January 2009 (UTC)[reply]
mw:Extension:Cite/Cite.php#Templates might pose problems, thought the information could also be out of date. We'd need to test, or find an existing template from Category:Citation templates that contains <ref>. --Para (talk) 11:46, 28 January 2009 (UTC)[reply]
Came here to see if it was possible to supress the coorodinates down to [maps] and saw this section. I tried it out at Baffin Island and I think it looks pretty good. CambridgeBayWeather Have a gorilla 15:18, 3 February 2009 (UTC)[reply]
You can also do a navbox to further reduce article clutter. EG: Battle_of_Corydon#External_links has a box with engagments. These all emit locations, one of which is a coordinate. -J JMesserly (talk) 18:15, 28 February 2009 (UTC)[reply]
I very much like this idea. I think it should also be used in conjunction with the change proposed above to add [map] next to the link instead of an icon. Adding the ref tag to template shouldn't be a problem, if you're having any problems with it you can drop me a message on my talk page. --Nezek (talk) 10:40, 1 March 2009 (UTC)[reply]

Span title

Resolved
 – Change finally implemented.

The tool tip link includes the full coordinates, e.g. "Maps, aerial photos, and other data for 34°40′37″N 118°11′10″W" when hovering with the mouse pointer over 34°40′37″N 118°11′10″W / 34.67694°N 118.18611°W / 34.67694; -118.18611. It was suggested earlier (Template_talk:Coor_URL/Archive01#Span_title) to limit this to the text "Maps, aerial photos, and other data for this location".

This was implemented for most coordinates templates (1), but this template appears to have been omitted. I suggest that we include this change in the next update of Template:Coord/link. Sample code is at [1]. -- User:Docu

Quarl was concerned the last time that putting the page name in the tooltip would be misleading with inline coordinates about something else. Now that we have the name parameter, I would like to see the name of the page or the name of the inline coordinates used, which in turn would encourage people to add it to inline coordinates where it's missing. The tooltip could have "for {{{name|{{PAGENAME}}}}}". It may however still not be widespread enough (see results of the sslloooww tools:~para/cgi-bin/coord_unnamed). So until it is, I think "for this location" is fine. --Para (talk) 12:37, 5 February 2009 (UTC)[reply]
I'd suggest "Maps, aerial photos, and other data for {{{name|this location}}}". The PAGENAME will often be inappropriate. —AlanBarrett (talk) 15:27, 5 February 2009 (UTC)[reply]
Sounds good to me. I changed [2] accordingly. -- User:Docu
Most articles with coordinates have a strong link to the pagename, and if we want to use a name for coordinates in tooltips at all, it would be odd to never use the name of the page. It may be inappropriate in some cases (graveyard coordinates in articles about people or museum coordinates in articles about paintings come to mind), but then that's a good reason to give them another name or omit the coordinates altogether. --Para (talk) 00:35, 11 February 2009 (UTC)[reply]
So you'd rather have "this location" ? -- User:Docu
I believe simply "this location" is better in all cases. The tooltip should rephrase the purpose in another way to clarify, not just repeat a placename that can already be seen. Saying "location" actually provides more context. --GregU (talk) 06:58, 11 February 2009 (UTC)[reply]
I'd rather have names only or "this location" only, but not a mix of the two. I disagree that "this location" provides more context, when "this" could refer to the subject of the entire page or something mentioned near the coordinates, and when the tooltip already describes the information available behind the link, very much related to locations. --Para (talk) 14:07, 11 February 2009 (UTC)[reply]
Ok, let's go for the initial solution "this location" then. -- User:Docu


Trying to shoehorn name properties into a coordinates template is not a valid reason to start omitting coordinates from articles. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 13:49, 11 February 2009 (UTC)[reply]
Docu says "this template appears to have been omitted", but what actually happened is that I told him that "the coor * templates are on the verge of being deprecated, and replaced with {{coord}}" and he chose to ignore that and forge ahead anyway. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 13:53, 11 February 2009 (UTC)[reply]

Minor fix - {{{10}}}

Resolved
 – Bug fixed.
Unresolved
 – Suggested new format needs to be developed.

Currently the {{coord|1|2|2|N|1|2|2|E|type:landmark|region:NO}} isn't recognized as an error as the validation function in {{Coord/input/dms}} doesn't receive the 10th unnamed field.

It does work for other formats, e.g. {{coord|1|2|N|1|2|E|type:landmark|region:NO}} is recognized by {{Coord/input/dm}} as an error as the 8th unnamed parameter is passed on.

To fix it, {{coord}} needs the following change: [3]. It could be included in the next series of updates of the coord family. -- User:Docu

Would it be confusing for the less initiated editors, though? Now all colon parameters are separated with an underscore, but with this change they would look more like normal template parameters, and people would no doubt try to use type=landmark or region=NO. Simplifying parameter usage and dropping the colon usage altogether would be a good direction for improvement, but someone needs to test how many modifications it would require to support all the possible parameters, and how it would change expansion limits. Anyway, support for more unnamed parameters would also require concatenation in all the input templates. --Para (talk) 00:43, 11 February 2009 (UTC)[reply]
To clarify: the change doesn't add support for additional ways of formatting, it just checks if too many parameters were added. {{Coord/input/dms}} already checks for {{{10}}}, but never finds any as {{coord}} doesn't pass it on. The check works with {{Coord/input/dm}} {{Coord/input/d}} etc. The categorization from {{Coord/input/dms}} could be added directly to {{coord}}.
As it simply outputs an error category, it helps with using the current format.
In general, I'd favor a solution like /Archive_9#Named parameters for region/type etc. This would need some work though .. -- User:Docu
Ah, of course, I don't know how I interpreted it the other way round. Better error detection sounds good, yes. --Para (talk) 14:38, 11 February 2009 (UTC)[reply]


The decimal output for the microformat doesn't ouput negative for all pages

Resolved
 – Bug fixed

Some pages seem to lack the - in the <span class="geo"> element for positions west of the prime meridian. For example Leeds doesn't, but oddly London does.

This worked fine a few weeks ago when the pages were outputting the full microformat.

Sorry if this is the wrong place to put this, but I'm new to this. -- — Preceding unsigned comment added by 86.26.250.85 (talk • contribs)

Neither Leeds nor London use {{coord}} directly. Leeds uses {{Infobox UK place}}. That infobox seems to use some workaround to fix a problem {{coord}} had earlier. Thus you might want to try Template talk:Infobox UK place. -- User:Docu
Thanks for noticing, the bug is indeed with the microformat output only, and it's been this way for over three weeks now! This is happening when the template is called with degrees and letters S or W, like {{coord|1|N|2|W}}. Looks like we have hemispheres swapped in the conversion at Template:Coord/input/d and the template is testing a case that will never happen:
  |dec-lat={{#ifeq:{{{2}}}|W|-}}{{{1}}}
  |dec-long={{#ifeq:{{{4}}}|S|-}}{{{3}}}
The W should be an S and the S a W. --Para (talk) 13:25, 18 February 2009 (UTC)[reply]
Good catch! Looks like that output wasn't much used. Despite that, as the job queue was short, I made the change. -- User:Docu

Coordinates for rivers?

When adding coordinates to river articles, which point it should reference? The beginning, the mouth, the mid point, something else? Renata (talk) 12:43, 27 February 2009 (UTC)[reply]

Check out Wikipedia:WikiProject Geographical coordinates/Linear, Regards,  Badgernet  ₪  14:19, 27 February 2009 (UTC)[reply]

Southern Latitudes in Google Maps

When Google Maps links to a Wikipedia article, it appears to have trouble with latitudes in the format -X°N. Notice that the Reserve Bank of Australia, with a latitude of -33.868086°N, is shown on Google Maps as located somewhere in the Pacific Ocean. Alternately, Australia, with a latitude of 35°18′S, is located in the proper place on the map.

So, what's the convention for latitudes in the Southern Hemisphere? Is it important to have them in a format that Google Maps can make sense of? It might be easier to request that Google update their code to read the -X°N style, particularly if that's accepted notation in the world of geography. Not sure if this is a problem for longitude as well...

Also, while I'm on the subject, an even bigger error than an Australian bank being in the middle of the Pacific Ocean is Venus's Baltis Vallis being right next door. Is there some way that non-Earth features can be marked so that they don't get picked up by Google Maps (and, potentially, do get picked up by Google Moon, Google Mars, or a hypothetical Google Venus)? Maybe it's as simple as Venus X°N Y°E (unfortunately, I don't know how often Google crawls Wikipedia to update the coordinates; it could take a significant amount of time to figure this out through trial and error). Khakiandmauve (talk) 22:32, 27 February 2009 (UTC)[reply]

Isn't -33°N a bit strange? Why don't you simply write -33° or 33°S ? −Woodstone (talk) 22:52, 27 February 2009 (UTC)[reply]
Use globe:venus in the parameter section (where you put type:landmark etc.). --Dschwen 00:00, 28 February 2009 (UTC)[reply]
It's not marked with a coord tag; I think Google is pulling the information from Template:Infobox_feature_on_Venus, which doesn't have a globe parameter. Although I see how the globe parameter is being used for, say, Olympus Mons, which doesn't appear on the map. Khakiandmauve (talk) 00:47, 28 February 2009 (UTC)[reply]
Then Template:Infobox_feature_on_Venus is definitely broken. It must generate globe:venus on the coordinates. And thus should be using coord. --Dschwen 03:46, 28 February 2009 (UTC)[reply]

Special:Book/pdf version : coordinates rendering

Please check Help:Books/Feedback#Coordinates. -- User:Docu

{{Coord/display/inline,title}} needs to be changed to hide the coordinates part above the title. The PDF generation does not evaluate CSS styles. Therefore the coordinates are shown twice inline. It should be changed using {{Hide in print}} like this:
{{{1}}}{{Hide in print|<span style="font-size: small;"><span id="coordinates">[[Geographic coordinate system|Coordinates]]: {{{1}}}</span></span>}}<noinclude>{{pp-template|small=yes}}{{template doc|Template:Coord/sub doc}}[[Category:Coord template]]</noinclude>

and {{Coord/display/title}} should be added to Category:Exclude in print --He!ko (talk) 11:58, 1 March 2009 (UTC)[reply]
Heiko, there are two different issues, for different ways this template works:
(1) for display=inline,title, pdf is displaying the inline version twice (once the standard version, once the microformat version). The suggested fix doesn't address this.
(2) for display=title, the coordinates are not displayed in the pdf version, while they work in the print version. The second fix doesn't address this either.
In both cases, the coordinates should be display with the title as this is being done in the print version (link "printable version" on articles). -- User:Docu
(1) Why? The fix omits the span (goes to the top of the page) and thus the coorrdinates won't show up twice. --He!ko (talk) 15:51, 1 March 2009 (UTC)[reply]
(2)They work in the print version (HTML+CSS) but won't in the PDF as no CSS is supported. Simply writing the coordinates wherever the template is used in the markup may lead to unexpected results. --He!ko (talk) 15:51, 1 March 2009 (UTC)[reply]
(1) The duplication wasn't on the top of the page in Ben Nevis, but in the infobox field. The solution below (Template:PrintCoord/link) avoids the issue and has the advantage that {{coord}} itself wont get more complex. -- User:Docu
(2) The solution below isn't ideal, but is there a way to have it rendered before or after the article text? (prepend or append)-- User:Docu
I solved (1) by creating Template:PrintCoord/link. This also got rid of the URL to geohack being included at the end of the article.
For (2) (Old Town, Edinburgh at Help:Books/Feedback#Coordinates), the new Template:PrintCoord/display/title displays the coordinates in the article at the location of the template (new pdf version at Old Town, Edinburgh pdf). Previously these coordinates were omitted. This isn't ideal, but better than before. -- User:Docu
Currently (20:54, 2 March 2009 (UTC)), the Print version don't appear to work anymore. -- User:Docu

I was informed that a simply class="noprint", should also work. That might be easier to do perhaps, since spans are already in use. --TheDJ (talk • contribs) 21:06, 2 March 2009 (UTC)[reply]

Template:PrintCoord/link was quite easy to do, it just doesn't work right now. -- User:Docu
There are now two sample test pages at:
-- User:Docu

Magic words

I don't know if this is the best place to start with this question but here goes.

The problem is that there are many templates including one that I've been working on, {{Infobox Protected area}}. When a template wants to display a map with mark at a specific location based on geo data, all kinds of nasty kludging is required. They call templates like {{superimpose}} and {{Location map}} to get the job done. They work but are not elegant.

My dream would be that there would be a way to access the latitude and longitude information. I noted when examining the source HTML code for articles using {{coord}} that vcard geo data is always embedded in decimal format. If that data could be accessible to a template coder things would get very simple.

It appears that the VariablesExtension is not likely to be implemented anytime in the near future. See bugzilla:7865. I've tried to think of other ways like writing a parser template that would extract the data from the coord template but that would not be easy for me and must have been done already while writing this template.

The dream way would be for the coord template to create a two magic words. See also Manual:Variable. Something like {{LATITUDE}} {{{{LONGITUDE}}. This would require some javascript. As I say this is a dream thing and I have no idea if it is feasible.

I would be more than happy with a parser templates. Something like {{latitude|{{{coords}}}} and {{longitude|{{{coords}}}} but this might add unnecessary and redundant overhead.

Any thoughts or comments would be greatly appreciated. --DRoll (talk) 03:43, 9 March 2009 (UTC)[reply]

Leave a Reply