Template talk:Yearinbaseball

From BR Bullpen

For leagues such as the Negro Leagues and the Japanese League where the template is supposed to round down to the nearest decade it is instead rounding either up or down to the nearest decade. For example, 1906 rounds to 1910s in the X Leagues when it should round to 1900s in the X Leagues. I found this at Wikipedia but couldn't figure out how to apply it here. Kinston eagle 19:03, 22 November 2007 (EST)

I'm not good with templates. Can someone else figure this out? - --Mischa 09:13, 23 November 2007 (EST)

This is where the Template:Trcenter is coming from. Anybody out there know what it is for and what we need it to be? --Jeff 23:19, 2 January 2008 (EST)

I tried removing the Trcenter template, and it got rid of the NL and AL links, so obviously I did that wrong. --Jeff 18:48, 1 May 2008 (EDT)

Phew[edit]

So I just went through the template and cleaned it up - there were some big problems. There was a format error in parameter coding. When trying to do a new table row with an if expression, the syntax WAS:

(end of last expression}}
{{#ifeq:(if expression)|{{!-}}
{{!}}...}}
This created a problem, because of the line break between the end of the last expression and the start of the next one. If the "next" expression was true, everything worked fine, it would look something like this:
|text (from 1st expression)
|-
|text (from next expression)
However, if the expression was false, because the line break was not contained in the if equation, extra spaces would be added:
|text (from 1st expression)

|-
|text (from a later expression that was true)
So I fooled around with this for a while, and finally a last ditch move got me the solution - I can't even explain why it works, but for some reason it does:
(end of last expression}}{{#ifeq:(if expression)|<br/>
{{!-}}
{{!}}...}}
The odd thing about this is that the {{!-}} can not be on the same line as the break tag, I'm not really sure why - but I've tested this out about 100 times and for whatever reason, it works.

The only other thing I did was remove the row styling, and I just centered the text which essentially did the same thing as align=center. However, I did also remove the color styling, but I haven't put it back in yet because I'm not sure where it's supposed to be. It's easy to put back in though, it would just go after the {{!}} in the row.--danielfolsom 13:02, 2 July 2008 (EDT)

Oh, and I also replaced all the {{{1}}} with {{{1|0}}}, just so the template on the main template page wouldn't look messed up.--danielfolsom 13:04, 2 July 2008 (EDT)

If you go to either 1943 AAGPBL or 1954 AAGPBL, you have links to seasons that don't exist (1942 and 1955) due to this template. How do we fix that? - --Mischa 21:01, 18 January 2011 (EST)