Template talk:WPauthor: Difference between revisions
Jump to navigation
Jump to search
imported>Robert W King (→Bug) |
imported>J. Noel Chiappa (→Bug: Ooops, one of my proposed alternatives definitely doesn't work) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
Turns out that this is because '=' is a no-no in a template argument (see {{WM|Help:Template#Restrictions_on_parameter_values|here}}), and a lot of the URL's people were trying to use included an =. I'll work out a work-around, and document it. [[User:J. Noel Chiappa|J. Noel Chiappa]] 15:06, 6 March 2008 (CST) | Turns out that this is because '=' is a no-no in a template argument (see {{WM|Help:Template#Restrictions_on_parameter_values|here}}), and a lot of the URL's people were trying to use included an =. I'll work out a work-around, and document it. [[User:J. Noel Chiappa|J. Noel Chiappa]] 15:06, 6 March 2008 (CST) | ||
:Try the ascii character code? --[[User:Robert W King|Robert W King]] 15:07, 6 March 2008 (CST) | :Try the ascii character code? --[[User:Robert W King|Robert W King]] 15:07, 6 March 2008 (CST) | ||
:: Yeah, that did it - but I followed {{WP|Template:Equals|Wikipedia practise}} and stuck it in a [[:Template:=|template]] to make it easier to do. I tried just sticking an ASCII '=' in there, and that didn't work (I was hoping it would delay evaluation for long enough, but no soap). I have updated the instructions here, and will fix places that call it problematically. [[User:J. Noel Chiappa|J. Noel Chiappa]] 15:34, 6 March 2008 (CST) | |||
:: Well, I fixed many, but probably not all, problematic uses (there's just too many to look at every use to make sure it works OK). [[User:J. Noel Chiappa|J. Noel Chiappa]] 17:18, 6 March 2008 (CST) | |||
: I'm starting to realize that there are probably any number of ways to fix this problem, including some that might be simpler; for example, wrapping <nowiki><nowiki></nowiki> tags around the arguments, or prepending a "1=" (because apparently only the first "=" is seen as an argument name/value separator, as long as there's no "|" in there <s>which BTW means you only need to {{tl|1==}} the first "="</s> - alas, you probably can't just escape the ''first'' one, because then the '''''second''''' one will be treated as an argument name/value separator, sigh). I haven't tested any of these yet (except the "1=' one, which I just used to make the {{tl|1==}} work :-), just wanted to make a note of them. [[User:J. Noel Chiappa|J. Noel Chiappa]] 14:50, 7 March 2008 (CST) | |||
: Bah, although the "1=" hack worked to do {{tl|1==}} (plain old <nowiki>{{tl|=}}</nowiki> gives {{tl|=}}), it ''doesn't'' work when passing a URL with ='s in it to {{tl|WPauthor}}, for reasons I don't understand. Maybe what I wrote about further ='s being ignored until you get to the next | was bogus? And anyway, that's the kind of 'fix' that might be broken by a new rev of the MediaWiki parser, so maybe the {{tl|1==}} hack is OK after all. [[User:J. Noel Chiappa|J. Noel Chiappa]] 15:03, 7 March 2008 (CST) |
Latest revision as of 15:03, 7 March 2008
Comment
Sharp template, Alek. :-) Stephen Ewen 02:49, 17 April 2007 (CDT)
- I think "portions of" is fine. It implies you imported those portions and are not mirroring the WP article. —Stephen Ewen (Talk) 13:59, 13 August 2007 (CDT)
Bug
If one attempts to include a hyperlink (e.g. to a specific version of an article on Wikipedia) in the first argument, this doesn't work. J. Noel Chiappa 21:13, 5 March 2008 (CST)
Turns out that this is because '=' is a no-no in a template argument (see here), and a lot of the URL's people were trying to use included an =. I'll work out a work-around, and document it. J. Noel Chiappa 15:06, 6 March 2008 (CST)
- Try the ascii character code? --Robert W King 15:07, 6 March 2008 (CST)
- Yeah, that did it - but I followed Wikipedia practise and stuck it in a template to make it easier to do. I tried just sticking an ASCII '=' in there, and that didn't work (I was hoping it would delay evaluation for long enough, but no soap). I have updated the instructions here, and will fix places that call it problematically. J. Noel Chiappa 15:34, 6 March 2008 (CST)
- Well, I fixed many, but probably not all, problematic uses (there's just too many to look at every use to make sure it works OK). J. Noel Chiappa 17:18, 6 March 2008 (CST)
- I'm starting to realize that there are probably any number of ways to fix this problem, including some that might be simpler; for example, wrapping <nowiki> tags around the arguments, or prepending a "1=" (because apparently only the first "=" is seen as an argument name/value separator, as long as there's no "|" in there
which BTW means you only need to {{=}} the first "="- alas, you probably can't just escape the first one, because then the second one will be treated as an argument name/value separator, sigh). I haven't tested any of these yet (except the "1=' one, which I just used to make the {{=}} work :-), just wanted to make a note of them. J. Noel Chiappa 14:50, 7 March 2008 (CST) - Bah, although the "1=" hack worked to do {{=}} (plain old {{tl|=}} gives {{ }}), it doesn't work when passing a URL with ='s in it to {{WPauthor}}, for reasons I don't understand. Maybe what I wrote about further ='s being ignored until you get to the next | was bogus? And anyway, that's the kind of 'fix' that might be broken by a new rev of the MediaWiki parser, so maybe the {{=}} hack is OK after all. J. Noel Chiappa 15:03, 7 March 2008 (CST)