<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<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"
		>
	<channel>
		<title>bbPress Plugin Browser &#187; Topic: MediaWiki wikitext Filter</title>
		<link>http://bbpress.org/plugins/topic/mediawiki-wikitext-filter/</link>
		<description>bbPress Plugin Browser &#187; Topic: MediaWiki wikitext Filter</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 05:16:53 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://bbpress.org/plugins/rss/topic/mediawiki-wikitext-filter" rel="self" type="application/rss+xml" />

		<item>
			<title>PS Vita Games on "MediaWiki wikitext Filter"</title>
			<link>http://bbpress.org/plugins/topic/mediawiki-wikitext-filter/#post-6301</link>
			<pubDate>Mon, 20 Dec 2010 16:11:08 +0000</pubDate>
			<dc:creator>PS Vita Games</dc:creator>
			<guid isPermaLink="false">6301@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Added the dutch language myself
</p>]]></description>
					</item>
		<item>
			<title>PS Vita Games on "MediaWiki wikitext Filter"</title>
			<link>http://bbpress.org/plugins/topic/mediawiki-wikitext-filter/#post-5627</link>
			<pubDate>Thu, 01 Apr 2010 02:49:31 +0000</pubDate>
			<dc:creator>PS Vita Games</dc:creator>
			<guid isPermaLink="false">5627@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Is this also in dutch?
</p>]]></description>
					</item>
		<item>
			<title>dmitriid on "MediaWiki wikitext Filter"</title>
			<link>http://bbpress.org/plugins/topic/mediawiki-wikitext-filter/#post-230</link>
			<pubDate>Wed, 09 May 2007 11:57:10 +0000</pubDate>
			<dc:creator>dmitriid</dc:creator>
			<guid isPermaLink="false">230@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>There are numerous errors in this code. </p>
<ul>
<li>patterns should be enclosed in //:
<ul>
<li>incorrect: &#124;pattern&#124;</li>
<li>correct: /pattern/</li>
</ul>
</li>
<li>all special characters must be escaped with \:
<ul>
<li>incorrrect:<code>/([[)(.*?)&#124;(.*?)(]])/</code></li>
<li>corrrect:<code>/(\[\[)(.*?)\&#124;(.*?)(\]\])/</code></li>
</ul>
</li>
<li>backreferences are referenced with $n, where n is a number:
<ul>
<li>incorrrect:<code>&#60;strong&#62;&#60;em&#62;2&#60;/em&#62;&#60;/strong&#62;</code></li>
<li>corrrect:<code>&#60;strong&#62;&#60;em&#62;$2&#60;/em&#62;&#60;/strong&#62;</code></li>
</ul>
</li>
</ul>
<p>Here's the updated working version:</p>
<pre><code>&#60;?php
/*
Plugin Name: MediaWiki Markup for bbPress
Plugin URI: <a href="http://bbpress.org/forums/topic/713" rel="nofollow">http://bbpress.org/forums/topic/713</a>
Description: Add a subset of MediaWiki markups to bbPress
Version: 0.1
Author: Jason Godesky
Author URI: <a href="http://anthropik.com/" rel="nofollow">http://anthropik.com/</a>
*/

/*  Copyright 2006  Jason Godesky  (email : <a href="mailto:jason@anthropik.com">jason@anthropik.com</a>)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/*
These parameters specify the functioning of this plugin.
Edit accordingly for your specific situation.
*/

# Wiki root; &#34;internal&#34; links will point to the concatenation
# of this root and the link specified.
$mediawiki_filter_params[&#34;wiki&#34;] = &#34;http://en.wikipedia.org/wiki&#34;;

/*
Stop editing; actual plugin functionality follows.
*/

function bb_mediawikitext($text) {
    global $mediawiki_filter_params;
    // BASIC FORMATTING
    // Bold and italic
    $text = preg_replace(&#34;/(\\\&#39;\\\&#39;\\\&#39;\\\&#39;\\\&#39;)(.*?)(\\\&#39;\\\&#39;\\\&#39;\\\&#39;\\\&#39;)/&#34;,
        &#34;&#60;strong&#62;&#60;em&#62;$2&#60;/em&#62;&#60;/strong&#62;&#34;, $text);

    // Bold
    $text = preg_replace(&#34;/(\\\&#39;\\\&#39;\\\&#39;)(.*?)(\\\&#39;\\\&#39;\\\&#39;)/&#34;,
        &#34;&#60;strong&#62;$2&#60;/strong&#62;&#34;, $text);
    // Italic
    $text = preg_replace(&#34;/(\\\&#39;\\\&#39;)(.*?)(\\\&#39;\\\&#39;)/&#34;,
        &#34;&#60;em&#62;$2&#60;/em&#62;&#34;, $text);

    // LINKS
    // Internal links with aliases
    $text = preg_replace(&#34;/(\\[\\[)(.*?)\\&#124;(.*?)(\\]\\])/&#34;,
        &#34;&#60;a href=&#34;.&#39;&#34;&#39;.$mediawiki_filter_params[&#34;wiki&#34;].&#34;$2&#34;.&#39;&#34;&#39;.&#34;&#62;$3&#60;/a&#62;&#34;,
        $text);
    // Internal links without aliases
    $text = preg_replace(&#34;/(\\[\\[)(.*?)(\\]\\])/&#34;,
        &#34;&#60;a href=&#34;.&#39;&#34;&#39;.$mediawiki_filter_params[&#34;wiki&#34;].&#34;$2&#34;.&#39;&#34;&#39;.&#34;&#62;$2&#60;/a&#62;&#34;,
        $text);
    // External links with descriptions
    $text = preg_replace(&#34;/(\\[)(.*?) (.*?)(\\])/&#34;,
        &#34;&#60;a href=&#34;.&#39;&#34;&#39;.&#34;$2&#34;.&#39;&#34;&#39;.&#34;&#62;$3&#60;/a&#62;&#34;, $text);
    // External links with no description
    $count   = 1;
    $replace = TRUE;
    while ($replace) {
        $before = $text;
        $text = preg_replace(&#34;/(\\[)(.*?)(\\])/&#34;,
            &#34;&#60;a href=&#34;.&#39;&#34;&#39;.&#34;$2&#34;.&#39;&#34;&#39;.&#34;&#62;[&#34;.$count.&#34;]&#60;/a&#62;&#34;,
            $text, 1);
        if ($before==$text) { $replace = FALSE; }
        $count++;
    }

    // HEADINGS
    $text = preg_replace(&#34;/(======)(.*?)(======)/&#34;,
        &#34;&#60;h6&#62;$2&#60;/h6&#62;&#34;, $text);
    $text = preg_replace(&#34;/(=====)(.*?)(=====)/&#34;,
        &#34;&#60;h5&#62;$2&#60;/h5&#62;&#34;, $text);
    $text = preg_replace(&#34;/(====)(.*?)(====)/&#34;,
        &#34;&#60;h4&#62;$2&#60;/h4&#62;&#34;, $text);
    $text = preg_replace(&#34;/(===)(.*?)(===)/&#34;,
        &#34;&#60;h3&#62;$2&#60;/h3&#62;&#34;, $text);
    $text = preg_replace(&#34;/(==)(.*?)(==)/&#34;,
        &#34;&#60;h2&#62;$2&#60;/h2&#62;&#34;, $text);

    // RETURN
    return $text;
}

add_filter(&#39;pre_post&#39;, &#39;bb_mediawikitext&#39;, 1);

?&#62;</code></pre>]]></description>
					</item>
		<item>
			<title>jefgodesky on "MediaWiki wikitext Filter"</title>
			<link>http://bbpress.org/plugins/topic/mediawiki-wikitext-filter/#post-86</link>
			<pubDate>Mon, 12 Feb 2007 21:08:03 +0000</pubDate>
			<dc:creator>jefgodesky</dc:creator>
			<guid isPermaLink="false">86@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Filters posts and applies basic wikitext markup from MediaWiki</p>
<p>&#60;!--plugin-data-installation--&#62;<br />
&#60;p&#62;Add <code>mediawiki-wikitext-filter.php</code> to your <code>/my-plugins/</code> directory.&#60;/p&#62;</p>
<p>&#60;!--plugin-data-faq--&#62;<br />
&#60;h4&#62;What markup is available?&#60;/h4&#62;</p>
<p>&#60;p&#62;The color of the stars is set in the <code>bb-ratings.css</code> stylesheet file.  The yellow color comes from "<code>background-color: #fc0;</code>",<br />
and the red color comes from "<code>background-color: #d00;</code>".  You can adjust these values to your taste.&#60;/p&#62;</p>
<ol>
<li>Basic formatting: Bolding and Italicizing</li>
<li>Basic internal links.  Aliases work, but this does not include template transclusion, image embedding, or anything fancy like that.</li>
<li>External links.  External links without descriptions are numbered, and descriptions are displayed.</li>
</ol>
<p>&#60;h4&#62;Does it support lists?  Tables of contents?&#60;/h4&#62;</p>
<p>&#60;p&#62;No, but it would really be great if it did, so by all means give it a go.  That's the glory of open source, right?&#60;/p&#62;</p>
<p>&#60;!--plugin-data-other_notes--&#62;<br />
&#60;h3&#62;Configuration&#60;/h3&#62;<br />
&#60;p&#62;At present, there is only one configuration option to change, on line 35: $mediawiki<em>filter</em>params["wiki"].  This establishes the wiki you wish to use for "internal" links.  "Internal" links work by concatenating the link onto the end of this parameter.  The default value, "http://en.wikipedia.org/wiki/", will point to the English Wikipedia.&#60;/p&#62;
</p>]]></description>
					</item>

	</channel>
</rss>

