User:Bicycle bell/Sandbox

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Bicycle bell's sandbox page[edit]

Navigation for Rotterdam Metro subway stations[edit]

Stadhuis old method old lines:

Previous Line Next
Beurs   Erasmuslijn   Centraal Station

Beurs new method old lines:

Preceding station   Rotterdam Metro   Following station
toward De Akkers
Erasmuslijn
toward De Akkers
Calandlijn
Ommoord branch
toward Binnenhof
toward De Akkers
Calandlijn
Nesselande branch
toward Nesselande
toward De Akkers
Calandlijn
Capelle aan den IJssel branch
toward De Terp

Stadhuis new method new lines (DE with E using system=RandstadRail):

Preceding station   Rotterdam Metro   Following station
toward De Akkers
Line D
Terminus
toward Slinge
Line E (RET)

Beurs new method new lines (ABCDE with line E using system=Rotterdam Metro):

Preceding station   Rotterdam Metro   Following station
Line A
toward Binnenhof
Line B
toward Nesselande
toward De Akkers
Line C
toward De Terp
toward De Akkers
Line D
toward Slinge
Line E

Beurs new method only lines E (first two with system=Rotterdam Metro, last two with system=RandstadRail; first and third without " (Rotterdam"), second and fourth with " (Rotterdam)"):

Preceding station   Rotterdam Metro   Following station
toward Slinge
Line E
toward Slinge
Line E
toward Slinge
Line E (RET)
toward Slinge
Line E (RET)

Note about line E: the leftmost terminus is a temporary one! Therefore, the examples at Stadhuis and Beurs stations using line E are currently impossible. Change the template for "E/left" as soon as the leftmost terminus changes.

Navigation for RandstadRail stations[edit]

Zoetermeer Seghwaert (lines 3 and 4):

Preceding station   RandstadRail   Following station
toward Centrum West
Line RR3 (HTM)
toward Javalaan
Line RR4 (HTM)
toward De Uithof

Zoetermeer Palenstein (lines 3 and 4):

Preceding station   RandstadRail   Following station
toward Centrum West
Line RR3 (HTM)
toward Javalaan
Line RR4 (HTM)
toward De Uithof

Same (Z. Palenstein), but with lines RR3 and RR4 (should look exactly the same):

Preceding station   RandstadRail   Following station
toward Centrum West
Line RR3 (HTM)
toward Javalaan
Line RR4 (HTM)
toward De Uithof

Leidschenveen (lines E, RR3, and RR4):

Preceding station   RandstadRail   Following station
toward Slinge
Line E (RET)
toward Centrum West
Line RR3 (HTM)
toward Javalaan
Line RR4 (HTM)
toward De Uithof

Huge handbook for creating previous/next templates![edit]

Hi Chris,

I just wrote you a small guideline for creating preceding/following station templates. Except that it is not small anymore, but ah well... If you've got any more questions: feel free to ask, although I don't think my knowledge on this subject extends beyond what I wrote here. :-)

The templates with preceding/following station information are based on lines. So, each line needs a seperate template. If we take as an example the template for line E which you can find on the page Nootdorp RandstadRail station, you see the following text which 'loads' the template:

{ {s-rail-start}}
{ {s-rail|title=RandstadRail}}
{ {s-line|system=RandstadRail|line=E|previous=Pijnacker Centrum|next=Leidschenveen}}
{ {end}}

(Obviously, you should remove the space between the first and second "{" for this to work).

The second line contains information about the entire 'box', so "title=RandstadRail" does not really do anything except place that title in the table heading and turn it into a link. Boring. ;-)

The third line is more interesing. The phrase after "system" defines in which category all templates should be placed, in this case Category:RandstadRail templates (because "system=RandstadRail"). Another example is Category:Thalys templates for when "system=Thalys".

If you have decided on the name, then make that category (Category:****NAME**** templates). Each template you are going to create should be placed in this new category by using "noinclude" as follows:

< noinclude>Category:****NAME**** templates< /noinclude>

Now, create these three templates:

  • Template:****NAME**** color (so NOT "colour", that does not work)
    • In this template you define the color to be used in the two little boxes per line (blue in the example of Nootdorp RandstadRail station). If you want all lines to be the same color, then just enter that color and be done with it. If you want each line to have a different color, then you have to be a little more creative: just steal the code from the template Template:RandstadRail color and replace the FIRST part (3/RR3/4/RR4/E/Erasmuslijn) with the line number or the line letter you are going to use, and the SECOND part (after the "=") with the appropriate color.
  • Template:****NAME**** lines
    • In this template, you will define how each line should be called in the table. Check the RandstadRail example at Template:RandstadRail lines. For RandstadRail stations, I want the text "Line E (RET)" to be shown whenever "line=E", and for example "Line RR3 (HTM)" whenever "line=3" or "line=RR3" (3 and RR3 are the same thing, so other Wiki users might not use the one I have anticipated upon; therefore I simply created both). Also note that the template code shows a line with "#default"! In other words, whenever a line number is used which is not 'programmed' (for example "line=1234567"), then it still knows how it should be formatted.
  • Template:****NAME**** stations
    • This one basically does the same as the lines template, but then for the station. It defines what should be shown for a specific station, making sure that for example "previous=Nootdorp" and "next=Nootdorp" are to be translated to a link: Nootdorp. The RandstadRail example is REALLY complicated here (because of the existence of two different stations with the same name on different lines, which I wanted an automatic check on - silly, really), so I'm going to show the shortened version of it (which is probably enough for most situations):
{ {#switch:{{{station}}}
 | #default=[[{{{station}}} RandstadRail station|{{{station}}}]]
 } }
} }
    • These lines of text take as input what you've given them as a station name, and turning that into a link by adding "RandstadRail station" to the link. If you are creating a page for a Dutch railway station (and probably those of most other countries as well), you simply replace "RandstadRail" with railway, because the Wikipedia articles on those stations are all called "NameOfTheStation railway station". So, do make sure that there is a system in the naming of station articles (or create a bunch of redirects).

The last templates you have to create are "left" and "right" templates for EACH line. Call those "Template:S-line/****NAME**** left/1234567" and "Template:S-line/****NAME**** right/1234567", where you include the proper name, and replace "1234567" by the correct line number or the line letter. These templates are easy, as you only include the left and right terminuses of the lines, in plain and simple text (so no links, because the station template you've just created will do that for you).

The final step is to include the text as you see above in each station article. Of course, replace the "title=RandstadRail" with some nice title, replace the "system=RandstadRail" with the category name you have come up with, replace "line=E" with the proper line letter, and include the correct previous and next stations. Finally, you can multiple the third line (starting with "s-line") so multiple lines are displayed in one box (see for example Forepark RandstadRail station).

Also browse around how templates for other rail systems have been created, for example in Category:Thalys templates or Category:London Underground templates. They just might give you some nice ideas! As you can see with the London Underground templates, the category name (London Underground) and template names (LUL) are different; apparently this is possible, but I would get confused. :-)

Cheers and good luck with 'em! Bicycle bell 16:38, 27 May 2010 (UTC)

And the only other problem I see me encountering when the trains split somewhere.

Thanks for your help, if you could just start me off I hope then I can do it.

Thanks Chris0693 (talk) 21:42, 27 May 2010 (UTC)

Started off :-)[edit]

Hi,

I've just created some templates to begin with, and made it work for the 1600 and 3500 Intercities and the 5700 Stoptrein. I split the whole story into two parts: one part for the Intercity trains, and another part for Sprinter trains (also with Stoptrein and Sneltrein templates, but those are mainly redirecting to Sprinter and Intercity templates). This makes maintenance a bit more difficult, but I like the result better, since we can now give Intercities and Sprinters different colors and captions!

If we take Amsterdam Zuid station as an example with series 1600, 3500 and 5700, the following code:

{ {s-rail-start}}
{ {s-rail|title=Nederlandse Spoorwegen}}
{ {s-line|system=NS Intercity|line=1600|previous=Schiphol|next=Duivendrecht}}
{ {s-line|system=NS Intercity|line=3500|previous=Schiphol|next=Amsterdam Bijlmer ArenA}}
{ {s-line|system=NS Stoptrein|line=5700|previous=Schiphol|next=Amsterdam RAI}}
{ {end}}

now generates, when you remove the spaces of course, the following beautiful box:

Preceding station   Nederlandse Spoorwegen   Following station
NS Intercity 1600
toward Enschede
NS Intercity 3500
toward Venlo
toward Hoofddorp
NS Sprinter 5700

For this to work, I've created several templates in the newly created category Category:Nederlandse Spoorwegen templates (take a look!). As you can see, for each train type (Intercity/Sneltrein/Stoptrein/Sprinter) there are THREE templates to begin with: "color", "lines", and "stations". If you like what you see above, then you don't have to ever touch those again. ;-) If not, read this:

  • LINES template. I chose not to turn the train series number into an article link, as I don't think it has any added value to write a Wikipedia article about every single train series. If you think otherwise and you DO want it to become a link, you should change all four "lines" templates by replacing text "Intercity {{{1}}}" (or "Sprinter {{{1}}}" or whatever) with a link. Bear in mind that the code "{{{1}}}" stands for whatever the input is after "line=" (in this case 1600 / 3500 / 5700), so always leave the "{{{1}}}" part alone. For the intercity template (but also change the other three!), the entire line with the link should probably become:
| #default=[[NS Intercity {{{1}}}]]
  • COLOR template. There are actually only two instead of four "color" templates: Intercity and Sprinter. This is because I've created a redirect from the Sneltrein-color and Stoptrein-color templates, so now Intercity and Sneltrein share a color (blue), and Sprinter and Stoptrein also share a color (yellow). If you don't like this, then simply steal the entire code from the Intercity-color or Sprinter-color template, paste it into the Sneltrein-color or Stoptrein-color template, and of course change the HEX code of the color into something you like.
  • STATIONS template. Since all station names are the same for each train type (of course), ALL four train-type-station templates redirect to one other template, which I called "Template:Nederlandse Spoorwegen stations". You only have to ever touch this one template if you want to add exceptions to the basic rule, but the basic rule is fine the way it is: if you give "Duivendrecht" as input, it automatically creates a link to "Duivendrecht railway station". Those exceptions might occur if Dutch stations share their name with foreign stations (which they do, but for all of those stations - Deurne, Haren, Soest, and Zwijndrecht from the top of my head - Wikipedia still only has an article about the Dutch station and not about the foreign one).


Now, on to create two templates for each and every train series!! This is going to be a lot more work, but also much, much simpler. For each series, you have to make one "left" AND one "right" template. Just copy the entire code of one of the templates I've created (for example "Template:S-line/NS Intercity left/1600") and create a new template with the same name (replacing only the train type and the number) and of course replace the station in that template with the station it should be. Do bear in mind that you use the proper train type (IC/Sn/St/Sp) in the name of the template!

The final step, when you have created enough templates for a station, is to put the box on the Wiki page of that station. To do so, you simply have to paste the code to make those boxes into the station article, and change four things for each line: "system=" (for the train type), "line=" (for the number), and obviously "previous=" and "next=".

That is all! I hope I've given you a decent head start, but feel free to ask if you still have some trouble!! I'm not going to create templates for all train series, but if you want for example to change a color or to make the train series into a link and you don't get it, just ask. :-) Have fun! Bicycle bell (talk) Bicycle bell 10:45, 29 May 2010 (UTC)

Branches[edit]

Hi Chris,

You seem to have gotten the hang of it, it's looking good. :-) Your question about trains which go different places is a good one, I forgot about that. Luckily I've used them in the past, so I've created the templates for the 700 Intercity for you.

First of all let me tell you that some difficulties arise because the "stations" template automatically creates a link to a Wiki article about that station. Therefore, an input such as "Groningen/Leeuwarden" would've resulted in a link to the non-existing article "Groningen/Leeuwarden railway station". To deal with this issue, I had to create some exceptions in the stations template, which you can see for yourself if you edit the Template:Nederlandse Spoorwegen stations template, so take a look! I already included some other combinations of stations you might need, such as Den Haag C/Rotterdam C. It is important that you use the exact same notation as I did when writing the template, if you don't it won't work!! I think it is easy enough to add more exceptions if that might be necessary: just copy and paste one of the lines and type in the stations.

Then, how does it work? Well, on the combined section of the train (between Schiphol and Zwolle), there is no difference at all. Just enter "line=700" and everything else you'd normally enter, and then "Groningen/Leeuwarden" will appear as destination. For all stations after Zwolle, you have to add "|branch=???????" directly after "line=700". I've chosen to use the train number as branch number, so the train to Groningen will be "|branch=700", while the train to Leeuwarden will be "|branch=10700".

For the station of Assen (with branch=700), this code:

{ {s-rail-start}}
{ {s-rail|title=Nederlandse Spoorwegen}}
{ {s-line|system=NS Intercity|line=700|branch=700|previous=Beilen|next=Haren}}
{ {end}}

now generates:

Preceding station   Nederlandse Spoorwegen   Following station
NS Intercity 700
toward Groningen

For the station of Heerenveen (with branch=10700), this code:

{ {s-rail-start}}
{ {s-rail|title=Nederlandse Spoorwegen}}
{ {s-line|system=NS Intercity|line=700|branch=10700|previous=Wolvega|next=Akkrum}}
{ {end}}

now generates:

Preceding station   Nederlandse Spoorwegen   Following station
NS Intercity 700
toward Groningen

And for the station of Hilversum (with no branch code at all), this code:

{ {s-rail-start}}
{ {s-rail|title=Nederlandse Spoorwegen}}
{ {s-line|system=NS Intercity|line=700|previous=Duivendrecht|next=Amersfoort}}
{ {end}}

now generates:

Preceding station   Nederlandse Spoorwegen   Following station
NS Intercity 700
toward Groningen

Since there is only one "left" terminus for this train (which is Schiphol), you will understand that the "left/700" template is completely normal. But now take a look in the "right/700" template, so click edit. Since we have two branches and one shared section, the template will have to distinguish between those three options. See how if you have entered "branch=700" it will give Groningen as output, if you have entered "branch=10700" it will say Leeuwarden, and if you have entered anything else or nothing at all, it will result in Groningen/Leeuwarden.

Now you can just copy and paste the code of that template to use for other trains which split somewhere. If something goes wrong, do remember to check whether the stations template already has an exception to deal with the combination of two stations.

On a final note I have to say that the software includes the possibility to add some text below "NS Intercity 700" when a branch has been entered. However, I found it a bit confusing and also redundant, because the terminus already distinguishes between the branches. Besides, if it says "NS Intercity 700, branch 700" I doubt whether that is useful. If you think otherwise then let me know, because I can include it (any text is possible for each different branch, so it is not necessarily the number).

Good luck again! :-) Bicycle bell (talk) Bicycle bell 08:46, 30 May 2010 (UTC)

Branches part 2 and NS Hispeed[edit]

Hi,

I see you already got the 700 working at several stations. I redid Zwolle railway station for you, and also added the template for Steenwijk railway station (which is in the branch=10700 area of course).

Furthermore, I added the train type "NS Hispeed". It has a dirty pinkish color (copied that from the NS Hispeed logo), and to use it you have to replace "system=NS Intercity" or whatever with "system=NS Hispeed". I created the templates for the 1000 series (Fyra between Amsterdam C and Rotterdam C), and implemented it at the Schiphol railway station page.

Cheers. :-) Bicycle bell (talk) Bicycle bell 09:27, 30 May 2010 (UTC)