Langbahn Team – Weltmeisterschaft

Help talk:Magic words: Difference between revisions

Content deleted Content added
Cpiral (talk | contribs)
No edit summary
Line 134: Line 134:
:::It's an inconsistency within the page. I have raised the matter at [[mw:Help talk:Magic words#Variables that affect behaviour]]. Please do not use bullets for indenting talk page posts: see [[WP:TPG#Layout]] (third bullet) and [[WP:TPO#fixformat]]. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 10:21, 17 July 2014 (UTC)
:::It's an inconsistency within the page. I have raised the matter at [[mw:Help talk:Magic words#Variables that affect behaviour]]. Please do not use bullets for indenting talk page posts: see [[WP:TPG#Layout]] (third bullet) and [[WP:TPO#fixformat]]. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 10:21, 17 July 2014 (UTC)
:::: Thanks. When I noticed the discrepancy between how these three keywords are characterized here versus in the MediaWiki documentation, I thought I should point it out. I grant that all three affect page display, and thus behave differently from other variables and parser functions, but the MediaWiki categorization of keywords appears to key on their format and mechanism of action rather than on their effects. ~ Regarding indentation, over time I've developed the habit of including a bullet before the first paragraph of replies, and only colons before subsequent paragraphs of the same reply, as I find that this greatly improves readability. If it's good for threaded discussions in AfD, CfD, RfC, etc., then it's good elsewhere. But I'll defer to your request here. —&nbsp;'''[[User:Jaydiem|Jaydiem]]'''&nbsp;([[User talk:Jaydiem|talk]]) 13:51, 17 July 2014 (UTC)
:::: Thanks. When I noticed the discrepancy between how these three keywords are characterized here versus in the MediaWiki documentation, I thought I should point it out. I grant that all three affect page display, and thus behave differently from other variables and parser functions, but the MediaWiki categorization of keywords appears to key on their format and mechanism of action rather than on their effects. ~ Regarding indentation, over time I've developed the habit of including a bullet before the first paragraph of replies, and only colons before subsequent paragraphs of the same reply, as I find that this greatly improves readability. If it's good for threaded discussions in AfD, CfD, RfC, etc., then it's good elsewhere. But I'll defer to your request here. —&nbsp;'''[[User:Jaydiem|Jaydiem]]'''&nbsp;([[User talk:Jaydiem|talk]]) 13:51, 17 July 2014 (UTC)


I'd like to have [[WP:PAGENAME]] for [[WP:Page name]].

Please let me know why I should ''not'' do that.
I will be happy to reason further if need be.
Thanks. &mdash; [[User:Cpiral|<font color="#00C000">Cp</font><font color="#80C000">i</font><font color="#C08000">r</font><font color="#C00000">al</font>]][[User talk:Cpiral|<font color="#2820F0">Cpiral</font>]] 04:18, 7 August 2014 (UTC)

Revision as of 04:18, 7 August 2014

WikiProject iconWikipedia Help NA‑class
WikiProject iconThis page is within the scope of the Wikipedia Help Project, a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the Help Menu or Help Directory. Or ask for help on your talk page and a volunteer will visit you there.
NAThis page does not require a rating on the project's quality scale.

No Line

Is there any magic word to remove the horizontal lines which locate after each heading? --Yoosef (talk) 08:20, 9 August 2012 (UTC)[reply]

No, but you can add the following line to either Special:MyPage/common.css or Special:MyPage/skin.css:
h2 { border-bottom: none; }
This will remove the horizontal line below section headings (those formatted as ==Heading==). To remove the horizontal line below page headings as well, use h1, h2 instead of h2. --Redrose64 (talk) 14:52, 9 August 2012 (UTC)[reply]

A quirk

Hi all,

  • Over at Wikipedia:Copyright problems there's a section which contains "Wikipedia's current date is {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}...". However, those magic words don't seem to take effect; I just see it rendered as "Wikipedia's current date is CURRENTMONTHNAME CURRENTDAY, CURRENTYEAR. I tried editing the section; after a punctuation tweak it seemd to work in Preview, but on saving the change they're still redlinks. I know that these magic words are used elsewhere successfully (a lot of portals have boxes of "On 05 October..." type content). What's going on? Am I missing something obvious? There are lots of other templates on the affected page so maybe the parser has indigestion? If so, perhaps we should document that weakness more clearly as I couldn't find anything.
  • On a related point: Should this help page explain the distinction between magic words and templates, even though both can be invoked with double braces? For instance, if there was a template with the same name as a magic word, presumably it couldn't be invoked in the usual way..? (Whilst trying to figure out what was happening on Wikipedia:Copyright problems I found that there were templates like {{CURRENTMONTHNAME}} which got deleted years ago - they all seem to have been attempts at template vandalism).

Any suggestions? bobrayner (talk) 22:38, 5 October 2012 (UTC)[reply]

Richardguk (talk) 23:23, 5 October 2012 (UTC)[reply]
Groovy; thanks. bobrayner (talk) 01:32, 6 October 2012 (UTC)[reply]

Arithmetic operators with magic words

Sorry if this is a stupid question, but I want to be able to use something other than UTC in my sig file, yet I don't want it necessarily to be the time of my computer (I think there's a COMPUTERTIME magic word -- I don't want that). How do I use a math. operator with CURRENTTIME?

Something like the following is what I want to be able to do, but where adding 1 actually works. :)

{{subst:CURRENTTIME+1}} (Berlin Time)

Thanks.

BWP1234 (talk) 11:57, 25 November 2012 (UTC)[reply]

Using the help page here, I constructed {{subst:#time:H:i, j F Y|now +1 hour}} which displays as "13:12, 25 November 2012". BUT I'm not convinced this is a good idea, as it will make it hard for other editors to compare your timestamps with those of other editors. -- John of Reading (talk) 12:12, 25 November 2012 (UTC)[reply]

Thanks for the quick reply! I'll reflect on the effect on other users before implementing this. (Another ?: Why on earth doesn't Wikimedia default to the ISO date format?= BWP1234 (talk) 12:39, 25 November 2012 (UTC)[reply]

For the same reason that it's discouraged at WP:DATESNO - it's not the natural way of writing dates. --Redrose64 (talk) 14:16, 25 November 2012 (UTC)[reply]
Thanks for the answer, though I (weakly) disagree that it's not the "natural" way of writing dates, but, more importantly, strongly disagree that whatever's natural should be determinate. --User:BWP1234 (talk) 2012-11-25, 14:46 (New York Time)
There are a number of scripts and bots that expect that dates and times will be written in a particular format. If you try to deviate from that format, stuff like this happens. --Redrose64 (talk) 23:44, 25 November 2012 (UTC)[reply]
Let's hope someone soon realizes that badly written bots need to be scrapped, or rewritten! --User:BWP1234 (talk) 2012-11-26, 02:37 (New York Time)
Bots are coded to implement an agreed standard. You are welcome to start a discussion about changing the standard to allow for varying time zones, but I, for one, would favour consistency. -- John of Reading (talk) 08:19, 26 November 2012 (UTC)[reply]
Myself, I favor diversity, and everything that enables diversity to flower! --User:BWP1234 (talk) 2012-11-26, 07:44 (New York Time)
I sympathise with your point that the ISO format would be more logical, but you've even departed from that by using a local timezone instead of UTC.
More importantly, the adopted signature format has been chosen because it is the single most commonly used and recognised unambiguous international English-language format. So it is not an arbitrary choice. And dozens of bots rely on this standard being followed. In particular, Wikipedia:Signatures indicates that non-standard timestamps can confuse bots which automatically archive sections according the date of the most recent comment.
You are free to propose a new format, but until community consensus adopts your proposal, the onus is on you to respect the agreed guidelines – or create a more diverse wiki on your own website and edit there instead!
Richardguk (talk) 13:27, 26 November 2012 (UTC)[reply]
Here is an example of an ISO format date being wrongly interpreted. There are two possibilities: (i) the person who added the ref had assumed that the format should be CCYY-DD-MM and 158.169.131.14 has applied the correct fix for that; (ii) the person who added the ref had used the format CCYY-MM-DD, but 158.169.131.14 has assumed that it was formatted CCYY-DD-MM and applied the incorrect "fix". In fact it was the latter. This sort of issue will always arise unless we insist upon months being written out as words. --Redrose64 (talk) 13:53, 27 November 2012 (UTC)[reply]
Redrose64: I wouldn't mind writing out the month, but the year should come first: biggest units to smallest units (seconds).
As for this: "The adopted signature format has been chosen because it is the single most commonly used and recognized unambiguous international English-language format."
I'm not sure I agree, though I may misunderstand. Though I probably disagree no matter what you mean. Is "international English" a compound noun, modified by the preceding adjectives? If so, I disagree with the application of the adjectives, but mostly with the very idea that there is something that should be regarded as "international English" (though there probably should be some kind of international English -- it would certainly help nonnative speakers!) 2) If "international" is one of the adjectives, then ISO is probably more widely recognized -- or recognizable --(though perhaps not yet most widely used).
If a condition of my participation here is that I have to conform to a standard I disagree with, I may bow out. Anyway, thanks for the explanations. --User:BWP1234 (talk) 2012-11-27, 12:56 (New York Time)

Help with magic words in a template

Hello, i'm a member of WP:MMA a wikiproject for Mixed Martial Arts. We have been experiencing some troubles with pages being marked for deletion in part because they lack good sources. I thought it might help to build a template that could be dropped in a talk page that would help people find sources. the problem is that the pages in question have spaces in their names, example being UFC 49, the space breaks the external link so the template ends up useless. the magic word i'm using is {{BASEPAGENAME}}, i've tried {{BASEPAGENAMEE}} which replaces the space with an underscore, that makes the link work, but breaks the google search, so again it doen't actually work for what i want it to. When i use the template I've created in a page with no spaces it looks and works great. Anyway, the template i made is {{MMA find sources}}, if you click on that you will see it broken, or you can check out my sandbox (the same template, but my sandbox title doesn't have spaces) to see how i hoped it would look and work. Any help is much appreciated! Kevlar (talk) 09:19, 5 December 2012 (UTC)[reply]

The template {{Find sources}} uses "urlencode" to get round this, so I suggest you adapt the coding from there. -- John of Reading (talk) 11:20, 5 December 2012 (UTC)[reply]
(edit conflict) Probably redundant now that John has pointed you to {{Find sources}}, but in case it's of further help:
Wrap the page name in {{urlencode:...}} to convert spaces to pluses (which Google will convert back to spaces). For example, "{{urlencode:{{BASEPAGENAME}}}}" produces "Magic+words".
Note that {{BASEPAGENAME}} risks removing any part of the article name after a slash (for example, "A/B testing" would produce "A"). On the other hand, {{PAGENAME}} risks including extraneous subpages if it is transcluded on talk subpages (such as archive pages). If you will only ever use the template on the main article talk pages, "{{urlencode:{{PAGENAME}}}}" would be most appropriate.
Richardguk (talk) 11:27, 5 December 2012 (UTC)[reply]
thanks very much! you guys both rock! Kevlar (talk) 21:05, 5 December 2012 (UTC)[reply]

I wonder where it is possible to learn where the scope of basic search, or Advanced search by selected namespaces, is extended beyond the page as rendered by my webbrowser.

Specifically regarding magic words, by accident I learned that basic search for 'FORCETOC' (or 'FORCETOC_' and others) hits 543 articles. Initially I supposed that those are all of the English wikipedia articles that use the magic word, and visiting some may be instructive.

Soon I lost that faith, finding 2 hits for BASEPAGENAME and none for NEWEDITSECTION.

Similarly --for two that are not magic words but likely to be confused, if i understand correctly-- 216 hits for DEFAULTSORT (in article space, not the redirect to help space) and 1 hit for TOCLIMIT.

Now I wonder whether these searches hit mistaken appearances in article code, which are relatively few in number and may have diagnostic value because something needs to be fixed --instructive value as illustrations only in the negative, so to speak.

--P64 (talk) 03:36, 14 February 2013 (UTC)[reply]

Ignore parts of a string for ifeq/switch-conditions

I have a number of strings that are entered in templates that contain 3 letters followed by 3 digits, for example "ISS064" or "STS123". Is there a way to make a compare or ifeq comparison to find out whether the beginning of the string is "ISS" or "STS" without making a comparison between the string and all possible numbers behind them?

Example how it's done now:

{{#ifeq: {{#switch: {{{mission}}} | ISS001 = ISS | ISS002 = ISS | ISS003 = ISS | ... | ISS049 = ISS | ISS050 = ISS | Other }}| ISS | 1 | 2 }}

That, however, is getting slightly annoying for several hundred cases. Any help would be greatly appreciated. Thanks. --Julian H. (talk) 16:42, 23 March 2013 (UTC)[reply]

You can pick out the first three characters using {{str left}}. Try something like...
{{#ifeq: {{str left|{{{mission}}}|3}} | ISS | 1 | 2 }}
-- John of Reading (talk) 16:58, 23 March 2013 (UTC)[reply]
Thank you very much, that is indeed much easier. --Julian H. (talk) 17:43, 23 March 2013 (UTC)[reply]

__DISAMBIG__

Could someone please add the necessary documentation for __DISAMBIG__ (mw:Extension:Disambiguator)? Thank you. -- Michael Bednarek (talk) 13:51, 11 July 2013 (UTC)[reply]

 Done, see here --Redrose64 (talk) 14:30, 11 July 2013 (UTC)[reply]

Tomorrow

Is there some way to auto-generate text that is tomorrows date? Context: Wikipedia:Redirects for discussion/Today transcludes today's RfD discussions, but the page would be a million times better if it included a link to the previous day's discussions. Ego White Tray (talk) 03:07, 13 June 2014 (UTC)[reply]

@Ego White Tray: Yes, the #time magic word can do this. The documentation is at mw:Help:Extension:ParserFunctions#.23time.
*[[Wikipedia:Redirects for discussion/Log/{{CURRENTYEAR}} {{CURRENTMONTHNAME}} {{CURRENTDAY}}]]
*[[Wikipedia:Redirects for discussion/Log/{{#time:Y F j|now - 1 day}}]]
*[[Wikipedia:Redirects for discussion/Log/{{#time:Y F j|now + 1 day}}]]
-- John of Reading (talk) 05:21, 13 June 2014 (UTC)[reply]

Three "behavior switches" that aren't

Regarding the following three keywords:

All three of these are presently included in the list of behavior switches, but they aren't behavior switches; the first two are variables, and the third is a parser function. It seems to me that they should be moved from the "Behavior switches" section to the "Variables" and "Parser functions" sections, respectively. — Jaydiem (talk) 00:18, 17 July 2014 (UTC)[reply]

The first two do not return a value: they are not variables. The third does not take a value, process it and return another value: it is not a parser function. All three change the behaviour of the page: they are behaviour switches. --Redrose64 (talk) 00:27, 17 July 2014 (UTC)[reply]
If you examine the linked references I provided above—or the "General information" section within the article itself—I believe you will find them to be incompatible with that interpretation. — Jaydiem (talk) 01:22, 17 July 2014 (UTC)[reply]
It's an inconsistency within the page. I have raised the matter at mw:Help talk:Magic words#Variables that affect behaviour. Please do not use bullets for indenting talk page posts: see WP:TPG#Layout (third bullet) and WP:TPO#fixformat. --Redrose64 (talk) 10:21, 17 July 2014 (UTC)[reply]
Thanks. When I noticed the discrepancy between how these three keywords are characterized here versus in the MediaWiki documentation, I thought I should point it out. I grant that all three affect page display, and thus behave differently from other variables and parser functions, but the MediaWiki categorization of keywords appears to key on their format and mechanism of action rather than on their effects. ~ Regarding indentation, over time I've developed the habit of including a bullet before the first paragraph of replies, and only colons before subsequent paragraphs of the same reply, as I find that this greatly improves readability. If it's good for threaded discussions in AfD, CfD, RfC, etc., then it's good elsewhere. But I'll defer to your request here. — Jaydiem (talk) 13:51, 17 July 2014 (UTC)[reply]


I'd like to have WP:PAGENAME for WP:Page name.

Please let me know why I should not do that. I will be happy to reason further if need be. Thanks. — CpiralCpiral 04:18, 7 August 2014 (UTC)[reply]