Template talk:Adjacent stations/Archive 4
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | Archive 4 |
Fixed too small font per MOS:FONTSIZE.
I have removed some excessive shrinking of the font sizes in this module's styles.css page per MOS:FONTSIZE. Because infoboxes already reduce the font size to 88% of normal, the most you can reduce the font size beyond that is to 97%. The change made the infobox at Hellifield railway station only about one line of text taller (about a quarter-inch on my screen), FWIW. – Jonesey95 (talk) 16:55, 26 January 2022 (UTC)
- Welp. @Mackensen: @Jc86035: @Pi.1415926535: Got any good ideas on how we can improve the design of these boxes? Cards84664 22:01, 26 January 2022 (UTC)
Preceding station | Rapid Transit | Following station | ||
---|---|---|---|---|
West 25th–Ohio City toward Airport
|
Red Line | Tri-C–Campus District toward Windermere
| ||
Terminus | Blue Line | Tri-C–Campus District toward Warrensville–Van Aken
| ||
Green Line | Tri-C–Campus District toward Green Road
|
In an infobox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Services | ||||||||||||||||||||
|
I know this is not a fun situation, but the previous text sizes were just too small. Since MOS started enforcing this size limit a few years ago, we've had to change a lot of templates and template transclusions. For what it's worth, the text in the infobox example is currently at 85.4% of normal size, so that's as small as it can go. One drastic option would be to have the rail WikiProjects agree that all "adjacent stations" boxes should live outside of infoboxes, in their own box, where the font size could be more consistent from article to article (although it would still have a minimum size limit of 85%, so it might be a lot of work for not much benefit). See WP UK Rail talk for a relevant discussion where this change was proposed. – Jonesey95 (talk) 21:17, 26 January 2022 (UTC)
- No. Keeping them in the infobox on a per country basis is fine, it's a trivial difference that most users will not be able to discern now. UK and US have different approaches to this and it is fine, we don't need more busy work where it is not needed. Cards84664 22:00, 26 January 2022 (UTC)
I noticed the change had been made and I have no objection. Mackensen (talk) 23:31, 26 January 2022 (UTC)
- Jc86035 adjusted the above change in a clever way in March, and I'm pretty sure it worked back then, but I just noticed that even outside of infoboxes, the "note-mid" values were again displaying at 79% of nominal. I don't know if something changed between March and today, but I have once again adjusted the size of "note-mid" and similar text to meet our guidelines. A more elegant solution is always welcome, of course. – Jonesey95 (talk) 16:55, 26 April 2022 (UTC)
- Pinging Redrose64 for their input as they made the suggestion for the edit. Cards84664 18:44, 26 April 2022 (UTC)
Override system title
There's a use case with Module:Adjacent stations/Sound Transit where it would be useful to override the system title based on type of service. Compare s-line with adjacent stations. I'm envisioning something similar to how name format can be a string or a table. {{adjacent stations}} could invoke with a parameter named system_stylen
. I'm playing with the idea in Module:Adjacent stations/sandbox and can't quite get it right. Mackensen (talk) 13:18, 31 January 2022 (UTC)
- Hmm. I've had a quick go at this, assuming I've understood the goal right. Can you try previewing St Joseph station with the sandbox version of adjacent stations and removing
|header1=
. That is: - -- did you mean something like this? ProcrastinatingReader (talk) 13:50, 31 January 2022 (UTC)
services = {{Adjacent stations/sandbox|system1=Sound Transit |header2=Future services |line2=Line T|type2=Hilltop|right2=Hilltop District |header3=Proposed services |line3=Line T|type3=TCC|left3=Ainsworth|right3=Hilltop District }}
- @ProcrastinatingReader: on the right track, thank you. We need to be able to vary it--see for example King Street Station. Mackensen (talk) 13:57, 31 January 2022 (UTC)
- @Mackensen: So "Sound Transit" is the operator and the light rail/commuter rail are different systems? I'm wondering how that's best represented in the Adjacent stations config (really a stylistic/structural choice, not a technical one)? If that's a correct understanding then I have a rough concept in Module:Sandbox/ProcrastinatingReader/examples that could be invoked using
|subsystem=link
or|subsystem=sounder
for example, but maybe there are other/better ways to structure the config for these cases? ProcrastinatingReader (talk) 13:17, 1 February 2022 (UTC)- @ProcrastinatingReader: Yes, that's the concept. These are all service offerings under the Sound Transit umbrella, but they have their own branding. With S-line they all had separate templates, leading to some duplication. Mackensen (talk) 13:32, 1 February 2022 (UTC)
- @Mackensen: Sorry about the delay with this. Try: on King Street Station (corresponding data is in the
services = {{Adjacent stations/sandbox|system1=Amtrak |line1=Cascades|left1=Tukwila|right1=Edmonds |line2=Coast Starlight|left2=Tacoma Dome |line3=Empire Builder|right3=Edmonds |system5=Sound Transit|subsystem5=commuter rail |line5=North|right5=Edmonds |line6=South|left6=Tukwila }}
subsystem icons
key in Module:Adjacent stations/Sound Transit, activated in template using|subsystemn=
).- @ProcrastinatingReader: No worries, thanks for staying with this. That looks perfect to me. Tagging in SounderBruce as well as an interested party. Question: for systems other than SoundTransit, if they have a rounded icon, we would probably want to display some kind of title text with the icon. For Sound Transit, we would pass "", indicating that the title should be suppressed. Mackensen (talk) 14:05, 17 April 2022 (UTC)
- @Mackensen: I've added support for
subsystem titles
(example in Module:Adjacent stations/Sound Transit); if a title is specified it will show that after the subsystem icon (otherwise just the icon), and vice versa for a subsystem title being defined but no icon. Can see an example with|subsystem5=light rail
. ProcrastinatingReader (talk) 14:55, 17 April 2022 (UTC)- Looks good to me, thanks. Mackensen (talk) 14:59, 17 April 2022 (UTC)
- @Mackensen: I've added support for
- @ProcrastinatingReader: No worries, thanks for staying with this. That looks perfect to me. Tagging in SounderBruce as well as an interested party. Question: for systems other than SoundTransit, if they have a rounded icon, we would probably want to display some kind of title text with the icon. For Sound Transit, we would pass "", indicating that the title should be suppressed. Mackensen (talk) 14:05, 17 April 2022 (UTC)
- @Mackensen: Sorry about the delay with this. Try:
- @ProcrastinatingReader: Yes, that's the concept. These are all service offerings under the Sound Transit umbrella, but they have their own branding. With S-line they all had separate templates, leading to some duplication. Mackensen (talk) 13:32, 1 February 2022 (UTC)
- @Mackensen: So "Sound Transit" is the operator and the light rail/commuter rail are different systems? I'm wondering how that's best represented in the Adjacent stations config (really a stylistic/structural choice, not a technical one)? If that's a correct understanding then I have a rough concept in Module:Sandbox/ProcrastinatingReader/examples that could be invoked using
- @ProcrastinatingReader: on the right track, thank you. We need to be able to vary it--see for example King Street Station. Mackensen (talk) 13:57, 31 January 2022 (UTC)
Adjacent stations article count
# of invocations | 2020-12 | 2021-02 | 2021-06 | 2021-08 | 2021-10 | 2021-12 | 2022-02 | 2022-04 | 2022-06 | 2022-08 | 2022-10 | 2022-12 | 2023-02 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Template:S-line | 18335 | 18764 | 18902 | 18351 | 18471 | 18272 | 17354 | 15775 | 8732 | 6205 | 3458 | 2383 | 2382 |
Template:Adjacent stations | 12386 | 12977 | 13793 | 14687 | 15121 | 15699 | 17210 | 18973 | 27102 | 30130 | 33698 | 35237 | 36624 |
Template:Rail line | Number of invocations unavailable for this time period | 11066 | 11010 | 10242 | 10261 | 10151 |
So far so good, Adjacent stations will be in the majority in the next few weeks. Cards84664 13:47, 3 February 2022 (UTC)
- Another useful way to track progress may be to count the number of subpages of {{S-line}}. At this writing, the numbers above are 12,457 transclusions of {{S-line}}, 22,223 transclusions of {{Adjacent stations}}, and 5,069 subpages of {{S-line}}. – Jonesey95 (talk) 18:26, 5 May 2022 (UTC)
- 8,887 S-line transclusions and 26,427 Adjacent stations transclusions. Massive changes done in May alone. Also worth noing that Template:Rail line has 10,980 transclusions. Gonnym (talk) 07:20, 27 May 2022 (UTC)
- Updated the chart, nice! Cards84664 16:28, 1 June 2022 (UTC)
- I have updated the chart as of today. There are currently 2,844 subpages of {{S-line}}. – Jonesey95 (talk) 16:57, 3 July 2022 (UTC)
- Update as of 19 September 2022: 1,939 subpages of {{S-line}}, and 3,487 transclusions. Progress. Just at a glance, it appears that most of the remaining work resides in Germany, the Netherlands, and the United Kingdom, with significant bunches in other countries as well. – Jonesey95 (talk) 01:40, 19 September 2022 (UTC)
- I have updated the chart as of today. There are currently 2,844 subpages of {{S-line}}. – Jonesey95 (talk) 16:57, 3 July 2022 (UTC)
- Updated the chart, nice! Cards84664 16:28, 1 June 2022 (UTC)
- 8,887 S-line transclusions and 26,427 Adjacent stations transclusions. Massive changes done in May alone. Also worth noing that Template:Rail line has 10,980 transclusions. Gonnym (talk) 07:20, 27 May 2022 (UTC)
Problem with icons and aliases
The icon function (exposed by {{Rail icon}}) doesn't seem to work with aliases. Consider Module:Adjacent stations/Montreal Metro. All three of these calls should produce the same output:
It's failing to the default case for the second and third. Mackensen (talk) 16:32, 6 February 2022 (UTC)
- The "aliases" key was incorrectly under the scope of "lines". It looks like it's working now! BLAIXX 16:52, 6 February 2022 (UTC)
- @Blaixx: Sigh, thank you. Mackensen (talk) 17:30, 6 February 2022 (UTC)
Tercer Milenio (TransMilenio) conversion question
How should Tercer Milenio (TransMilenio) be converted? I haven't seen a usage with 2 lines on the same row. Gonnym (talk) 07:54, 2 March 2022 (UTC)
- If the map is accurate that's the station where the A and H terminate (one in one direction, one the other), so it should just be two rows. Mackensen (talk) 11:37, 2 March 2022 (UTC)
Seoul Line 1
May I highlight that Seodongtan is problematic in the tables (eg Seryu station table services should be showing Seodongtan ?) Bouzinac (talk) 15:54, 30 March 2022 (UTC)
- The existing interpretation is that Seodongtan is on a branch; see Byeongjeom station. Is this inaccurate as of 2022? Mackensen (talk) 18:04, 30 March 2022 (UTC)
- If you go there http://www.seoulmetro.co.kr/en/cyberStation.do and click on Seodongtan, check for Information and then see the timetable, you can see train going to Seoul Station,Cheongnyangni,Dongmyo,Kwangwoon Univ.,Guro on weekdays. If you click on Seryu, trains are possible for Seodongtan. Bouzinac (talk) 20:47, 30 March 2022 (UTC)
New York
Is there a reason there is no template functionning for New York subway stations? (very complicated...) Bouzinac (talk) 15:26, 31 March 2022 (UTC)
- @Bouzinac: Yes, NYC has had a separate template set up since 2006 due to this complexity. I am still in the process of actively creating one at Module:Adjacent stations/New York City Subway. Cards84664 19:45, 31 March 2022 (UTC)
OK. I'm trying to build up on frwiki but it's very lengthy. See for instance https://m.wikidata.org/wiki/Talk:Q11265 (which still needs improvement)... Bouzinac (talk) 19:50, 31 March 2022 (UTC)
I hope I didn't make any mistakes there in the final end result fr:Times Square – 42nd Street (métro de New York) Bouzinac (talk) 20:49, 1 April 2022 (UTC)
Delhi Metro Grey Line
This template is not working for Grey Line of Delhi Metro. The color should be "838996". The template works for other lines of Delhi metro though. Could someone fix this? Dhruv edits (talk) 15:55, 8 April 2022 (UTC)
- I don't see any problems with that page, but I did find and fix a typo in Module:Adjacent stations/Delhi Metro. If the page is still broken, please be more specific about the problem. – Jonesey95 (talk) 16:08, 8 April 2022 (UTC)
- @Jonesey95 The template is now working for Grey Line. Thanks. Dhruv edits (talk) 16:57, 8 April 2022 (UTC)
Preventing clear before template in article body
I am trying to convert Catania Centrale railway station to use {{Adjacent stations}}, but I have been unable to find documentation describing how to prevent the template from effectively inserting {{clear}} before the box. {{S-start}} uses |noclear=y
to achieve this effect. What am I missing? – Jonesey95 (talk) 20:25, 26 April 2022 (UTC)
- Also, it appears that Module:Adjacent stations/Catania Metro needs a specification for a branch line that goes to the Porto metro station, but that is currently beyond my abilities. – Jonesey95 (talk) 20:28, 26 April 2022 (UTC)
- Jonesey95, I have added a
|noclear=y
option (anyone else should feel free to clean up implementation). there are two ways to handle branches, one is to add a "types" section to the line and use "type" to select the type (see, for example, Nightjet in Module:Adjacent_stations/ÖBB). the other method for cases where there aren't that many uses is to just say|to-left1=
or|to-right1=
to override the termini. Frietjes (talk) 15:07, 29 April 2022 (UTC)- @Frietjes: I tweaked Module:Adjacent stations to fix an error in many articles but now I'm wondering if args[1] was really intended. Perhaps it's args.noclear? Please check. Johnuniq (talk) 02:24, 30 April 2022 (UTC)
- Johnuniq, thanks for fixing the script errors, I didn't think about someone skipping 1 and going straight to 2. you are correct, that it should have been _args.noclear instead (just using the unprocessed args seems to work fine). thank you again. Frietjes (talk) 15:18, 30 April 2022 (UTC)
- @Frietjes: I tweaked Module:Adjacent stations to fix an error in many articles but now I'm wondering if args[1] was really intended. Perhaps it's args.noclear? Please check. Johnuniq (talk) 02:24, 30 April 2022 (UTC)
- Jonesey95, I have added a
Color error after page move
What should be done to fix Terminal Link which was recently moved from Link Train? The problem is that {{rcr|Terminal Link}}
gives 'template "Terminal Link color" does not exist' after a recent edit. Johnuniq (talk) 23:40, 28 April 2022 (UTC)
- I have worked around the problem for now by restoring the name that works. The root problem is that all pages that use Module:Adjacent stations/Link Train directly need to be changed so that they use the new name, and just before that, Module:Adjacent stations/Link Train needs to be moved to Module:Adjacent stations/Terminal Link and edited slightly. Someone with AWB and quick fingers could probably make it work without too many Lua errors appearing. Since (to my knowledge) redirects don't work in Module space, is there an elegant way to do this move? – Jonesey95 (talk) 23:55, 28 April 2022 (UTC)
- Ah, you have reminded me that I did that once before after being told what was needed. See Module:Adjacent stations/Kaohsiung Rapid Transit which shows how to do the equivalent of a redirect. Do you want to do it? Johnuniq (talk) 06:08, 29 April 2022 (UTC)
Generic line
I noticed that you cannot set the to-left and to-right if the line is blank, although everything else works
Preceding station | PKP Intercity | Following station | ||
---|---|---|---|---|
Szczecin Dabie towards
|
PKP via Poznan and Warsaw
|
Szczecin Dabie towards
| ||
PKP via Poznan, Katowice and Krakow
|
so instead, I have to use a "dummy" line name Lua error in Module:Adjacent_stations at line 237: Unknown line "PKP". can we make to-left and to-right work in both cases? thank you. Frietjes (talk) 15:24, 30 April 2022 (UTC)
- What's the use case for not having a line? Mackensen (talk) 17:27, 30 April 2022 (UTC)
- @Mackensen: Currently that case is London King's Cross railway station for example. Could go either way with this, adding a param or adding terminals to Module:Adjacent stations/Great British Railways, etc. Cards84664 21:05, 5 May 2022 (UTC)
- I think a none value should be used for this purpose (note this is all lowercase; it's certainly possible that in some non-English-speaking region they have a station called None) Animal lover |666| (talk) 14:21, 7 June 2022 (UTC)
- @Mackensen: The terminus parameters are good when you have a system made of separate, well defined lines - even if these lines share tracks. Even systems like the Long Island Railroad, where you have mix-and-match between western termini and eastern termini (all meeting at a single station, Jamaica station) don't quite work; convertingGreat Britain's National Railway is a disaster. Animal lover |666| (talk) 15:47, 8 June 2022 (UTC)
- @Mackensen and Gonnym:Can someone please implement this? Animal lover |666| 01:13, 13 July 2022 (UTC)
- I'm still not sure I grok the use case; also, have you discussed using this module with the UK railways project? Mackensen (talk) 02:07, 13 July 2022 (UTC)
- I need a bit more details on what this request wants. How are the left and right ends used if there is no specific line table used? Are you requesting we add a none table?
*****: ["lines"] = { *****: ["_none"] = { *****: ["left terminus"] = "", *****: ["right terminus"] = "", *****: }, *****:
- or something else? Also, what should be written in the middle box (the line box) when there is no line title? Should it be empty? Please explain in as much specific as possible. Gonnym (talk) 07:22, 13 July 2022 (UTC)
- If the left terminus and/or the right terminus resolves as the empty string, or is completely absent on all levels, the template should supress the word "to". An empty "line" entry already leaves the middle blank. Animal lover |666| 06:26, 27 July 2022 (UTC)
- @Mackensen and Gonnym:Can someone please implement this? Animal lover |666| 01:13, 13 July 2022 (UTC)
- @Mackensen: The terminus parameters are good when you have a system made of separate, well defined lines - even if these lines share tracks. Even systems like the Long Island Railroad, where you have mix-and-match between western termini and eastern termini (all meeting at a single station, Jamaica station) don't quite work; convertingGreat Britain's National Railway is a disaster. Animal lover |666| (talk) 15:47, 8 June 2022 (UTC)
- I think a none value should be used for this purpose (note this is all lowercase; it's certainly possible that in some non-English-speaking region they have a station called None) Animal lover |666| (talk) 14:21, 7 June 2022 (UTC)
- @Mackensen: Currently that case is London King's Cross railway station for example. Could go either way with this, adding a param or adding terminals to Module:Adjacent stations/Great British Railways, etc. Cards84664 21:05, 5 May 2022 (UTC)
Is there a way to suppress a mid-table "system" parameter display?
Please take a look at the previous revision and the current revision of Coevorden railway station. In the previous (S-line) revision, there is only one "Arriva" system header, but in the new version, which uses two module subpages, there are two system headers. I set up separate subpages for these two Arriva "systems", because the company operates train lines and systems in multiple countries, and I didn't want to have a single "Arriva" subpage that was impossibly crowded.
I think that what I want is a way to suppress a "system" header name, but I am open to other options for preserving the previous display. – Jonesey95 (talk) 15:08, 10 May 2022 (UTC)
- Jonesey95, this would enable
|hide-system3=y
to hide that system header. if there is a better parameter name, we could use that as well, but I wanted to distinguish it from hiding an entire row or header. Frietjes (talk) 20:38, 13 May 2022 (UTC)- I think that would work. I do want the ability to note the system so that the following lines use the correct module subpage, but I do not want the system to display. I tested the sandbox in the article, and it appears to work as desired. – Jonesey95 (talk) 00:58, 14 May 2022 (UTC)
This edit request to Module:Adjacent stations has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Please implement this edit to the module.
- Animal lover |666| 13:59, 10 June 2022 (UTC)
Bug?
this example is from Mantes-la-Jolie station, before I made a suboptimal fix. if I use
{{adjacent stations |system1=Transilien |line1=J|left1=Mantes-Station|right1=Rosny-sur-Seine|to-right1=Vernon–Giverny |line2=J|left2=Mantes-Station |line3=N|left3=Épône-Mézières }}
which has three lines, I get
Preceding station | Transilien | Following station | ||
---|---|---|---|---|
Mantes-Station towards Paris-St.-Lazare
|
Line J | Rosny-sur-Seine towards Vernon–Giverny
| ||
Terminus | ||||
Épône-Mézières towards Paris-Montparnasse
|
Line N |
which is only showing two lines. my guess is that the module is implicitly assuming that the omitted right2
is the value in right1
? for now, I have swapped two of the rows, which is suboptimal. if the keyword terminus
were allowed, I could use that, or is there another method for fixing this? Frietjes (talk) 20:28, 13 May 2022 (UTC)
- interesting, but if I insert a header between the second and third lines, all three rows show
Preceding station | Transilien | Following station | ||
---|---|---|---|---|
Mantes-Station towards Paris-St.-Lazare
|
Line J | Rosny-sur-Seine towards Vernon–Giverny
| ||
Terminus | ||||
Épône-Mézières towards Paris-Montparnasse
|
Line N | Terminus |
Frietjes (talk) 22:29, 13 May 2022 (UTC)
- I'm fairly sure I've encountered this bug before but never reported it. Mackensen (talk) 22:59, 13 May 2022 (UTC)
- Is this really a bug? You have line J in lines 1 and 2, with the same left station. I think the module wants you to label the Mantes Branch, for which the station is a terminus, and the Poissy-Vernon Branch, which continues to a terminus at Vernon–Giverny. – Jonesey95 (talk) 00:56, 14 May 2022 (UTC)
I found a similar example from East Acton tube station where the line 5 won't show, when left4
, left5
; right5
, right6
and consecutive middle cells have the same value.
{{Adjacent stations|system=London Underground |line4=Central|left4=North Acton|right4=Wood Lane|note-mid4=(1946–1947)|to-left4=Ealing Broadway|to-right4=Stratford |line5=Central|left5=North Acton|right5=Wood Lane|note-mid5=(1947–1947)|to-left5=Ealing Broadway|to-right5=Leytonstone |line6=Central|left6=North Acton|right6=Wood Lane|note-mid6=(1947–1947)|to-left6=Ealing Broadway or Greenford|to-right6=Leytonstone}}
Preceding station | London Underground | Following station | ||
---|---|---|---|---|
North Acton towards Ealing Broadway
|
Central line (1946–1947)
|
Wood Lane towards Stratford
| ||
Central line (1947–1947)
|
Wood Lane towards Leytonstone
| |||
North Acton towards Ealing Broadway or Greenford
|
I expected a merged middle-cell of line 5 and 6 but it just disappeared, used temp hack –
in this case.
Preceding station | London Underground | Following station | ||
---|---|---|---|---|
North Acton towards Ealing Broadway
|
Central line (1946–1947)
|
Wood Lane towards Stratford
| ||
Central line (1947–1947)
|
Wood Lane towards Leytonstone
| |||
North Acton towards Ealing Broadway or Greenford
|
Central line (1947–1947)
|
Also from Wood Lane tube station (Central line), a very similar example, feels like one short because of right6
's height.
{{Adjacent stations|system1=London Underground |line5=Central|left5=East Acton|to-left5=Ealing Broadway|right5=Shepherd's Bush|to-right5=Stratford|note-mid5=(1946-1947) |line6=Central|left6=East Acton|to-left6=Ealing Broadway or Greenford|right6=Shepherd's Bush|to-right6=Stratford|note-mid6=(1947-1947) |line7=Central|left7=East Acton|to-left7=Ealing Broadway or Greenford|right7=Shepherd's Bush|to-right7=Leytonstone|note-mid7=(1947-1947)}}
Preceding station | London Underground | Following station | ||
---|---|---|---|---|
East Acton towards Ealing Broadway
|
Central line (1946-1947)
|
Shepherd's Bush towards Stratford
| ||
East Acton towards Ealing Broadway or Greenford
|
Central line (1947-1947)
|
|||
Shepherd's Bush towards Leytonstone
|
Update: If it helps, the middle line from my second example is completely gone when viewed on monitors or in desktop view or mobile web landscape on my mobile.
unlinked station name
Is there a way to get the template to generate a station name that is not wikilinked? —Joeyconnick (talk) 03:07, 18 May 2022 (UTC)
- Not that I know of, but there really should be. It would be especially valuable for BRT routes, where major busway stops are notable but regular street stops are not. Pi.1415926535 (talk) 16:41, 1 June 2022 (UTC)
- Yes, agree... in this case, LRT in Toronto, where the on-surface stops frequently do not have (and should not have) articles. —Joeyconnick (talk) 04:32, 2 June 2022 (UTC)
Code change: allowing template:Rail icon to also show the line name
I've modified the module in the _icon()
function to allow the function to accept a |name=
parameter which when set (with any value) additionally displays the line name and link:
{{Rail icon/sandbox|San Diego Trolley|Green}}
→{{Rail icon/sandbox|San Diego Trolley|Green|name=y}}
→ Green Line
I've additionally renamed two parameters from upper-case to lower-case while changing them a bit so they won't clash with Lua system names. See Module:Adjacent stations/sandbox for changes. Gonnym (talk) 10:14, 9 June 2022 (UTC)
Method to place a header above first system
We need a method to place a header above the first system. For example, if you have a double-station (e.g Bank and Monument stations), you may want a header for the first station above the first system. For non-first entries you can achieve this by using the headern parameter, leaving the rest of line n blank, and continuing with systemn+1; however, system1 can't be omitted. Animal lover |666| 21:29, 9 June 2022 (UTC)
- Animal lover, it's a total hack but
{{adjacent stations|system1=Tbilisi Metro|hide-system1=y|header1=Top header|system2=Tbilisi Metro|line2=1|left2=Ghrmaghele|right2=Gotsiridze}}
works. the better way to fix this would be this change which sets the system to be the next system when there is no prior system, but only if the row is a header. if there are no objections, I can put this feature in the main module. Frietjes (talk) 17:09, 17 June 2022 (UTC)- This hack works because I got the hide-system parameter to be set up, see the edit request higher up on the page. That is a hack, and wasn't yet possible when I started this thread. Animal lover |666| 18:47, 18 June 2022 (UTC)
- Looks like a reasonable change, so I have added this feature to the main module. Let me know if anything breaks, but it appears to be working! Thanks! Plastikspork ―Œ(talk) 22:25, 18 June 2022 (UTC)
- Is there any reasonably easy tool to find all uses of the hide-system1 parameter? Animal lover |666| 23:54, 18 June 2022 (UTC)
- Animal lover, try this search. Thanks! Plastikspork ―Œ(talk) 00:16, 19 June 2022 (UTC)
- Is there any reasonably easy tool to find all uses of the hide-system1 parameter? Animal lover |666| 23:54, 18 June 2022 (UTC)
- Looks like a reasonable change, so I have added this feature to the main module. Let me know if anything breaks, but it appears to be working! Thanks! Plastikspork ―Œ(talk) 22:25, 18 June 2022 (UTC)
- This hack works because I got the hide-system parameter to be set up, see the edit request higher up on the page. That is a hack, and wasn't yet possible when I started this thread. Animal lover |666| 18:47, 18 June 2022 (UTC)
Allowing station type to be provided for infobox station
please see this thread and let me know if you see any problems with this proposal. Frietjes (talk) 16:47, 17 June 2022 (UTC)
Attempting to add the Maine Central Railroad Company service to the infobox of subject article using the following code:
{{Adjacent stations|system1=Boston and Maine Railroad|line1=Main Line|left1=Rigby|system2=Maine Central Railroad Company|line2=Main Line|left2=Cumberland Mills|right2=Deering Junction}}
I encountered an error message:
- "Lua error in package.lua at line 80: module 'Module:Adjacent stations/Maine Central Railroad Company' not found."
Can someone suggest a correction? Thewellman (talk) 02:32, 19 June 2022 (UTC)
- No one has defined Module:Adjacent stations/Maine Central Railroad Company (normally company would be omitted, but that's not the issue here). Compare Module:Adjacent stations/Boston and Maine Railroad. Mackensen (talk) 03:08, 19 June 2022 (UTC)
- Thank you. I notice in the Module:Adjacent stations list of defined systems, the Maine Central reporting mark MEC is already in use for Metrorail Eastern Cape. Will that be a problem? Thewellman (talk) 03:36, 19 June 2022 (UTC)
- Which is why abbreviations are bad with module names. Gonnym (talk) 09:13, 19 June 2022 (UTC)
That should be renamed, but if you use the full name, there will be no problem.Never mind, Module:Adjacent stations/Metrorail Eastern Cape is at the full name already. Mackensen (talk) 12:55, 19 June 2022 (UTC)
- Thank you. I notice in the Module:Adjacent stations list of defined systems, the Maine Central reporting mark MEC is already in use for Metrorail Eastern Cape. Will that be a problem? Thewellman (talk) 03:36, 19 June 2022 (UTC)
Duplication between Module:Adjacent stations/ConnDOT and Module:Adjacent stations/CTrail
@Mackensen and @2018rebel, could you explain to me what the difference between the Hartford and Shore Line East lines at Module:Adjacent stations/ConnDOT and Module:Adjacent stations/CTrail are and when one module should be user over the other? Gonnym (talk) 12:32, 23 June 2022 (UTC)
- They both refer to the CT Rail Hartford Line and Shore Line East, but Module:Adjacent stations/ConnDOT also includes the CT Fastrak bus rapid transit system and doesn't indicate that the two rail lines are part of the CT Rail network, while Module:Adjacent stations/CTrail does not include CT Fastrak, but includes that the lines are branded as CT Rail. Module:Adjacent stations/CTrail should always be used when a CT Rail service needs to be displayed. When CT Fastrak service is present, use Module:Adjacent stations/ConnDOT exclusively for CT Fastrak, while continuing to use the CT Rail module when CT Rail service is present. For example, this was done on the Hartford Union Station article, since the two systems are never branded together by CTDOT. 2018rebel 14:37, 23 June 2022 (UTC)
- That being the case, the rail services should be removed from the ConnDOT template. They should never been defined in two places. Mackensen (talk) 17:24, 23 June 2022 (UTC)
- Yeah, I would agree with that. The ConnDOT template could become a CT Transit or CT Fastrak template instead. 2018rebel 17:47, 23 June 2022 (UTC)
- I cleaned up some obvious ones via templates but I'm not really familiar with these systems. Would be great if one of you can take a look at the remaining transclusions over at Module:Adjacent stations/ConnDOT and see what can be converted to /CTrail so we can remove the duplication from the module. Gonnym (talk) 20:45, 23 June 2022 (UTC)
- I can look later; I agree that ConnDOT probably becomes CT Transit. The whole situation has evolved over the last few years. Mackensen (talk) 20:58, 23 June 2022 (UTC)
- Okay, I created Module:Adjacent stations/CT Transit and orphaned Module:Adjacent stations/ConnDOT. Mackensen (talk) 01:29, 24 June 2022 (UTC)
- I cleaned up some obvious ones via templates but I'm not really familiar with these systems. Would be great if one of you can take a look at the remaining transclusions over at Module:Adjacent stations/ConnDOT and see what can be converted to /CTrail so we can remove the duplication from the module. Gonnym (talk) 20:45, 23 June 2022 (UTC)
- Yeah, I would agree with that. The ConnDOT template could become a CT Transit or CT Fastrak template instead. 2018rebel 17:47, 23 June 2022 (UTC)
- That being the case, the rail services should be removed from the ConnDOT template. They should never been defined in two places. Mackensen (talk) 17:24, 23 June 2022 (UTC)
Deciphering
If I have | color = {{rcr|CSM|6}}, how do I get its raw value? Bouzinac (talk) 10:52, 28 June 2022 (UTC)
- If you copy that code to your sandbox, then click Preview, then click the drop-down triangle for "Templates used in this preview", you will see that Module:Adjacent stations/Changsha Metro is being transcluded. Click that, then look for the color code in the section for line 6. – Jonesey95 (talk) 15:47, 28 June 2022 (UTC)
- Okay. Does it matter being upper/lowercase? Bouzinac (talk) 11:59, 29 June 2022 (UTC)
- As far as I know, the color codes like "ffe200" or "FFE200" are not case-sensitive. See Help:Using colours for more information. – Jonesey95 (talk) 17:06, 29 June 2022 (UTC)
- Okay. Does it matter being upper/lowercase? Bouzinac (talk) 11:59, 29 June 2022 (UTC)
Rail icon
according to the documentation for template:rail icon, I can use |size=
to set the size in pixels. but, if the corresponding module is using "line icon format" like Module:Adjacent stations/Rhine-Ruhr Stadtbahn added by Gonnym, the size is confused for the link text when I use 10px|U11. any ideas how to fix this? Frietjes (talk) 14:26, 5 July 2022 (UTC)
- I'll take a look at it now. Thanks for the input. Gonnym (talk) 14:27, 5 July 2022 (UTC)
- @Frietjes it seems Template:Rail color box (which the "icon format" values use) does not support sizes. Don't have a fast fix for that so can't help more at the moment. Gonnym (talk) 14:30, 5 July 2022 (UTC)
- maybe switch to use "icon" instead of "line icon format" until this is fixed? Frietjes (talk) 14:33, 5 July 2022 (UTC)
- Do you have an icon to switch to? Gonnym (talk) 14:34, 5 July 2022 (UTC)
like Module:Adjacent stations/KLRT?never mind, that one is broken too. Frietjes (talk) 14:40, 5 July 2022 (UTC)- I thought you meant icon as an image file. That could work and I have no preference. I'm sure I copied the "route" style from an existing usage but I can't remember. Gonnym (talk) 14:53, 5 July 2022 (UTC)
- Do you have an icon to switch to? Gonnym (talk) 14:34, 5 July 2022 (UTC)
- maybe switch to use "icon" instead of "line icon format" until this is fixed? Frietjes (talk) 14:33, 5 July 2022 (UTC)
- @Frietjes it seems Template:Rail color box (which the "icon format" values use) does not support sizes. Don't have a fast fix for that so can't help more at the moment. Gonnym (talk) 14:30, 5 July 2022 (UTC)
Showing the word 'line' in the box
When using the rail color box template, is there any way to include the word 'line' in the box? For example, Tsuen Wan line but with line included, like Tsuen Wan line does here? In contrast to other cities, the actual icon used by the MTR and navigation apps such as Google Maps and Citymapper have the full name written out within the icon including 'line'. Also, the names of lines in same cases overlap with the district or actual stations on the line, so having the word 'line' in the box will be helpful. An alternative for the MTR lines could be to use the official 3-letter abbreviations, for example Tsuen Wan Line, Island Line and Kwun Tong Line would be TWL, ISL and KTL respectively but this would be more confusing for readers. It seems like the template also automatically uses lower case 'line'. I guess the matter of whether this should be capitalised should be discussed in a move review for MTR line articles, but either way I think that the icons from rail color boxes should reflect what is used in the city and include the word 'line'. Here is an image of what I mean: https://commons.wikimedia.org/wiki/File:MTR_Central_Station_signs_ISL,_TWL,_customer_service.jpg Transit106 (talk) 09:21, 7 August 2022 (UTC)
- +1 @Gonnym could help with code. Something like
["rcb format"] = "title"
could use line title for all versions of Rcb. Rn it relies on usingshort name
but its not really short. REEDriler (talk) 15:04, 20 August 2022 (UTC)
This edit request to Module:Adjacent stations has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Description of suggested change:
- An option to use line title for route versions of
{{Rail color box}}
and add a new variant "broute". Tested in sandbox. With growing use of using exactly the display part of line title in Route box, it seems logical to be able to do this via a single option than to type it for every single line which just appends/prepends "Line" to its key. REEDriler (talk) 13:37, 6 December 2022 (UTC) - Done * Pppery * it has begun... 18:35, 11 December 2022 (UTC)
Unused redirects like Template:S-line/Indian Railways left/Ahmedabad–Botad line
The subpages of {{S-line}} contain about 300 Indian Railways redirects of the type {{S-line/Indian Railways left/Ahmedabad–Botad line}}, all of which redirect to {{S-line/Indian Railways left/?}} or {{S-line/Indian Railways right/?}}. The latter templates are used, but the former redirect is not used (except that it is linked from a similarly named and unused redirect) and can presumably be deleted. If the unused ones should be deleted, does anyone know an easy way to identify and delete them? – Jonesey95 (talk) 02:32, 2 September 2022 (UTC)
- It looks like someone has quietly taken care of this one via speedy deletion. Well done. – Jonesey95 (talk) 15:18, 4 September 2022 (UTC)
Edit request 18 September 2022
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change: Portland Streetcar B is now #343291, A is #db0962, and NS is #8dc640.
Diff:
− | + | CHANGED_TEXT |
truflip99 (talk) 17:22, 18 September 2022 (UTC)
- @Truflip99: You can make the change at Module:Adjacent stations/Portland Streetcar. Pi.1415926535 (talk) 19:51, 18 September 2022 (UTC)
- Done – Jonesey95 (talk) 23:26, 18 September 2022 (UTC)
Potential bug in getColor()
In the module document, the p["system color"]
is defined as "Can be called by using only one parameter in {{Rail color}}." But in practice, it would be overridden by p["lines"]["_default"]["color"]
, even if no 2nd argument is specified (e.g. {{rcr|CRT}}
→ A2AAAD instead of 00843D). This means that these two keys now have exactly identical function, and causes problems when "default line color" is set to gray to indicate a not-in-operation or color-TBA line. Maybe this function should always return p["system color"]
instead of p["lines"]["_default"]["color"]
when the line argument is nil or empty, at least when called via {{Rail color}}. David Xuang (talk) 05:43, 24 September 2022 (UTC)
New 'rail color box' type?
Currently {{rail color box|MTR|Kwun Tong|route}} gives Kwun Tong line which is a box of the line color.
Is there a way to add a new variant, perhaps named "broute" which has a black outline on it so that it shows as Kwun Tong Line ? Durian Farmer (talk) 16:26, 30 November 2022 (UTC)
- @Durian Farmer
{{rail color box/sandbox|MTR|kt|broute}}
→ Kwun Tong line REEDriler (talk) 08:46, 3 December 2022 (UTC)
Rail color box
This edit request to Module:Adjacent stations has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change:
Please sync the updated {{Legend/styles.css}}
dimensions. [1]
Edit request 31 December 2022
This edit request to Module:Adjacent stations has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change:
Removed args.bold fix when |bold=no
in rail color box, check type's title should not be empty in Line link, optional disable color box format.
REEDriler (talk) 23:51, 31 December 2022 (UTC)
- I'm fine with the last two changes, but, re removing the bold= parameter, why should it be done? Is there some consensus somewhere agreeing to it? * Pppery * it has begun... 22:23, 1 January 2023 (UTC)
- @Pppery Since bold=no doesn't work in present state, I thought I'd remove it all together because no one asked for it in the first place. Else I'll rework the sandbox? REEDriler (talk) 02:38, 2 January 2023 (UTC)
- @Pppery I tweaked it. Should be fine now. REEDriler (talk) 04:25, 2 January 2023 (UTC)
- @Pppery Since bold=no doesn't work in present state, I thought I'd remove it all together because no one asked for it in the first place. Else I'll rework the sandbox? REEDriler (talk) 02:38, 2 January 2023 (UTC)
- Done * Pppery * it has begun... 04:31, 2 January 2023 (UTC)