Help talk:Magic words
From MediaWiki.org
Archives |
|
|---|---|
|
|
Contents |
[edit] __NEWSECTIONLINK__ or {{NUMBEROFARTICLES}} alternative in 1.6.10?
is there any alternative to __NEWSECTIONLINK__ or {{NUMBEROFARTICLES}} in 1.6.10?
[edit] PAGESINCATEGORY doesn't work on my site.
I cannot seem to get the PAGESINCATEGORY magic word to work. My wiki treats it like its a Template.
Is there a setting that needs to be set somewhere to make it work? My Wiki Version is 1.13.1
I note that it works here: {{PAGESINCATEGORY:Help}} = 57
[edit] {{NUMBEROFVIEWS}}
Q/ {{NUMBEROFVIEWS}} doesn't work on my wiki. You'v got any idea ?
- A/ Needs MW 1.14++
[edit] Why not REVISIONTIME?
Why not {{{REVISIONTIME}}} ? --Dvdgmz 15:53, 8 October 2009 (UTC)
[edit] PAGENAME, titleparts and categories
I'm trying to create a template that:
- Auto-categorizes the including page
- Sorts on the page name, but with a leading sub-page element stripped (e.g. "A/B/C" becomes "B/C")
What I have so far is something like:
<noinclude>[[Category: {{{catname|General}}} | {{{catsort|{{#titleparts: {{subst:PAGENAME}} | 0 | 2 }} }}} ]]</noinclude>
This fails because of the inclusion/substitution order, but for the life of me, I can't get the right ordering of <noinclude>...</noinclude> and subst: that works for this. Can someone help me out, here and either point me to somewhere that #titleparts is used with PAGENAME in a template or show me an example that's otherwise known to work? Thanks. -Harmil 20:48, 12 October 2009 (UTC)
[edit] NUMBEROFACTIVEUSERS
Not much explanation on this - what is the definition of an active user? Based on number of edits / views? How recent? --Robinson Weijman 09:54, 10 November 2009 (UTC)
$activeUsers = $dbr->selectField( 'recentchanges', 'COUNT( DISTINCT rc_user_text )', array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers' OR rc_log_type IS NULL" ), __METHOD__ );
- It scrapes the recent changes table, so this depends on your Manual:$wgRCMaxAge setting. Splarka 08:23, 11 November 2009 (UTC)