Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Search
Search
Appearance
Create account
Log in
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Editing
Module talk
:
Coordinates
(section)
Add topic
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
Add topic
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Issue with inline coords == {{moved from|Template_talk:Infobox_settlement#Issue_with_coordinates...}} {{Infobox settlement | mapframe = no | coordinates = }} So I keep coming across pages where the {{para|coordinates|{{tlc|coords|...|display{{=}}title}}}}. The issue with this is that the logic in the if statement sees that {{param|coordinates}} is not empty, and therefore renders the {{code|Coorindates:}} text. See the example at right, note I have used a [[nbsp]] to achieve the same result here so as not to throw random coords on the talk page title. We should fix this somehow... The options I see include: # Detecting if {{para|display|title}} and if so, hiding the {{code|Coordinates:}} text. # Somehow modifying [[Module:coordinates]] so that in certain circumstances you can use the {{code|coordinsert}} functionality to change the display from just title to title and inline, though I now realize that would ''still'' require detecting what the current value of {{para|display}} is. We don't want to run into errors because the coords are defined as inline in the infobox then at the bottom of the page there is a 2nd set of coords defined for the title... Open to any suggestions! '''[[User:Zackmann08|<span style="color:#00ced1">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 23:04, 14 December 2025 (UTC) :{{ping|Jonesey95|Hike395}} any thoughts on this? '''[[User:Zackmann08|<span style="color:#00d5ff">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange">What I been doing</span>]]</sub>) 18:40, 15 December 2025 (UTC) :Looks like the coordinates module already has some helper functions that parse the display parameter value, so maybe just make sure they are exported in a namespace from which they can be reused? --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 19:42, 15 December 2025 (UTC) ::Not sure how exactly that would look. I'm only able to picture an additional function that would return the a parsed display parameter. '''[[User:Zackmann08|<span style="color:#00d5ff">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange">What I been doing</span>]]</sub>) 22:33, 15 December 2025 (UTC) :::Can we test the output of {{para|coordinates}} to see if it wants to display the inline portion? Alternatively, can we somehow inject display=inline into the parameter, maybe with a string replacement? β [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 01:02, 16 December 2025 (UTC) ::::Exactly what I am thinking, just not really sure how to do that... Happy to dive into it though. Mainly wanted to sanity check that I wasn't missing something obvious before I went down the rabbit hole. '''[[User:Zackmann08|<span style="color:#00d5ff">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange">What I been doing</span>]]</sub>) 01:04, 16 December 2025 (UTC) :::::This is a total hack and will definitely have negative side effects (I think), but <syntaxhighlight lang=wikitext inline>{{Str rep|1={{coords|1|1|N|3|3|E|display=title}}|2=-hidden noexcerpt|3=}}</syntaxhighlight> might be fun to play with. β [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 02:18, 17 December 2025 (UTC) ::::::Because there's no mention of 'display' or 'inline' or 'title' in the second or third parameters, nobody will remember what it does tomorrow. Let's not make it more complex and less likely to be maintained. --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 08:19, 17 December 2025 (UTC) :::I'm referring to isInline() and similar functions, [[Module:Coordinates#L-633]]. With a few relatively small interventions, this could be brought out of the local scope and we could conceivably use it to quickly check the display value from the outside. --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 08:47, 16 December 2025 (UTC) ::::Hmm that could certainly help! I'll get into this later this week and see if I can't mock something up in the Sandbox. '''[[User:Zackmann08|<span style="color:#00d5ff">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange">What I been doing</span>]]</sub>) 16:46, 16 December 2025 (UTC) :::::{{ping|Joy|Jonesey95}} moved the discussion here where I probably should have started it. I have mocked up a solution in [[Module:Coordinates/sandbox]]. See below: :::::* {{tlc|coord/sandbox|8|N|7|W|display{{=}}i}} → {{coord/sandbox|8|N|7|W|display=i}} :::::* {{mlx|coordinates/sandbox|forceinline|{{tlc|coords|8|N|7|W|display{{=}}t}}}} → {{#invoke:coordinates/sandbox|forceinline|{{coords|8|N|7|W|display=t}}}} :::::So with this we could wrap {{tl|Infobox settlement}}'s {{param|coordinates}} param in the new function as follows: {{mlx|coordinates|forceinline|{{param|coordinates}}}}. This would ensure that it always displays inline, in addition to in the title if that is desired. Note I have done '''VERY LITTLE''' testing of this, but am looking for feedback on this as a possible solution. '''[[User:Zackmann08|<span style="color:#00d5ff">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange">What I been doing</span>]]</sub>) 02:58, 19 December 2025 (UTC) ::::::{{ping|Pppery|Izno|Hike395|Frietjes}} as recent editors of this template, at your convenience, could you please review the above discussion and my [[Special:Permalink/1328309609|attempted solution]]? Thanks! {{smiley|santa}} '''[[User:Zackmann08|<span style="color:#00d5ff">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange">What I been doing</span>]]</sub>) 19:13, 22 December 2025 (UTC)
Summary:
Please note that all contributions to LarpOfHoi4 Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LarpOfHoi4 Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Module talk
:
Coordinates
(section)
Add topic