Manual talk:Parser functions
Contents
Unparsed Input[edit | edit source]
I know what I'm asking is essentially what tag extensions do, but is there any to specify that input arguments of the callback function should not be parsed? —Sledged (talk) 18:28, 16 September 2007 (UTC)
Change of Defaults in 1.12[edit | edit source]
It seems that commit 27667 changed the default for noparse and noarg from false to true in some situations. We have a function which returns a wikitext call to a template (for formatting) with a list of named parameters, and found that while it worked as expected in 1.9 it no longer works with recent SVN. Possibly this is a bug. We had to change our functions to ensure that to:
return array( $result, 'noparse' => false);
whereas previously they just:
return $result;
Perhaps someone knows if this was an anticipated change... Karora 01:10, 8 January 2008 (UTC)
- I just got bit by this, too ... initially, I just returned the generated wikitext from my new parser function, and couldn't figure out why it wasn't being parsed correctly (esp. since it makes extensive use of templates), nor why none of the documentation really specified how to trigger the necessary parsing myself. (It's not the same as for tag extensions!) I've just added a note on this topic to the Manual:Parser functions page. Paul Lustgarten 14:50, 16 April 2009 (UTC)
Problem with Time parser function[edit | edit source]
I posted a question on the ParserFunctions help talk page having to do with a problem with time functions when having a 2 digit date. If anyone has a clue of how to fix it, it would be greatly appreciated! (apologies for not having a screen name; I have one on wikipedia I use a lot, but I just came here to try and figure out why the error was occurring in edits I made at wikipedia) Thanks. 24.236.101.233 09:49, 30 December 2008 (UTC)
Determining the output of recursiveTagParse[edit | edit source]
I'm attempting to determine the output of recursiveTagParse, which I am calling from a parser function. To do so, I'm trying to return the output of recursiveTagParse wrapped in <pre></pre> tags, which I was hoping would show me the rendered HTML. I'm seeing some unexpected behavior. When I do this:
$parsedList = $parser->recursiveTagParse("* test"); return $parser->insertStripItem($parsedList, $parser->mStripState);
I get this:
- test
But when I do this:
$parsedList = $parser->recursiveTagParse("* test"); return $parser->insertStripItem('<pre>' . $parsedList . '</pre>', $parser->mStripState);
I get this:
* test
It's almost like the rendered HTML is being converted back into wikitext. I'm completely lost. Does anyone have any insight on this?
--Csagedy 04:07, 31 October 2011 (UTC)
Function execute on page reload[edit | edit source]
I followed the example parser function and made an extension that calls a web api for data. The function works great but only executes when the page is saved after editing. Can someone point me in the right direction on how to make the extension/parser function I just built execute when the wiki page is reloaded?