Template talk:Void
From Wikipedia, the free encyclopedia
Contents |
---|
[edit] Documentation
This template does nothing.
More exactly, it outputs the null string. It's useful for programming advanced templates.
It often is used within a template to the right of an equals sign.
[edit] Alternatives
It's also possible to use {{ns:0}}
instead of {{void}}
. Attackers could manipulate {{void}} but not {{ ns:0 }}, the empty/void/null string for the main namespace. Some magic words like __END__ might also have the desired effect of doing nothing.
[edit] See also
[edit] Discussion
Contents |
Add issues below as you see fit, sign with ~~~~
[edit] Copy to another wikipedia?
How can I copy this template to the sl:Template:Void, in order to see sl:Kofi Anan (infobox copied from en:)? --romanm (talk) 23:10, 1 October 2005 (UTC)
- You can't create an empty template. If you look at the History of this one you'll see it was created with something in it, which was then erased so as to leave the needed nothing. (SEWilco 03:56, 2 October 2005 (UTC))
-
- I see. Thank you. --romanm (talk) 12:01, 2 October 2005 (UTC)
- He's wrong, write __END__ in the textbox and save it, a revision with no contents will be inserted into the database. —Ævar Arnfjörð Bjarmason 05:06, 22 October 2005 (UTC)
- Well, it looks to me like this template was created through erasure. Where is this __END__ thing documented? I'm sure you know what you're talking about, but we mere users sometimes need hints as to what you're talking about. (SEWilco 06:22, 22 October 2005 (UTC))
- I don't know if it's documented anywhere, it's a magic word intended to allow one to save revisions with whitespace at the end (which would otherwise be trimmed), by placing it by itself in the textbox you can bypass the empty-field check and save a null-byte revision. —Ævar Arnfjörð Bjarmason 10:20, 22 October 2005 (UTC)
- If it isn't documented, users won't use it and is indistinguishable from magic. (SEWilco 15:06, 22 October 2005 (UTC))
- The only reference to __END__ I've found is in German (de:Wikipedia:Wikisyntax/Glossar). SeventyThree(Talk) 01:31, 5 December 2005 (UTC)
- I don't know if it's documented anywhere, it's a magic word intended to allow one to save revisions with whitespace at the end (which would otherwise be trimmed), by placing it by itself in the textbox you can bypass the empty-field check and save a null-byte revision. —Ævar Arnfjörð Bjarmason 10:20, 22 October 2005 (UTC)
- Well, it looks to me like this template was created through erasure. Where is this __END__ thing documented? I'm sure you know what you're talking about, but we mere users sometimes need hints as to what you're talking about. (SEWilco 06:22, 22 October 2005 (UTC))
- He's wrong, write __END__ in the textbox and save it, a revision with no contents will be inserted into the database. —Ævar Arnfjörð Bjarmason 05:06, 22 October 2005 (UTC)
- I see. Thank you. --romanm (talk) 12:01, 2 October 2005 (UTC)
[edit] Template:Null
What is the difference between Template:Null and Template:Void ? --Hello World! 13:45, 23 April 2006 (UTC)
- There's apparently no intentional difference, therefore I've redirected Template:Null. Here's the comment of the author:
-
- This is an intentionally empty template.
-
- An empty template has several functions:
- "Null", i.e. the zero-string, is often required in template code, either as a backup or default parameter.
- It is crucial to various higher-function templates like {{Hif}}.
- It can often prevent nasty errors, possibly in connection with templates like {{Tif}} or {{Exists}} by swapping in a zero-string instead of an error.
- An empty template has several functions:
-
- To anyone who doesn't see the point of a zero-template, please consider:
- It's not causing any harm.
- It is being used, and many other templates will cease to function without it.
- Most "codes" always require a zero-string (compare to vbNull in Visual Basic).
- To anyone who doesn't see the point of a zero-template, please consider:
-
-
- Note: there is also {{void}} - one of these templates should be deleted, and suggest
void
on the basis ofnull
being a more obvious name for this function.
- Note: there is also {{void}} - one of these templates should be deleted, and suggest
-
- See
{{ns:0}}
has precisely the same effect, but can't be attacked by vandals. -- Omniplex 04:35, 1 May 2006 (UTC)
for the author and the source of this quote. JFTR, both null and void are arguably useless, because