Template talk:Coords

From CryGaia Wiki
Jump to navigation Jump to search

It looks like the map legend can allow for more than one word with some changes:

In "Template:Coords" the text parameter needs to have urlencode used upon it. (Example: User:Skolia/sandbox/Template:Coords - View It's Source)

In "ShowCoords" the text parameter needs to have urldecode used upon it, otherwise we will end up with urlencoded markers (like %20 for space) in the legend.


The issue is not in the backend template (Template:Overlay_simple). I tested it manually in my sandbox Map Test

Thats awesome! Originally we didn't have urlencode in the wiki, the .com version was on an older version of mediawiki and it never worked for some reason. I remember going round and round trying to get multiple words with no success. Hadn't thought about checking to see if it would work better on the new wiki Sojourner (talk) 23:26, 24 August 2017 (UTC)
Well, "good" rather than awesome -- after some testing, it's the urldecode that we're missing, not the urlencode. Although it looks like by using the |WIKI parameter, we get an "_" (underbar) for spaces, instead of a "+" (plus) character. Which is much more readable, and I think acceptable if anyone wants to use multiple words Sojourner (talk) 00:12, 25 August 2017 (UTC)
urldecode should be built in. According to this doc anyway. It looks like Extension:StringFunctions is depreciated so if that's installed it may be overriding mediawiki core which is where urlencode/decode ended up. --Skolia (talk) 00:49, 25 August 2017 (UTC)
I take that back, they incorporated urlencode but not urldecode.
Although according to this doc there are now multiple formats for urlencode to use. The default was changed to QUERY from WIKI in v1.17. --Skolia (talk) 00:51, 25 August 2017 (UTC)
One workaround might be to have ShowCoords replace + or _ with space for the legend text. --Skolia (talk) 00:53, 25 August 2017 (UTC)
This module Module:String might do the trick, it doesn't seem to be enabled or installed on Crygaia right now. --Skolia (talk) 01:00, 25 August 2017 (UTC)
#urldecode seems to be working? WhackyTests --Skolia (talk) 01:31, 25 August 2017 (UTC)
Ok, no idea what is going on -- I read the same thing you did, StringFunctions is depreciated and there is no built in urldecode. And yet, when i put #urldecode into the template, it works.... So, no idea. I'm going to add it to the template, and we'll just have to keep an eye on it if there are ever any code updates to this wiki Sojourner (talk) 23:29, 25 August 2017 (UTC)

Bugs

  • y isn't being passed properly.
(279,552)
{{Coords|279|552|Kaidan|End}}
Is going to:
/ShowCoords?x=279&y=279&zone=Kaidan&text=End&mapx=1024&mapy=1024
--Skolia (talk) 03:36, 25 August 2017 (UTC)
Oops, yeah. I was passing parameter 1 in for both X and Y. Must have cut-n-pasted twice. Fixed now. Sojourner (talk) 23:06, 25 August 2017 (UTC)
  • Seeing coordinate placement issues on Scorched_Desert (is that the right map name?). --Skolia (talk) 06:36, 27 August 2017 (UTC)
I verified a couple of placements, and they seem to be right. At least, they're right for the coords given - but some things have moved a bit. If you're seeing something off, do you have an example of one that isn't working right? Sojourner (talk) 22:05, 27 August 2017 (UTC)
Odd, they all seem to be correct now. Well, good enough for me lol --Skolia (talk) 22:44, 27 August 2017 (UTC)

++Seoul Map isn't aligned properly with In game Coordinates. The Start coordinates of the Butterfly effect Mission 405 x 235 is showing at approximately 205 x 125 in game and way south west of the location in game.