Jump to content

Template talk:Self-reference

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by Mclay1 (talk | contribs) at 11:42, 30 March 2023 (Mclay1 moved page Template talk:Self reference to Template talk:Self-reference: grammatically correct hyphen). The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Instructions for use

[edit]

This template should be placed around any text in the main article namespace which is a self-reference (see Wikipedia:Avoid self-references).

Why, you are asking, is such a trivial thing in a template? It is here to deal properly with self-references. In support of forks and mirrors, articles should never refer into category space, wikipedia space, or talk space.

However, occasionally there is a good reason to provide a "see also" link into such spaces. Currently the policy is that self-references are only allowed using a template. By using this template, you can include such a link in a way that allows a particular fork or mirror that doesn't copy these spaces to easily suppress that link. Mirrors and forks can choose to blank the template and suppress these references, or they can do a little bit of work and turn them into external references to Wikipedia. -- Jmabel | Talk 18:19, Feb 2, 2005 (UTC) (edited for clarity by Creidieki 18:39, 28 November 2005 (UTC))[reply]

I agree that this template is useful occasionally. However, potential users should be warned that just because a self-reference is placed in a template is not a license to include all the self-references you desire. They still create problems for paper versions of Wikipedia and are often not encyclopedic or professional. Use discretion. Deco 07:26, 5 Feb 2005 (UTC)

The only way I see this of any use is to make it very extensible. I am going to rename it to Template:Selfref (sr is undecipherably vague) and also change it to only accept a parameter, with no accompanying default text. To make use of it, you'd insert {{selfref|Some text of relevance}}. -- Netoholic @ 17:54, 2005 Feb 7 (UTC)

TfD'd

[edit]

This template was listed for deletion on Templates for Deletion. The decision was to keep this template. Please see Wikipedia:Templates for deletion/Log for more information. If you are viewing this after April 2005, you will have to see TfD's history.

[edit]

Attention all, replace the selfref tagged (Special:Whatlinkshere/Template:Selfref) articles as external links or as external links in the external links section. -- Zondor 20:36, 15 October 2005 (UTC) Maybe not. -- Zondor 18:19, 6 November 2005 (UTC)[reply]

See also??

[edit]

I can understand Category:Wikipedia maintenance, but what is the purpose of having a {{main}} and a See also section hidden within the template?—jiy (talk) 02:04, 7 November 2005 (UTC)[reply]

for easier navigation and thus a better wikipedia infrastructure -- Zondor 09:19, 7 November 2005 (UTC)[reply]

avoid self references mark

[edit]

I made a change that adds a little mark to indicate it is a self reference and appears like this:

Perhaps, its an eyesore but the point was to indicate this is a self-reference other than using pastel shaded information boxes. And as you know, self-references are not professional.

-- Zondor 09:19, 7 November 2005 (UTC)[reply]

Made another change that would appear like this:

this is a self reference

-- Zondor 18:35, 13 November 2005 (UTC)[reply]

Both have subsquently ceased to exist. --Wcquidditch | Talk 17:22, 23 November 2005 (UTC)[reply]

Adds extra space

[edit]

This template seems to add extra space after the text in a way other dablink templates don't. For example, on the current version of Main, there is a gap between "For the Wikipedia main page, see Main Page" and "For the American state, see Maine." Anyone able to fix this?72.72.199.151 (talk) 22:31, 31 May 2008 (UTC)[reply]

I've changed the template in the following way:
  • I changed the normal version to use {{dablink}}, so should work like all the other hatnotes. This (I hope) will fix 72.'s concerns.
  • I changed the inline version to use the plainlinks and selfreference classes, just like the normal hatnote version.
I also changed the code to allow the inline version to be invoked with {{selfref|''text''|inline}} in addition to {{selfref|''text''|}}. --h2g2bob (talk) 22:23, 26 June 2008 (UTC)[reply]

Inline does not work in bulleted lists

[edit]

I would like to add a selfref to a disambiguation page, but the template does not allow inclusion in a bulleted list.

  • Item 1
  • Item 2

- Even though there is an aserisk before the 3rd item, it does not show up as a bullet. Can someone fix this, or is there an alternative method? --George100 (talk) 07:10, 12 November 2008 (UTC)[reply]

This bug still occurs, in the sense that if you want to delete the entire bulleted item as follows you get strange formatting.
  • Item 1
  • Item 2
It would be best to eliminate the bullet as well as the item in the cleaned output. 14:13, 19 January 2016 (UTC)

Edit Protected

[edit]

{{editsemiprotected}}

{{pp-semi-template|small=yes}}</noinclude> {{#switch:{{{2|NONE}}}

is causeing extra space on articles. Please change to

{{pp-semi-template|small=yes}}</noinclude>{{#switch:{{{2|NONE}}}

or

{{pp-semi-template|small=yes}} </noinclude>{{#switch:{{{2|NONE}}}

or

{{pp-semi-template|small=yes}} </noinclude>{{#switch:{{{2|NONE}}}

. Thank you.96.53.149.117 (talk) 02:04, 8 December 2008 (UTC)[reply]

 Done Ruslik (talk) 14:52, 8 December 2008 (UTC)[reply]

Editprotected request involving this template

[edit]

This message is to inform people monitoring this talk page that there is an "editprotected" request involving this and several other templates at Template talk:! cymru.lass (hit me up)(background check) 20:36, 28 December 2010 (UTC)[reply]

Request to remove extraneous space

[edit]

At the end of the page, there's additional spacing. If you could remove that (so as to remove an entirely unnecessary and empty line on all those articles), that would be most appreciated! Thanks. --Qwerty Binary (talk) 14:42, 11 August 2012 (UTC)[reply]

Hmm, there's no additional space. (If you copy all the source, into a notepad, you can check for yourself. The way that pagebreaks are highlighted in our edit-window makes it appear as if there is a superfluous space, but there is not.)
Which article(s) are you seeing problems in? (examples are always handy :) -- Quiddity (talk) 00:05, 12 August 2012 (UTC)[reply]

"Exclude in print" bug

[edit]

{{Selfref|inline}} does not inherit the print-exclusion code:

... {{selfref}} normally uses {{Hatnote}} which has class="dablink" and that class is excluded in print by MediaWiki:Print.css. However, if the rarely used inline parameter is present in a {{selfref}} then {{Hatnote}} is not used and the selfref is not excluded in print. Spelling is an example of that (I had to examine around 50 selfrefs to find an example with inline).

— PrimeHunter (talk) 01:03, 29 January 2014 (UTC)

Posting this here; going to put this on my to-do list and attempt a fix after further investigation (if needed) later. meteor_sandwich_yum (talk) 04:24, 29 January 2014 (UTC)[reply]

I'm not sure uses with the inline parameter should be excluded from print. The quoted post was an explanation of the current situation and not an argument for changing it. I don't know how selfrefs with the inline parameter are generally used in practice. Maybe there are cases where we want inline selfrefs to be printed, and where users expect it. PrimeHunter (talk) 04:44, 29 January 2014 (UTC)[reply]
Agreed. After a lot of thinking, I've decided I'm not going to change this, for two reasons: 1.) I'm not confident enough to be sure I won't break functionality and 2.) after examining the first 50 namespace transclusions (I checked—Spelling does appear to be the only article-namespace page using it) I'm thinking it's not that big a deal.
Not to say it should never be changed, but just that it's too messy right now.
However, I will mention print-exclusion in the template documentation. The folks over at History of Wikipedia seem to be using {{Selfref}} incorrectly. I'm going to fix this. meteor_sandwich_yum (talk) 20:22, 1 February 2014 (UTC)[reply]
{{template usage|selfref|inline|0}}hastemplate:"selfref" insource:/\{\{ *[Ss]elfref *\|[^}]*inline/ prefix: : shows the nine six or so uses. I don't think self references should show in print, but then what does class="selfreferences" do? Wait for a mirror site to interpret it? So if I want to say something in article space, for online users, like search and navigation goodies, I recommend using {{nomirror}}, which does class="selfreference noprint".
The others are false positives. — CpiralCpiral 08:13, 17 December 2015 (UTC)[reply]
"class=selfreference" marks what will be removed from mirror sites, per CharlotteWebb at wp:Village_pump_(proposals)/Archive_45. What is removed from a web site should be removed from print as well, right? — CpiralCpiral 08:23, 17 December 2015 (UTC)[reply]

Should we warn against nested templates?

[edit]

Nested templates (similar to those used in {{Multiple issues}}) of the same general location- & format-type can be made to work to some degree with Selfref, according to a few casual tests I ran at As of. However, I think the documentation should warn against it due to the resulting formatting errors:

  • Minor and subtile, and therefore more likely to be missed: Nesting another indented template inside the indented Selfref template indents the resulting line of text twice as far as is standard:
{{selfref|{{For|the Wikipedia style guideline|Wikipedia:As of}}}}
  • Major: Text within Selfref but before (outside) of the nested template will cause a line break, with the resulting text from the nested template indented twice as far:
{{selfref|"As of" redirects here. {{For|the Wikipedia style guideline|Wikipedia:As of}}}}

Should we put a warning in or leave it out?

Also, what is the correct WP term for "a template that creates an indented, italicized line used at the top of an article or section"? Is that a hatnote template, or does the term "hatnote" include "message boxes used at the top of an article or section"? Hm. Maybe this distinction doesn't matter here, since something like {{Refimprove}} would be obviously ugly instead of subtly. Plus, if we caution against nesting any template, that would cover it. Still, I'm curious how robust our distinctions are, for the sake of clarity elsewhere.

Sorry all I can do is point this out, but my real-life limitations are getting in the way of doing this myself right now and I might not make it back here. Thanks in advance if you can discuss or work on this! — Geekdiva (talk) 22:17, 29 August 2015 (UTC)[reply]

To editors Meteor sandwich yum and PrimeHunter: You've discussed this template recently, so I'd like to point this out to you. Please see my post above. Thanks! — Geekdiva (talk) 22:25, 29 August 2015 (UTC)[reply]

Trim input

[edit]

I think users should be free from the unnamed parameter space handling. It doesn't trim. I think we should trim space from any given input, so that the spacing output is determined naturally, by the spacing the template is given in the wikitext. — CpiralCpiral 00:33, 25 December 2015 (UTC)[reply]

Template-protected edit request on 10 April 2016

[edit]

Add the <includeonly /> tags. I have saved the suggestion in the sandbox.

ADTC Talk Ctrb  10:06, 10 April 2016 (UTC)[reply]
The version in the sandbox you started from did not match the live template. There's a whole lot more there than just your request. Could you refresh the sandbox and have another go please? I'd do more but am not currently at my PC. Bazj (talk) 10:23, 10 April 2016 (UTC)[reply]

Template-protected edit request on 3 November 2018

[edit]

The consensus is against adding <span class="user-show"> to this template.

Cunard (talk) 05:44, 27 January 2019 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Add <span class="user-show"> in this template per this discussion at the village pump. I don't think this edit would be controversial because the editors would not be affected by this edit. Thanks. Hddty. (talk) 11:28, 3 November 2018 (UTC)[reply]

 Not done: This is a pretty major change to how this template displays since doing this would hide it for most people, so there should be an explicit consensus in favour. Changes would also have to be made to Module:Hatnote since it also provides selfref functionality. Galobtter (pingó mió) 12:22, 3 November 2018 (UTC)[reply]


Should we make this template hidden in the article mainspace with a code to those who doesn't logged in, especially readers? The articles that linked using this template are mostly only in the interest of the editors and often distract the readers who come here only to read (example: Fair use, Internet troll, International Phonetic Alphabet). We already put links to the project page at the left bar and from the Main Page. Some would probably argue that this hatnote would attract new editors, however that's not our purpose, our purpose is to create an encyclopedia. Per Wikipedia:Hatnote: "Their purpose is to help readers locate a different article if the one they are at is not the one they're looking for", most readers not even intended to look for the project namespace in the first place. This discussion is almost similar to WP:CNR. RfC relisted by Cunard (talk) at 06:33, 16 December 2018 (UTC). Hddty. (talk) 13:16, 3 November 2018 (UTC)[reply]

Why do you need another <span>...</span> element? You can simply add the user-show class name to the existing class="plainlinks selfreference noprint" and class="plainlinks selfreference" attributes. --Redrose64 🌹 (talk) 15:37, 3 November 2018 (UTC)[reply]
I don't know about the code but at least it's possible to do this. Hddty. (talk) 22:48, 3 November 2018 (UTC)[reply]

The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Move discussion in progress

[edit]

There is a move discussion in progress on Template talk:Self-reference which affects this page. Please participate on that page and not in this talk page section. Thank you. —RMCD bot 09:01, 28 October 2020 (UTC)[reply]