
Hello, on Dienstag, 13. Juli 2010, Tim Mohlmann wrote:
On irc you requested me to implement the maps extension on http://en.opensuse.org/openSUSE:Map.
Edit Template:map_user to meet the extension's syntax [...] So the template now looks like this: {{{1}}}, {{{2}}}~{{{3}}}~{{{4}}}, {{{5}}};
You missed the cases where the URL is missing (not only empty). I changed the template to use {{{4|}}} and {{{5}}} (note the "4|" and "5|"). This avoids that something like {{{5}}} will be displayed in the map.
So next step was [...] to remove the old map from http://en.opensuse.org/openSUSE:Map and add the line: {{#display_points:{{openSUSE:Map/Coordinates}}}}.
Looks nice, but I see two issues: a) the clickable name list to answer the question "where does person X live?" This is an important feature IMHO. The old map on my server still does this, so the easiest solution is probably to add a link to it. (Yes, I know that it is not the nicest solution ;-) b) there's a error message shown below the map: The following error has been detected in your syntax: One or more values for parameter coordinates are invalid. The value x has been omitted. Very helpful error message :-( Now try to find out which map entry is broken... Regards, your BOfH ;-) ... ... ... ... Had enough debugging fun? Found the error? No, it is not only one error ;-) ... ... ... ... Here's the easier solution: my map-debug service :-) http://service.cboltz.de/opensuse/debug-map.php It will check for: ## Latitude ## contains invalid chars (non-numbers)? ## out of range? (+/- 90) ## Longtitude ## contains invalid chars (non-numbers)? ## out of range? (+/- 180) ## Label ## contains < or >? ## empty? (fatal) ## Description ## contains < or >? ## empty? (fatal) ## URL ## contains < or >? ## empty? (warning only) ## too many fields? -> probably a syntax error (PHP source attached to this mail) I'm not sure if an empty description is a fatal error - opinions? Empty/missing URL is not a real problem IMHO, and a line won't be listed as faulty if just the URL is empty. BTW: The old "debug.php" is still there, but is less strict on error checking. debug-map.php is a complete rewrite from scratch. It should catch everything that debug.php catched, and much more. Now really writing as BOfH: I did _not_ fix the coordinates page so that you can test if my map debugger really works *eg* If you find any issues in my script - patches and feedback welcome. Regards, Christian Boltz PS: not a random sig ;-) -- I read the BOFH texts long time ago and remember them, but this attitude is unfortunately not really called for business Linux versions ;) "In the new SUSE Linux release we are now standardizing on the 'netcat' browser. It is fully costumable to your viewing experience." ;) [Marcus Meissner in suse-security]