[WikiEN-l] Ok, so about that ISBN template...

Stephen Bain stephen.bain at gmail.com
Mon Aug 7 08:14:44 UTC 2006


On 8/6/06, Steve Bennett <stevagewp at gmail.com> wrote:
> All of which is to say, the "magic word", while undoubtedly useful and
> intuitive to those naively adding ISBN numbers (not necessarily
> expecting a link), is not actually necessary.
...
> In fact, unless I'm mistaken, you could implement {{ISBN}} directly as
> a standard template without the magic word at all:
> [[[Special:Booksources/isbn={{{1}}}|ISBN {{{1}}}]]

You can, and that's a good way to do it. You'll have to ask the devs
what their reasons were for implementing this as a magic word, rather
than simply using a template (probably so thousands of existing pages
would already produce links without further edits, and possibly
because magic words are cheaper than templates?).

My point was that it's a bad idea to use a template as nothing more
than a wrapper for the magic word; if using a template is the
preferable method, then remove the magic word altogether, and only
have the one behaviour.

> See the following for some examples.
> http://en.wikipedia.org/wiki/User:Stevage/sandbox

You're piping the link with "ISBN <number>", which the parser is
picking up as a magic word and rewriting. I've edited the page to
break that action - it now works as you intended.

Note that directly linking to [[Special:Booksources]] is more flexible
than the magic word behaviour; it allows you to use slashes, for
example.

> > an abstraction layer to hide the real operation is likely to confuse
> > anyone who really wants to know how it works and takes a look at the
> > template code.
>
> Well, you could use the same argument against any templates. Using
> "abstraction layers to hide the real operation" is a fundamental part
> of making any complicated system usable by new users.

{{ ISBN | <number> }} which maps to [[ Special:Booksources / <number>
]] is useful, it provides a way to abstract the link to the
booksources page.

However {{ ISBN | <number> }} which maps to "ISBN <number>" is not
useful; the magic word syntax is already an abstraction layer, there
is no need to lay another one over the top, if it does not perform any
additional function of its own. Do you see my point?

You should ask the developers why this was implemented as a magic word
in the first place, I'm not really sure of their reasons.

-- 
Stephen Bain
stephen.bain at gmail.com



More information about the WikiEN-l mailing list