Template talk:NYCS time 2

HTML bullets

edit

@Cards84664: I was going to post this on your talk page but you archived the section. Pinging Useddenim, Epicgenius.

 
2
5
 
2
5

Something like {{Color circle}} could be used instead of {{RouteBox}}: M 2 7 (NB these were not made using the template). It's a bit hacky and needs some tweaking (especially the diamond; it doesn't seem to align properly) but it seems to just about work. Jc86035 (talk) 12:06, 4 September 2017 (UTC)Reply

"a bit hacky" is an understatement. Useddenim (talk) 12:10, 4 September 2017 (UTC)Reply
@Useddenim: Well, at least it looks a bit prettier I guess. At this size it doesn't seem like it needs the bold. Jc86035 (talk) 14:47, 4 September 2017 (UTC)Reply
I guess we could go with the route bullets when it's all finalized, but we should definitely keep the boxes to signify line endings. The MTA uses boxes for lines' terminals on their official map. epicgenius (talk) 00:19, 5 September 2017 (UTC)Reply

Template-protected edit request on 16 May 2018

edit

The list of changes is too large to describe here in detail, due to the scope of the errors. If you look at Template:NYCS time 2/testcases, you will see how it has been fixed. I would like to replace the current contents of this template with this version of the sandbox. It contains a fix for route service templates that only have "diamond express" services, whose service emblems look like this:  ; without any corresponding "circle local" services, whose emblems look like this:  . The "diamond" express services, e.g. {{NYCS Flushing express}}, are transcribed like  <7>  and "<7>" in the {{NYCS time 2}} template. The "circle" local services, e.g. {{NYCS Flushing local}}, are transcribed like  7  and "7".

The fix that I am proposing will get rid of a typo that occurs with "diamond"-only service templates that use {{NYCS time 2}}, as long as |excludelocal= parameter is added to the template. For instance, if you include the code {{NYCS time 2|7|excludelocal=yes|dicon=rushpeak|dtext=rush hours until 9:30 p.m., peak direction|time={{{time|}}}}}}} to {{NYCS Flushing express}}, that template will display the value "<7>" instead of the incorrect value "and <7>". If {{NYCS Flushing express}} is transcluded on an article page with the |time= parameter set to bullets, it will look like this:   instead of this:    . And so on. These diamond-only service templates do not require a circular emblem or service indication, which is why I have proposed this change.

There are two templates that currently contain the wrong values: {{NYCS Flushing express}} and {{NYCS Pelham express}}. Again, please look at Template:NYCS time 2/testcases to see the issues that have been resolved. Thank you. epicgenius (talk) 21:11, 16 May 2018 (UTC)Reply

  Done Galobtter (pingó mió) 03:49, 17 May 2018 (UTC)Reply
@Galobtter: Please do a double check of your edit, all of the infobox bullets are now broken, look at Grand Central–42nd Street (New York City Subway) for example. Cards84664 (talk) 12:12, 17 May 2018 (UTC)Reply
@Cards84664: undid it, seems to have problems with the header of the infobox, @Epicgenius: please fix your code and test it properly and then make another edit request Galobtter (pingó mió) 12:34, 17 May 2018 (UTC)Reply
Maybe you deleted a line calling for bullets specifically, every NYCS article broke. Cards84664 (talk) 12:31, 17 May 2018 (UTC)Reply
@Galobtter and Cards84664: I don't see what you mean, since there's no way for me to see the actual thing that's messed up without using "transclusion preview". Unfortunately, I can't use transclusion preview since it's a protected page. epicgenius (talk) 13:07, 17 May 2018 (UTC)Reply
The top Infobox on GC-42 (as an example) was displaying this:   4   5     6     7   S

Cards84664 (talk) 13:13, 17 May 2018 (UTC)Reply

(edit conflict)Yeah that is pain, dunno why transclusion preview isn't allowed for people who can't edit the page. The problem is that next to each of the linked images (circles etc) in the row below "Grand Central—42 Street" there is also linked text of say 4_(New_York_City_Subway_service) duplicating it. Or bullets formatting is broken Galobtter (pingó mió) 13:17, 17 May 2018 (UTC)Reply
(edit conflict × 2) Thank you to both of you. I have figured out what the problem is (see below). epicgenius (talk) 13:19, 17 May 2018 (UTC)Reply


I fixed the problem listed above. This code is the correct code, as seen here: Template:NYCS time 2/testcases#test. Apparently, I forgot to include a #default somewhere. epicgenius (talk) 13:19, 17 May 2018 (UTC) epicgenius (talk) 14:21, 17 May 2018 (UTC)Reply

  Done — Martin (MSGJ · talk) 09:47, 18 May 2018 (UTC)Reply
@MSGJ: You reverted to the wrong version, the subway infoboxes are displaying extra numbers again. Cards84664 (talk) 13:12, 18 May 2018 (UTC)Reply
I applied the version explicitly linked by Epicgenius above — Martin (MSGJ · talk) 14:07, 18 May 2018 (UTC)Reply
Yeah epicgenius linked the wrong revision (same one as before), I see @Jc86035: has gotten to syncing the correct code Galobtter (pingó mió) 17:09, 18 May 2018 (UTC)Reply
Sorry about that. Seems I messed up again, because I have yet another edit request. Now would be a very bad time to trust me with unprotected-template editing.   epicgenius (talk) 17:50, 18 May 2018 (UTC)Reply

I would like to replace the current contents with this version of Template:NYCS time 2/sandbox. I have added a conditional function which will fix spacing for {{NYCS time 2}} the entry for the |time= parameter is "bullets". In my version, an extra &nbsp; is only implemented if both the "diamond" and the "circle" icons, which I have discussed above, are present. Otherwise, the &nbsp; will show up even when one of the icons is missing. Compare {{NYCS Flushing express}} with {{NYCS Flushing local}}:

  ({{NYCS Flushing local}})

  ({{NYCS Flushing express}}) - As you can see, there is an extra non breaking space that shouldn't be there.

7 ({{NYCS Flushing local}})

<7> ({{NYCS Flushing express}})

Please also see the fifth example in Template:NYCS time 2/testcases#test. epicgenius (talk) 17:50, 18 May 2018 (UTC)Reply

@Epicgenius:   Done Jc86035 (talk) 18:00, 18 May 2018 (UTC)Reply
@Epicgenius: Grand Central–42nd Street (New York City Subway) has two non-breaking spaces before   and after  . Is this supposed to happen? Jc86035 (talk) 18:06, 18 May 2018 (UTC)Reply
@Jc86035: Actually, the double spaces are an error. I fixed it here after messing up three more times, but I think there should not be any more problems. Of course, not being able to use transclusion preview with the protected template makes things much harder... epicgenius (talk) 20:37, 18 May 2018 (UTC)Reply
Actually, never mind, it turns out I didn't fix it.   Facepalm epicgenius (talk) 20:44, 18 May 2018 (UTC)Reply
@Jc86035: It's very confusing for me to keep contradicting myself, but here I go again. This version (the link mentioned just above) is the correct version of {{NYCS time 2}}. I finally figured out that the problem was with {{NYCS Grand Central/sandbox}}, the other template that I was testing, rather than {{NYCS time 2/sandbox}} itself. epicgenius (talk) 21:12, 18 May 2018 (UTC)Reply

I would appreciate it if the contents of this version of the sandbox are placed in the main template. It fixes the additional spacing issue raised by Jc86035 above. Thanks. epicgenius (talk) 00:29, 19 May 2018 (UTC)Reply

  Done Jc86035 (talk) 02:19, 19 May 2018 (UTC)Reply
@Epicgenius: I don't understand how {{NYCS Grand Central}} works. Could you fix that template? It still has two extra spaces for some reason (there are some empty span tags in the source). Jc86035 (talk) 02:43, 19 May 2018 (UTC)Reply
There are also some double spaces on {{N (New York City Subway service)}}. Jc86035 (talk) 04:00, 19 May 2018 (UTC)Reply
There aren't supposed to be spaces there. Maybe it has to do with how zero-width spaces are treated in the individual templates (but then again, these zero-width spaces didn't cause problems before, and they are needed for {{NYCS trains}} to function properly). See, told you I was no good at templates. epicgenius (talk) 15:54, 19 May 2018 (UTC)Reply
@Jc86035: I think this revision will work. The spaces only appear because I used the #switch function instead of the #ifeq function. epicgenius (talk) 16:22, 19 May 2018 (UTC)Reply
Copied the code over; it seems to be working. Jc86035 (talk) 16:26, 19 May 2018 (UTC)Reply

Template-protected edit request on 12 June 2018

edit

In Line 38 (right after the line with the text | 1 and before the line with the text | #default=), change the line

| = [[{{{1}}} (New York City Subway service)|{{{1}}}]]

to

| = [[{{#if: {{{link|}}}|{{{link}}}|{{{1}}} (New York City Subway service)}}|{{{1}}}]]

This will allow a custom link display to be given if the {{{link}}} parameter is specified. epicgenius (talk) 03:28, 12 June 2018 (UTC) epicgenius (talk) 03:28, 12 June 2018 (UTC)Reply

  Done Galobtter (pingó mió) 06:57, 12 June 2018 (UTC)Reply

Template-protected edit request on 29 December 2018

edit

I would like to add a functionality to clarify any links labeled "S", which refers to shuttle service.

In line 30, replace

   | bold = [[{{#if: {{{link|}}}|{{{link}}}|{{{1}}} (New York City Subway service)}}|'''{{{1}}}''']] 

with

   | bold = [[{{#if: {{{link|}}}|{{{link}}}|{{{1}}} (New York City Subway service)}}|'''{{#ifeq:{{{1}}}|S|{{{1}}}{{#if: {{{link|}}}| ({{{link}}})|}}|{{{1}}} }}''']] 

In line 38, replace

   | = [[{{#if: {{{link|}}}|{{{link}}}|{{{1}}} (New York City Subway service)}}|{{{1}}}]]

with

   | = [[{{#if: {{{link|}}}|{{{link}}}|{{{1}}} (New York City Subway service)}}|{{#ifeq:{{{1}}}|S|{{{1}}}{{#if: {{{link|}}}| ({{{link}}})|}}|{{{1}}} }}]]

The result should be like this version of the sandbox. Output like this. In essence, a link to this: S will now look like this: S (Rockaway Park Shuttle).

epicgenius (talk) 01:59, 29 December 2018 (UTC)Reply

I believe this template is used in places (e.g. infoboxes) where space is at a premium. The abbreviated version may be intentional. The proposed new version will take up a lot more space. Does this need further discussion? — Martin (MSGJ · talk) 09:40, 2 January 2019 (UTC)Reply
Disabled for now. Please reactivate when appropriate. — Martin (MSGJ · talk) 13:34, 3 January 2019 (UTC)Reply

Template-protected edit request on 26 March 2019

edit

Remove spaces between bullets when "bullets" is the modifier. (I do not have the coding acumen to do this.) WMSR (talk) 20:18, 26 March 2019 (UTC)Reply

I agree, they need to be single spaced, not double spaced. Cards84664 (talk) 20:48, 26 March 2019 (UTC)Reply
I may be able to implement this change, but the request is unclear. Please create or point to a test case on the testcases page that shows the specific option(s) in use, then explain in more detail how you would like it to be different. Pretend you are talking to someone who has never seen this template before. Thanks. – Jonesey95 (talk) 08:41, 27 March 2019 (UTC)Reply
  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. -- /Alex/21 12:10, 29 March 2019 (UTC)Reply
@Jc86035: @Epicgenius:. Cards84664 (talk) 13:40, 29 March 2019 (UTC)Reply
@Cards84664 and Jc86035: Actually, most of the code to be adjusted is in {{NYCS br}}, not here. The remaining code to be fixed is this line:
{{#if:{{{dicon|}}}|{{#if:{{{excludelocal|}}}||&nbsp;}}{{rail-interchange|newyork|{{{1}}}d}}}}
Try changing it to
{{#if:{{{dicon|}}}|{{#if:{{{excludelocal|}}}||&#32;}}{{rail-interchange|newyork|{{{1}}}d}}}}
If not it may be a problem with the constituent templates such as {{NYCS Broadway}} (or maybe MediaWiki doesn't like &#32;&#32; to be placed twice in different templates.) epicgenius (talk) 15:00, 29 March 2019 (UTC)Reply
@Epicgenius: That didn't seem to work. Any other insight on how to remove those spaces? WMSR (talk) 19:25, 15 May 2019 (UTC)Reply
WMSR, This requires two edits. First, the edit I just made to Template:NYCS br here, and second, the edit I described above (the remaining code to be fixed) needs to be made to this template. So you will have to file a second edit request. epicgenius (talk) 19:30, 15 May 2019 (UTC)Reply
@Epicgenius: I made this edit in the sandbox, but testcases is still showing an extra space. WMSR (talk) 04:19, 16 May 2019 (UTC)Reply
WMSR, I think you also have to use Template:NYCS br/sandbox. And anyway, I think the trick was to replace
{{#if:{{{dicon|}}}|{{#if:{{{excludelocal|}}}||&#32;}}{{rail-interchange|newyork|{{{1}}}d}}}}
with
{{#if:{{{dicon|}}}|{{rail-interchange|newyork|{{{1}}}d}}}}
, removing the space altogether. See the second collapsible box in Template:NYCS time 2/testcases#NYCS infobox. Is this the one you want? epicgenius (talk) 14:12, 16 May 2019 (UTC)Reply
Yes! You truly are an epic genius. WMSR (talk) 14:18, 16 May 2019 (UTC)Reply
WMSR, Sounds great! I'm glad I can help. After you make the edit request for this template, just undo my most recent edit to Template:NYCS br. epicgenius (talk) 14:22, 16 May 2019 (UTC)Reply
  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. — Martin (MSGJ · talk) 12:13, 15 May 2019 (UTC)Reply

Template-protected edit request on 16 May 2019

edit

Replace

{{#if:{{{dicon|}}}|{{#if:{{{excludelocal|}}}||&#32;}}{{rail-interchange|newyork|{{{1}}}d}}}}

with

{{#if:{{{dicon|}}}|{{rail-interchange|newyork|{{{1}}}d}}}}

in order to remove blank space between icons. Epicgenius already made the edit in the sandbox. WMSR (talk) 14:26, 16 May 2019 (UTC)Reply

@WMSR:   Done. --Ahecht (TALK
PAGE
) 14:57, 16 May 2019 (UTC)Reply
Hey @Epicgenius: this seems to have only removed spaces between express and local lines, though the sandbox version still appears correct. I'm confused. WMSR (talk) 15:53, 16 May 2019 (UTC)Reply
WMSR, I fixed it. epicgenius (talk) 17:04, 16 May 2019 (UTC)Reply

Shuttle services

edit

Is there actual signage that uses the modified shuttle bullets? Cards84664 (talk) 01:06, 15 December 2019 (UTC)Reply

@WMSR: Cards84664 (talk) 05:21, 31 December 2019 (UTC)Reply
That's how the MTA website identifies them. WMSR (talk) 21:51, 31 December 2019 (UTC)Reply
@Oknazevad:. Is this worth keeping, or are they adding it to signage and platforms?Cards84664 (talk) 16:31, 23 January 2020 (UTC)Reply
They are not actually used on signage or maps. They only appear on the website, the only place where the three shuttle services are listed adjacent to each other, largely to clarify which is which. I don't believe we need to keep them here. That said, I cannot see what that template edit actually is doing, as the edit does t actually affect the output of that page itself. Please link an article with the template included so I can properly give input. oknazevad (talk) 16:42, 23 January 2020 (UTC)Reply
@Oknazevad: Every Rockaway Park and Franklin Avenue infobox (example and example). Cards84664 (talk) 19:36, 23 January 2020 (UTC)Reply
I see. No, they should be reverted. Those bullets are used on the website only, and are not the official standards for those lines. Using them here misrepresents their actual use and gives them undue prominence. oknazevad (talk) 19:56, 23 January 2020 (UTC)Reply

Please revert this edit based on the reasoning given above. Cards84664 (talk) 23:39, 23 January 2020 (UTC)Reply

  Done WMSR (talk) 01:01, 24 January 2020 (UTC)Reply

Template-protected edit request on 4 July 2023

edit

This template contains a number of #switch statements. Each #switch should contain unique keys; however there are two #switch statement that have a duplicate key (show)

Line 35 duplicates line 31 and

Line 77 duplicates line 73

Please remove these duplicates Desb42 (talk) 11:28, 4 July 2023 (UTC)Reply

  DoneJonesey95 (talk) 12:12, 4 July 2023 (UTC)Reply