Hello!
I have a problem encoding the chess table in Slovene Wikipedia: http://sl.wikipedia.org/wiki/Uporabnik:Romanm/%C5%A0ahovska_deska The upper-right version is twice-templated and subject to my question since it is not working, the lower version does not use main template and is there only for comparision.
The idea is to have [[Template:Chess_Position]] and use it like follows:
{{Chess_Position|white=white |black=lightgray |a1= ... other initialisations |h8= |h8=template for black knight |g7=template for black king |f7=template for white pawn |e5=template for white king |h4=template for white queen}}
I was using direct unicode characters instead of chess-piece templates, but Internet Explorer users complained that they cannot see the characters and they appeared in background color in Mozilla (*), so I switched to templates that should display picture on the background.
But this does not work! Any hints where did I go wrong?
* Version with Unicode characters: http://sl.wikipedia.org/w/wiki.phtml?title=Uporabnik:Romanm/%C5%A0ahovska_de...
Roman Maurer wrote:
I was using direct unicode characters instead of chess-piece templates, but Internet Explorer users complained that they cannot see the characters and they appeared in background color in Mozilla (*), so I switched to templates that should display picture on the background.
But this does not work! Any hints where did I go wrong?
You should probably describe in greater detail what you mean by "does not work". It works perfectly for me.
Timwi
Timwi pravi:
You should probably describe in greater detail what you mean by "does not work". It works perfectly for me.
Sorry for not being precise. By "this" I meant the positioning of images in a 8x8 matrix, not displaying background images.
So bottom line is this: http://sl.wikipedia.org/wiki/Uporabnik:Romanm/%C5%A0ahovska_deska is not displaying two chessboards - the upper-right is corrupt and I don't have a clue why would that be.
Roman Maurer wrote:
Timwi pravi:
You should probably describe in greater detail what you mean by "does not work". It works perfectly for me.
Sorry for not being precise. By "this" I meant the positioning of images in a 8x8 matrix, not displaying background images.
So bottom line is this: http://sl.wikipedia.org/wiki/Uporabnik:Romanm/%C5%A0ahovska_deska is not displaying two chessboards - the upper-right is corrupt and I don't have a clue why would that be.
If I delete {{}} around the unicode characters, it works like a charm
When I moved them inside, where they belong -- so there's no "overloading" the fields --, on many places a {Template:XN} would appear.
Does the whole {{ }} thing support nesting? So, is {{ {{ }} }} valid?
Roman Maurer wrote:
Timwi pravi:
You should probably describe in greater detail what you mean by "does not work". It works perfectly for me.
Sorry for not being precise. By "this" I meant the positioning of images in a 8x8 matrix, not displaying background images.
So bottom line is this: http://sl.wikipedia.org/wiki/Uporabnik:Romanm/%C5%A0ahovska_deska is not displaying two chessboards - the upper-right is corrupt and I don't have a clue why would that be.
OK, it's not working because you're trying to nest two levels of {{...}}. You're trying to do something like this: |h8={{♞}} inside a {{template inclusion block}}. This doesn't work because the parser isn't that smart. It stops at the first "}}" and doesn't realise that several {{...}}s were nested inside each other.
I've experimented around a bit (maybe you've seen the edits that I accidentally sent to sl.wikipedia.org rather than my local install :) ). I tried to make it so that you can write |h8=♞ and then have [[Template:Chess Position]] include another template by saying {{chess_{{{h8}}}}}. But this also didn't work: It just generated a link to [[Template:Chess_♞]] even if that page existed. I don't know why it does that. I've examined the source code, but I can't find the error. This is clearly a bug which I'm going to file in Bugzilla now.
Greetings, Timwi
Timwi pravi:
I tried to make it so that you can write |h8=♞ and then have [[Template:Chess Position]] include another template by saying {{chess_{{{h8}}}}}. But this also didn't work: It just generated a link to [[Template:Chess_♞]] even if that page existed. I don't know why it does that. I've examined the source code, but I can't find the error. This is clearly a bug which I'm going to file in Bugzilla now.
OK, please let me know the request ID so that I can track the progress of it.
Roman Maurer wrote:
Timwi pravi:
I tried to make it so that you can write |h8=♞ and then have [[Template:Chess Position]] include another template by saying {{chess_{{{h8}}}}}. But this also didn't work: It just generated a link to [[Template:Chess_♞]] even if that page existed. I don't know why it does that. I've examined the source code, but I can't find the error. This is clearly a bug which I'm going to file in Bugzilla now.
OK, please let me know the request ID so that I can track the progress of it.
wikipedia-l@lists.wikimedia.org