Template talk:A

From ISFDB
Revision as of 20:58, 24 June 2009 by Kpulliam (talk | contribs) (→‎Discussion: === altName vs altname ===)
Jump to navigation Jump to search

Use this to link to an author's name, almost as easy as just typing the name itself.

See Template:A/doc for detailed documentation.

Discussion

Color

I have edited the tempalte to use background color #CCFF99 ( like this ) as a test, because it was suggested to me that links to the db ought to visually sitinct from links to other wiki pages. Any comments on what color to use, or indeed whether color should be used in tis way at all? Other formatting could be used (typeface, size, even an image) if desired, or we could return to the status quo ante. -DES Talk 23:52, 7 July 2008 (UTC)

If you are going to leave this edit... (And I don't have any issues with it - It's a decent idea), please go ahead and apply it to the other 'internal' linking templated, P and T. I was mightily confused for a day as to why some links were green and others not. then when I realized it was an internal template... I was confused why all the single letter templates didn't have a color (Either the same color or a different color). As to your color choice... One thing I have learned is that Pastels often work fine on screen, and continue to work if someone prints something out, while bold colors look better on screen, but then look horrible when printed out in b/w. Kevin 06:07, 31 August 2008 (UTC)
I have, quite frankly, been waiting for significant response, positive or negative, before extending the color. I think there has been timne enough, and I will extend the color to the other matching templates. -DES Talk 15:15, 31 August 2008 (UTC)
Go for it! It's a horrible colour, I'm surprised there hasn't been more comment. I still like the idea of links showing where they go (roughly) though. This is a Template even I use now. BLongley 20:34, 31 August 2008 (UTC)
Ok will do.

Broken Example

This template does not work when there is a ( or a ) in the authors name. Though rare, this is the documented way to disambiguate between two authors. See Author:Donald_Macpherson_(Novelist) for an example in the database. I could not get the A Template to work for me on this page so I had to resort to full html links. Thanks Kevin 06:07, 31 August 2008 (UTC)

I will look into the matter, and see what, if anything, can be done about it. it may be a limitaiton of the wiki software, i'm not yet sure. -DES Talk 15:17, 31 August 2008 (UTC)
By the way, it is permisible to have spaces in the names (titles) of wiki pages, and such spaces can be used in wiki links. -DES Talk 15:17, 31 August 2008 (UTC)
I know about spaces.. but I cut n pasted the text above (shrug). Kevin 15:40, 31 August 2008 (UTC)
Fine, as long as you know. The form above is fine. Some people have gone to great lengths to avoid spacs when not needed. It used to be that this template required manual conversion of spaces to underscores. The conversion is now done automatically. -DES Talk 15:49, 31 August 2008 (UTC)

(unindent) Yep this is a bug. The problem is with the anchorencode function, used to convert spaces to underscores. It also converts parens to numeric codes (and probably some other non-url-safe characters). To write a version that would do onlt\y what we want, the String functions Extension would need to be installed. -DES Talk 20:26, 31 August 2008 (UTC) Or i could create a vesion that worked with the parserFunctions extension (which includes #if) and some additional parameters. Hmm I think i see a way... -DES Talk 20:28, 31 August 2008 (UTC)

Fixed! -- or at least hacked around. Any authors with parens or single quotes in their cannonical names will need to use a special parameter altName in this tempalte, see the documatation page transcluded on the template page. If I had the String Functions Extension I wouldn't need the hack, but... -DES Talk 20:45, 31 August 2008 (UTC)

Thank you - I'm also filing a bug report as this should be an easy one to detect/fix in ea.cgi. For the bug report the bad links are Donald_Macpherson_(novelist) and Donald_Macpherson_(artist). Marc Kupper (talk) 21:58, 31 August 2008 (UTC)
If you undertake a fix in the code, make sure that it handles all non-alphanumeric characters, because anchorencode pueports to convert all such. Tests may be needed to determine what it actuall converts. -DES Talk 22:42, 31 August 2008 (UTC)

altName vs altname

Could we amend this to use either altName or altname? I just spent 10 minutes trying to figure out what I was doing wrong, and it was the capitalized N I was leaving as a lowercase n. Kevin 00:58, 25 June 2009 (UTC)