Template talk:Infobox port
This is the talk page for discussing improvements to the Infobox port template. |
|
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||
|
Parameters
[edit]Is it easy to add a few spots to the template? Namely,
- callsign(s) of the terminal
- CB frequencies of the terminal and
- the timezone information for that terminal?
CaribDigita (talk) 04:58, 4 January 2011 (UTC)
- Yes, it is fairly easy to do, but the better question is should we? I certainly could see some utility to the timezone in an encyclopedia article, but the infobox for airports does not include them, and those are similar facilities. Certainly not the most determinative, but something to keep in mind. As to the other two, those seem to me to be something you would add if this was a guide, and that is not what Wikipedia is about. And again, I don't believe the airport infobox includes how to contact the terminal. Aboutmovies (talk) 06:58, 4 January 2011 (UTC)
Website parameter
[edit]Can we have the website parameter appear under the "Details" section instead of its current location under the "Statistics" section? The location of a port's website is not statistics-related. It looks particularly peculiar to list a website under this section when no other statistics-related parameters are populated. See Port Alberta. Hwy43 (talk) 23:23, 9 April 2012 (UTC)
- In the meantime, I've used the "blankdetailstitle3" parameter at Port Alberta to place the website under the "Details" section. Hwy43 (talk) 07:21, 10 April 2012 (UTC)
- Typically the website is at the bottom of an infobox, it just so happens this one puts it in a Statistics section. How does this look? 117Avenue (talk) 05:39, 13 April 2012 (UTC)
- Looks better. What would be ideal is a condition that, if the ~10 statistics-related parameters above it are all unpopulated but the website parameter is populated, the "Statistics" header is not displayed. Is this possible? Hwy43 (talk) 06:00, 13 April 2012 (UTC)
- Good catch, I didn't see that. 117Avenue (talk) 06:04, 13 April 2012 (UTC)
- Took long enough! ;o) Thanks. Hwy43 (talk) 05:06, 18 September 2012 (UTC)
- Good catch, I didn't see that. 117Avenue (talk) 06:04, 13 April 2012 (UTC)
- Looks better. What would be ideal is a condition that, if the ~10 statistics-related parameters above it are all unpopulated but the website parameter is populated, the "Statistics" header is not displayed. Is this possible? Hwy43 (talk) 06:00, 13 April 2012 (UTC)
- Typically the website is at the bottom of an infobox, it just so happens this one puts it in a Statistics section. How does this look? 117Avenue (talk) 05:39, 13 April 2012 (UTC)
Location map
[edit]Hi there, could somebody please add parameters for a location map. We're writing a couple of articles for GibraltarpediA and this would be particularly useful there. Thanks, --Gibmetal 77talk 2 me 21:35, 17 September 2012 (UTC)
- Copy the one already implemented into Template:Infobox UK place. User:ScotXWt@lk 13:34, 12 February 2017 (UTC)
Draft depth
[edit]There should be a
- | Draft depth = 50 feet
- | Air draft = 200 feet
- Wikideas1 (talk) 12:55, 7 February 2016 (UTC)
- now added. Frietjes (talk) 15:01, 12 March 2017 (UTC)
- Draft and depth are 2 complimentary dimensions. Draft refers to the measurement from the bottom of the keel to the waterline of a ship. Depth on the other hand refers to the depth of water available. So a port with a depth of 12 meters would not be able to handle ships of 12 meter draft as they would be scraping along the bottom. Ships require an under keel clearance to allow them to move in the water. This is sometimes specified by the port/terminal and sometimes it is decided by the ship's master and/or the pilot. I think some clarification on the Draft depth parameter is needed to indicate what the value actually represents. Fob.schools (talk) 12:34, 5 December 2017 (UTC)
- now added. Frietjes (talk) 15:01, 12 March 2017 (UTC)
UN/Locode
[edit]The UN/LOCODE should be a parameter I believe. It is equivalent to the IATA or ICAO codes used for airports. Can it be added? Fob.schools (talk) 12:46, 5 December 2017 (UTC)
- I have added it now. Fob.schools (talk) 13:52, 8 December 2017 (UTC)
Misuse of templates?
[edit]Not sure if it is a problem as such but https://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:Infobox_port shows that is template is frequently used in articles that are not about sea ports, e.g. for border crossings like El Paso Stanton Street Port of Entry or Lewiston–Queenston Bridge that make use of the customizable attributes. Kq-hit (talk) 15:39, 1 January 2020 (UTC)
Port logo parameter
[edit]Would it be possible to have a second image or logo parameter added so that the infobox can display the port authority logo as well as a general photo of the port? The airport infobox has such a provision. Thanks Thx811 (talk) 21:03, 16 April 2020 (UTC)
- Support Fob.schools (talk) 08:41, 17 April 2020 (UTC)
Implementation
[edit]Hello Thx811. Commenting here based on this. Infobox port currently use 3 image placeholders. One for the usual photo, one for a manual static map, and one more for another map (parameter name: image_map
). Would you want me to add a fourth?
If you'd like, I could look into merging both the map parameters and upgrading it to a dynamic map like Template:Infobox power station, and then adding a 3rd image placeholder as you requested (probably between the photo and the map). That's just my suggestion, but let me know what you'd like. Cheers. Rehman 15:45, 17 May 2020 (UTC)
- Hi Rehman, thanks for getting back. I think your suggestion of merging the maps would be a good idea. I think a logo parameter would sit best between the current name and image parameters, so it displays the same order as in the Template:Infobox airport. Many thanks Thx811 (talk) 19:06, 17 May 2020 (UTC)
- Can someone go into some more detail on the map options? I’ve been through a whole bunch of these templates articles in the last few weeks and really haven’t noticed many using maps. Fob.schools (talk) 20:08, 17 May 2020 (UTC)
- Fob.schools; since the current maps require a static raster file name to be manually set, I think this is probably because many just don't bother with adding them. The new map will be automatic, generated based on the coordinates. Would you like me to go ahead in adding that? Rehman 02:09, 18 May 2020 (UTC)
- Ideally, yes. I just wondered if the editor will have an ability or need to finesse the area displayed automagically? Fob.schools (talk) 07:06, 18 May 2020 (UTC)
- The editor doesn't need to set the display region manually (it would be automatically determined based on coords). Of course, in rare cases, this can be overridden at the article level. Will look into this soon. Cheers, Rehman 07:14, 18 May 2020 (UTC)
- Ideally, yes. I just wondered if the editor will have an ability or need to finesse the area displayed automagically? Fob.schools (talk) 07:06, 18 May 2020 (UTC)
- Fob.schools; since the current maps require a static raster file name to be manually set, I think this is probably because many just don't bother with adding them. The new map will be automatic, generated based on the coordinates. Would you like me to go ahead in adding that? Rehman 02:09, 18 May 2020 (UTC)
- Can someone go into some more detail on the map options? I’ve been through a whole bunch of these templates articles in the last few weeks and really haven’t noticed many using maps. Fob.schools (talk) 20:08, 17 May 2020 (UTC)
Hello Thx811 and Fob.schools. I've drafted the image and map functions at Template:Infobox port/sandbox. Could you test it and let me know if that is what you prefer? You can test it by visiting an existing article that uses {{Infobox port}} and simply change the template to {{Infobox port/sandbox}} and preview it.
logo
,logo_alt
,logo_size
, andlogo_caption
, are the parameters for the logo. Default size is the width of the first image.- Any article that has a value in
pushpin_map
, will automatically show the map. Default size is the width of the first image.
Let me know. If it is fine, I can move it to the live template. Cheers, Rehman 04:40, 19 May 2020 (UTC)
- Thanks for this. All those parameters seem to be working but the default width seems to be changing
- {{Infobox port/sandbox | name = Port of Rotterdam | logo = Port of Rotterdam logo.svg | logo_caption = Port of Rotterdam logo | logo_alt = Port of Rotterdam logo (c) 2020 Port of Rotterdam | logo_size = 150 | image = ECT waalhaven bij nacht.jpg | caption = The Wallhaven at night <!-- Location --> | pushpin_map = yes
- Also, the pushpin icon is a bit 'not-a-port'. Can it be changed? Fob.schools (talk) 09:09, 19 May 2020 (UTC)
- test was done on Port of Rotterdam btw. Fob.schools (talk)
- Thanks Fob.schools, icon changed to "ferry", or you could also choose one from mw:Help:Extension:Kartographer/Icons. Could you tell me what would you like to occur regarding the size? Also, did you try adding px to the size (i.e. 150px)? I did some amendments to the default. Could you recheck and let me know please? Rehman 10:06, 19 May 2020 (UTC)
- Add px to the logo size doesn't make much noticeable difference. But the image is now the same size as the map, but both seem to bigger than the current default. Fob.schools (talk) 11:00, 19 May 2020 (UTC)
- Thanks Fob.schools, icon changed to "ferry", or you could also choose one from mw:Help:Extension:Kartographer/Icons. Could you tell me what would you like to occur regarding the size? Also, did you try adding px to the size (i.e. 150px)? I did some amendments to the default. Could you recheck and let me know please? Rehman 10:06, 19 May 2020 (UTC)
- I can definitely change the defaults. What would you like it to be? Rehman 11:15, 19 May 2020 (UTC)
- I've now changed the defaults to 250px. Is this better? Rehman 11:18, 19 May 2020 (UTC)
- Probably. What I'm unsure about is what has changed from the current invocation? Was/is the default 250 before your changes? It seems so, but perhaps there is something different about the Rotterdam infobox data? I'm not sure.
- BTW, I'm being templated on Commons for uploading copyvio screenshots - LOL. The port logo is only 'fair use' so cannot appear on Commons.Fob.schools (talk) 13:33, 19 May 2020 (UTC)
- The previous default was carried from Module:InfoboxImage. But since we have a map that should ideally be the same width of the image (to not look ugly), I had to set a local default. I'm not too sure what the exact default at the module is, it's probably subjective. Don't worry about the commons files. I went ahead and deleted those, as they aren't needed anymore. :) Shall I go ahead and move this to the live version? Rehman 13:59, 19 May 2020 (UTC)
- Sounds good to me. Fob.schools (talk) 14:03, 19 May 2020 (UTC)
- Done. I'll update the documentation shortly. Rehman 15:51, 19 May 2020 (UTC)
- I've updated some of the docs, but I get a warning in preview that the logo parameter is invalid. But it saves and works ok. Fob.schools (talk) 16:21, 19 May 2020 (UTC)
- The error msg is "Warning: Page using Template:Infobox port with unknown parameter "logo" (this message is shown only in preview)." Fob.schools (talk) 16:22, 19 May 2020 (UTC)
- I'll clear those together with the doc update. Rehman 16:25, 19 May 2020 (UTC)
- The error msg is "Warning: Page using Template:Infobox port with unknown parameter "logo" (this message is shown only in preview)." Fob.schools (talk) 16:22, 19 May 2020 (UTC)
- I've updated some of the docs, but I get a warning in preview that the logo parameter is invalid. But it saves and works ok. Fob.schools (talk) 16:21, 19 May 2020 (UTC)
- Done. I'll update the documentation shortly. Rehman 15:51, 19 May 2020 (UTC)
- Sounds good to me. Fob.schools (talk) 14:03, 19 May 2020 (UTC)
- The previous default was carried from Module:InfoboxImage. But since we have a map that should ideally be the same width of the image (to not look ugly), I had to set a local default. I'm not too sure what the exact default at the module is, it's probably subjective. Don't worry about the commons files. I went ahead and deleted those, as they aren't needed anymore. :) Shall I go ahead and move this to the live version? Rehman 13:59, 19 May 2020 (UTC)
- Many thanks Rehman, tried it out in sandbox and looks good. Thx811 (talk) 18:09, 19 May 2020 (UTC)
Paremeter merge
[edit]Post-template merger, we now have 2 parameters which effectively mean the same - teu= from the intermodal template is the same as containervolume= which was originally in the port infobox. Can someone merge them or depracate the teu= one please? Fob.schools (talk) 14:52, 2 August 2020 (UTC)
Body of Water
[edit]Wikidata has a property called located in or next to body of water (P206); is it worth adding an equivalent entry to the infobox? FWIW, Greenwich Pier lists it in Location, but it's not listed explicitly on Port of Tilbury. Alex Chamberlain (talk) 21:39, 27 December 2022 (UTC)
World Port Index database ID
[edit]Can we please add a new field for the World Port Index database ID (WPI ID)? It is a property in Wikidata - Wikidata:Property:P7625, and is from an authoritative source, namely the Maritime Safety Information (MSI) of the U.S. National Geospatial-Intelligence Agency (NGA). To quote from its home page: "Provide global maritime geospatial intelligence in support of national security objectives, including safety of navigation, international obligations, and joint military operations."
And just to clarify, the WPI has information on all seaports, military and civilian. Its specific output is fairly comprehensive, and contains much detail which could easily be supported by semantic data - some of which is is already in our template. Furthermore, the WPI ID link could be used as a primary authoritative citation for all port articles - in a similar vein to Airport Information Charts are used as footnote citation in the infobox of airport articles.
This is one of the examples from the Wikidata page. Militum professio scriniarii (talk) 21:40, 27 April 2023 (UTC)
Wrong codes
[edit]@Davemck Hi, Template:Infobox mapframe is related to OSM. So these codes are completely false:
|image3 = {{Infobox mapframe
|id = {{{qid|}}}
|coord = {{{coordinates|}}}
|frame-width = {{Digits|1={{#if:{{{image_size|}}}|{{{image_size|}}}|280px}}}}
|marker = {{{marker|harbor}}}
|marker-color= #005E80
|zoom = {{#if:{{{pushpin_map_geomask|}}}|{{{pushpin_map_zoom|}}}|{{{pushpin_map_zoom|11}}}}}
|geomask = {{#ifeq:{{{pushpin_map_geomask|}}}|Yes|P17|<!-- -->}}
|geomask-stroke-width = {{#ifeq:{{{pushpin_map_geomask|}}}|Yes|0.5|<!-- -->}}
|geomask-stroke-colour= {{#ifeq:{{{pushpin_map_geomask|}}}|Yes|#000000|<!-- -->}}
|geomask-fill = {{#ifeq:{{{pushpin_map_geomask|}}}|Yes|#BABABA|<!-- -->}}
}}
In fact we should set zoom of OSM by "mapframe-zoom" argument as other places. Thanks, Hooman Mallahzadeh (talk) 15:08, 28 April 2025 (UTC)
Looks like this has been like this since the initial implementation in 2020[1]. It should be using #invoke: and the |auto parameter instead, per current documentation there. --Joy (talk) 22:09, 29 April 2025 (UTC)
breakage
[edit]@Hooman Mallahzadeh it looks like the most recent changes caused a lot of breakage: PetScan link showing hundreds of errors at the time of linking
The errors look like:
Lua error in Module:Location_map at line 526: Unable to find the specified location map definition: "Module:Location map/data/yes" does not exist.
This is kind of obvious since the value of the |pushpin_map=
parameter seems to be "yes" in a lot of these callers, and the existing documentation of this template says:
|pushpin_map= any value in this field will cause a map to appear
So the callers aren't doing anything wrong. If you want to change them, go ahead, but do that first. --Joy (talk) 22:01, 29 April 2025 (UTC)
- @Joy I sandboxed my modification to the template here. If you could show me where was the error, I would fix that myself.
- Because all tests of me didn't have any error. Please mention at least one of such articles that produce such error. Thanks, Hooman Mallahzadeh (talk) 03:51, 30 April 2025 (UTC)
- I started creating the /testcases page, but can't quite reproduce it. I think it's because of this:
{{#property:P625}}
- This code doesn't evaluate to true in the test case. I tried searching for the specification of how it works and how to make it testable, but couldn't immediately find it, do you happen to know? --Joy (talk) 07:33, 30 April 2025 (UTC)
- Yes. Coordinates of an event should be placed uniquely in its Wikidata item. Mentioning it twice in article is somehow redundant.
- You should place testcases in an article that has Wikidata item and its Wikidata item has "coordinate location" property. For example, copy and paste your test cases in article Port of Shahid Rajaee and replace your testcase instead of its Infobox. Hooman Mallahzadeh (talk) 07:42, 30 April 2025 (UTC)
- Well, that is what I am doing at Template:Infobox port/testcases - I switched to a helper that allows me to pass in the qid parameter. I've made some progress, let's see if I can get it to render the same error. --Joy (talk) 10:12, 30 April 2025 (UTC)
- I gave up on trying to look up Wikidata QIDs from the test case, and instead just temporarily skipped them. Template:Infobox port/testcases now render the errors. --Joy (talk) 10:33, 30 April 2025 (UTC)
- @Hooman Mallahzadeh okay so even if I'm not able to reproduce this fully in the test case, the problem is already fairly obvious.
- Port of Shahid Rajaee is an example of what you are expecting - a value of pushpin_map that is "Iran", so it matches {{Location map}} specification. But, that it's not what is formatted according to Template:Infobox port#Parameter descriptions, so it doesn't match what others have input already.
- You can do a search for hastemplate:"Infobox port" insource:/pushpin_map/ to see how much of this is out there already.
- You have to handle this case, or fix all the callers first to specify a {{Location map}} data point instead of "yes" or similar, and only then deploy your change. --Joy (talk) 10:21, 30 April 2025 (UTC)
- I'm trying changing all of them. Please wait... Hooman Mallahzadeh (talk) 12:45, 30 April 2025 (UTC)
- @Hooman Mallahzadeh can you please not break all of them while you fix them? What is the point of that? The pages with script errors list already has 40+ entries. --Joy (talk) 14:16, 30 April 2025 (UTC)
- @Joy It is finishing. Please wait... Hooman Mallahzadeh (talk) 14:17, 30 April 2025 (UTC)
- @Joy
Done All 400 articles checked and corrected. Hooman Mallahzadeh (talk) 14:36, 30 April 2025 (UTC)
- Now, I am ready for any questions. Thanks, Hooman Mallahzadeh (talk) 14:39, 30 April 2025 (UTC)
- Oof, that's a lot of manual labor :) I've updated the documentation. --Joy (talk) 15:37, 30 April 2025 (UTC)
- @Joy
- @Joy It is finishing. Please wait... Hooman Mallahzadeh (talk) 14:17, 30 April 2025 (UTC)
- @Hooman Mallahzadeh can you please not break all of them while you fix them? What is the point of that? The pages with script errors list already has 40+ entries. --Joy (talk) 14:16, 30 April 2025 (UTC)
- I'm trying changing all of them. Please wait... Hooman Mallahzadeh (talk) 12:45, 30 April 2025 (UTC)
- Well, that is what I am doing at Template:Infobox port/testcases - I switched to a helper that allows me to pass in the qid parameter. I've made some progress, let's see if I can get it to render the same error. --Joy (talk) 10:12, 30 April 2025 (UTC)
- I started creating the /testcases page, but can't quite reproduce it. I think it's because of this: