Help talk:Magic words

__NEWSECTIONLINK__ or alternative in 1.6.10?
is there any alternative to __NEWSECTIONLINK__ or in 1.6.10?

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: =

Q/ doesn't work on my wiki. You'v got any idea ?
 * A/ Needs MW 1.14++

Request regarding urlencode
The old version on urlencode replaced spaces with underscores, however, a relatively recent change means that it now replaces spaces with plus signs. There is at least one (and I assume several) applications in which it is still necessary to have the underscore: when converting a string for use at http://stats.grok.se, underscores are required instead of spaces.

Therefore, is it possible for someone to create a new magic word called urlencode2 (or something similar)? This could process the subject string through urlencode, then change any instances of "+" to "_". If this is not the right place to request something like this, please direct me elsewhere. Thanks! --Zach425 19:11, 9 September 2009 (UTC)


 * Old version? relatively recent change? It looks like urlencode was introduced in 14273, only moved from Parser.php to CoreParserFunctions.php in 15276 where it has remained unchanged to this day. Where did you observe this change, Wikia perhaps? Splarka 07:10, 10 September 2009 (UTC)
 * Followup: here is the Help page on meta just a few weeks after it was introduced: . It shows  producing +x+y+%25%40. Splarka 07:23, 10 September 2009 (UTC)
 * You're absolutely correct - it seems I was MUCH mistaken regarding the "recent change". I'm sure I read that urlencode previously used an underscore instead of a plus sign (and its usage on Wikipedia suggests that this was indeed the case), but now I can't seem to find the site where I read that.
 * Urlencode aside, would it be possible to add rawurlencode as a magic word? I've found some documentation on it that indicates it would work for the problem stated above, as stats.grok.se accepts either _ or %20 in place of a space. Unfortunately, my very limited knowledge about PHP, Java, & MediaWiki doesn't allow me to act on what I've seen. Thanks again.  --Zach425 08:43, 10 September 2009 (UTC)
 * You can use the "escaped" version of the name-based magic words. For example: produces "", in a URL you can utilize it thusly: http://google.com/search?q= Splarka 13:26, 10 September 2009 (UTC)
 * THANK YOU, Splarka! This is just what I needed, but I unfortunately didn't understand FULLPAGENAMEE well enough to realize it! --Zach425 04:35, 11 September 2009 (UTC)

Using in a nested parser function
Sorry if this is a known workaround. I was unable to find it easily if it does exist out there somewhere.

I was running into a bit of a snag using the following parser function to evaluate whether a category should show a category tree or not (strictly a stopgap measure) at the top of the page.:

It seems that if there are more than 1000 pages in the category, fails because a comma is inserted into the number and the expression cannot parse it as a numerical value. The workaround here is to use the function:

RCWizard 23:12, 15 September 2009 (UTC)
 * You can just use NaN . That will also work on wikis set to a content language that delimits with periods, for example. Splarka 07:04, 16 September 2009 (UTC)