Module talk:Location map/Archive 8: Difference between revisions

Content deleted Content added
m <font> → <span style>; rm stripped </span>
m Fixed Lint errors on this page (stripped tags)
 
(2 intermediate revisions by 2 users not shown)
Line 3:
== Detecting missing parameters, and illogical combinations ==
 
I want to incorporate the following code: <sourcesyntaxhighlight lang=text enclose=div>{{#switch:{{#if:{{{lat|}}}|1|0}}{{#if:{{{lon|}}}|1|0}}{{#if:{{{lat_deg|}}}|1|0}}{{#if:{{{lon_deg|}}}|1|0}}{{#if:{{{lat_min|}}}|1|0}}{{#if:{{{lon_min|}}}|1|0}}{{#if:{{{lat_sec|}}}|1|0}}{{#if:{{{lon_sec|}}}|1|0}}
|11000000|00110000|00111100|00111111=<!-- valid combinations - do none -->
|#default=[[Category:Location map parameter errors]]
}}{{#ifeq:{{#if:{{{lat_dir|}}}|1|0}}|{{#if:{{{lon_dir|}}}|1|0}}|<!-- valid combination - do none -->|[[Category:Location map parameter errors]]}}</sourcesyntaxhighlight> But I have no idea how to do it in Lua. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 12:29, 4 February 2015 (UTC)
:{{ping|Redrose64}} I set this up, but with the generic error category instead of a new one, and also with visible messages explaining exactly what the problem is. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 18:45, 4 February 2015 (UTC)
::
Line 66:
:::{{ec}} Thanks, {{ping|Jackmcbarn}}, that seems to work for modules, but not for templates.
:::Unfortunately, I have now just discovered that [[:Template:Location map Scotland Highland]] has a piped name <code>Highland (council area)<nowiki>{{!}}</nowiki>Highland</code>, which is expecting to be linked. Which is the correct specification for what {{param|name}} is supposed to be?
:::I wrote the above sentences before Alakzi's reply. (Can we do something clever to detect the presence of a pipe character?) An example of a "misbehaving" infobox is {{tlx|Infobox UK feature}}. --<span style="border:1px solid #006000">[[User:Dr Greg|<span style="color:#FFFF80;background:#006000">'''&nbsp;Dr&nbsp;Greg&nbsp;'''</span>]][[User talk:Dr Greg|<span style="color:#006000;background:#FFFF80">&nbsp;<small>talk</small>&nbsp;</font></span>]]</span> 19:13, 2 July 2015 (UTC)
:::: Only [https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=Template%3A+intitle%3ALocation+map+intitle%3A-doc+insource%3A%2Fname.*%5C%7B%5C%7B%21%5C%7D%5C%7D%2F&fulltext=Search 16] of them in the Template namespace. [[User:Alakzi|Alakzi]] ([[User talk:Alakzi|talk]]) 19:27, 2 July 2015 (UTC)
:::: And [https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=Template%3A+insource%3A%2F%5C%5B%5C%5B%5C%7B%5C%7B%5C%23invoke%5C%3ALocation+map%5C%7Cdata%2F&fulltext=Search these] are all of the infoboxes which link to the name. [[User:Alakzi|Alakzi]] ([[User talk:Alakzi|talk]]) 19:30, 2 July 2015 (UTC)