<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Add a Custom Function to MediaWiki</title>
	<atom:link href="http://planetozh.com/blog/2006/05/how-to-add-a-custom-function-to-mediawiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetozh.com/blog/2006/05/how-to-add-a-custom-function-to-mediawiki/?source=rss</link>
	<description>A bit of my personal life, mainly focused on my kids. A bit of code, mainly focused on Wordpress and PHP. Overall, bits of nothing in particular.</description>
	<lastBuildDate>Wed, 08 Feb 2012 20:57:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Christian Boltz</title>
		<link>http://planetozh.com/blog/2006/05/how-to-add-a-custom-function-to-mediawiki/comment-page-1/#comment-39578</link>
		<dc:creator>Christian Boltz</dc:creator>
		<pubDate>Sun, 14 Oct 2007 19:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/05/30/how-to-add-a-custom-function-to-mediawiki/#comment-39578</guid>
		<description>I just spent an hour to find out how I can use wiki tags in $input. Therefore I&#039;m adding it here to avoid that another user has to waste another hour ;-)

My method probably works with Mediawiki &gt;= 1.8, I tested with 1.10.

Instead of
[php]function printSampleTag($input,$params)[/php]
use
[php]function printSampleTag($input,$params,$parser)[/php]

and then call
[php]$ret = $parser-&gt;recursiveTagParse($input);[/php]

$ret will then contain HTML code with wiki tags expanded, clickable links etc. - just as every other wiki page.</description>
		<content:encoded><![CDATA[<p>I just spent an hour to find out how I can use wiki tags in $input. Therefore I'm adding it here to avoid that another user has to waste another hour ;-)</p>
<p>My method probably works with Mediawiki &gt;= 1.8, I tested with 1.10.</p>
<p>Instead of</p>
<div class="igBar"><span id="lphp-1"><a href="#" onclick="javascript:showPlainTxt('php-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-1">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> printSampleTag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$input</span>,<span style="color:#0000FF;">$params</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
use</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> printSampleTag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$input</span>,<span style="color:#0000FF;">$params</span>,<span style="color:#0000FF;">$parser</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and then call</p>
<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-3">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ret</span> = <span style="color:#0000FF;">$parser</span>-&gt;<span style="color:#006600;">recursiveTagParse</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$input</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>$ret will then contain HTML code with wiki tags expanded, clickable links etc. - just as every other wiki page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: m2</title>
		<link>http://planetozh.com/blog/2006/05/how-to-add-a-custom-function-to-mediawiki/comment-page-1/#comment-27684</link>
		<dc:creator>m2</dc:creator>
		<pubDate>Thu, 24 Aug 2006 21:55:08 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/05/30/how-to-add-a-custom-function-to-mediawiki/#comment-27684</guid>
		<description>This is how you can add an rss feed to your special pages:

Find the corresponding Special page i.e.  include/SpecialWantedpages.php

Open this file and at the bottom where: function wfSpecial... is located, add on the next line: global $wgRequest;

At the end of the function add just above the doQuery:
  if ( ! $pp-&gt;doFeed( $wgRequest-&gt;getVal( &#039;feed&#039; ), $limit ) )</description>
		<content:encoded><![CDATA[<p>This is how you can add an rss feed to your special pages:</p>
<p>Find the corresponding Special page i.e.  include/SpecialWantedpages.php</p>
<p>Open this file and at the bottom where: function wfSpecial... is located, add on the next line: global $wgRequest;</p>
<p>At the end of the function add just above the doQuery:<br />
  if ( ! $pp-&gt;doFeed( $wgRequest-&gt;getVal( 'feed' ), $limit ) )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinu</title>
		<link>http://planetozh.com/blog/2006/05/how-to-add-a-custom-function-to-mediawiki/comment-page-1/#comment-24370</link>
		<dc:creator>Vinu</dc:creator>
		<pubDate>Thu, 15 Jun 2006 10:20:38 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/05/30/how-to-add-a-custom-function-to-mediawiki/#comment-24370</guid>
		<description>If I want to add a RSS feed to each page of the wiki how do I do that?? Are there any plugins available?</description>
		<content:encoded><![CDATA[<p>If I want to add a RSS feed to each page of the wiki how do I do that?? Are there any plugins available?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

