Help talk:Magic words/Archives/2006

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Warning! Please do not post any new comments on this page. This is a discussion archive first created in 2006, although the comments contained were likely posted before and after this date. See current discussion or the archives index.

No Title

The following discussion is closed.

Trying to figure out how to hide titles on various pages. Like on the main page, how can you hide the "Main Page" title? I thought the NOTC magic word command would work, but it only seems to put in the NOTC with the underscores around it in the page. Was wondering if I am missing something. I am on the latest version of 1.7 The preceding unsigned comment was added by Razak (talk • contribs) 09:44, 28 August 2006 (UTC).

That's actually done by modifying the sitewide JavaScript file. – Minh Nguyễn (talk, contribs) 19:30, 28 August 2006 (UTC)
Hi, Can you explain what exactly should be change in sitewide JavaScript file to be able to hide the Main Page title please? Sorry but I can find it out. thanks. Alain - 12 January 2007 (UTC).

For Monobook.css:

/* hide heading for Main Page (Monobook skin only) */ H1.firstHeading {
    display: none;

--pfctdayelise 16:03, 28 March 2007 (UTC)

ToC copy

The following discussion is closed.

I'm trying to insert in one page the TOC of another one. I've only been able of inserting one whole page (see this), but would be nice to hide the content. How could I do it? Is there any magic word? Thanks. --Micru 19:47, 5 October 2005 (UTC)

I don't think that there is an existing feature for that. If you really want it, ask for it at MediaZilla (although I am not sure such feature would be a good idea). --Mormegil 10:29, 1 November 2005 (UTC)


The following discussion is closed.

Is there a token similar to NUMBEROFARTICLES that displays the number of *all* entries in the database, instead of just those big enough to be considered an "article" by the engine? -- Schnee 04:09, 26 December 2005 (UTC)

{{NUMBEROFPAGES}} = 10,768,891 (while {{NUMBEROFARTICLES}} = 90,045) Smiddle 17:07, 14 February 2007 (UTC)

Number of articles in a specific category

The following discussion is closed.

Hi, is it possible to get the number of articles of a certain category, like the one that is displayed on category pages. I want to use it in a table of contents like: Category A (3), Category B (7), Category C (-). --Rudy, Jan 5th 2005

This isn't currently possible using magic words; you would need to use an extension or change MediaWiki. —{admin} Pathoschild 14:51:47, 05 March 2008 (UTC)

HOME variable

The following discussion is closed.

There should be a variable called HOME or something like that which is equivalent to User:xxxxx where xxxxx is the name of the currently-logged in user. Otheus 01:28, 16 January 2006 (UTC)

We have Special:Mypage for that. :^) – Minh Nguyễn (talk, contribs) 15:22, 11 July 2006 (UTC)

own Variable

The following discussion is closed.

Hi, how can i make a own MagicWord?

For you own sanity, leave it to the developers. I tried monkeying with it and ended up giving up. -- Nexis 02:31, 17 May 2006 (UTC)
See mw:Manual:Magic words. —{admin} Pathoschild 14:53:42, 05 March 2008 (UTC)

Other keyword?

The following discussion is closed.

I saw another keyword, but I wasn't sure if version dependent or installation customization.

  • (from the Stub Template?)

--Iain 00:27, 31 January 2006 (UTC)

FULLPAGENAME added. -- Omniplex (w:t) 06:06, 27 March 2006 (UTC)

Category modifiers

The following discussion is closed.

Where are things like <noinclude> or <includeonly> described? Shouldn't they be on this page somewhere? --Connel MacKenzie 04:05, 7 February 2006 (UTC)

No, not here. There are more Wiki tags, <gallery>, <inputbox> (sp?), <references> & Co. They certainly should be somewhere, maybe create a list of this stuff? Omniplex 05:34, 27 March 2006 (UTC)
P.S.: And of course then add a link from here under "See also"
<inputbox> and <references> are added by extensions, so they're documented at mw:Extension:Inputbox and mw:Extension:Cite respectively. Other tags are documented (or soon will be) on the merged page at mw:Help:Magic words. —{admin} Pathoschild 14:59:51, 05 March 2008 (UTC)


The following discussion is closed.

Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror:: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences.

Is raw:MediaWiki: the same as INT: by chance? Test:

Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror:: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences.

Apparently, but I tested only English. Or is it like action=raw? Test with {{raw:Template:!}}:


Next test with {{raw:Template:CURRENTDAY2}}:


Okay, templates are evaluated. Where would I need this? w:User:Omniplex 05:12, 27 March 2006 (UTC)
Straight into an edit conflict, I've not yet created a cookie for the new account (see below, thanks).
After some testing, raw is apparently the same as msg ?!? -- Omniplex (w:t) 08:44, 27 March 2006 (UTC)

What does {{raw:..}} do?

What does raw do? I do not see what that magic word does. And what does &action=render do? -- 11:33, 27 March 2006 (UTC)

Check it out, straight from the location field of my browser while typing this (replacing action=submit etc. by action=render):
{{raw:unclear}} is (unclear), it can't simply be the same as {{unclear}} (unclear), it's probably something like msg with a special effect under certain conditions, please tell us if you find the solution. Question also posted on w:WP:VP/T, maybe it's already answered. -- Omniplex (w:t) 13:38, 30 March 2006 (UTC)
This has since been documented on the help page. —{admin} Pathoschild 15:07:27, 05 March 2008 (UTC)

Magic words reorganisation

The following discussion is closed.

Copied from the [[Help:Magic words]] talk page on Wikipedia:

Copied from m:User_talk: (I can't create an account there, its inline PNG captcha doesn't work with my browser, see "account" in WP:VP/T):

I see you're reorganising Help:Magic words. I don't understand what system you're using, though; how are #redirect and __MAGIC__ terms related to formatting? // Pathoschild 02:29, 27 March 2006 (UTC)
#REDIRECT is a bogey, now moved to "misc.". The rest is simply the remaining stuff with two underscores like __NOEDITSECTION__ (that's often useful to suppress edit links in the noinclude part of a template, somewhat related to the ToC magic words). REVISIONID belongs to PAGENAME & Co., it's used to create Permalinks, see Help:Variable. -- Omniplex 04:17, 27 March 2006 (UTC)
I created the account Omniplex and emailed you the login information. :) // Pathoschild (admin / talk) 04:27, 27 March 2006 (UTC)
Thanks, much better now, finally I can set the edit window to a size working in my browser window, use the classic skin, etc. -- Omniplex (w:t) 05:55, 27 March 2006 (UTC)

I don't think they're related to the table of contents. The only similarity I can see is that the words affect headings, and the table of contents is a list of headings. The words don't have any effect on the table itself, though. // Pathoschild 04:34, 27 March 2006 (UTC)

Maybe my POV is somewhat skewed, I needed the TOC, FORCETOC, NOEDITSECTION magic in similar templates like w:Template:Doctl. If you know a good name for the "NO"..."START" table let's split "Formatting", but keep the underscore magic adjacent (below the ToC magics). How about "Nonomagic" (that joke misses anybody who doesn't know vi). Testing new signature: Omniplex 05:26, 27 March 2006 (UTC)

Currentday with leading 0 when <10?

The following discussion is closed.

For RFC 3339 / ISO 8601. -- Jeandré, 2006-03-27t18:47z

{{CURRENTDAY2}} = 25, {{CURRENTDAY}} = 25. -- Omniplex (w:t) 05:18, 3 April 2006 (UTC)
WikiThanks.png -- Jeandré, 2006-04-03t19:33z

CS vs. CZ

The following discussion is closed.

For unknown reasons [[cs:|foo]] doesn't work on Wikipedia, test it there, no such issue with [[cz:|bar]]. The fullurl examples were too wide, I've replaced <code> by <small> again, but now consistent for all three cases where an URL is shown (incl. SERVER), so that should be okay for any browser, no typographical mess anymore. 09:10, 4 April 2006 (UTC) -- Omniplex (w:t)

That was complete nonsense, on en:w: it only needs a leading colon [[:cs:]] and here on Meta that colon also works. Besides [[cz:]] never really worked anywhere, it was only shown as link (unlike [[cs:]] on w:en:). -- Omniplex (w:t) 01:30, 2 May 2006 (UTC)

New magic words

The following discussion is closed.

The new magic words {{TALKSPACE}}, {{TALKSPACEE}}, {{SUBJECTSPACE}}, {{SUBJECTSPACEE}}, {{TALKPAGENAME}}, {{TALKPAGENAMEE}}, {{SUBJECTPAGENAME}} and {{SUBJECTPAGENAMEE}} have MW 1.6+ tag but does not work even on 1.6.3. Did you mean 1.7+? Borgx 09:08, 14 April 2006 (UTC)

Maybe. I can't tell, I've only tuned the table, please fix 1.7 if you think that that's we're using. Special:Version says 1.7alpha  at the moment, whatever that means. -- Omniplex (w:t) 09:46, 14 April 2006 (UTC)
This has since been corrected. —{admin} Pathoschild 15:12:10, 05 March 2008 (UTC)

Raw modifier

The following discussion is closed.

{{NUMBEROFUSERS}}, {{NUMBEROFFILES}} and {{NUMBEROFARTICLES}} will now all accept a "raw" modifier, e.g. {{NUMBEROFUSERS|R}}. (fixed on r.13978). Thanks to Robchurch. Borgx 00:21, 1 May 2006 (UTC)

Added. -- Omniplex (w:t) 01:32, 2 May 2006 (UTC)
Very useful addition. Thanks. --CBDunkerson 13:42, 5 May 2006 (UTC)

New magic word

The following discussion is closed.

New magic word __NEWSECTIONLINK__ introduced to mw r14009 (bugzilla:4876. This magic word will force page to have plus (+) button at the top of page (new section). Borgx 00:24, 2 May 2006 (UTC)

Just add what you find, this is a Wiki, bold, self-healing, the works... ;-) -- Omniplex (w:t) 01:34, 2 May 2006 (UTC)

Hi Omniplex, I added here instead of main page because my english is bad :) Borgx 01:37, 2 May 2006 (UTC)

Okay, I try it with my DEnglish... :-) -- Omniplex (w:t) 02:08, 2 May 2006 (UTC)
Failed, I've no clue what it's supposed to do, apparently it doesn't work yet. I've also no idea what {{DISPLAYTITLE}} does, if anything. -- Omniplex (w:t) 02:52, 2 May 2006 (UTC)

Yes, ofcourse it will failed, because it will work only on revision 14009+, meta currently below that (it seems). Borgx 02:57, 2 May 2006 (UTC)

Special:Version says 1.7alpha r13760 here, also on w:en: - at least the "R" format for the numbers works. -- Omniplex (w:t) 03:04, 2 May 2006 (UTC)

The svn revision info seems to not working also, which now i complain to robchurch at #mediawiki. {{NUMBEROFUSERS}} also supposed to work on 13916+ , but it works now on meta (13760?). I also fillup bugzilla:5784 Borgx 03:10, 2 May 2006 (UTC)

The revision number seems correct now. Borgx 01:48, 9 May 2006 (UTC)

Magic word for main title of page?

The following discussion is closed.

Given a page named "Wikipedia:Today's featured article/April 11, 2006", I can get "Wikipedia" with NAMESPACE and "April 11, 2006" with SUBPAGENAME. Is there any way to extract out "Today's featured article"? It would be very useful to be able to identify a 'TITLEPAGENAME' like this so that conditions could be set for all sub-pages based on the main (simplifying and improving w:Template:FCpages) or a link constructed by adding a computed date to a title page name (vastly simplifying w:Template:Day+1). --CBDunkerson 14:01, 5 May 2006 (UTC)

Patrick created some interesting examples at Help:Link/a and Link/a. The latter is a namespace supporting subpages, and you can get some interesting effects with "../". The former namespace Help on Meta doesn't support subpages. Your case is the latter, because SUBPAGENAME works for you. -- Omniplex (w:t) 12:01, 8 May 2006 (UTC)

Robchurch has added new magic words {{BASEPAGENAME}} and {{BASEPAGENAMEE}} for this. Just wait for r.14212 (bugzilla:5845). Borgx 05:05, 14 May 2006 (UTC)

I'd like to see something that would give the full SUBPAGENAME...e.g. "Other/Subtitle" on "Title/Other/Subtitle". (Particularly in user space) I occasionally do organize things to a third level and want to display the full path below User:username. ⇔ ChristTrekker 15:54, 5 September 2007 (UTC)

See Help:ParserFunctions#.23titleparts:. —{admin} Pathoschild 15:15:36, 05 March 2008 (UTC)

No html auto-completion for template

The following discussion is closed.

I'm not sure if this is the right place to ask (and would welcome redirection to the right spot if it's somewhere else), but I'm wondering if there's a "Magic word" to prevent the html in a template from being auto-completed.

For example, I have a template with an html div open tag "<div>" (lets call it "Header") and a matching template with an html div close tag "</div>" (lets call it "Footer"). I want to use these two templates to wrap around content. E.g:


On older versions of the MediaWiki software this seems to work (such as the version currently in use by Wikipedia). But, on newer versions (such as 1.6.3 which I'm running on my own server), the software will insert a closing </div> tag right after the end of the first template - preventing the wrapping of the content that I'm wanting. The result looks like:


So, is there a Magic Word I can put in my Header template to prevent that unwanted div close tag? Thanks. —GrantNeufeld 06:01, 10 May 2006 (UTC)

It works for me.
Template A with:
<div> Hi
Page B with
{{A}} World
Shows Hi World, with source code:
<div>Hi World</div>
Platonides 13:39, 14 May 2006 (UTC)
Odd. I'm forced to guess:
  1. - some templates like w:en:Template:Wrapper as shown on en:Template_talk:- work perfectly - or at least they used to work a few weeks ago. It starts a table floating right (+ backwards compatible align="right") completed later manually.
  2. - AFAIK auto-completion is the normal specified behaviour for HTML, you can omit some end and even a few start tags in HTML. In XHTML that's fortunately not more allowed, and the tool "tidy" can fix it in most cases (= add missing start or end tags).
  3. - not all Wikis use "tidy", but Meta and the English Wikipedia do.
  4. - the HTML auto-completion can introduce subtle oddities. Example:
    If you're within an open paragraph and start preformatted text with <pre>, then this would result in </p><pre>. So far no issue. But if you had an explicit </p> later behind the <pre> it would be invalid (missing a corresponding start tag) and could have odd effects.
  5. - that's all completely unrelated to templates, "tidy" works on whatever it gets after templates and Wiki markup are translated to wannabe-XHTML, it only fixes obvious errors. The only "tidy"-bug I know is mediazilla:5569.
  6. - If there's a rule that templates can't start a <div> unless they also finish it this would be very strange, especially if there's no similar restriction for tables. In theory it should be possible to start any page with <div align="center"> and end it with </div>, no matter how you do it, including templates. If you forget the closing tag "tidy" should add it near the end of the page (on Wikis using "tidy" - otherwise it's just invalid XHTML, and my ten years old browser might be confused ;-) -- Omniplex (w:t) 15:24, 14 May 2006 (UTC)


Since CURRENTWEEK follows the ISO year and not the calendar year, there needs to be a new Magic word for CURRENTISOYEAR. As it is, a CURRENTWEEK/CURRENTYEAR combo will not work when the calendar year is different from the ISO year. See the ISO 8601 section on weeks for the boring details.

Ideally, CURRENTWEEK would use a standard that followed the CURRENTYEAR calendar year and there would be a new CURRENTISOWEEK and CURRENTISOYEAR that followed the ISO week and year. Of course, being an ugly American, I vote for a CURRENTUSAWEEK as well to follow our arguably stupid Sunday-Monday partial weeks up to 54 system, but I could really care less as long as I can have a WEEK that agrees with a YEAR all of the time.

Alternatively, perhaps one's "weeking" system should be an admin setting for a Wiki. —BozoTheScary 18:46, 15 May 2006 (UTC)

On rereading of the ISO 8601 article, perhaps CURRENTWEEKYEAR would be better than CURRENTISOYEAR, since there is no indication that any other ISO notation than the week notation would ever use a year other than the calendar year. —BozoTheScary 18:55, 15 May 2006 (UTC)

See w:en:Template:CURRENTISOYEAR.--Patrick 01:08, 16 May 2006 (UTC)
Groovy. Since that is implemented in Wikipedia, but not in the MediaWiki distro, is there a way I can use it in my personal wiki? —BozoTheScary 02:42, 16 May 2006 (UTC)
If it is new enough to have all required variables, you additionally need to copy this template and the templates it uses.--Patrick 21:20, 16 May 2006 (UTC)
I upgraded to 1.6.6 from 1.5.7 because the ParserFunctions extension wouldn't run on 1.5.7. The Template:ISOYEAR on the Wikipedia uses #if which, according to the ParserFunctions extension docu, doesn't work for 1.6.*. The Wikipedia Version page says that it is running 1.7 beta, which isn't packaged yet. So, are the the choices 1) use the ISOYEAR on Meta (which is different) and hope that I don't run into a similar template/extension compatibility problems, OR 2) use subversion to upgrade to the latest 1.7 beta and install the ParserFunctions extension? Thanks for any input. —BozoTheScary 03:13, 7 June 2006 (UTC)


Copied / moved from Help talk:Variable

I've no clue what that's about and removed it. At the moment the formerly "unclear" CURRENTWEEK 1..52 vs. 1..54 converges at 1..53 here and also on Help:Magic words.

7*53 is 371 - do we have a category for "talk pages using parser functions"? Just kidding. Non-leap years have 365 days, 371-365 is 6. What's the problem with 2007-12-31?

You said it's a Monday, checking: 1, (0 = Sunday), okay, it's a Monday. And you said it has CURRENTWEEK 1, because it belongs to the first week in 2008. Why isn't it in week 53 of 2007? -- Omniplex (w:t) 20:51, 21 May 2006 (UTC)

See w:ISO_8601#Week_dates. A week has only one number, even if it contains days in two years.--Patrick 22:45, 21 May 2006 (UTC)
See also Help_talk:Magic_words#CURRENTWEEK.--Patrick 23:24, 21 May 2006 (UTC)
Okay, ISO uses week numbers 01..53 and again 01 within certain years together with day numbers 1..7.
The latter is different from CURRENTDOW, are you sure that CURRENTWEEK reflects the former? The old CURRENTWEEK info was 1..54, I added "unclear", somebody explained it, but I don't recall who replaced 54 by 53 why and when. Maybe using 0..54 could work, 0 for "actually the rest of ISO week 53 in the previous year", 54 for "actually the begin of ISO week 1 in the next year" (?).
We need pointers to the CURRENTWEEK code, and assuming it's some built-in PHP function to the docu of this function. -- Omniplex (w:t) 18:46, 22 May 2006 (UTC)
The info is from [1], we can keep an eye on the variable at the end of the year.--Patrick 13:35, 29 May 2006 (UTC)
Late addition, one of the links in this article is interesting, math of the ISO calendar has a page for 2008/2009. -- Omniplex (w:t) 21:56, 3 June 2006 (UTC)


It looks to me like {{DISPLAYTITLE}} has something to do with changing the display of the article title.

From DefaultSettings.php:

 * Allow DISPLAYTITLE to change title display
$wgAllowDisplayTitle = false ;

Can anyone verify this?

-- Nexis 02:19, 17 May 2006 (UTC)

When you turn on $wgAllowDisplayTitle in your LocalSettings.php, {{DISPLAYTITLE|xyz}} changes the visible title of the page to xyz and shows (Link to this page as [[Help talk:Magic words]]) (=MediaWiki:Displaytitle) under the header. But: bug. WebBoy 16:10, 9 June 2006 (UTC)
What Version of mediawiki are we talking about ? i can't find it in my Version 1.6.5 (but i will upgrade to 1.7.1 asup). And i would need this, too --GerhardSchwarz 09:32, 14 July 2006 (UTC)
I'm on 1.7.1 and cannot seem to get this to work. I have it enabled in my LocalSettings.php, and tried to set it in the top of a page, but it just shows up as a broken template. 00:01, 18 July 2006 (UTC)
I'm also running 1.7.1, and I get the same problem as the above post. I'd like to be able to get rid of the Category: prefix for my categories. Michael Tyznik 07:21, 5 August 2006 (UTC)

Maybe a solution (not intensively tested) for Version 1.7.1: I did the following changes to the function displaytitle in CoreParserFunctions.php (in the includes directory), or simply exchange the whole function.

function displaytitle( $parser, $param = '', $subtitle = false ) { 
	global $wgOut;
	$parserOptions = new ParserOptions;
	$local_parser = clone  $parser ;
	$t2 = $local_parser->parse( $param, $parser->mTitle, $parserOptions, false, false );
	$parser->mOutput->mHTMLtitle = $t2->GetText();

	#Add subtitle
	if(!$subtitle) {
		$t = $parser->mTitle->getPrefixedText();
		$parser->mOutput->mSubtitle .= wfMsg('displaytitle', $t);
		return '';

There are two aspects that went wrong with the original function:

  1. The HTML pagetitle becomes <title></title> when using the displaytitle function. To fix this I've added the lines
    global $wgOut;
    This simply redefines the title
  2. Text on pages which uses the displaytitle function isn't parsed correctly. This problem can be solved by simply adding/ setting the fith parameter in parse function-call to false (which is true by default).
    $t2 = $local_parser->parse( $param, $parser->mTitle, $parserOptions, false, false );

BTW: If you do not want to display the subtitle (which shows the original pagetitle), you have to simply add a "|" followed by at least one charakter after your pagetitle.

{{DISPLAYTITLE:xyz|do not display the subtitle}}

But there's still another problem - the cache. It seems that the displaytitle function is not called every time the site is displayed. So sometimes the title from displaytitle is shown and sometimes the original pagetitle.

The only way I've found so far to get around this problem, is to disable the parsercache. Add the following line to your LocalSettings.php:

$wgEnableParserCache = false;

--Netsurfer 22:52, 29 August 2006 (UTC)

I restored the title by this:
$wgHooks['OutputPageBeforeHTML'][] = 'fixHTMLTitle';

function fixHTMLTitle( &$out ) {
  if (!strlen($out->getHTMLTitle()))
If you want to kill the subtitles, add an $out->setSubtitle(""); -- 01:01, 15 April 2007 (UTC)

To allow page titles to be set independently of URLs in version 1.13.4, it seems to be sufficient to change the if statement in the displaytitle function in CoreParserFunctions.php in the includes/parser subdirectory. The resulting function is as follows:

        static function displaytitle( $parser, $text = '' ) {
                $text = trim( Sanitizer::decodeCharReferences( $text ) );
                $title = Title::newFromText( $text );
                if( $title instanceof Title && $title->getFragment() == '' )
                        $parser->mOutput->setDisplayTitle( $text );
                return '';

--Beastin 00:40, 24 March 2009 (UTC)

New magic word

Isn't it time for new magic word for statistical purpouses - {{NUMBEROFINTERWIKIS}} or similar, counting all interwiki links on a particular wikipedia. This could be criteria for comparison and for statistical accountings. Regards, BloodIce 23:46, 4 July 2006 (UTC)


Please reenable magic word PAGESINNS, it's used on WM:HELP. The local setting is probably $wgAllowSlowParserFunctions = true; -- Omniplex (w:t) 00:46, 4 July 2006 (UTC)

Only a developer can do that; try asking in #wikimedia-tech or filing a bug request. // [admin] Pathoschild (talk/map) 05:21, 4 July 2006 (UTC)
I just disabled PAGESINNS by default because it was too slow, and you think if you ask nicely I might immediately re-enable it again? It needs to be rewritten so that it doesn't require a full scan of the page table on every page view. -- Tim Starling 03:17, 6 July 2006 (UTC)
We're on Meta here, it has only 10,768,891 pages, and loads of obscure namespaces. -- Omniplex (w:t) 21:58, 6 July 2006 (UTC)


Has there been / is there any support for these "magic words" or their like, i.e. to set a page's TOC to be collapsed ("rolled-up", "hidden", "closed") or shown when the page is opened, regardless of the user's default...?  I'm thinking of occasions when there are many (justifiable) subsections on a page, producing a long TOC that is probably best kept out of the way (collapsed) unless the user wishes to click on [show] and see it. Regards, David Kernow 11:40, 18 August 2006 (UTC)

Magic Words not working in caption

How come the {{PAGENAME}} magic word doesn't work in <gallery caption="{{PAGENAME}}">?

Used by itself:

Magic words/Archives/2006

MagicWork for User Name?

I'd like to know whether there is a magic word to show the name of the user, to be used in messages and so. Thanks. -- 16:17, 12 November 2006 (UTC)

{{PAGENAME}} works in the user and user talk namespace. Special:Mypage and Special:Mytalk always lead to the viewer's userpages. Other than that, nope. —[admin] Pathoschild 02:02, 12 November 2006 (UTC)
Pff, that's too bad, but thanks a lot you for your time! -- 16:17, 12 November 2006 (UTC)

More verbosity, please?

Could an example be made for {{DIRMARK}} and a better explanation would be nice. I have NO idea what this function does. --Billwsmithjr 12:50, 14 November 2006 (UTC)

Suppress NameSpace Portion in Category listings

I would like to see a magic word, like __NOPREFIX__, for Category pages to hide the prefix. This would be VERY nice on pages, like Category:Templates, where every single link there is a template! BTW, I do know about [[Category:Templates|template_name]] to make it sort by the templates base name. --Billwsmithjr 19:01, 16 November 2006 (UTC)

<div class="firstHeading" style="font-size: 188%; padding-top: 0.5em; padding-bottom: 0.17em; float: left; position: absolute; left: 0.5em; top: 0%; width: 98%; background-color:#FFFFFF">{{PAGENAME}}</div class>
replacing "Blah" with the title you want to display. Smiddle 17:04, 14 February 2007 (UTC)
That's a neat trick, but it doesn't answer the question. The original poster wants a way to suppress namespace output in the list of links to articles that are in a category, so that every entry isn't prefaced with Template: (or whatever). This is useful when you want to use namespaces in earnest and every entry in a particular category related to that namespace will be in it. GreenReaper 05:41, 4 April 2007 (UTC)
And shortly after posting this, GreenReaper came over and prodded me until I made a js trick to do it:
// trigger with a div, eg: <div id="catnoprefix" style="display:none;"></div>
addOnloadHook(function() {if(document.getElementById('catnoprefix')) document.getElementById('mw-pages').innerHTML = document.getElementById('mw-pages').innerHTML.replace(/\<a href\=([^\>]*\>)[^\:|\<]*\:/g,'<a href=$1');});
Splarka 06:58, 4 April 2007 (UTC)

The opposite of formatnum

Is there a function that does the opposite of formatnum (ie. removes commas from numbers)? For many infoboxes the use of formatnum and other functions has been brilliant in performing come calculations (in particular the conversion between metric and imperial units), but for templates already widely in use, these functions cannot be used since people have entered the numbers with commas. If there was a way to undo this without manually changing every entry, it would be incredibly useful. - 52 Pickup 07:57, 7 December 2006 (UTC)