Jump to content

Module talk:Infobox road/color: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
PHL colours: Please be more specific.
PHL colours: more tagging
Line 190: Line 190:
Can someone change the colours for Philippine road articles? Thanks! --<span style="font-size:12pt;font-family:Tw Cen MT;color:black">[[User:HueMan1|hueman1]] [[User talk:HueMan1|<small>(talk)</small>]]</span> 10:43, 23 August 2018 (UTC)
Can someone change the colours for Philippine road articles? Thanks! --<span style="font-size:12pt;font-family:Tw Cen MT;color:black">[[User:HueMan1|hueman1]] [[User talk:HueMan1|<small>(talk)</small>]]</span> 10:43, 23 August 2018 (UTC)
:{{ping|HueMan1}} Can you please be more specific? Are there certain types that need to be changed? What do you want the new colors to be? -[[User:Happy5214|happy]][[User talk:Happy5214|5214]] 11:58, 23 August 2018 (UTC)
:{{ping|HueMan1}} Can you please be more specific? Are there certain types that need to be changed? What do you want the new colors to be? -[[User:Happy5214|happy]][[User talk:Happy5214|5214]] 11:58, 23 August 2018 (UTC)
::{{ping|HueMan1|TagaSanPedroAko}} There was a thread right above this one and a message on my talk page regarding Philippine road articles. Which one is correct? –[[User:Fredddie|Fredddie]][[User talk:Fredddie|™]] 13:06, 23 August 2018 (UTC)

Revision as of 13:07, 23 August 2018

Can someone add appropriate colors for Poland, please? Mkmk101 (talk) 23:50, 24 April 2013 (UTC)[reply]

What are the appropriate colors? --Rschen7754 02:16, 25 April 2013 (UTC)[reply]

Request to change "colors" subtable

This module was the subject of a recent bugzilla defect.

A future change may cause invocations of this module to break. The line at issue is "p.colors = colors". As per comment #6

...the proper fix is to not place that "colors" subtable in the table of functions being returned to PHP for #invoke.

The recommended fixes are any one of the following:

  • separate the entire "colors" table into a different module
  • change p.colors to an accessor function
before
p.colors = colors
after: "p.colors = colors" removed; accessor added in its place
function p.colors(frame)
    return colors
end
  • remove the "p.colors = colors" line. The module does not need it in order to work.

The accessor function seems like the best course of action. Let me know if you need more info. Thanks.

gnosygnu 02:15, 16 May 2013 (UTC)[reply]

 Done by User:Legoktm. -happy5214 08:24, 16 May 2013 (UTC)[reply]

Edit request on 18 August 2013

Here is the snippet of code needed for Poland:

do -- Poland
            local POL = Country:new{default = "background:#006A4D; color:#fff;"}
            POL:addTypesAsColor({"A", "S"}, "background:#0079C1; color:#fff;")
            colors.POL = POL

Fredddie 23:43, 18 August 2013 (UTC)[reply]

 Done --Rschen7754 02:05, 19 August 2013 (UTC)[reply]

Edit request on 22 August 2013

Here is the snippet of code needed for Sri Lanka:

do -- Sri Lanka
            local LKA = Country:new{default = "background:#006A4D; color:#fff;"}
            LKA:addTypesAsColor({"E"}, "background:#0000CD; color:#fff;")
            LKA:addTypesAsColor({"A"}, "background:#006A4D; color:#fff;")
            colors.LKA = LKA

Chamath237 12:11, 22 August 2013 (UTC)[reply]

 Done --Rschen7754 17:47, 22 August 2013 (UTC)[reply]
Isn't defining the A color redundant to the default? –Fredddie 00:24, 23 August 2013 (UTC)[reply]

Canada colours broke

I'm not good with Lua, and so I don't want to go making cascading changes without a clue. The header type argument doesn't seem to work in Canada anymore with the recent change to Lua. Articles such as Don Valley Parkway are reverting to the default colours (normally used only for county and city roads). A header type of "Freeway" and "freeway" should return the dark blue colour used by the 400-series highways, for our unnumbered municipal expressways - #003F87.

This is what tried adding, but it doesn't seem to have any effect:

        do -- Canada
            local CAN = Country:new{default = "background:#006A4D; color:white;"}
            CAN:addTypesAsColor({"Freeway", "freeway", "FWY", "Fwy", "fwy"}, "background:#003F87; color:white;")
            colors.CAN = CAN
        end -- Canada

-- Floydian τ ¢ 17:20, 13 December 2013 (UTC)[reply]

 Fixed There were a few issues. First of all, the addTypesAsColor method refers to highway types, not header types. And by adding that code, it disabled the already-existent submodule for Canada. Lastly and most importantly, the module was written to not calculate the country when a header_type value was present. That has been fixed so that only "built-in" header types cause this behavior. -happy5214 06:25, 14 December 2013 (UTC)[reply]
Awesome. Is there a page that lays out the heirarchy of all these modules? Can be difficult to find things going through layer upon layer of code. - Floydian τ ¢ 19:35, 14 December 2013 (UTC)[reply]
The best option is probably Special:PrefixIndex/Module:Infobox road/color. The UK is the only other country with a separate submodule. -happy5214 20:16, 14 December 2013 (UTC)[reply]

Template-protected edit request on 3 March 2014

Please add the following section

                do -- Iran
			local IRN = Country:new{default = "background:#cedff2;"}
			IRN:addTypesAsColor({"freeway"}, "background:#06c; color:#fff;")
			IRN:addTypesAsColor({"expressway"}, "background:#22B14C; color:#fff;")
			IRN:addTypesAsColor({"road"}, "background:#22B14C; color:#fff;")
			IRN:addTypesAsColor({"boulevard"}, "background:#fff; color:#000;")
			IRN:addTypesAsColor({"street"}, "background:#fff; color:#000;")
			colors.IRN = IRN
		end -- Iran

Nima Farid (talk) 02:32, 3 March 2014 (UTC)[reply]

 DoneFredddie 03:09, 3 March 2014 (UTC)[reply]

Template-protected edit request on 7 December 2014

Please make it so the color is the same as EUR when country is set to NLD and type is set to E. TheWombatGuru (talk) 23:29, 7 December 2014 (UTC)[reply]

Should be good to go. –Fredddie 23:39, 7 December 2014 (UTC)[reply]
Thanks, but I think the colour for E roads in NLD should be #08842C just like EUR in single colour countries. TheWombatGuru (talk) 23:43, 7 December 2014 (UTC)[reply]

Template-protected edit request on 16 December 2014

  • Please make it so the color is the same as EUR when country is set to DEU, CHE or ITA, and type is set to E.
  • Fix white space at NLD entry.
  • Fix note in line 105 "end -- Germany" should be "end -- Denmark".

TheWombatGuru (talk) 15:14, 16 December 2014 (UTC)[reply]

Was there a discussion where these changes were discussed and agreed upon someplace you can link to? Thanks. — {{U|Technical 13}} (etc) 15:55, 16 December 2014 (UTC)[reply]
No, points 2 and 3 are fixes, I don't think they have to be discussed first. The first point, is an edit similar to one I requested a few days ago, that one was accepted. TheWombatGuru (talk) 16:39, 16 December 2014 (UTC)[reply]
 Done 2 and 3. I think you are going to need to explain point 1 more thoroughly, as I don't understand it (and judging by how long this request has been waiting, others are having trouble as well). — This, that and the other (talk) 03:27, 23 December 2014 (UTC)[reply]
 Done #1. @Happy5214: can you get double check CHE? @TheWombatGuru: if there are any issues, let me know. Imzadi 1979  03:56, 23 December 2014 (UTC)[reply]
Yeah, they're all green now, also CHE: European route E35 in Switzerland. TheWombatGuru (talk) 11:39, 23 December 2014 (UTC)[reply]

Template-protected edit request on 4 September 2016


Hello, I'm working on Roads in Pakistan and there seems to be lack of detail for the Pakistan section. Only M (motorways) are noted, not N (national highways) or E (expressways). Also the colours are wrongly noted. Kindly please update the colours and headings for Pakistan section as follows:

- National Highways (N) uses colour = #06c - Motorways (M) uses colour = #22B14C - Expressways (E) uses colour = #F5C31D

The same colours are being used for our Roads in Pakistan template Template:Motorways of Pakistan

Thank You, PAKHIGHWAY, 2016.9.4 18:45 PM (PST)

PAKHIGHWAY (talk) 13:48, 4 September 2016 (UTC)[reply]

 DoneFredddie 21:12, 4 September 2016 (UTC)[reply]

Template-protected edit request on 11 May 2017

I am working on articles about expressways and highways in the Philippines, but there is no distinguishing header color for infoboxes if I add "E" (or "Expressway", for expressways), "N" (or "National Road" or "National Highway", for national roads), or "AH" (or "Asian Highway", for Asian Highway routes, with the only route in the Philippines is AH26 or Pan-Philippine Highway) in the type parameter of infobox road, with PHL as country parameter. The header color by the type set will be:

  • E, Expressway: #fc3
  • N, National Road, National Highway: #3C9
  • AH, Asian Highway: #039.

The code is:

do -- Philippines
			local PHL = Country:new{default = "background:#cedff2;"}
			PHL:addTypesAsColor({"E", "Expressway"}, "background:#FC3; color:black")
			PHL:addTypesAsColor({"N", "National Road", "National Highway"}, "background:#3C9; color:#fff;")
			PHL:addTypesAsColor({"AH", "Asian Highway"}, "background:#039; color:#fff;")
			colors.PHL= PHL
		end -- Philippines 

TagaSanPedroAko (talk) 06:50, 11 May 2017 (UTC)[reply]

@TagaSanPedroAko: I asked you a question the other day about this at Template talk:Infobox road, but you haven't answered. –Fredddie 13:01, 11 May 2017 (UTC)[reply]

I haven't noticed the question there, as I am busy editing articles about Philippine roads. But I left a reply there, that I will use green (     #093) as default, and blue (     #039) for Asian Highway, over my previous proposal. I revised the code to be added (see below)
      do -- Philippines
			local PHL = Country:new{default = "background:#093; color:white;"}
			PHL:addTypesAsColor({"AH", "Asian Highway"}, "background:#039; color:white;")
			colors.PHL = PHL
		end -- Philippines 

--TagaSanPedroAko (talk) 13:56, 11 May 2017 (UTC)[reply]

 DoneFredddie 13:58, 11 May 2017 (UTC)[reply]

PHL colours

Can someone change the colours for Philippine road articles? Thanks! --hueman1 (talk) 10:43, 23 August 2018 (UTC)[reply]

@HueMan1: Can you please be more specific? Are there certain types that need to be changed? What do you want the new colors to be? -happy5214 11:58, 23 August 2018 (UTC)[reply]
@HueMan1 and TagaSanPedroAko: There was a thread right above this one and a message on my talk page regarding Philippine road articles. Which one is correct? –Fredddie 13:06, 23 August 2018 (UTC)[reply]