Hello,
I recently made an extension that I uploaded too http://svn.wikimedia.org/svnroot/trunk/extensions/Click/Click.php and it works perfectly. Unfortunately it won't work inline; no matter what I do it always starts a new paragraph or adds an opening <br> - does anyone know how I can fix this? Maybe it's because it returns HTML, but I think there should still be a way to make it inline.
MinuteElectron.
The link you supplied isn't working, but you're describing a common problem which I have written about[1], and overcome in such extensions as EmbedVideo[2]
Instead of simply returning the output of your parser function, do this:
return $parser->insertStripItem( $output, $parser->mStripState );
Where $parser is the &$parser input parameter to the handling function, and $output is whatever you want to display.
[1] http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki_Par... [2] http://www.mediawiki.org/wiki/Extension:EmbedVideo
-- Jim R. Wilson (jimbojw)
On Fri, Mar 28, 2008 at 7:30 PM, Minute Electron minuteelectron@googlemail.com wrote:
Hello,
I recently made an extension that I uploaded too http://svn.wikimedia.org/svnroot/trunk/extensions/Click/Click.php and it works perfectly. Unfortunately it won't work inline; no matter what I do it always starts a new paragraph or adds an opening <br> - does anyone know how I can fix this? Maybe it's because it returns HTML, but I think there should still be a way to make it inline.
MinuteElectron.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Or try this if you parse this way. $wgParser->parse($text, $title, $parserOptions, false /*to strip whitespace*/, true /*to clear parser state*/);
-----Original Message----- From: wikitech-l-bounces@lists.wikimedia.org [mailto:wikitech-l-bounces@lists.wikimedia.org] On Behalf Of Jim R. Wilson Sent: Monday, March 31, 2008 2:37 PM To: Wikimedia developers Subject: Re: [Wikitech-l] Inline parser function
The link you supplied isn't working, but you're describing a common problem which I have written about[1], and overcome in such extensions as EmbedVideo[2]
Instead of simply returning the output of your parser function, do this:
return $parser->insertStripItem( $output, $parser->mStripState );
Where $parser is the &$parser input parameter to the handling function, and $output is whatever you want to display.
[1] http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki _Parser_Function [2] http://www.mediawiki.org/wiki/Extension:EmbedVideo
-- Jim R. Wilson (jimbojw)
On Fri, Mar 28, 2008 at 7:30 PM, Minute Electron minuteelectron@googlemail.com wrote:
Hello,
I recently made an extension that I uploaded too http://svn.wikimedia.org/svnroot/trunk/extensions/Click/Click.php and it works perfectly. Unfortunately it won't work inline; no matter
what
I do it always starts a new paragraph or adds an opening <br> - does anyone know how I can fix this? Maybe it's because it returns HTML, but I think there should still be a way to make it inline.
MinuteElectron.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org