Template talk:S-line/Archive 1

Page contents not supported in other languages.
Source: Wikipedia, the free encyclopedia.
Archive 1 Archive 2

DLR

The Doklands Light Railway is not actually part of the London Underground but there are many thins integrated and i suppose, reluctantly, it is for the ease of the traveller.

Documentation?

So how do we use this template? I've tried converting the explicit code in

San Bernardino (Amtrak station) to correctly show the Metrolink successions, but haven't been entirely successful yet. Slambo (Speak)
21:16, 24 January 2007 (UTC)

Regrettably documentation is largely stuck in my head at the moment and on assorted talk pages. I've been working on unified documentation but it isn't finished. In the meantime, I'd be happy to answer questions. Mackensen (talk) 21:22, 24 January 2007 (UTC)

I've taken a further stab at explaining this beast. Mackensen (talk) 03:07, 6 February 2007 (UTC)

Way cool. Thanks for the doc. Slambo (Speak) 11:20, 6 February 2007 (UTC)

I've added documentation for the one-way functionality I added a bit ago, as well as some other optional parameters I found useful when doing the CTA succession boxes. Which, now that my work has calmed down a bit, I really need to get back to converting. -- Loco830/Espio (Rant) 06:43, 8 February 2007 (UTC)

Circle Line

For the London Underground Circle Line you're using toward Inner Circle, which makes no sense. At the signs at stations the destination is shown as "via Liverpool Street" (or whatever well-known station is about a third of the way round in the direction of the train). Could the template (and the stations) be updated to use the same scheme? --88.109.224.119 12:14, 11 February 2007 (UTC)

  • Yes they could, but we'd need to work out a scheme beforehand. Mackensen (talk) 15:12, 11 February 2007 (UTC)

Dividing the circle into 4 sections, something like this should work:

  • Aldgate to Temple - toward Victoria / toward Liverpool Street
  • Embankment to Bayswater - toward Paddington / toward Tower Hill
  • Notting Hill Gate to Baker Street - toward Liverpool Street / toward High Street Kensington
  • Great Portland Street to Aldgate - toward Tower Hill / toward Baker Street

I think the platform indicators actually use more overalapping sections than this, which would be quite complex to emulate. MRSCTalk 20:57, 11 February 2007 (UTC)

Well, let's break down how the Circle Line interacts with the rest of the system. The clock-wise trains are on the right-hand side from High Street Kensington to Aldgate, then left-hand from Tower Hill to Gloucester Road. It might make sense to designate the four "sections" geographically: SW, NW, NE, SE. We could go even further and define NC (North Central) and SC (South Central). Mackensen (talk) 22:19, 11 February 2007 (UTC)

Direction Location Temini
NW High Street Kensington to Edgware Road Victoria / King's Cross St. Pancras
NC Baker Street to King's Cross St. Pancras High Street Kensington / Liverpool Street
NE Farringdon to Aldgate Paddington / Tower Hill
SE Tower Hill to Blackfriars King's Cross St. Pancras / Victoria
SC Temple to Westminster Liverpool Street / High Street Kensington
SW St. James's Park to Gloucester Road Tower Hill / Paddington

Now, both type and type2 should be set to the section of the line that the station is located in. Everything else will show up automatically.Mackensen (talk) 22:34, 11 February 2007 (UTC)

These boundaries can be modified very easily, by the way. Mackensen (talk) 22:38, 11 February 2007 (UTC)

LUL District line termini

The termini need to be updated as they currently point to redirects.

Thanks. MRSCTalk 20:32, 11 February 2007 (UTC)

Also,
Wimbledon tube station is a link from the box used at Earl's Court tube station. This points to a dab page. It is not transparent how to update these. MRSCTalk
18:05, 13 February 2007 (UTC)
This is done at the "stations" template, in this case Template:LUL stations. The following line takes care of the problem:
Wimbledon=[[Wimbledon station|Wimbledon]]
Mackensen (talk) 18:15, 13 February 2007 (UTC)
Much obliged. MRSCTalk 19:07, 13 February 2007 (UTC)

"Free transfer" parameter

I think that a "free transfer" parameter should be added in addition to a "transfer" parameter to distinguish where free transfers exist, as opposed to transfers where one must pay an additional fare. If anyone else agrees, I'll add an {{

Crashintome4196
23:35, 13 May 2007 (UTC)

  • I wonder if such a level of complexity is really necessary...Mackensen (talk) 00:09, 14 May 2007 (UTC)

Towards

Can a parameter be added for users to choose between "towards" and "toward"? It can be linked with system or line. Qaka 15:19, 5 August 2007 (UTC)

  • I'd be hesitant to do so absent a real grammatical problem with one or the other. Mackensen (talk) 15:53, 5 August 2007 (UTC)
It looks perculiar when it appears on an article about a London tube station or an MTR station. Qaka 19:48, 5 August 2007 (UTC)
Well, if it's a difference between American English and British English, it might be possible to re-write this template (and related templates) to reflect that difference. The trick is doing it the right way. Mackensen (talk) 20:02, 5 August 2007 (UTC)

Done. The default is "toward." If you want "towards," create or modify the {{{SYSTEM}}} style template (e.g. Template:Amtrak style) and add this line: lang=GB. Mackensen (talk) 20:36, 5 August 2007 (UTC)

Thanks. Qaka 15:55, 6 August 2007 (UTC)

South Eastern

Right i fancy having a go at implementing some of this across "my patch". I'm confused about what data i have to put in where. I understand the conversion of rail line to s-rail, etc. ie do i put in a list of stations, a list of lines by the TOC, etc? Pickle 20:28, 22 March 2007 (UTC)

  • Well, it depends on several factors. Some TOCs already have their data backend defined; some don't. The first thing you have to establish is the "system name" each TOC will use within the s-rail/s-line system. In the states this is often, but not always, the AAR reporting mark. In the United Kingdom, the full name of the TOC (e.g. c2c, First ScotRail) is used instead. Each TOC then needs its own sub-templates, as defined above:
  1. Line
  2. Station
  3. Color

Now, the question of "line" may vary according to your local rail culture. "Line" in this sense really means service, as services may run over one or more historic "lines" and said "lines" are no longer owned by the original company. With Amtrak, for example, there's a separate definition for each named train. Each line/service will need its own termini definition. A common rule of the road is that west is on the left, east on the right, and everything above all should be consistent. I'd be happy to field questions about individual TOCs, but those are the basics. Best, Mackensen (talk) 21:27, 22 March 2007 (UTC)

Thanks for the reply (I'll get on with this next week hopefully)
I appreciate the distinction between line and services you are making.
So i would need a list of "lines/services", a list of stations and a colour for the TOC. The last two are relatively easy, the first will be challenging as not all have the "mapped out" for want of a better phrase.
A supplementary question would be how do i handle closed/truncated "lines/services" eg Dover Priory railway station, Strood railway station, etc
Pickle 16:40, 23 March 2007 (UTC)
Well, a couple options for disused lines. One, you can just ignore them altogether. S-rail/s-line and rail line can co-exist peaceably within the same table. Another is to simply define them as you would any other system. A third option is to not show disused systems altogether (which is what has happened in the states). Mackensen (talk) 17:24, 23 March 2007 (UTC)
OK I've tested it on a much smaller TOC, the
VSOE, which only has two stations London Victoria station and Folkestone Harbour railway station
. I followed the documentation above (is Amtrack the best example) and looked at C2C as well. If I've done it right I've made the following 5 templates;
  • Template:S-line/VSOE right/VSOE
  • Template:S-line/VSOE left/VSOE
  • Template:VSOE color
  • Template:VSOE lines
  • Template:VSOE stations
it was confusing because the example don't show a simple one line one TOC system and left me confused (as Amtrack and LUL are examples of complexity).
If all thats is right, the bit that has so far confused me is adding more lines/services, i take it i add more lines/services to the "Template:TOC lines" and then create "Template:S-line/TOC right/line" and "Template:S-line/TOC left/line" (as the colour doesn't change).
The "Template:TOC stations" to solve redirect problems eg [[London Victoria railway station]] instead of [[London Victoria station]] wasn't immediately apparent
thanks for your patients! Pickle 14:47, 27 March 2007 (UTC)

Yes, that's the way to do a one-line system. You've also got it right for adding more lines/services. Looks great! Mackensen (talk) 14:52, 27 March 2007 (UTC)

I've made one minor change [1]. It's common practice in the UK articles for intermodal stations to be named X station instead of X railway station. If you generalize the template, you can simply list stations that meet the exception. Mackensen (talk) 14:55, 27 March 2007 (UTC)

ahh thanks, i've done the Gatwick Express as well and that was much quicker now i know what i'm doing! The next step is to try a bigger system. Pickle 16:19, 27 March 2007 (UTC)
having a look at Gatwick Airport railway station, and i had a go at the Virgin routes through the station but it doesn't want to work (properly), a deeper examination showed that the Virgin cross country stuff is very complex!!! What am i doing wrong? Pickle 16:49, 27 March 2007 (UTC)
Virgin Cross-Country was beyond vexing during development. You'll need to examine Template:S-line/Virgin Trains right/VT2 (which holds the definitions for both directions) to see what directions you need. You'll then need to plug those into type and type2. Mackensen (talk) 18:11, 27 March 2007 (UTC)
Thanks, very complex ;) Pickle 18:27, 27 March 2007 (UTC)
I'm currently almost finished with S-line programming for Southeastern. Virgin and Silverlink are finished (by other users). Geoking66talk 16:21, 30 August 2007 (UTC)

Heavens, has the consensus at UK railways changed? Mackensen (talk) 16:53, 30 August 2007 (UTC)

Err no. I'm sitting back waiting for the mushroom could to go up from a certain user.... Personally i like s-rail (see my work in new Zealand) but i don't like it cramped up in the station Infobox. I've warned
Infobox UK station}} to allow s-rail to be show, but without establishing a consensus first. again i fear i vast edit war... Pickle
17:42, 30 August 2007 (UTC)
BTW there has been some great cat sorting (see Category:Silverlink templates) that i've recnetly worked on. Mackensen can you have a look at {{S-line/Silverlink right/London to Northampton}} with {{S-line/Silverlink right/Northampton}} and {{S-line/Silverlink left/London to Northampton}} with {{S-line/Silverlink left/Northampton}}. Pickle 17:46, 30 August 2007 (UTC)
The station option was added for the WMATA and PATH folks, but it's definitely not suitable in all cases. Where at all possible s-line/s-rail should mimic the previous setup; adding information unobtrusively. I'd suggest moving that stuff out into the article to avoid unnecessary aggravation. Note that {{s-rail-start}} takes the noclear=yes parameter which stops the page-clearing line break. Mackensen (talk) 18:12, 30 August 2007 (UTC)

historic lines and closed stations

I've had a play with the defunct

North Weald and Epping). It also does look a bit funny when the heritage rail bit comes in as well (it doesn't look aligned right). No real panic, I'm just playing. Pickle
09:41, 12 September 2007 (UTC)

What are all the options in s-line?

I've been looking at the source code and there seems to be some stuff in there that has not been fully explained in the talk page, and how to use them. New users of this template could potentially miss out some of the functions of this template, and might even suggest new ones.

Examples are "branch" and "transfer". —Preceding unsigned comment added by Sandstorm6299 (talkcontribs) 12:48, 28 October 2007 (UTC)

Linkable branch parameter

I think that the branch parameter underneath the system line should be able to be linked, just like all the parameters in the box. For example, each branch of the

Green Line "C" Branch, etc. I have no idea how to go about this, but hopefully there is a way by changing the protected code somehow. –Dream out loud (talk
) 05:17, 1 November 2007 (UTC)

{{s-rail-start}}
{{s-rail|title=MBTA}}
{{s-line|system=MBTA|line=Green|branch="B" Branch|previous=Copley|next=Boylston|rows2=2}}
{{s-line|system=MBTA|line=Green|branch="D" Branch|previous=Copley|hide2=yes}}
{{s-line|system=MBTA|line=Green|branch="C" Branch|previous=Copley|next=Boylston}}
{{s-line|system=MBTA|line=Green|branch="E" Branch|previous=Copley|next=Boylston}}
{{end}}
  • Basically, {{{branch}}}, {{{system}}}, and {{{line}}} are all passed to a new template: [[Template:{{{SYSTEM}}} lines/branches]] (Template:MBTA lines/branches). If that template doesn't exist, the branch is displayed normally. Otherwise, you've a full range of linking options. This is in the development version of the template; I can merge it into the main template any time. Mackensen (talk) 12:23, 1 November 2007 (UTC)
    • Ok, I definitely like that and it seems easy enough to implement. Do you think you can merge it into the main template? –Dream out loud (talk) 17:13, 1 November 2007 (UTC)
      • Merged. The MBTA pages are probably all updated automagically. Mackensen (talk) 17:57, 1 November 2007 (UTC)

Fair use rationale for Image:Mbta-logo.svg

fair use
.

Please go to

Wikipedia:Fair use rationale guideline
is an easy way to insure that your image is in compliance with Wikipedia policy, but remember that you must complete the template. Do not simply insert a blank template on an image page.

If there is other fair use media, consider checking that you have specified the fair use rationale on the other images used on this page. Note that any fair use images uploaded after 4 May, 2006, and lacking such an explanation will be deleted one week after they have been uploaded, as described on criteria for speedy deletion. If you have any questions please ask them at the Media copyright questions page. Thank you.

BetacommandBot 00:05, 7 November 2007 (UTC)

To-edit or not to edit

How do i make changes to these templates without disaster? Simply south 14:24, 12 November 2007 (UTC)

  • Very carefully ;) (replied on my talk page as well). Mackensen (talk) 14:25, 12 November 2007 (UTC)

Fair use rationale for Image:Mbta-logo.svg

fair use
.

Please go to

Wikipedia:Fair use rationale guideline
is an easy way to insure that your image is in compliance with Wikipedia policy, but remember that you must complete the template. Do not simply insert a blank template on an image page.

If there is other fair use media, consider checking that you have specified the fair use rationale on the other images used on this page. Note that any fair use images uploaded after 4 May, 2006, and lacking such an explanation will be deleted one week after they have been uploaded, as described on criteria for speedy deletion. If you have any questions please ask them at the Media copyright questions page. Thank you.

talk
) 15:55, 19 November 2007 (UTC)

Logos

How do logos such as the tube roundel get put before the name in the s-rail title box? Geoking66talk 02:03, 22 November 2007 (UTC)

new S-rail-next template

i've created a new template s-rail-next that takes in the same parameters as s-rail, but without the "preceding/following station" column title. Main use is for multiple lines in succession box. the london overground title uses this in the following example:

{{s-rail-start}}
{{s-rail|title=LUL}}
{{s-line|system=LUL|line=Bakerloo|previous=Harrow & Wealdstone|next=South Kenton}}
{{s-rail-next|title=LOG}}
{{s-line|system=LOG|line=Watford DC|previous=Harrow & Wealdstone|next=South Kenton}}
{{end box}}

 - oahiyeel talk 07:22, 22 November 2007 (UTC)

rowsline & hideline parameter

Currently there is a s-line-jnct template, which has the effect of spanning lines into 2 rows, example is Westferry DLR station. I feel that it would be better to merge it into this template with the above 2 parameters, and it can be dealt with the same way as the current parameters rows1 & rows2 and hide1 & hide2. Furthermore, merging into this template would give the flexibility of spanning it to more than just 2 rows, as the current template does. Anyone with me on this?  - oahiyeel talk 07:07, 21 November 2007 (UTC)

The current parameters rows1, rows2, hide1 and hide2 seem to work fine. Is there any advantages of using s-line-jnct over the current method? 리지강.wa.au (의논하다|기여) 16:49, 21 November 2007 (UTC)
Not really. I don't quite remember why I created it in the first place. The only difference is that it spans the central cell (with the line information), which can be useful but not essential. S-line-jnct also predates the development of "branching," which helped eliminate the need. I would not be adverse to deprecating its usage. Mackensen (talk) 16:53, 21 November 2007 (UTC)
I feel that the the spanning of the central cell is still useful and would not deprecate the usage of branching. Some rail lines do not have an "official" branch name, for example splitting of the line into the same loop in different direction. This difference in direction thus would be indicated by the "type" parameter. In this case, it would be useful to span the central cell. In the normal cases where the lines have specific branch names, the branch method should still be used.  - oahiyeel talk 18:18, 21 November 2007 (UTC)
Yes, I see what you're getting at now. I'll put the two methods here for clarity.

This uses s-line-jnct:

{{s-info|name=Bukit Panjang}}
{{s-rail-start}}
{{s-rail|title=SLRT}}
{{s-line-jnct|system=SLRT|line=Bukit Panjang|previous=Phoenix|next=Petir|next2=Senja|type2=Fajar|type4=Fajar}}
{{s-line|system=SLRT|line=Bukit Panjang|branch=Ten Mile Junction shuttle|previous=|next=Ten Mile Junction|type2=Ten Mile Junction}}
{{end}}

This uses rows1, rows2, hide1 and hide2:

{{s-info|name=Bukit Panjang}}
{{s-rail-start}}
{{s-rail|title=SLRT}}
{{s-line|system=SLRT|line=Bukit Panjang|previous=Phoenix|next=Senja|rows1=2|rowsmid=2}}
{{s-line|system=SLRT|line=Bukit Panjang|next=Petir|hide1=yes|hidemid=yes}}
{{s-line|system=SLRT|line=Bukit Panjang|branch=Ten Mile Junction shuttle|previous=|next=Ten Mile Junction|type2=Ten Mile Junction}}
{{end}}

s-line-jnct does deserve more mention in the discussion portion. I don't exactly know how to decipher the code, so I can't help there. 리지강.wa.au (의논하다|기여) 19:12, 21 November 2007 (UTC)

Yes that's exactly what i mean. I don't think it's necessary to decipher the s-line-jnct code. Basically, it should take the same method as rows1 etc. where the parameter after the = sign indicates the number of rows to span.  - oahiyeel talk 19:23, 21 November 2007 (UTC)
S-line-jnct does, but it produces odd results sometimes. What might make sense is simply allowing central spanning within s-line. Let me play with that in my userspace. Mackensen (talk) 20:52, 21 November 2007 (UTC)
Any progress? :)  - oahiyeel talk 08:51, 23 November 2007 (UTC)
As a matter of fact, yes ;) I've merged the new code and updated your second example above. S-line-jnct is now redundant and should probably be orphaned. Mackensen (talk) 15:37, 23 November 2007 (UTC)

rows2 doesn't work if previous parameter is absent together with spanning rows1 and rowsmid

Example with previous parameter present:

Preceding station   KCR   Following station
Fung Tei
614PTerminus
Siu Hong
Yuen Long
610

Replacing the preceding station "Fung Tei" with blank produces the following result:

Preceding station   KCR   Following station
Terminus614PTerminus
Siu Hong
Yuen Long
610

It doesn't seem to be affected when middle row or row1 is not spanned:

Preceding station   KCR   Following station
Terminus614PTerminus
614P
Siu Hong
Yuen Long
610
Preceding station   KCR   Following station
Terminus614PTerminus
Terminus
Siu Hong
Yuen Long
610

Coding bug somewhere? :)  - oahiyeel talk 21:20, 23 November 2007 (UTC)

  • I think I saw this before with s-jnct, and tried to reproduce it in standard html, only to have the same problem. That is, if memory serves, this is a standard html rendering issue. Can you create the "correct" table using html or wikitax? Mackensen (talk) 16:30, 24 November 2007 (UTC)
Yes, i understand what u mean now, I think it's a rendering issue. Probably because every row is spanned, rendering the "extra" row in between useless. The only way to make it render with the desired effect is for at least one of the rows to have more than 1 line of text, or creating an "invisible column" that would not be spanned.

Using 2 lines of text (&nbsp;<br>&nbsp; in col2):

Terminus  
 
614P   Terminus
Lam Tei
Tuen Mun Hospital 610

By hiding the border of col 4:

Terminus   614P   Terminus
  Lam Tei
Tuen Mun Hospital 610

 - oahiyeel talk 17:41, 24 November 2007 (UTC)

I just saw this at Help:Table:

Note that using rowspan="2" for cell G combined with rowspan="3" for cell F to get another row below G and F won't work, because all (implicit) cells would be empty. Likewise complete columns are not displayed if all their cells are empty. Borders between non-empty and empty cells might be also not displayed (depending on the browser), use &nbsp; to fill an empty cell with dummy content.

So seems like the "bug" is by design. - oahiyeel talk 17:50, 24 November 2007 (UTC)

state1,state2

what does this 2 parameters do? i've tried experimenting them but could not tell their functions. - oahiyeel talk 09:17, 6 December 2007 (UTC)

  • Nothing by default. They're passed to the station templates, mainly for purposes of disambiguation. However, the system station templates have to be told to look for them, and to do something with them. I implemented this is response to the new developer-imposed limit on {{#ifexist}} calls, because {{GSR stations}} was breaking on some articles. Mackensen (talk) 11:50, 6 December 2007 (UTC)

Fair use rationale for Image:NS logo.jpg

fair use
.

Please go to

Wikipedia:Fair use rationale guideline
is an easy way to insure that your image is in compliance with Wikipedia policy, but remember that you must complete the template. Do not simply insert a blank template on an image page.

If there is other fair use media, consider checking that you have specified the fair use rationale on the other images used on this page. Note that any fair use images lacking such an explanation can be deleted one week after being tagged, as described on criteria for speedy deletion. If you have any questions please ask them at the Media copyright questions page. Thank you.

talk
) 23:57, 2 January 2008 (UTC)

Why full protected

Does anyone know why this template is fully protected?

Talk
02:34, 3 October 2007 (UTC)

  • Yes. It's high use and affects the presentation of thousands of articles across different wikiprojects. Mackensen (talk) 07:35, 3 October 2007 (UTC)
    • Thanks. This probably means that many established users that are vandals are likely to destroy it.
      Talk
      10:33, 3 October 2007 (UTC)

Nice sarcasm... and yet you never got a response.... is there evidence that this template leads to vandalism by established users? ~ PaulC/T+ 09:05, 8 January 2008 (UTC)

  • I didn't think he wanted a response, frankly. Given that it's been fully protected since it became high-use, no, there's no history of vandalism. Mackensen (talk) 12:28, 8 January 2008 (UTC)

Template:LIRR lines/branches

I can't figure out why this non existent template is called when using this template. It shows up on line 80 articles... Is this a bug with the template? Are there other examples of this? Should something be present at this location? ~ PaulC/T+ 09:03, 8 January 2008 (UTC)

  • It's not a bug (not within the template, anyway); it's an unused feature. When ifexist checks for its existence it winds up getting transcluded even though it doesn't exist. Chalk that one up to the oddities of mediawiki I suppose. If it's bothering you, there's a generic placeholder that could go there. Mackensen (talk) 12:30, 8 January 2008 (UTC)

Documentation

{{

editprotect
}} I've created the subpage Template:S-line/doc so that the it can be included on the main page instead of the talk space. Could someone edit the page and put in {{subst:#ifexist:{{subst:#invoke:string|replace|{{subst:FULLPAGENAME}}|/sandbox$|plain=false}}/doc|{{{{subst:void}}documentation}}}}? Thanks :)  - oahiyeel talk 04:02, 11 June 2008 (UTC)

 Done Thanks, PeterSymonds (talk) 06:22, 11 June 2008 (UTC)

Edit request

{{

editprotected
}} This template is currently a member of Category:Rail succession templates, but that category has been redirected to Category:Rail transport succession templates, so the link should be updated. Since the correct category link is transcluded from the /doc page, the old one can simply be deleted. --Russ (talk) 20:10, 9 July 2008 (UTC)  Done--Mackensen (talk) 22:34, 9 July 2008 (UTC)

S-rail with Heritage and Historical lines

I have recently seen templates converted to S-rail but associated Heritage and / or Historical boxes left as they are (see Grosmont railway station) - the result is to convert a single tidy composite box into a pair of ugly mismatched boxes (because the two template types do not join up or assume common widths).

From what I have read about S-rail, I imagine it should be able to handle all three types (UK national, heritage and historical (closed) lines), although I do not understand it well enough myself to try it.

May I ask that those who are changing existing templates to S-rail should do a complete job when they encounter junctions with historical or heritage lines, so as not to leave a visual mess in their wake.

XTOV (talk) 21:49, 25 August 2008 (UTC)

lines with no terminuses

For MTR Light Rail lines 705 and 706 (Tin Shui Wai Circular), there are no terminuses for both lines. The trains keep running in Tin Shui Wai in clockwise or anti-clockwise direction. And the trains only show the words "705 Tin Shui Wai Circular" or "706 Tin Shui Wai Circular" instead of any destinations. (Please refer to this photo.)

At this moment, this template shows "towards Tin Shui Wai Circular (counter-clockwise)" or "towards Tin Shui Wai Circular (clockwise)" for the above situation. But I think they are not the appropriate descriptions. So I would like to ask how to hide the word "towards".

Hokachung (talk) 05:38, 2 October 2009 (UTC)

Trouble with Charlotte CATS s-rail succession

Over the past week or so I moved all s-rail and s-line related templates from LYNX to CATS as the latter is the main provider and operator of LYNX and Charlotte Trolley. I'm having trouble with trying to make the Trolley-related articles which are separate from the LYNX station articles work with the links. I don't know how this works for the Miami-Dade Transit rail station articles for the Metrorail and Metromover stations, so any help would be appreciated. GETONERD84 (talk) 01:20, 19 February 2010 (UTC)

Working with {{s-line}} can be very confusing, and it took me a while to understand it at first too. I fixed those stations by editing {{CATS stations}}. Take a look at the code to see how its done. I also shortened "Charlotte Area Transit System" to simply "CATS" in the {{s-rail}} boxes. –Dream out loud (talk) 02:15, 20 February 2010 (UTC)

Not reverting to bottom

Is there any way that we can make the box not automatically go down to the bottom of the page? This occurs when an infobox ends up being longer than the text of an article. Geoking66talk 20:52, 23 March 2010 (UTC)

2 colors for one rail line

Is there anyway that this template could be altered to feature two colors for one rail line?

Journal Square–33rd Street (via Hoboken) (PATH service) is colored with a dotted blue/yellow line on maps (link). Right now the color is just yellow, but that corresponds to another PATH service. –Dream out loud (talk
) 16:49, 19 April 2010 (UTC)

/Tranz Metro/Paraparaumu Line

Hello... could someone with editing rights please change Tranz Metro/Paraparaumu Line to Kapiti Line? Since the template is locked I'm unable to. --LJ Holden 21:30, 27 February 2011 (UTC)

Done Sw2nd (talk) 15:23, 1 March 2011 (UTC)

Piped links

How can I put a piped link in the |line= field? I was editing a page that uses

Grand Central Railway. With Template:S-rail-national I couldn't make the link point to the correct page without changing the text of the page. As a temporary solution, I've replaced Template:S-rail-national with Template:Rail line. (With Template:S-rail-national, the renamed |line= field is a link, so the link text is the name of the target article, but with Template:Rail line the eqivalent field has to be explicitly linked, so it can contain a piped link.) Tim Ivorson
2011-05-21 14:35, 21 May 2011 (UTC)

I believe it is controlled by Template:National Rail lines. GFOLEY FOUR— 18:41, 12 June 2011 (UTC)
Thanks for the info. Tim Ivorson 2011-06-12

Deleting unused subpages

I have started a discussion at TfD about what to do with terminal subpages that are unused. Feel free to comment. — Train2104 (talk • contribs • count) 21:29, 9 October 2011 (UTC)

Editprotected circular parameters

Please apply

Belorusskaya (Zamoskvoretskaya Line), the side cells of the brown circle line with the termini of the line defined as "anticlockwise / outer" and "clockwise / inner" in the station template, unlinked. Thx -- Sameboat - 同舟 (talk
) 05:31, 15 December 2011 (UTC)

Has there been any discussion anywhere about these changes? Is this likely to be at all controversial? — Martin (MSGJ · talk) 15:11, 16 December 2011 (UTC)
This talk page is practically dormant. Previously (2009) there was request for the parameter to remove the word "toward" (#lines with no terminuses) but left unanswered at all. I've invited user:Redrose64 and user:Edokter for comment. -- Sameboat - 同舟 (talk) 22:51, 16 December 2011 (UTC)
Personally I dislike the whole {{s-line}} family and avoid their use wherever possible, because of the necessity of setting up dozens of subtemplates whose syntax is impenetrable. Instead, I use the {{rail line}} family, which are much easier to use - the only subtemplates are for colours, and even those are optional - |col=8f691e works just as well as |col={{GWR colour}}.
I suggest asking
WT:RAIL for their opinion. --Redrose64 (talk
) 23:02, 16 December 2011 (UTC)
I try for S-line simply because there was other editor last year used it in the Moscow Metro station articles. (It's likely the editor stopped half-way because he didn't know how to deal with the "toward" for the ring line.) So it would be too cumbersome to change them to other template. But I expect some documentation for {{rail line}} to explain its usage. -- Sameboat - 同舟 (talk) 23:43, 16 December 2011 (UTC)
Have added documentation for {{rail line}}; but the primary documentation for the family was at {{rail start}}. --Redrose64 (talk) 17:15, 17 December 2011 (UTC)
Done Happymelon 12:22, 6 January 2012 (UTC)

Problems with this template

I recently tried to use this in my article

La Floresta (FGC) and it did not work properly. (see here). If someone could tell me whats I'm doing wrong here (if anything), I would appreciate it. Thanks, Liam987
12:40, 20 February 2012 (UTC)

Is the problem that several of the stations are redlinks, or is it something else? --Redrose64 (talk) 12:45, 20 February 2012 (UTC)
Got it. It was the funny-looking links to
Pl. Catalunya. This was due to a subtemplate being misconstructed. Have fixed. --Redrose64 (talk
) 12:59, 20 February 2012 (UTC)
Thanks Liam987 13:06, 20 February 2012 (UTC)

i want to edit this template

Hi, I'd like to make a couple of minor changes to this template. I am completely familiar with coding so that is not a problem at all. Can I have access? Thanks, Azylber (talk) 10:23, 14 May 2012 (UTC)

See Wikipedia:Template sandbox and test cases. The normal practice is for you to make your amendments to Template:S-line/sandbox, test them at Template:S-line/testcases .
Then, if it all works as expected, describe your changes here (purpose, effects, etc.) and then, if others agree with your amendment, put an {{
administrator will make the amendment to the live version. --Redrose64 (talk
) 13:22, 14 May 2012 (UTC)
Hi Rose, thanks a lot for point out the procedure to me, sounds like a very reasonable way to do this. I will now do it and I'll let you know if I have any problems. Thanks! Azylber (talk) 16:46, 14 May 2012 (UTC)

Edit request: categorize in mainspace only

I'm working on reducing the backlog at

WP:USERNOCAT. I've run across User:Raphaelmak/Sandbox, which is categorized in Category:Stations on the Guangshen Railway. I'm guessing that the {{S-line}} template is adding the category, but I'm not sure. Could someone please see if the template could be changed so that it only categorizes in mainspace? Thanks! GoingBatty (talk
) 15:58, 6 January 2013 (UTC)

Not done: It's actually in Template:CR lines which is not protected. --Redrose64 (talk) 17:48, 6 January 2013 (UTC)
Thanks for pointing me in the right direction! GoingBatty (talk) 18:38, 6 January 2013 (UTC)

Can somebody please fix

Daxuecheng Station (Chongqing). The documentation provided is completely unhelpful. Following it to the letter yields a bad result. Frankly, this template really needs to be overhauled to make disambiguation more intuitive, without requiring the disambiguator to parse through multiple levels of subtemplates to make what should be a really easy fix. bd2412 T
04:55, 4 May 2013 (UTC)

Hi, I've taken care of this problem. You were editing the wrong template. This type of problem is fixed by editing the template Template:CRT stations. If you've touched any other templates, please revert your changes. And if you want you can also let me know and I'll help you deal with these or similar problems. But if you modify that template you modified in the way you did it, you'll break something else, so it's very important that other similar changes you've made are also reverted. Let me know if you need any help. Azylber (talk) 17:11, 4 May 2013 (UTC)
And by the way, this template system is used across all groups of articles on rail systems. Disambiguation is really easy because it's always done in the XXX stations template, where XXX is the code of the rail system. It has to be done that way to centralise the disambiguation for all the articles in the group. That XXX stations template is used by many other templates in that same system, and without these scheme it would be necessary to touch many templates just to disambiguate one thing. Hope this helps. Cheers, Azylber (talk) 17:16, 4 May 2013 (UTC)
Is there no way to set it up so that disambiguation can be effected with a simple |dab=(foo) parameter on the template that actually calls the link? bd2412 T 00:38, 5 May 2013 (UTC)
In my opinion, the current template scheme, that we have in thousands of pages about hundreds of rail systems, is the simplest way to do it. You just change the XXX stations template. I know what you're saying that disambiguators don't necessarily know this, but disambiguation is currently not a big issue at all in this wikiproject, I think we've got it pretty tight. Azylber (talk) 03:04, 5 May 2013 (UTC)
I don't think that it's necessary to show the disambiguator. See London Paddington station#Services, where in the "Following station" column of the routebox, there are five links to Edgware Road - but the Bakerloo Line one has a different target from the others. It's all handled through {{LUL stations}} - there is no special coding in {{S-line}}, {{S-line/side cell}}, {{S-line/LUL right/Bakerloo}}, {{S-line/LUL right/Circle}}, {{S-line/LUL right/District}} or {{S-line/LUL right/Hammersmith & City}}. There are, IIRC, three pairs of London Underground stations which have identical names but are on different lines (Edgware Road, Hammersmith and Shepherd's Bush), but only in the case of Edgware Road do both members of a pair have the same adjacent station. --Redrose64 (talk) 10:22, 5 May 2013 (UTC)

font issues

{{s-start}}
{{s-rail|title=Sydney Trains}}
{{s-line|system=Sydney Trains|line=Airport and East Hills|previous=Town Hall|next=Circular Quay}}
{{s-end}}
{{s-start}}
{{s-rail|title=Sydney Trains}}
{{s-line/sandbox|system=Sydney Trains|line=Airport and East Hills|previous=Town Hall|next=Circular Quay}}
{{s-end}}

checking Town Hall railway station, the link text is not white, even though there is a specific font declaration. I was going to address this within the {{Sydney Trains lines}} template, but the link text is used with both coloured and transparent backgrounds, so we cannot simply override the colouring. I thought that the issue can be resolved by changing the <font style="color:#..."> statements to <font color="#..."> statements, but it seems that doesn't work either. any suggestions? Frietjes (talk) 18:27, 11 August 2013 (UTC)

Template:Sydney Trains color defines both color and font color. Can something be done there? This looks like an overuse of color anyway. Most other rail succession templates have simple bands of color and there is no conflict within the text box. Sw2nd (talk) 18:46, 11 August 2013 (UTC)
Normal display is mimiced below. How do they get all that color block and border? Sw2nd (talk) 19:08, 11 August 2013 (UTC)
{{s-start}}
{{s-rail|title=Sydney Trains}}
{{rail line|previous=[[Town Hall railway station|Town Hall]]<br><small>''towards Central''</small>|next=[[Circular Quay railway station|Circular Quay]]<br><small>''towards Macarthur''</small>|route=[[Airport and East Hills railway line|Airport and East Hills Line]] |col={{Sydney Trains color|airport and east hills}} }}
{{s-end}}
Some months ago (see
WP:CONTRAST concerns (compare with old version), including the requirement that "Links should clearly be identifiable as a link to our readers". --Redrose64 (talk
) 19:24, 11 August 2013 (UTC)
Got it! Change the definition in Template:Sydney Trains lines to include the small text. Sw2nd (talk) 15:40, 12 August 2013 (UTC)

Help needed in setting up Eurocity

Tried to set up Eurocity as a system under this template family. It mostly seems to have worked, but the newly created Template:S-line/EC left/ and Template:S-line/EC right/ don't seem to be working correctly, despite being exact copies of Template:S-line/SBB-CFF-FFS left/ and Template:S-line/SBB-CFF-FFS right/. In fact, they come as redlinks, even though you can successfully follow them. You can see the resulting effect in the infobox at Lugano railway station. Can anybody point out what I've done wrong?. -- chris_j_wood (talk) 13:54, 30 October 2013 (UTC)

Well, I don't understand that. After 3 or 4 hours, it seems to have sorted itself out. Some sort of caching issue?. -- chris_j_wood (talk) 15:17, 30 October 2013 (UTC)

Template Typo

Resolved

There appears to be an typo in the template for the preceding station or following station of

talk
) 19:57, 28 January 2014 (UTC)

The {{s-line}} templates are a real pain in the ass to trace through. This edit should fix it; please reply if not. --Redrose64 (talk) 21:54, 28 January 2014 (UTC)
Great! That took care of it! Thanks!
talk
) 22:58, 28 January 2014 (UTC)

spurious newlines

just fixed a bug when hidemid=y and hide2=y which results in spurious blank lines since the inner cells are not rendered. I also updated the testcases to expose such bugs (added some text above and below the succession box make the spurious newlines more obvious). Frietjes (talk) 15:49, 21 May 2014 (UTC)

Template-protected edit request on 24 June 2015

Merge the contents of the /sandbox (inside the <includeonly> tags) into the main template. This, as shown inside the infoboxes on the testcases page, fixes the display problem inside infobox tables where the infobox CSS class overrides the CSS of the <tr> tag—each table cell now has the text-align: center declaration. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 08:22, 24 June 2015 (UTC)

It's not such a big issue with this one, so let's just wait for it to be fixed in the stylesheet.
talk
) 14:07, 24 June 2015 (UTC)
@Alakzi: Is the stylesheet going to be fixed, though? Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 14:40, 26 June 2015 (UTC)
Flip a coin.
talk
) 14:41, 26 June 2015 (UTC)
Done
talk
) 14:43, 26 June 2015 (UTC)

SRT Branch Lines

Hi, still quite unsure about how to add a different terminus station for branch lines for the same main line after reading the main article on s-line. Such example can be seen at

Thung Song Junction Railway Station where the mainline has a terminus as it should be, but the Kantang Branch Line does not (having only an open-ended 'towards'). Any solutions on how it should be fixed in order for the branch line terminus to appear as 'towards Kantang' would be much appreciated. Bahndosi (talk
) 06:28, 4 July 2016 (UTC)

The whole s-line system seriously overuses subtemplates. In this case, it's either {{S-line/SRT right/Southern}} or {{SRT stations}} that needs fixing. --Redrose64 (talk) 09:24, 4 July 2016 (UTC)

Trying to eliminate calls to nonexistent "XXX style" templates

If you look at Special:WantedTemplates, you can see that many of the nonexistent templates listed are "XXX style" templates that are called by rail articles, specifically those that use {{S-line}} and similar templates. I have updated {{S-line}} in an attempt to test for the existence of these "system style" templates before calling them, but I have been unsuccessful so far. As far as I know, I have not broken the template, but if anyone can provide any insight as to why S-line is still calling nonexistent templates, I would be grateful. I'd like to get these style templates off of the WantedTemplates list so that it is easier to see other problems on the list.

An example page that calls a nonexistent style template is

18th & Crystal (Metroway station). – Jonesey95 (talk
) 00:25, 15 October 2016 (UTC)

@Jonesey95: Maybe {{S-line/side cell}}, though I think adding more ifexist functions might make the template less efficient. (At some point it might be better to change S-line to use module subpages like {{Location map}}, so all the info for a system could be stored on one page.) Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
02:55, 15 October 2016 (UTC)
Yes, I think you're right. We need another {{#ifexist:Template:{{{system}}} style| test before the {{#ifeq:{{{{{system}}} style|showterm}}|No ifeq statement. I have played a bit in the sandbox, but I haven't figured out the impressively nested if statements well enough to figure out where to put it and still show the text that we want to show. I have calls to the sandbox code for S-line and S-line/side cell in User:Jonesey95/sandbox3 if anyone wants to experiment with S-line/side cell and see what the results look like.
I feel like I'm always asking Frietjes for help, so don't feel like you have to help here, but I think you might be able to fix this one. – Jonesey95 (talk) 04:58, 15 October 2016 (UTC)
added an extra #ifexist. I tested it in the sandbox first, and the testcases showed no problems, so I updated the main template as well. Frietjes (talk) 19:47, 15 October 2016 (UTC)
{{
#ifexist}} is horribly expensive, and should be used sparingly. --Redrose64 (talk
) 20:10, 15 October 2016 (UTC)
true. we could refactor it to reduce from two to one call by moving it up a few levels in the nested parserfunctions, or rewrite it in lua to have even more control over the number of #ifexist calls. Frietjes (talk) 21:48, 15 October 2016 (UTC)
It looks like that worked. Template:IT-Treno_regionale_style was being called by 236 articles, and after null edits of the articles transcluding it, that number is down to zero. The template is still being linked from a pile of articles, but that doesn't seem to cause any problems. – Jonesey95 (talk) 00:14, 16 October 2016 (UTC)
yes, the #ifexist effectively changes the transclusions to links. there is no easy way, as far as I can tell, to completely eliminate everything in "what links here". Frietjes (talk) 14:21, 16 October 2016 (UTC)

documentation update about when disambiguation for a station name is needed

The documentation here needs to address non-uniform cases! Examples of only "uniform" cases are given, please add a non-uniform example. Or otherwise give a clue about how to handle when a station name is ambiguous, when disambiguation is needed. Searching the documentation for "ambig" gives three items about state1, state2 stuff, but that is no help in my case. Also there are no instances of "pipe" in the document, when I thought pipelinking would be needed.

My problem was that at

Yangmei Station (Taiwan), not to diambiguation page Yangmei Station
.

The code at Puxin Station is:

{{s-rail-start}}
{{s-rail|title=TRA}}
{{s-line|system=TRA|line=Western|previous=Zhongli|next=Yangmei}}
{{end}}
{{TRA Western Line}}

Seeing that code, i came to template:s-line to see what I should change in the template call. I eventually figured out how to fix the problem, but only from reading 2013 discussion raised by BD2412 above, at #Template:S-line/CRT right/1.

The fix was:

  • 0. make NO CHANGE in the s-line template call. So for me, at
    Puxin Station
    article, I needed to restore the "s-line" statement back to how it was originally, before I made reasonable tries like replacing "Yangmei" by "Yangmei (Taiwan)" or by "Yangmei Station (Taiwan)|Yangmei".
  • 1. take a leap and assume that there exists a Template:TRA stations, despite there being no link to any such template at the Puxin Station article(!!!!)
  • 2. despite the template showing nothing understandable, go ahead and edit it. When in edit mode I could see other examples luckily, and following them I figured I should add a line:

| Yangmei=[[Yangmei Station (Taiwan)|Yangmei]]

Some text like here should be added to the documentation I think, perhaps in Q&A form to answer the question "What if a station name is ambiguous? Should pipelinking be used?", being sure to use terms pipelink and disambiguation.

Hope this could possibly help someone else. --doncram 13:11, 7 August 2015 (UTC)

You still did not direct to the correct article in Template:TRA stations. Secondarywaltz (talk) 14:33, 7 August 2015 (UTC)
Yep, it was supposed to be the Taiwan one, i.e.
| Yangmei=[[Yangmei Station (Taiwan)|Yangmei]] . Thanks for catching and fixing that. --doncram 18:06, 7 August 2015 (UTC)

I'm trying to disambiguate an S-line template for Roseville railway station, Sydney which is called from Chatswood railway station. The template points to the disambiguation page Roseville station. Based on what I think I'm reading above, I tried to edit Template:Sydney Trains stations by adding a line "Roseville = [[Roseville railway station, Sydney|Roseville]]" but it seemed to have no effect, so I reverted my edits to the template. Can somebody 'in the know' please look into this and advise on how to disambiguate the link? Thanks in advance! PKT(alk) 23:33, 24 November 2016 (UTC)

I reverted this edit because I could see no problem. What was wrong with it? --Redrose64 (talk) 00:12, 25 November 2016 (UTC)
Wow! - when I tried it and tested the edit, it didn't seem to work..... but it does now. Maybe I should have allowed more time for the template edit to take effect? I dunno, but thank you for checking!! PKT(alk) 01:14, 25 November 2016 (UTC)

Train service type and secondary color parameters

Hi, I added the train service type parameter, {{servicetype|}}, and the secondary color parameter, {{2rycol|}} so that you could disambiguate the train service types other than local/stopping service with an optional horizontal color band. The below succession boxes are examples what I applied to.

The reason for the amendment is the current S-line template is not assumed to multiple train services within a short-hauled line/route. For more than a half century, Japanese commuter railways have adopted color systems for their train service types such as Express or Rapid Express, rather than adopting colors for their rail lines/routes.

Hope you understand my intention and this modification helps the S-line template more universal. Thanks – KU (talk) 10:55, 20 August 2016 (UTC)

{{s-rail-start}}
{{s-rail|title=Kintetsu}}
{{s-line/sandbox|system=Kintetsu|line=Kyoto/Kashihara|service=Local|previous=Unebigoryōmae|next=|type=Nishinokyo—Kashiharajingu-mae|type2=Hirahata—Unebigoryomae|rows2=3}}
{{s-line/sandbox|system=Kintetsu|line=Kyoto/Kashihara|service=Express|previous=Unebigoryōmae|type=Nishinokyo—Kashiharajingu-mae2|type2=Hirahata—Unebigoryomae|hide2=yes}}
{{s-line/sandbox|system=Kintetsu|line=Kyoto/Kashihara|service=Limited Express|previous=Yamato-Yagi|type=Nishinokyo—Kashiharajingu-mae2|type2=Nishinokyo—Yamato-Yagi|hide2=yes}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Local|previous=Kashiharajingū-nishiguchi|next=Okadera|type=Takadashi—Kashiharajingu-mae|type2=Kashiharajingu-nishiguchi—Kashiharajingu-mae|rows1=2|rowsmid=3}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Local|next=|type=Takadashi—Kashiharajingu-mae|type2=|hide1=yes|hidemid=yes}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Local|previous=|next=Okadera|type=Takadashi—Kashiharajingu-mae|type2=Kashiharajingu-mae—Okadera|hidemid=yes}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Semi-express|previous=Kashiharajingū-nishiguchi|next=Okadera|type=Takadashi—Kashiharajingu-mae|type2=Kashiharajingu-mae—Yoshinojingu|rows1=3|rowsmid=2}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Semi-express|next=|type=Takadashi—Kashiharajingu-mae|type2=|hide1=yes|hidemid=yes}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Suburban Express|next=|type=Osaka-Abenobashi—Takadashi|type2=|hide1=yes}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Express|previous=Takadashi|next=Okadera|type=Furuichi—Yoshino|type2=Kashiharajingu-mae—Yoshinojingu|rows1=4|rowsmid=2}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Express|next=|type=Furuichi—Yoshino|type2=|hide1=yes|hidemid=yes}}
{{s-line/sandbox|system=Kintetsu|line=Minami-Osaka/Yoshino|service=Limited Express|next=Asuka|type=Furuichi—Yoshino|type2=Osaka-Abenobashi—Yoshinojingu|hide1=yes|rows2=2}}
{{s-line/sandbox|system=Kintetsu|line=Sakura Liner|service=Limited Express|type=Furuichi—Yoshino|type2=Osaka-Abenobashi—Yoshinojingu|hide1=yes|hide2=yes}}
{{end}}
The point about the {{s-line}} group is that you don't use parameters to specify colours, it's all pulled from the system-specific subtemplates. So I think that this is the wrong approach. Regarding how it should be done, I already did this three years ago for National Rail:
Preceding station National Rail National Rail Following station
TerminusAbellio ScotRail
see this edit and this one. --Redrose64 (talk) 11:49, 20 August 2016 (UTC)
I recognize your smart applications to the NR a few year ago, actually, I tried to refer to those. But your line color (lightcol) stripe practice with <div>~</div> look neat and nice, but not at all when heights of succession boxes is more than two sentense lines. As you may know, lengths of station and line names are relatively long unlike the NR. Besides, the method changing around {{{branch}}} on S-line subpage template for each railway system does not seem practical since there are over 180 rail transit operators even in Japan. That's another reason why I decided to modify the S-line template itself. Hope you undertand the situation. As of parameters to specify colors, it seems to be improved, thanks to Jc86035. Anyway, thanks for your pointing out. KU (talk) 01:27, 21 August 2016 (UTC)
@KU: (edit conflict) Looks nice; could be useful for other complicated systems like the NYC subway. I've modified the template sandbox (and {{Kintetsu color}}) so that |servicetype= is now |service=, and the colour can now be called from Template:[system] color instead of having to be manually entered (this replaces |2rycol=). Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 11:32, 20 August 2016 (UTC)
Thanks for improving the sandbox template and its subpage template. I appreciate it. KU (talk) 01:27, 21 August 2016 (UTC)

Would someone, with an administrator status who agree with this amendment, copy the S-line/sandbox, except for the sandbox notice at the bottom, into the live S-line template? Thanks in advance. KU (talk) 07:24, 28 August 2016 (UTC)

@
Edit protected}} if you want this added; also, the documentation should be updated to reflect the changes. Jc86035 (talk) Use {{re
|Jc86035}}
to reply to me
14:21, 25 September 2016 (UTC)
@Jc86035: Would you submit the current S-line/sandbox content to the live S-line template if you agree the amendment since I had been not granted as neither a template editor nor an administrator. Thanks KU (talk) 22:51, 26 September 2016 (UTC)
@KU: Sorry, I can't do that either. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
04:30, 27 September 2016 (UTC)

@Redrose64 and KU: Would there be any potential problems with conflicts if the proposed service colours were called with {{{service}}} instead of {{{line}}}~~{{{service}}}? Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
11:42, 10 January 2017 (UTC)

Wangjiawan Station is now a disambiguation page. Please make whatever adjustments are needed to the following articles to allow the links to point to the correct station:

  • Zongguan Station
  • Yulong Road Station
  • Shilipu Station (Wuhan)
  • Line 3, Wuhan Metro
  • Jiangwangmiao Station

Cheers! bd2412 T 04:17, 10 March 2017 (UTC)

@BD2412:  Done by editing Template:WHM stations. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
04:46, 10 March 2017 (UTC)
  • Thanks. I made the same edit (with the other disambiguator) on Template:NJM stations to fix the last link. Cheers! bd2412 T 05:02, 10 March 2017 (UTC)

Color

I don't get it about colors you did not give the instruction of creating color but first how to create color for example red blue green Armanjarrettp (talk) 13:32, 28 August 2017 (UTC)

@Armanjarrettp: Do you not understand how web colors are encoded, or do you not know how to create a Template:«system» color template? Jc86035 (talk) 15:29, 28 August 2017 (UTC)

Infobox station Services

There was a problem! on this template | services= there was a name "Santa Fe Southern Railway to Santa Fe" on service infobox how to fix this?

Here this sample check the service

Lamy
Services
{{s-rail|title=Amtrak}} {{s-line|system=Amtrak|line=Southwest Chief|previous=Albuquerque|next=Las Vegas}} {{s-note|text=Former services}} {{s-rail-next|title=ATSF}} {{s-line|system=ATSF|line=main|previous=Twitchell|next=Glorieta}} {{s-line|system=ATSF|line=main|previous=Albuquerque|next=Las Vegas|notemid='''Major stations'''}} {{s-line|system=ATSF|line=Santa Fe Branch|previous=Santa Fe}} [[Santa Fe Southern Railway]] to [[Santa Fe Depot (Rail Runner station)|Santa Fe]] {{s-rail-next|title=SFSR}} {{s-line|system=SFSR|line=Santa Fe Southern Line|previous=Santa Fe|notemid=''Closed in 2014''}}
@Armanjarrettp: What are you trying to do? I cannot understand what you're saying. (Please sign with four tildes ~~~~.)
[[Santa Fe Southern Railway]] to [[Santa Fe Depot (Rail Runner station)|Santa Fe]] is in the code of the template. Did you add it? Are you trying to use {{S-line}} with it? Do you want to remove it? Jc86035 (talk) 16:11, 2 September 2017 (UTC)

Template issue

What happend this template?

first i created this <code>Los Angeles</noinclude>[[Category:Atchison, Topeka and Santa Fe Railway templates]]</noinclude></code> lated on i have many times to edit this but is not work to toward right. Whats happend it is blocked?

{{s-start}}
{{s-line|system=ATSF|line=Golden Gate|previous=Holt|next=Burnham}}
{{s-end}}

— Preceding unsigned comment added by Armanjarrettp (talkcontribs) 22:59, 3 September 2017 (UTC)

@Armanjarrettp: You used two closing tags </noinclude> where you should have used one opening tag <noinclude> and one closing tag </noinclude>. --Redrose64 🌹 (talk) 06:42, 4 September 2017 (UTC)

Unable to use subtemplate

This edit broke the S-line template. How can that be remedied? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 21:57, 19 October 2017 (UTC)

@Pigsonthewing: The |system= parameter doesn't expect the value to contain markup of any kind, not even links. This is because it's used to build a template or subtemplate name, and page names cannot contain markup. So, in the previous version, the parameter |system=Avant caused the invocation of these subtemplates: {{Avant color}}; {{Avant lines}}; {{Avant stations}}; {{S-line/Avant left/}}; and {{S-line/Avant right/}}. --Redrose64 🌹 (talk) 22:18, 19 October 2017 (UTC)

Sydney styling

See

WT:TRAINS#Sydney styling in Template:S-line. Jc86035 (talk
) 10:48, 23 October 2017 (UTC)

I removed the custom NSW styling yesterday. Jc86035 (talk) 13:23, 4 November 2017 (UTC)

Suggestion

Hello, I suggest that two new columns shall be added to the template : Origin and Destination. It will give more information, as in the French Wikitemplate https://fr.wikipedia.org/wiki/Mod%C3%A8le:Desserte_gare.

It will clarify the article containing the template, giving the sections of the line served by the line and company.

--Railfan01 (talk) 09:48, 5 November 2017 (UTC)

@Railfan01: This is already what the small text saying "toward[s] Terminus" does, so I don't think adding the columns is necessary or imparts additional information. Using the French Wikipedia layout would also make the table unnecessarily wide, especially where the template is used in infoboxes. Jc86035 (talk) 13:25, 5 November 2017 (UTC)
The {{
WP:SBS). Adding more columns would not fit in with that scheme. --Redrose64 🌹 (talk
) 15:29, 5 November 2017 (UTC)

Help please

There are a number of pages that include a template invocation that reads something like this: {{s-rail|title=MOSMETRO}}{{s-line|system=MOSMETRO|line=Filyovskaya|previous=ArbatskayaFL|type=Both}}{{s-line|system=MOSMETRO|line=Arbatsko-Pokrovskaya|transfer=ArbatskayaAPL|previous=SmolenskayaAPL|next=Ploshchad Revolyutsii}}{{s-line|system=MOSMETRO|line=Sokolnicheskaya|transfer=Biblioteka Imeni Lenina|previous=Kropotkinskaya|next=Okhotny Ryad}}

The issue is with the last {{

Bulvar Rokossovskogo (Sokolnicheskaya Line). However, I can't figure out which of the many intertwined templates needs to be edited to include the parenthetical in the link without messing up the text displayed in the route box. Can anyone please help? --R'n'B (call me
Russ) 18:33, 13 November 2017 (UTC)

R'n'B, should be mostly fixed with this edit. the default is still to fall back to the dab page, but that shouldn't happen if a valid line name is given. Frietjes (talk) 19:35, 13 November 2017 (UTC)
  • @Frietjes: Here's a similar issue: {{s-line|system=IT-Treno regionale|type=Malpensa Aeroporto|type2=Milano Centrale|previous=Milano Porta Garibaldi|next=}} produces the text shown below, linking to the disambiguation page Malpensa Aeroporto railway station.
Treno regionaleTerminus
  • The terminal stop on this line actually is Malpensa Aeroporto Terminal 2 railway station. --R'n'B (call me Russ) 14:43, 22 November 2017 (UTC)
    • @Frietjes: The editing required to make a fix is unduly complex, which is problematic for even for advanced editors. Please incorporate an easier disambiguation parameter wherever an ambigous link is possible. bd2412 T 15:06, 22 November 2017 (UTC)
      • @
        Milan Central railway station. if you check that article, you will find
        {{s-line|system=IT-Treno regionale|type=Malpensa Aeroporto|type2=Milano Centrale|previous=Milano Porta Garibaldi|next=}}{{s-line|system=IT-Treno regionale|type=Malpensa Aeroporto|type2=Milano Centrale|previous=Milano Porta Garibaldi|next=}}
        which makes no sense. why would you have the same line twice. but, if you look directly below there, you will see a map for Malpensa Express, so I am assuming that one of these two s-lines are for that line? if so, which line is the other one? in any event if you change |type=Malpensa Aeroporto in that article to |type=Malpensa Aeroporto Terminal 2, the problem goes away. and, unless someone can tell me why there is are duplicate lines there, I would merge them into one. the next clue would be that the following station, Milano Porta Garibaldi railway station, only lists one "Treno regionale" line. Frietjes (talk
        ) 17:39, 22 November 2017 (UTC)

@Frietjes: Would it be worthwhile to convert this template to Lua/Wikidata? Confusion with the succession templates system seems to be a common theme. Jc86035 (talk) 15:57, 24 November 2017 (UTC)

Jc86035, hard to say. there are so many subtemplates that migrating them all would be a very big undertaking. I'm not sure how the submodules would be grouped, or what would be involved to clean it all up. Frietjes (talk) 15:30, 25 November 2017 (UTC)
@Frietjes: I suppose almost all of the subtemplates should be machine-readable, since they should mostly be either hex codes or switch parser functions. Some of them have already been converted to Lua (e.g. Module:MTR/data, Module:Rail transport colors) but not sure if those are necessarily the correct approach. Jc86035 (talk) 11:28, 26 November 2017 (UTC)

@Frietjes: I concur with BD2412's suggestion above. It is not possible for editors who are not intimately familiar with this family of templates and subtemplates to correct errors. The latest I have come across is a series of articles that contain {{s-line|system=Transperth|line=Armadale|previous=Foo|next=Bar}} which generates an erroneous link to Armadale railway station, instead of the correct link to Armadale railway station, Perth. In addition, there are a whole group of Moscow Metro templates that are now displaying incorrect links, which you can find listed at https://tools.wmflabs.org/dplbot/templates_with_dab_links.php --R'n'B (call me Russ) 15:57, 11 December 2017 (UTC)

The Moscow Metro templates were actually fixable by fixing the links in the template itself. It would be nice if all the rail templates worked this way. bd2412 T 16:01, 11 December 2017 (UTC)
the problem is that the link to the dab page is frequently generated by the "toward" link, which is generated automatically by the "left", "right", and "stations" line templates. the entire point of this system is that you correct it on one place, rather than correcting it in a dozen different articles. almost always the fix is to edit the "stations" template, like I did here to explicitly specify the link used for the station, rather than relying on the standard pattern. to me, it's easier to fix in one place, rather than 15, but I agree there is no documentation on how to do this. the alternative would be to use {{rail line}} where nothing is automatic, but the drawback there is that the style may be inconsistent for different stations on the same line (you have to specify the color, left, right, etc in every article). Frietjes (talk) 16:12, 11 December 2017 (UTC)

Change in Terminus

Hello. I'm looking for assistance for changing one of the branch terminus of the Northeast Regional using {{s-line}} template. The routing changed from Lynchburg to Roanoke in the past month. However, I cannot find a way to change the terminus from Lynchburg to Roanoke using {{s-line}}. Do I need to change the {{s-line|type2=}} or is it something more complicated? Thanks. FunksBrother (talk) 17:46, 11 December 2017 (UTC)

FunksBrother, that is encoded in Template:S-line/Amtrak left/Northeast Regional and toggles based on the value in |type= so if you put |type=Roanoke it _should_ use Roanoke as the terminus. if there is a particular article you are having trouble with, let me know. Frietjes (talk) 17:55, 11 December 2017 (UTC)
Ah. Thank you so much. I clicked on the article for the Template to change the terminus from Lynchburg to Roanoke. Hopefully the change will start showing up soon. FunksBrother (talk) 18:01, 11 December 2017 (UTC)
yes, there are about 55 articles using Template:S-line/Amtrak left/Northeast Regional, so it may be useful to review all of them after the change. Frietjes (talk) 18:52, 11 December 2017 (UTC)

Lua version

Hi. I have been working on a Lua version of this template, which would theoretically load faster and eliminate the need to have a bunch of succession templates. It also allows for more customization. As an example, I've created Module:L-rail/Taiwan HSR used here. What do you think?

I'm hoping each system can have its own module to suit its need. This particular example module can be stacked like s-line, as shown in my sandbox. Szqecs (talk) 09:25, 17 January 2018 (UTC)

@Szqecs: I don't think this would be the best approach, though it's a good start. I don't think each system needs its own complete module, since every system is going to need to generate a table and have preset translations; the current system of having one template and a lot of data pages – which works almost all of the time, though local/express designations would need to be added somehow to replace the Japanese templates – could be changed to be a system with one module and one data page for each system (somewhat like Module:HK-MTR stations/data, though I would return everything as return p with p being everything in a table).
With a Lua approach I would probably have one container template with numbered parameters like those in Module:Infobox (|system1=, |line2=, |prev2=, |next2=…), which would allow cells to be merged automatically (either by auto-filling empty parameters, or by merging identical cells). If Wikidata isn't banished by RfC it could also be possible to auto-fill all prev and next parameters, or even auto-fill the entire table. The data pages could also be reused in a {{Rail-interchange}} module (which should have been made ages ago).
There's already Module:Rail transport colors, but I think keeping separate data pages for each system would be better since it would prevent all the data from having to be template-protected. Module:MTR would need to be converted to this format. I'm not sure what happens to the templates if the Lua conversion is done, but some of them would probably remain as frontends like the current {{HK-MTR stations}}. Jc86035 (talk) 10:22, 17 January 2018 (UTC)
Not necessarily 'every' system needs its own module. I'm thinking there be a manual version where you fill out everything. Maybe a 'standard' version that works more or less the same as S-line. However, the discussion you mentioned is the reason why each system should be 'allowed' to have its own module. Different systems have different characteristics. The example module I created is a rather simple system, so it can contain all the data and not have to reference anything, which is efficient. A more complex system can't do this and needs to be coded differently. Szqecs (talk) 11:03, 17 January 2018 (UTC)
@Szqecs: All transit systems share characteristics like having lines, stations and termini (which is why the current template works in the first place), so the main module would probably be the only one which needs to do formatting. This would make the structure for data pages simpler, since they would just be local p = {lines = {line1 = {data tables}, line2 = {data tables}}, stations = {data}} return p or local p = {lines = {data}, color = {data}, left = {data}, right = {data}, branches = {data},… } return p instead of needing to have their own functions.
There are multiple other systems which use local and express designations, such as the New York City Subway (and a stripe option |lightcol= already exists in {{Rail line}}, though it's for specifying a line colour in addition to an operator colour). If a system needs some other custom thing then it could just be coded into the main template as an option if desired. If it already has some unique characteristic then it probably already uses {{Rail line}} and can keep using it if it's really the only transit system in the world that does something.
I don't think having a "manual" version (does this mean the whole module is self-contained?) would improve performance measurably and it shouldn't really be an issue unless a station has 1,000 or more connecting services. Jc86035 (talk) 11:34, 17 January 2018 (UTC)
Module:MTR (/data) is an example of an S-line-compatible module with multiple lines, though it also contains code for things other than the succession templates. Jc86035 (talk) 11:47, 17 January 2018 (UTC)
Well, consider this. Many metro systems have station codes. Say I'd like the module to be written so that I can just input the codes and have it work. To have this feature, the module will need code to interpret the station codes, which is system-specific. Can this be written on the 'data pages'? I don't think modules can invoke other modules. Does it make sense to have all systems run through code for a feature it doesn't use? Should the main module have every conceivable feature? Not to mention there is the template protection problem. Szqecs (talk) 12:05, 17 January 2018 (UTC)
Also, for the MTR example, there are still separate pages for stations, lines, color etc. My goal is that for simple systems such as THSR, there isn't a bunch of data pages like {{THSR color}} containing next to nothing. Szqecs (talk) 12:25, 17 January 2018 (UTC)
I don't think modules can load other modules that use control structures, like what is achieved by {{THSR stations}}. Szqecs (talk) 13:01, 17 January 2018 (UTC)
@Szqecs: The station codes would probably be handled in an aliases table in the module or a subpage of it (what I meant by "data page": a Lua module containing a table, which is the only object returned, such as Module:ISO 3166/data/AU). Modules can load data from other modules. What do you mean by "control structures"? If you're referring to the use of the {{#switch:}} parser function you could have a default of e.g. '[[%s station|%s]]' and then insert the station name in a function in the main module by using string.format() or mw.ustring.gsub(). This wouldn't really be any more efficient than having a hundred entries of { ABC = 'ABC station', XYZ = 'XYZ station', … }, though it might be easier to maintain. Wikitext templates are different because it's much more efficient to have a one-to-one table in Lua than it is to construct one with {{#switch:}}. You might want to ask on WT:Lua for Lua-related issues if you want to clarify anything. Jc86035 (talk) 13:54, 17 January 2018 (UTC)
I've edited my previous comment because I forgot to include a stations table in the first code example. Jc86035 (talk) 13:54, 17 January 2018 (UTC)

Yes that's what I meant by control structures. What do you do when the station article doesn't fit the default pattern (like how Taipei doesn't fit the default pattern of {{THSR stations}}, which btw is system-specific itself)? Is the main module gonna recognize every station in the world? Szqecs (talk) 14:44, 17 January 2018 (UTC)

@Szqecs: You can import the table out of the data module. You don't need a function for every system. Something like this (obviously with the usual Module:Arguments and a local function reused in each row and stuff like that) would be able to return [[Taipei station|Taipei]] or [[$Name HSR station|$Name]] if there were no entry in the stations table.
-- Main module (proof-of-concept). Module:Arguments and basically everything omitted for clarity, so this will basically only return a station name based on a data page
local p = {}

function p.findStation(frame)

	local args = frame.args
	-- System would be handled differently in a module allowing multiple systems and would be loaded somewhere else before being used by this function
	local data = mw.loadData('Module:S-line/data/'..args.system)
	-- Since there's only one variable here mw.ustring.gsub might be better?
	local link = data.stations[args.station] or string.format(data.stations['#default'], args.station, args.station)
	return link
end

return p
-- Data subpage. No aliases table for now
return {
	lines = {
		['Main line'] = {
			color = '#C35617',
			link = '[[Taiwan High Speed Rail]]',
			left = 'Nangang',
			right = 'Zuoying',
		},
	},
	stations = {
		['#default'] = '[[%s HSR station|%s]]',
		['Taipei'] = '[[Taipei station|Taipei]]',
	},
}
Jc86035 (talk) 15:09, 17 January 2018 (UTC)

Arbitrary break

Okay, I'll look into it to see if it is feasible. Thanks. Szqecs (talk) 15:15, 17 January 2018 (UTC)
Edit: Before proceeding any further, you mentioned that this approach wouldn't be more efficient than having a bunch of entries. So you care about efficiency, which I assume you meant load speeds. If so, wouldn't having separate modules be a lot more efficient? It would only execute necessary instructions, at the cost of taking up more space, which is arguably not a lot. Why does it bother you that there be duplicate code? Also, you said that all transit systems share characteristics like having lines, well in the case of THSR, lines is not one of them. There is no THSR 'Main line' you constructed. So using a general template for THSR, would you need to key in 'Main' as the line? As I said, systems differ, so should the modules. Szqecs (talk) 18:00, 17 January 2018 (UTC)
@Szqecs: What does a transclusion of your (ideal) template look like? The current use in Taichung HSR station is incomprehensible for me and you should retain more features (particularly the named parameters) from the current template to avoid alienating users. Many editors do not like change (especially for change's sake), and if Wikidata is successful it will not be necessary to have most parameters in about five to ten years anyway, so you may as well avoid changing the parameters too much. It is generally a good thing to avoid duplicate code since otherwise every module has to be updated (for consistency) if there's a style change or a new feature that should be added, and most editors cannot write Lua and would probably end up doing it wrong. It's probably best to make the data pages as simple as possible while keeping the complicated stuff alone. Furthermore it would take somewhat more work to convert the existing templates to that system. Why would you want to duplicate code when it's trivial to just use mw.loadData?
What I meant about efficiency was that I assumed you cared about it enough to take it into account, and it doesn't really matter (as much) with Lua modules in any case so I think it's fine to have some increase in load time for ease of use.
If you had a main module, you could set it so that e.g. args.line = args.line or '#default' and then have just an entry for ['#default'] in the data subpage lines table. Jc86035 (talk) 03:50, 18 January 2018 (UTC)
This might work. I've started to try to convert Module:L-rail/Taiwan HSR to a general one at Module:Sandbox/Szqecs/L-rail, with data for THSR at Module:Sandbox/Szqecs/L-rail/Taiwan High Speed Rail data. If you're interested, perhaps you could help me. Szqecs (talk) 17:01, 17 January 2018 (UTC)
@Szqecs: I'm not sure I have time to do it, though you should try to keep all the functionality from the existing template. Using a table to be iterated through (even with station[#stations]) would require all stations for all permutations of a multi-branch route to be entered into separate tables, which would be quite tedious and not user-friendly; and the conversion to the new template would take aeons because station lists would have to be generated manually for every system. (Furthermore, it would be basically impossible to use with Wikidata data.) The current method of specifying just the termini would probably work better and would be less complicated, though editors would have to manually enter previous and next stations. You could modify parameters for local/express services and branches by iterating through a table in a branches = {branch1 = {modified_parameter_to_replace_default = new_value, …}} table, though of course there are other ways. Jc86035 (talk) 03:50, 18 January 2018 (UTC)
  • My ideal transclusion is this. The first parameter does what {{S-rail-start}}, {{S-rail}} and {{S-end}} do: indicates the row type. It's demonstrated here. The second parameter is the ordinal index of the station on the line. As you can see, this module is much easier to use compared to S-line, so I'm not simply changing for the sake of changing. How to transclude and how to edit can be explained in documentation just like S-line. The underlying code is certainly not any less comprehensible than S-line.
  • What is this WikiData you keep mentioning?
  • The consistency argument I don't get. {{Infobox Australian place}} deviates from {{Infobox settlement}}, and it's used anyway. {{Infobox settlement}} doesn't contain the features of {{Infobox Australian place}} because it's just too much.
  • I'm not against having a universal version. But if you don't have the time to make it, why would anyone else? I've created Module:L-rail/Taiwan HSR with minimal effort, and with some tweaking, similar modules could be used for the vast majority of systems. If enough of them are created, naturally there will be a universal version. Why jump the gun? Szqecs (talk) 04:52, 18 January 2018 (UTC)
    @Szqecs: Regarding Wikidata (note capitalisation): see Wikidata, the guidance for its use here is at WP:Wikidata (there is also Help:Wikidata but it's extremely scanty) and the project itself is at wikidata:. --Redrose64 🌹 (talk) 11:38, 18 January 2018 (UTC)
  • Please don't convert any of this to Lua. Often I assist in resolving problems of the type "how do I link to the desired station/line and not to a dab page", and I do this by tracing the existing code through, using the
    WP:SUBST feature and a sandbox if necessary. Doing this usually shows me that a hitherto-missing parameter should have been used. It will not be possible to do this with Lua, since you cannot find out which parameter names are valid. Even if you do know that one is valid, finding out what it does is extremely difficult. --Redrose64 🌹 (talk
    ) 11:02, 18 January 2018 (UTC)
    Are you talking about the talk section below this one? Isn't the solution to go to the stations template and use #switch? How is that not possible with Lua? Lua has way more control structures available (if a then b else c, that sort of thing). Szqecs (talk) 11:50, 18 January 2018 (UTC)
    If I open a normal template for editing, I can find out which parameters are valid by looking for triple opening braces. This is impossible with Lua. --Redrose64 🌹 (talk) 12:50, 18 January 2018 (UTC)
    @Redrose64: What do you mean by 'find out which parameters are valid'? Szqecs (talk) 18:10, 18 January 2018 (UTC)
    Let's say that I find a template without documentation. How do I know what parameters to feed into it? One way is to trace through the template code. In template code, all parameters (without exception) may be identified by three consecutive opening braces; so I look for those. Consider Template:WikiProject English Language, for which I wrote the documentation a few days ago, after I found that it looked like this. In order to write that doc, I needed to know which parameters are recognised, and what their valid values were. So I opened up the template for editing, and found this. Notice that there are six occurrences of triple opening braces. Taking from there to the next pipe (or closing brace) we find: {{{small, {{{category, {{{listas, {{{class, {{{auto and {{{importance. So the valid parameters are |small=, |category=, |listas=, |class=, |auto= and |importance=. Anything else - such as |Foo= - is invalid.
    In general, you cannot do this with Lua modules. Some people, such as RexxS (talk · contribs), are careful to make parameters more easily identifiable, but there is no guaranteed universal method the way that there is for templates. --Redrose64 🌹 (talk) 15:52, 19 January 2018 (UTC)

@Redrose64: Parameters enter Lua modules as frame.args so you can search for that and you'll find the parameters. If you're saying wiki code is easier to understand, please explain to me how the code of S-line works. Szqecs (talk) 17:33, 20 January 2018 (UTC)

  • @Szqecs: For an example of an item which has (complete) adjacent stations data in Wikidata, see Yau Ma Tei station (Q838420). This can be obtained in Scribunto, and the item only needs to be requested once to return a table of all of its data. I believe it is also possible to access data for arbitrary items, which would allow line colours and other information (e.g. "toward" vs. "towards") to be obtained. This is partly why I would favour having one template generate all the code, instead of having one template for each row (also the issues with manually combining cells in the current template). Some of the problems with Wikidata usage currently are that not enough people are able to deal with vandalism in a timely manner, and not enough statements have reliable secondary sources to a degree which would totally satisfy English Wikipedia policies and guidelines (though this could probably be said for many WMF wikis). Some editors have spent many hours fighting about these things. This is why I said it would only happen in five to ten years.
    Why would you not want a universal version? It already exists as {{
    Infobox GB station
    }} will be around until someone makes a module or child infobox for generating station traffic infobox rows (I was probably supposed to do it two years ago so the template could be put up for being merged, but didn't get around to doing it).
    I understand and would encourage the use of numbered parameters (if it doesn't make the template too complicated), but I have no idea why you would want to use numbers in place of the station names. This is bad for usability and makes the template relatively indecipherable because the entered text doesn't correspond in any way to the output text. Having parameters for the previous and next stations to be entered manually is more intuitive, I think, is more consistent with the rest of the S-series of succession templates, and avoids issues of pieces of data only being used once or twice (also grounds for deleting a template, though these ones would probably escape that).
    I don't have time right now to write the module(s). If you want to write one first I can't stop you.
    (By the way, consider looking at other Lua modules to look at WP conventions for writing them, such as the use of Module:Arguments, using the variable name args for the arguments table, and using more self-explanatory variable names instead of abbreviated ones. This makes it easier for editors like Redrose64 to read modules without documentation, though it'd be better to just write the documentation.) Jc86035 (talk) 17:00, 18 January 2018 (UTC)

I'm not yet familiar with Wikidata, so I can't make use of it yet.

there just aren't enough Lua-competent editors

I can tell you this: the time it took me to figure out how S-line and parser functions work was about the same as going from knowing nothing about Lua to creating Module:L-rail/Taiwan HSR. And the code for S-line, I still don't understand. When I first started using S-line, I ran into the disambiguation problem like everyone else. If I weren't interested in templates, I would have just left pages outdated. S-line isn't any more user friendly than a Lua version could be.

Your module/template does less than S-line

It does less than S-line because it needs less. I don't know how else to explain it to you.

Some templates (like the ones you mentioned) are harder to merge than others

Exactly. Same issue here. It is rather difficult to write a module that applies to all systems.

why you would want to use numbers in place of the station names

Because the transclusion can be shorter. That's the point of templates. If you have to input the previous and next stations, you would have 2 times the number of station names, all on the page, whereas if you had just a list, it would only be 1 times, and the list would be behind the scenes. As for ease of use, with S-line you still have to deal with disambiguation and deviations from default pattern, so is it really easier? Szqecs (talk) 17:56, 18 January 2018 (UTC)
@Szqecs: Most heavy editors joined in the 2000s, before Scribunto existed (and before Wikidata existed). Quite a lot of them can't or refuse to learn Lua, and it's a mostly valid usability issue for them if Lua is used in place of wikicode templates without being significantly better than the older, working templates. Furthermore, many Wikipedia editors are not technical people and will not go out of their way to spend time figuring out how complicated stuff works. {{S-line}} is quite difficult to understand (and a lot of the code is hidden away in {{S-line/side cell}}), but the documentation should explain most of the parameters.
If you don't want to replace the entire thing, there's no point in duplicating existing functionality because it's never going to be taken up and will probably be deleted at some point. People will delete your hard work. The {{Routemap}} module had to be worked on for years by multiple editors across Wikipedias before it was able to replace the template-based {{BS-map}} and its almost 100 subtemplates, and a lot of editors hated it (particularly the new syntax, which isn't based on wikicode) and actively removed it even where it surpassed the functionality of the older templates. The only reason they tolerated its existence is because some uses of the old templates refused to load at all and had to be replaced. Jc86035 (talk) 03:46, 19 January 2018 (UTC)

If you don't want to replace the entire thing

Do you mean replacing the code of S-line or creating an alternative version like with {{Routemap}}?

I don't think the former is feasible. {{BS-map}} wasn't just replaced with a Lua version because it's too big of an impact.

  • It's difficult to write a template completely differently and have all existing tranclusions still work.
  • It would limit how the template could be improved.
  • It would alienate editors like you mentioned. Basically, S-line is protected for a reason.

The latter is more do-able. Routemap isn't deleted because there are no grounds to do so. According to Wikipedia:Templates for discussion, only if the template is 'redundant to a better-designed template' should it be deleted. In this case it is BS-map that should be deleted actually. A template that is written completely differently and used differently can hardly be considered 'redundant' IMO. If the use of the new template grows over time, starting with lower-profile systems, there would be more time for editors to adapt. As with BS-map, those who want to keep using S-line still can.

If neither approaches are feasible, we just wasted a lot of time here haven't we? You could have just told me this from the start. Szqecs (talk) 05:31, 19 January 2018 (UTC)

without being significantly better than the older, working templates

What I propose has an improvement and here is a real example.

I'd like stations to display the types of services that call there. With S-line, as far as I know, the type parameter can't achieve this. This can only be done by treating services as lines or branches, which requires more pages to be created, or by using notemid, which you will need to add for every station.

To have this feature I want, I would need to request a change to S-line and someone would have to understand the code to add this feature. For such a niche change, an editor like myself should be able to just add the feature and not have to worry about every transclusion of the template. A template that is easier to modify is 'significantly better'. Szqecs (talk) 07:10, 19 January 2018 (UTC)

@Szqecs: I think it would be possible to replace it gradually if you had something like service types that couldn't be done very nicely in the existing template, but you would have to have the goal of being able to supersede {{S-line}} and it would have to be possible to replace all existing transclusions. {{Rail line}} still exists and it's been eleven years since it could have been replaced entirely, so you don't have to replace it as soon as possible. However, I would avoid having to add new data like station lists because then all of it would be made redundant if Wikidata were to be enabled for the template. Jc86035 (talk) 12:32, 19 January 2018 (UTC)

Arbitrary break 2

@Jc86035: Hey, I realized that writing a universal version is perhaps a lot easier than I thought. I was making a system specific one when I realized that the specific parts can be moved to another module and loaded, including functions to interpret station codes and deal with station link patterns. Check it out:
So far it's good, though I would make the variable names more comprehensible so that it's easier for other users to edit the module in future. What's the variable "interpret" for? You haven't defined it anywhere in the module. Jc86035 (talk) 15:22, 20 January 2018 (UTC)
What I'm planning is this: The first parameter is the system. The module first loads the module for the system; in this case Kaohsiung. There are two right now but I plan to merge them. The system module can have an interpret function that defines what other parameters are for; in this case the 3rd and 4th parameters are the station code. If there is no interpret then it uses a default interpretation, which I'm still designing. I'll probably allow for manually inputting adjacent stations like S-line. I'm also trying to get all lines to be done in a single invoke. Szqecs (talk) 15:56, 20 January 2018 (UTC)
@Jc86035: I need a bit of help. Shown here: User:Szqecs/sandbox/L-rail, The function at Module:Sandbox/Szqecs/L-rail/data refuses to test input string. Szqecs (talk) 10:20, 26 January 2018 (UTC)
Missing .. before ' station|' on line 7, so it looks like calling function x(' station|') rather than a concatenation? Certes (talk) 11:52, 26 January 2018 (UTC)
@Certes: Thanks. Szqecs (talk) 12:22, 26 January 2018 (UTC)

Disambiguation

This template seems to provide no way of disambiguating ambiguous links in the |next= and |previous= fields. See e.g. Mosman Park railway station and North Fremantle railway station, which link to the DAB page Victoria Street railway station. If there is a way to fix problems like this (and there are several), I couldn't find it, and I wasted 20 minutes of my life looking for it. This is a serious nuisance. Narky Blert (talk) 00:06, 18 January 2018 (UTC)

@Narky Blert: As the documentation says, you can fix this by editing the "stations" succession template; in this case {{Transperth stations}}. Jc86035 (talk) 03:02, 18 January 2018 (UTC)
@
dn
}}
tags into the |previous= and |next= parameters, this breaks the linking horribly.
If the station that is to be linked to has parenthetical disambiguation, the |state1= and |state2= parameters of {{s-line}} may normally be used (without the parentheses) to supply that disambiguation. In this case, comma disambiguation is employed, and the actual fix was to this subtemplate. --Redrose64 🌹 (talk) 10:56, 18 January 2018 (UTC)
It would be preferable to improve the {{S-line}} template itself with a common parameter like "dab=" so that editors do not need to hunt down other templates to fix. New articles on stations are written every week, rendering existing station names ambiguous. bd2412 T 12:16, 18 January 2018 (UTC)
It already has such parameters, |state1= and |state2=. --Redrose64 🌹 (talk) 12:48, 18 January 2018 (UTC)
Can you add an example of a working use of those parameters to the template documentation? It is not clear where they need to go, or whether any other parameters need to be changed for their use. bd2412 T 15:04, 18 January 2018 (UTC)
They're named parameters; the positioning is immaterial. No other parameters need to be altered. Compare the following:
Preceding station   National Rail National Rail   Following station
Test
Swinton
They look identical, but the links differ. The values are passed by {{s-line}} through the |state= parameter of {{S-line/side cell}} into the |state= parameter of the relevant stations subtemplate which may then use the value in any way that might be appropriate. In this way, |state1= can modify the link generated by |previous=, and |state2= can modify the link generated by |next=, as shown above. --Redrose64 🌹 (talk) 21:54, 18 January 2018 (UTC)
I seem to recall having trouble making that work in the past, but I don't have a specific instance handy. I will try it going forward, and report back if there are any problems. bd2412 T 22:21, 18 January 2018 (UTC)
"state1, state2 Allows the passing of an additional station parameter. Useful for disambiguation."
To what? The documentation doesn't say.
Perth isn't a state.
"Please don't put {{
dn
}} tags into the |previous= and |next= parameters, this breaks the linking horribly."
I am well aware that {{
dn}} tag outside a {{s-line
}} tag generates an unlocalised tag at the top of the article, with no guide to other disambiguators as to what the problem might be.
"As the documentation says, you can fix this by editing the "stations" succession template; in this case {{Transperth stations}}." Where was I supposed to have found that? I wasted 15 minutes of my life trying to solve the original problem, and am wasting more time now by posting here.
I suggest: new fields |previous-link= and |next-link=. A simple solution for any disambiguator faced with such problems, which would cope with both parenthetical and comma DABs. Narky Blert (talk) 23:40, 19 January 2018 (UTC)
I agree - it is always easiest to have a parameter that lets you put in the actual target link, so that exceptions to the usual naming scheme don't throw the template off. bd2412 T 00:39, 20 January 2018 (UTC)
Disambiguation of a station, the clue is in the phrase "additional station parameter".
Surrey isn't a state either.
Where have I come across links broken by {{
dn}} before? Ah, here
.
It's not difficult to see which subtemplates are used. First go to the problem article and open it up for edit, find the relevant template code, in this case it's
{{s-line|system=Transperth|line=Fremantle|previous=Cottesloe|next=Victoria Street}}
and copy it to your clipboard. Then go to
WP:SANDBOX, open it for edit, paste in that code and click Show preview. At the bottom there will be a list headed "Templates used in this preview" (which you may need to expand by clicking the right-pointing triangle), look for the word "stations" in this list and there is the link to Template:Transperth stations
.
If you feel that separate link parameters are necessary, it's probably better to use one of the {{rail line}} templates. Four parameters (three if it's a terminus, five if you want a horizontal coloured stripe in addition to the two vertical ones); no subtemplates. --Redrose64 🌹 (talk) 10:44, 20 January 2018 (UTC)
What about comma-DABs? See
North Main Corona station. I've discovered that it should be Arlington Station, California. Narky Blert (talk
) 18:45, 20 January 2018 (UTC)
Follow the instruction that I gave beginning "It's not difficult to see which subtemplates are used." Doing this, I find that it's Template:ATSF stations, hence, this edit.
The main problem with USA stations is that there is no consistent naming convention. --Redrose64 🌹 (talk) 22:17, 20 January 2018 (UTC)
Please tell me that you're having a laugh. I have no intention of learning the intricacies of how to disambiguate badly-written templates like this one.
WP:TDD, 20 January 2018: 10,911 bad links to DAB pages. You may just have reduced that number to 10,910. Narky Blert (talk
) 01:11, 21 January 2018 (UTC)
It's not badly written; it's complicated because it was presumably designed to be able to handle all sorts of disambiguation and other quirks (like multiple line termini and links to non-stations) for the convenience of editors. If you ever decide to bother to find out how it works, all the information you need is in the documentation (I've linked the relevant section; only the first two subsections should matter for article disambiguation). Jc86035 (talk) 12:09, 21 January 2018 (UTC)
"for the convenience of editors". I have already told you. It is INconvenient for other, experienced, editors. Narky Blert (talk) 02:01, 22 January 2018 (UTC)
I agree. However complicated the template is, how hard can it be for seasoned template editors to add #IFEXIST parameters allowing a specific link to be designated in place of a disambiguation link for a given preceding parameter? All of this discussion could be spared if there was a way to put |link= (or maybe |link1=/|link2=) after the parameter containing the ambiguous term, and then add a ==Disambiguation links== section to the documentation that shows the wikitext to be implemented to make that fix. bd2412 T 02:07, 22 January 2018 (UTC)
I today came across another bad link to this template. Using the "helpful" instructions above, I managed to fix the problem in only about 10 minutes. Narky Blert (talk) 02:24, 23 January 2018 (UTC)

@Narky Blert and BD2412: I've added |link1= (left side) and |link2= (right side) for disambiguating links. Jc86035 (talk) 15:54, 26 January 2018 (UTC)

Many thanks! To be clear (for the documentation), we put the full text of the target link here, and it will override the previous parameter? bd2412 T 15:56, 26 January 2018 (UTC)
& documented them too - most helpful, thanks! Narky Blert (talk) 15:59, 26 January 2018 (UTC)
Perfect. bd2412 T 16:03, 26 January 2018 (UTC)

Template-protected edit request on 17 April 2018

Please replace the following:

{{notice|This template is called by {{t1|s-rail-national}}; an alias. If a change is made which alters/adds parameters names that template must be updated to reflect the new situation.}}

With this:

{{notice|This template is called by {{tl|s-rail-national}}; an alias. If a change is made which alters/adds parameters names that template must be updated to reflect the new situation.}}

This is simply to correct a typo; "Template:T1" redirects to "Template:Tl" specifically because it is a common typo (confusing the letter "l" and the digit "1"), but the typo should still be fixed. Jdaloner (talk) 23:49, 17 April 2018 (UTC)

 Done I have moved the notice to the /doc subpage and corrected the error you identified — Martin (MSGJ · talk) 11:31, 18 April 2018 (UTC)

A link to a DAB page

In Framingham station, this template generates a link to the DAB page Milford station. I cannot find how the link is being generated, let alone fix the problem. Narky Blert (talk) 07:47, 17 June 2018 (UTC)

@Narky Blert: Is the correct page Milford station (Connecticut)? (The template is {{NYC stations}}.) Jc86035 (talk) 07:53, 17 June 2018 (UTC)
@Jc86035: As far as I can tell, it should be Milford station (Massachusetts). See Milford Branch. Narky Blert (talk) 07:58, 17 June 2018 (UTC)
@Narky Blert: @Anthonyt31201, Morphenniel, and Pi.1415926535: Is the row correct, and should it actually be in the article? The diagram in Milford Branch indicates that the branch did not have any passenger stations, and that the station labelled "Milford Depot" (red link) was on the Milford Secondary – but I don't know anything about these lines other than what's in the articles, and they don't make this clear. Jc86035 (talk) 08:07, 17 June 2018 (UTC)
Yes, Milford Secondary shows that the Milford branch bypassed Milford Depot (no article) and joined the main line to run through Milford Yard (no article). Both are in Milford, Massachusetts. The fact that the terminus was in Milford is recorded in {{S-line/NYC left/Milford Branch}}. I've added a line to {{NYC stations}} to link Milford exceptionally to the town rather than to a station which was never built. That should fix it. No other pages seem to be affected. Certes (talk) 10:26, 17 June 2018 (UTC)
Milford had two stations - a wooden NYNH&H station on the Milford Secondary, and the still-extant stone B&A station on the Milford Branch. (The stations were about 150 feet apart; the lines met slightly to the south.) The latter lasted vastly longer (passenger service until 1959, versus 1920) and would be either Milford station (Massachusetts) or Milford station (Boston and Albany Railroad) should an article be created. (Note: I've created a Commons category: commons:Category:Milford station (Massachusetts)). I have corrected {{Milford Secondary}}, {{Milford Branch}}, and {{NYC stations}} to reflect this; however, the first two templates need a lot of work to include all former stations. Pi.1415926535 (talk) 19:41, 17 June 2018 (UTC)

Fixing links to dab pages

To make my cryptic remarks above more explicit for anyone reading this section later:

  1. View the article's source and identify the {{s-line|system=«S»|line=«L»|…}} template corresponding to the rogue link, noting «S» and «L».
  2. View Template:S-line/«S» left/«L» or Template:S-line/«S» right/«L», depending which end of the line contains the link; the text should be a station abbreviation «A».
  3. Edit Template:«S» stations, adding or updating the entry beginning with «A»=. (If appropriate, consider carefully updating a generic entry instead.)

In the example above, «S» is "MILW", «L» is "main" and «A» is "Seattle or Tacoma". Hope that helps, Certes (talk) 14:34, 7 August 2018 (UTC)

Another link to a DAB page

In

Tacoma instead of Tacoma, Washington. I have no idea even where to look. Narky Blert (talk
) 12:47, 7 August 2018 (UTC)

Fixed here. The offending link is the left end of a system=MILW row, so {{S-line/MILW left/main}} reveals which entry to change. Certes (talk) 13:17, 7 August 2018 (UTC)
Whoops, I remember noticing it on the page then never going back to fix it. Thanks Certes. GFOLEY FOUR!— 21:31, 7 August 2018 (UTC)

Improve accessibility of example

The example under Transfers could be more accessible. The issue is that the heading of the first row, middle column, does not apply to the entire column. I believe this will cause screen readers to treat North London Line as if it were part of the London Overground.

{{s-start}}
{{s-rail|title=LUL}}
{{s-line|system=LUL|line=Jubilee|previous=West Hampstead|next=Swiss Cottage|type2=one}}
{{s-line|system=LUL|line=Metropolitan|previous=Wembley Park|next=Baker Street|type=Four|rowsmid=2|rows2=2}}
{{s-line|system=LUL|line=Metropolitan|previous=Harrow-on-the-Hill|type=Four|hidemid=yes|hide2=yes|note=Peak periods only}}
{{s-note|text=Out-of-system interchange}}
{{s-rail|title=LOG}}
{{s-line|system=LOG|line=North London|previous=West Hampstead|next=Hampstead Heath|transfer=Finchley Road & Frognal}}
{{s-end}}

I believe a more accessible example would be the following, for which the column heading for the middle column actually does apply to the entire column:

{{s-start}}
{{s-rail|title=Transport in London}}
{{s-rail-next|title=LUL}}
{{s-line|system=LUL|line=Jubilee|previous=West Hampstead|next=Swiss Cottage|type2=one}}
{{s-line|system=LUL|line=Metropolitan|previous=Wembley Park|next=Baker Street|type=Four|rowsmid=2|rows2=2}}
{{s-line|system=LUL|line=Metropolitan|previous=Harrow-on-the-Hill|type=Four|hidemid=yes|hide2=yes|note=Peak periods only}}
{{s-note|text=Out-of-system interchange}}
{{s-rail-next|title=LOG}}
{{s-line|system=LOG|line=North London|previous=West Hampstead|next=Hampstead Heath|transfer=Finchley Road & Frognal}}
{{s-end}}

Thisisnotatest (talk) 04:31, 13 March 2019 (UTC)

A further link to a DAB page

In Philippi station, this template is calling the DAB page Charleston station instead of Charleston station (West Virginia). Narky Blert (talk) 12:29, 20 August 2018 (UTC)

@Narky Blert: A tough one. That needs a new entry in {{B&O stations}} (insert |Charleston above |Wheeler…), but did the B&O use the rival C&O's Charleston station (West Virginia) or have a separate facility with no article, possibly on the other rail line north of the river? On a related note, I've retargetted Charleston station (Amtrak). Do you think we should change Charleston railway station (currently a redirect to Charleston, South Australia)? Certes (talk) 13:06, 20 August 2018 (UTC)
@Certes: IMO Charleston railway station should redirect to Charleston station as {{R from ambiguous term}}. I've cleaned up the incoming links, and added the Australian station to the DAB page. Yrs, Narky Blert (talk) 13:16, 20 August 2018 (UTC)
@Narky Blert: Thanks. After further investigation, I'm convinced that Charleston B&O was a separate station. The B&O took over the K&M and the Grafton – Charleston branch (formerly the Coal and Coke Railway). Both run north of the Kanawha river, with the C&O on the south bank (map) and I can find no record of a bridge. I've turned the dab into a redlink Charleston station (Baltimore and Ohio Railroad) by editing {{B&O stations}}. Certes (talk) 13:35, 20 August 2018 (UTC)
@Certes: Good work. I've retargetted Charleston railway station as proposed. Yrs, Narky Blert (talk) 13:38, 20 August 2018 (UTC)
@Narky Blert: A postcard for you from Charleston. The line north of the river still has a few sidings beneath the I-64, so that's probably the location. Certes (talk) 13:50, 20 August 2018 (UTC)

What we really need is a fast way to find the modules that generate these links. One way to do that would be to have a bot set up regular lists on the module talk page of all the links invoked in the module, so that if a link becomes ambiguous, an editor can just look for "Module talk" links on the "What links here" page to figure out which module needs to be changed to fix the link. bd2412 T 13:08, 13 March 2019 (UTC)

Wikipedia:Disambiguation pages with links/Guide#Railway stations has some tips for playing Hunt the Module. Certes (talk) 13:21, 13 March 2019 (UTC)