Template talk:Shortcut
From Wikipedia, the free encyclopedia
[edit] Use of shortcut template
I asked this question at Wikipedia talk:WP, but I thought I'd ask it here as well in case anyone is watching this page. I was just wondering if there has been any discussion on the use of this shortcut template. I see it on some of the [[WP:]] pages, but not all. Should I (or someone else) go around and stick this on every single one, or is there a reason why it's only on a few now? Thanks. – Jrdioko (Talk) 20:00, 22 Jun 2004 (UTC)
- I'm going to be bold and start adding these, since I don't see any reason why that would be a bad thing. If I'm missing something, feel free to revert. – Jrdioko (Talk) 16:19, 23 Jun 2004 (UTC)
- There should be one piece of data stored that does these things:
-
- Update Wikipedia:WP to include that page
- Cause "WP:(page name)" to redirect to "Wikipedia:(page name)"
- Cause "Wikipedia:(page name)" to contain the shortcut template.
- There are other places where some standardisation like this would be useful too.
- Brianjd 05:01, Jul 18, 2004 (UTC)
-
-
- What would those instances be? I have not seen any and Wikipedia should be consistent!
-
-
-
- Brianjd 09:10, Jul 19, 2004 (UTC)
-
-
-
-
- I don't remember the specific cases now, but there were a few of the pages where it seemed to be cluttering or distracting on a certain page. For example, when new users come to the sandbox, they should be able to experiment with editing easily without being distracted by excess information. I feel that putting the template on that page would cause many of those newcomers to click on the shortcut links and perhaps get overwhelmed with information about templates and redirects that they don't understand yet. That's one of the situations where I feel it shouldn't be included. – Jrdioko (Talk) 04:19, 20 Jul 2004 (UTC)
-
-
The Shortcut page says that this template is for Wikipedia project reference pages, but I was wondering if I can use this for normal articles as well. For example, there was a note at the beginning of the List of sets of unrelated songs with identical titles mentioning a shortcut, UrSWIT, which I replaced with the template. Chiphead 21:06, 25 October 2005 (UTC)
- There have been a few edits to that page since, and the shortcut template is still there, so I'm going to assume there are no objections. Chiphead 20:08, 28 October 2005 (UTC)
[edit] link
Why is the shortcut linked in all uses of this template? It's not very useful to have a link to a redirect that goes to the page you're already on. Goplat 01:40, 6 Sep 2004 (UTC)
- I think it's useful, since most people using pages in the Wikipedia: namespace are active Wiki users, and therefore usually find it useful to be able to visit a page by its name directly. For example, I use WP:RD all the time to access Wikipedia:Reference desk. You can also use it in intra-wiki links like this (goes to the reference desk), and if you're like me and have a Firefox or Opera plugin set up for Wikipedia articles, it's handy. (I have Opera set up to replace "wiki <something>" with "http://en.wikipedia.org/wiki/<something>". :-)) splintax (talk) 09:43, 30 September 2005 (UTC)
[edit] Text overlapping the div box
Now that portals are becoming more common, this template is being placed within one of the portal's information boxes, usually in the introduction box. The problem that arises then is that the first line of text in the intro box will often overlap the divbox for {{Shortcut}}. I've tried a few different strategies on the trains portal, but nothing short of a much shorter first line of text in the intro box seems to work reliably. Is there a CSS guru who can sort this out? AdThanksVance. slambo 15:50, August 23, 2005 (UTC)
[edit] Tableless rewrite
This is a tableless rewrite of the current template. Source:
<div class="noprint" id="shortcut" style="border:1px solid #999; background:#fff; margin:0 0 .5em 1em; text-align:center; padding:5px; clear:right; font-size:smaller;float:right;"> '''[[Wikipedia:Shortcut|Shortcut]]''':<br /> '''{{{1}}}''' </div>
– TTD Bark! (pawprints) 23:33:01, 2005-09-03 (UTC)
- I tried using this rewrite on Portal:Trains, but the text still overlaps the box for me (Firefox on both WinXP and SuSE Linux 9.0). This code reduces the overlap, but doesn't completely solve the issue. Complicating the problem is that the box on the portal is used within another div box for the portal intro. slambo 10:57, September 8, 2005 (UTC)
[edit] Redirect link
I'm thinking that rather than having the link to the redirect page be a regular internal link, it should be an external link that removes the redirecting function (i.e. in the shortcut box for Wikipedia:Criteria for speedy deletion, rather than having the link be to WP:CSD, have it be to http://en.wikipedia.org/w/index.php?title=WP:CSD&redirect=no (so it would read: WP:CSD)). That way, if one clicks on the link, they don't automatically get redirected right back to where they started, they get to actually see the redirect, which is presumable why they clicked the link to begin with. They can, of course, click on WP:CSD and then once they're redirected click it again (where it says "Redirected from WP:CSD") and get there, but this eliminates the unnecessary interim bit. Granted, it doesn't look as nice, but I'd think it'd work better. Any thoughts? --Blackcap | talk 04:23, 19 October 2005 (UTC)
- Use Wikipedia:Tools/Navigation popups? Alphax τεχ 16:17, 21 December 2005 (UTC)
[edit] Guideline
Please replace WP:V / Wikipedia:Verifiability by WP:SHORT / Wikipedia:Shortcut in the <noinclude>...</noinclude> part. As example WP:SHORT is as good as WP:V, additionally it offers the relevant guideline with links to related information. Omniplex 10:58, 4 March 2006 (UTC)
- Done. Stifle 15:38, 7 March 2006 (UTC)
-
- Omniplex 17:59, 7 March 2006 (UTC) is fine now.
[edit] Request to administrators
I suggest the box read: Shortcut(s) —Markles 20:17, 14 March 2006 (UTC)
- More than one shortcut is often a dubious idea, see some IMO bad examples on WP:WP, better don't encourage it. Check out for similar proposals, the admins might miss it otherwise.
- Unrelated point keeping Markles' fitting header, please add...
[[Category:Wikipedia header templates]]
- ...near the end of Omniplex 18:18, 24 March 2006 (UTC) in its <noinclude> section.
[edit] Template:Shortcut/
- TfD nomination of Template:Shortcut/
- Template:Shortcut/ has been nominated for deletion. You are invited to comment on the discussion at the template's entry on the Templates for Deletion page. Thank you.
Next section copied from User talk:Omniplex in conjunction with the pending TfD. -- Omniplex 10:49, 20 April 2006 (UTC)
[edit] Please stop forking
Look, I understand you're using an older OS and browser and some things don't look right to you, but forking is not the answer. Please stop forking templates (such as {{ifdef}} and {{shortcut/}}), it adds far more complexity to a system that's already accused of being too complicated. —Locke Cole • t • c 09:52, 20 April 2006 (UTC)
- Even if {{Shortcut}} would be not protected I couldn't add the funtion of {{Shortcut/}} into it, they use different sizes, the latter creates an optional table cell, the former is standalone, it would be like two very different templates in one with at least two #if:. Maybe the code could share the WP:Short link, big deal.
- On the other hand as they are they use no if at all, and by their name it's clear that they are related but different. I've taken exactly the CSS as developed for {{Villagepumppages}} weeks ago, nobody said that this is bad. I've added the "optional shortcut" feature to {{Villagepumppages}} as you proposed it weeks ago. I've added your new <noinclude>|</noinclude> trick.
- It is exactly the look and feel as all those weeks, and nothing was wrong with that. And if you suddenly don't like it there is now one place to change it. -- Omniplex 10:16, 20 April 2006 (UTC)
-
- There is nothing wrong with
#if
(or even {{qif}}), both are practically free (the resulting pages are cached, they are not evaluated every time). Ergo, there's no reason to avoid them if it cuts down on the number of templates in use (and especially if it cuts down on the number of forks). Things were fine how they were; things were even fine when I integrated {{shortcut}} directly into (for example) {{historical}}. Things stopped being fine when you forked shortcut to shortcut/ just because it wasn't visually appealing to you.
- There is nothing wrong with
-
- We had this same problem yesterday with {{ifdef}}, so I get the impression it's not something you plan on stopping (hence my request: please stop forking). If you think you need to fork a template, get outside opinion first, there may very well be a solution (or you may find that people don't agree with the changes you're proposing). —Locke Cole • t • c 10:26, 20 April 2006 (UTC)
-
-
- It's no fork, repeating that can't make it true. It uses precisely the same number of templates (= one) as your proposal. But no if. It's so far the best solution, tune it as you like. We'll use #if: or ifndef when we really need them, which isn't the case anymore for shortcuts. -- Omniplex 10:37, 20 April 2006 (UTC)
-
-
-
-
- Saying it's not also doesn't make it not a fork. Your method uses {{shortcut/}} a fork of {{shortcut}}. My method uses a pre-existing template ({{shortcut}}), your method uses a new template because you (seemingly) have an issue with how it appears. And again, there is no reason to avoid
#if
or {{qif}}. WP:AUM was rejected, and#if
is, as I explained, basically free. —Locke Cole • t • c 10:50, 20 April 2006 (UTC)
- Saying it's not also doesn't make it not a fork. Your method uses {{shortcut/}} a fork of {{shortcut}}. My method uses a pre-existing template ({{shortcut}}), your method uses a new template because you (seemingly) have an issue with how it appears. And again, there is no reason to avoid
-
-
[edit] Fix the html
The html in this box is missing the </th> currently. -The DJ 15:26, 21 April 2006 (UTC)
[edit] Edit protected request
Please add the sort key to the category by changing
- [[Category:Wikipedia header templates]]
to
- [[Category:Wikipedia header templates|{{PAGENAME}}]]
- Done. --CBDunkerson 11:57, 28 April 2006 (UTC)
[edit] Obvious printing issue
Hi guys, I would just like to use class="noprint"
for the whole table, so that one doesn't get the borders (and only them) when printing. —Gennaro Prota•Talk 18:39, 22 May 2006 (UTC)
- Yes, now after you've said it it's obvious. I've fixed it for Meta, here an admin will do it. AFAIK it's also better to start the table on line one like this: on
{{{1{{{1|}}}|<table style="border: 1px solid #999; background: #fff; margin: .5em .5em .5em 1em; padding: 5px; float: right" class="noprint"> <th id="shortcut" align="center" valign="top"><small>[[Wikipedia:Shortcut|Shortcut]]:<br />{{{1|}}}</small> </table>}}}<noinclude> etc.
- -- Omniplex 20:07, 24 May 2006 (UTC)
- I've made the noprint change, but not the all-on-one-line one - perhaps someone else can chime in on that... RN 08:33, 25 May 2006 (UTC)
-
-
- Thanks RN. Though it doesn't hurt,
class="noprint"
on theth
is now superflous (I meant to move that one from the table header to the whole table). Thanks again for the fix. —Gennaro Prota•Talk 09:50, 25 May 2006 (UTC)
- Thanks RN. Though it doesn't hurt,
-
[edit] Interwiki
Can you please add interwiki links to:
- he:תבנית:קיצור דרך
- de:Vorlage:Shortcut
- als:Vorlage:Shortcut
- eo:Ŝablono:Mallongigo
and possibly more languages? --Amir E. Aharoni 13:02, 10 June 2006 (UTC)
- Done. —Ruud 00:59, 11 June 2006 (UTC)
Also hu:Sablon:Rövidítés --Tgr 11:40, 27 August 2006 (UTC)
And also nl:Sjabloon:Verwijzing - Ronaldvd 15:05, 14 November 2006 (UTC)
[edit] Positioning
Is there a way to position this template on the left/center of a page? If not, could an optional option be added so that, by default (option is not entered) the template appears on the right side, but if an option ("left", "center", "right") is entered, the template is positioned there? 24.126.199.129 07:36, 6 September 2006 (UTC)
[edit] 'Borrowing' this template
I was thinking of importing this template to another project I work on, so I went to view the source and noticed something that I don't understand. Why is the table surrounded by → {{{1{{{1|}}}|}}} ← that mess? –Xoid 07:33, 6 December 2006 (UTC)
- Anyone? –Xoid 02:41, 18 December 2006 (UTC)
[edit] add this IW
add this pls [[mk:Шаблон:Скратенпат]] Guitardemon666
[edit] Make template more convenient
Right now, this template requires its parameter, {{{1}}}
, to be [[WP:WP]]
for one shortcut, or the complicated [[WP:WP]]<br />[[WP:CUTS]]<br />[[WP:]]
for multiple shortcuts. Would it be possible to automate this? I would not mind switching the formatting for instances of this template. The current version goes:
{{{1{{{1|}}}| <table style="border: 1px solid #999; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; float: right" class="noprint"> <th id="shortcut" class="noprint" align="center" valign="top"><small>[[Wikipedia:Shortcut|Shortcut]]:<br />{{{1|}}}</small> </th></table>}}}
An intermediate version might go this way, for three shortcuts <and adding the somehow missing closing th tag:
<table style="border: 1px solid #999; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; float: right" class="noprint"> <th id="shortcut" class="noprint" align="center" valign="top"><small>[[Wikipedia:Shortcut|Shortcut]]:<br />{{#ifexist:{{{1|}}}|[[{{{1}}}]]|{{{1|}}} }}{{#if:{{{2|}}}|<br />[[{{{2}}}]]}}{{#if:{{{3|}}}|<br />[[{{{3}}}]]}}</small> </th></table>
This would not affect current versions of the template. Or for four shortcuts:
<table style="border: 1px solid #999; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; float: right" class="noprint"> <th id="shortcut" class="noprint" align="center" valign="top"><small>[[Wikipedia:Shortcut|Shortcut]]:<br />{{#ifexist:{{{1|}}}|[[{{{1}}}]]|{{{1|}}} }}{{#if:{{{2|}}}|<br />[[{{{2}}}]]}}{{#if:{{{3|}}}|<br />[[{{{3}}}]]}}{{#if:{{{4|}}}|<br />[[{{{4}}}]]}}</small> </th></table>
Another intermediate version below would use "redirect=no" to go to the shortcut page, rather than back to the target.
<table>style="border: 1px solid #999; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; float: right" class="noprint plainlinks"> <th id="shortcut" class="noprint" align="center" valign="top"><small>[[Wikipedia:Shortcut|Shortcut]]:<br />{{#ifexist:{{{1|}}}|[{{SERVER}}{{localurl:{{{1}}}|redirect=no}} {{{1}}}]|{{{1|}}} }}{{#if:{{{2|}}}|<br />[{{SERVER}}{{localurl:{{{2}}}|redirect=no}} {{{2}}}]}}{{#if:{{{3|}}}|<br />[{{SERVER}}{{localurl:{{{3}}}|redirect=no}} {{{3}}}]}}{{#if:{{{4|}}}|<br />[{{SERVER}}{{localurl:{{{4}}}|redirect=no}} {{{4}}}]}}</small> </th></table>
And when everything is converted (if this change is supported), the following version can be implemented:
<table style="border: 1px solid #999; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; float: right" class="noprint"> <th id="shortcut" class="noprint" align="center" valign="top"><small>[[Wikipedia:Shortcut|Shortcut]]:<br />{{#if:{{{1|}}}|[[{{{1}}}]]}}{{#if:{{{2|}}}|<br />[[{{{2}}}]]}}{{#if:{{{3|}}}|<br />[[{{{3}}}]]}}</small> </th></table>
And for "redirect=no":
<table style="border: 1px solid #999; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; float: right" class="noprint plainlinks"> <th id="shortcut" class="noprint" align="center" valign="top"><small>[[Wikipedia:Shortcut|Shortcut]]:<br />{{#if:{{{1|}}}|[{{SERVER}}{{localurl:{{{1}}}|redirect=no}} {{{1}}}]}} {{#if:{{{2|}}}|<br />[{{SERVER}}{{localurl:{{{2}}}|redirect=no}} {{{2}}}]}}{{#if:{{{3|}}}|<br />[{{SERVER}}{{localurl:{{{3}}}|redirect=no}} {{{3}}}]}}{{#if:{{{4|}}}|<br />[{{SERVER}}{{localurl:{{{4}}}|redirect=no}} {{{4}}}]}}</small> </th></table>
{{User:Gracenotes/Sandbox|WP:SAND|WP:SB}} An example for the above one, using {{User:Gracenotes/Sandbox|WP:SAND|WP:SB}}, is to the (what else?) right. Removed to change sandbox, 15:57, 14 March 2007 (UTC)
Hopefully I haven't screwed up any code. *cough yes the source code gets complicated fast* Any thoughts about this? GracenotesT § 00:58, 26 February 2007 (UTC)
- Hmm... I've always found it a bit silly that there's only one parameter, it seems a bit of a hack to slip in all those line breaks. One the other hand, using multiple parameters opens up two cans of worms: (1) where do we set the limit -- maybe five, for now? (2) to link the params, or not? Currently, they're all manually linked in the parameter, which means that adding hard brackets to the template will probably break every single current transclusion (easy but tedious to fix). Redirect=no seems to be another issue; I can see the rationale for that, but want to see how other people feel about it. They'll count as external links, at that point, which might be a drawback. (Even if we use plainlinks, it's still a distinct CSS class). – Luna Santin (talk) 19:34, 26 February 2007 (UTC)
- The first 3 of 5 suggested modifications won't break a single thing if someone just changed the source code to them right now (because of the #ifexist ParserFunction: the page "WP:SB" exists, but the page "[[WP:SB]]" does not). GracenotesT § 00:43, 27 February 2007 (UTC)
- Ohhh, very clever. I missed that. Will get around to implementing this, soon. Think I'll avoid the redirect=no bit, for now, but feel free to get a second opinion. – Luna Santin (talk) 01:48, 27 February 2007 (UTC)
- Done. Everything seems to check out. If we do want to change the rules for {{{1}}}, it looks like we'll also need to update {{policy}} (and any other templates that might include shortcuts) to match. Haven't looked into this too far, yet. – Luna Santin (talk) 01:57, 27 February 2007 (UTC)
- It's broke. The old code made it so if you didn't pass a parameter, nothing was displayed (see {{Rejected}} for an example of where this change caused issues). This new code displays an empty box if no parameter is provided. Please be more careful in the future. —Locke Cole • t • c 02:46, 28 February 2007 (UTC)
- It's not broken, since Luna Santin and I implemented condition calls from header templates (that really should have been there from the beginning). I accidentally reverted myself, but self-reverted my reversion. Refreshing a page on which {{rejected}} is transcluded should help. GracenotesT § 14:52, 28 February 2007 (UTC)
- It's broke. The old code made it so if you didn't pass a parameter, nothing was displayed (see {{Rejected}} for an example of where this change caused issues). This new code displays an empty box if no parameter is provided. Please be more careful in the future. —Locke Cole • t • c 02:46, 28 February 2007 (UTC)
- Done. Everything seems to check out. If we do want to change the rules for {{{1}}}, it looks like we'll also need to update {{policy}} (and any other templates that might include shortcuts) to match. Haven't looked into this too far, yet. – Luna Santin (talk) 01:57, 27 February 2007 (UTC)
- Ohhh, very clever. I missed that. Will get around to implementing this, soon. Think I'll avoid the redirect=no bit, for now, but feel free to get a second opinion. – Luna Santin (talk) 01:48, 27 February 2007 (UTC)
- The first 3 of 5 suggested modifications won't break a single thing if someone just changed the source code to them right now (because of the #ifexist ParserFunction: the page "WP:SB" exists, but the page "[[WP:SB]]" does not). GracenotesT § 00:43, 27 February 2007 (UTC)
[edit] Add sk:
Please, add sk:. sk:Šablóna:Skratka —Zacheus Talk • Contributions • Edit counter 16:02, 15 March 2007 (UTC)