<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Wikipedia markup...?]]></title>
		<link>https://punbb.informer.com/forums/topic/14738/wikipedia-markup/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/14738/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Wikipedia markup...?.]]></description>
		<lastBuildDate>Wed, 18 Apr 2007 21:25:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/92124/#p92124</link>
			<description><![CDATA[<p>Thanks, vin100. <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (guardian34)]]></author>
			<pubDate>Wed, 18 Apr 2007 21:25:52 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92124/#p92124</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/92119/#p92119</link>
			<description><![CDATA[<p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (Jérémie)]]></author>
			<pubDate>Wed, 18 Apr 2007 19:13:38 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92119/#p92119</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/92114/#p92114</link>
			<description><![CDATA[<p>remove &quot;e&quot; at the end of the mask</p>]]></description>
			<author><![CDATA[null@example.com (vin100)]]></author>
			<pubDate>Wed, 18 Apr 2007 17:54:09 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92114/#p92114</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/92112/#p92112</link>
			<description><![CDATA[<div class="quotebox"><cite>guardian34 wrote:</cite><blockquote><p>Add this to the current BBCode arrays:<br /></p><div class="codebox"><pre><code>&#039;#\[\[([^\[]*?)\]\]#e&#039;,</code></pre></div></blockquote></div><p>It seems that snippet, for me, doesn&#039;t work. It triggers an error at the $text = preg_replace($pattern, $replace, $text); stage. Using PHP 5.2.1</p>]]></description>
			<author><![CDATA[null@example.com (Jérémie)]]></author>
			<pubDate>Wed, 18 Apr 2007 17:30:10 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/92112/#p92112</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/87075/#p87075</link>
			<description><![CDATA[<p>@pogenwurst<br />many thanks, works great!</p>]]></description>
			<author><![CDATA[null@example.com (thesaint)]]></author>
			<pubDate>Sun, 11 Feb 2007 19:10:20 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/87075/#p87075</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/87052/#p87052</link>
			<description><![CDATA[<p>In include/parser.php, change</p><div class="codebox"><pre><code>    // Do the more complex BBCodes (also strip excessive whitespace and useless quotes)
    $a = array( &#039;#\[url=(&quot;|\&#039;|)(.*?)\\1\]\s*#i&#039;,
                &#039;#\[url\]\s*#i&#039;,
                &#039;#\s*\[/url\]#i&#039;,
                &#039;#\[email=(&quot;|\&#039;|)(.*?)\\1\]\s*#i&#039;,
                &#039;#\[email\]\s*#i&#039;,
                &#039;#\s*\[/email\]#i&#039;,
                &#039;#\[img\]\s*(.*?)\s*\[/img\]#is&#039;,
                &#039;#\[colou?r=(&quot;|\&#039;|)(.*?)\\1\](.*?)\[/colou?r\]#is&#039;);

    $b = array( &#039;[url=$2]&#039;,
                &#039;[url]&#039;,
                &#039;[/url]&#039;,
                &#039;[email=$2]&#039;,
                &#039;[email]&#039;,
                &#039;[/email]&#039;,
                &#039;[img]$1[/img]&#039;,
                &#039;[color=$2]$3[/color]&#039;);</code></pre></div><p>to</p><div class="codebox"><pre><code>    // Do the more complex BBCodes (also strip excessive whitespace and useless quotes)
    $a = array( &#039;#\[url=(&quot;|\&#039;|)(.*?)\\1\]\s*#i&#039;,
                &#039;#\[url\]\s*#i&#039;,
                &#039;#\s*\[/url\]#i&#039;,
                &#039;#\[email=(&quot;|\&#039;|)(.*?)\\1\]\s*#i&#039;,
                &#039;#\[email\]\s*#i&#039;,
                &#039;#\s*\[/email\]#i&#039;,
                &#039;#\[img\]\s*(.*?)\s*\[/img\]#is&#039;,
                &#039;#\[wiki\](.*?)\[/wiki\]#&#039;,
                &#039;#\[colou?r=(&quot;|\&#039;|)(.*?)\\1\](.*?)\[/colou?r\]#is&#039;);

    $b = array( &#039;[url=$2]&#039;,
                &#039;[url]&#039;,
                &#039;[/url]&#039;,
                &#039;[email=$2]&#039;,
                &#039;[email]&#039;,
                &#039;[/email]&#039;,
                &#039;[img]$1[/img]&#039;,
                &#039;&lt;a href=&quot;http://en.wikipedia.org/wiki/$1&quot; alt=&quot;Wiki&quot; target=&quot;_blank&quot;&gt;$1&lt;/a&gt;&lt;img src=http://en.wikipedia.org/wiki/external.png /&gt;&#039;,
                &#039;[color=$2]$3[/color]&#039;);</code></pre></div><p>@mystic (and thesaint if you use the above code): target=&quot;_blank&quot; is invalid XHTML, I&#039;m not sure if alt is a valid attribute for links but in any case using a title attribute instead of alt would make more sense, and you shouldn&#039;t direct link Wikipedia&#039;s image.</p>]]></description>
			<author><![CDATA[null@example.com (pogenwurst)]]></author>
			<pubDate>Sun, 11 Feb 2007 14:20:04 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/87052/#p87052</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/87002/#p87002</link>
			<description><![CDATA[<p>how to use this?</p>]]></description>
			<author><![CDATA[null@example.com (thesaint)]]></author>
			<pubDate>Sat, 10 Feb 2007 18:22:36 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/87002/#p87002</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/86865/#p86865</link>
			<description><![CDATA[<p>thanks for replies...</p><p>i used like this and it works just cool:<br /></p><div class="codebox"><pre><code>&#039;#\[wiki\](.*?)\[/wiki\]#&#039;,
 &#039;&lt;a href=&quot;http://en.wikipedia.org/wiki/$1&quot; alt=&quot;Wiki&quot; target=&quot;_blank&quot;&gt;$1&lt;/a&gt;&lt;img src=http://en.wikipedia.org/wiki/external.png /&gt;&#039;,</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (mystic)]]></author>
			<pubDate>Fri, 09 Feb 2007 11:18:39 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/86865/#p86865</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/86858/#p86858</link>
			<description><![CDATA[<p>Add this to the current BBCode arrays:<br /></p><div class="codebox"><pre><code>// find
&#039;#\[\[([^\[]*?)\]\]#e&#039;,

// replace
&#039;handle_url_tag(\&#039;http://en.wikipedia.org/wiki/\&#039;.str_replace(&quot; &quot;, &quot;_&quot;, \&#039;$1\&#039;), \&#039;$1\&#039;)&#039;,</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (guardian34)]]></author>
			<pubDate>Fri, 09 Feb 2007 07:46:57 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/86858/#p86858</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/86856/#p86856</link>
			<description><![CDATA[<p>[[string]] is much, much better imho.</p>]]></description>
			<author><![CDATA[null@example.com (Jérémie)]]></author>
			<pubDate>Fri, 09 Feb 2007 06:49:44 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/86856/#p86856</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/86854/#p86854</link>
			<description><![CDATA[<p>Just use the code hat&#039;s already there for bb-code. Something like [wiki]PUNBB[/wiki] could turn into [<a href="http://en.wikipedia.com/PUNBB">PUNBB</a>]</p>]]></description>
			<author><![CDATA[null@example.com (deadram)]]></author>
			<pubDate>Fri, 09 Feb 2007 06:30:44 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/86854/#p86854</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/86850/#p86850</link>
			<description><![CDATA[<p>That would make quite a nice extension.</p>]]></description>
			<author><![CDATA[null@example.com (Jérémie)]]></author>
			<pubDate>Fri, 09 Feb 2007 04:29:23 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/86850/#p86850</guid>
		</item>
		<item>
			<title><![CDATA[Wikipedia markup...?]]></title>
			<link>https://punbb.informer.com/forums/post/86841/#p86841</link>
			<description><![CDATA[<p>Hi all;</p><p>I wanted to ask is there are any kind of mod which can display the key word in [[..]] and link that key workd to wikipedia?</p><p>Ex: i like to link &quot;PUNBB&quot; word to wikipedia then in text area i will type like this [[PUNBB]] and it will be linked to <a href="http://en.wikipedia.com/PUNBB">http://en.wikipedia.com/PUNBB</a></p><p>I though the code would look like this:</p><div class="codebox"><pre><code>//    $this-&gt;currentItem-&gt;body = preg_replace( &quot;/\[\[(.+?)\|(.+?)\]\]/&quot;, &quot;&lt;a href=\&quot;http://en.wikipedia.org/wiki/\\1\&quot; target=\&quot;_blank\&quot; title=\&quot;Wikipedia: \\2\&quot;&gt;\\2&lt;/a&gt;&quot;, $this-&gt;currentItem-&gt;body );
//    $this-&gt;currentItem-&gt;more = preg_replace( &quot;/\[\[(.+?)\|(.+?)\]\]/&quot;, &quot;&lt;a href=\&quot;http://en.wikipedia.org/wiki/\\1\&quot; target=\&quot;_blank\&quot; title=\&quot;Wikipedia: \\2\&quot;&gt;\\2&lt;/a&gt;&quot;, $this-&gt;currentItem-&gt;more );

    
//    $this-&gt;currentItem-&gt;body = preg_replace( &quot;/\[\[(.+?)\]\]/&quot;, &quot;&lt;a href=\&quot;http://en.wikipedia.org/wiki/\\1\&quot; target=\&quot;_blank\&quot; title=\&quot;Wikipedia: \\1\&quot;&gt;\\1&lt;/a&gt;&quot;, $this-&gt;currentItem-&gt;body );
//    $this-&gt;currentItem-&gt;more = preg_replace( &quot;/\[\[(.+?)\]\]/&quot;, &quot;&lt;a href=\&quot;http://en.wikipedia.org/wiki/\\1\&quot; target=\&quot;_blank\&quot; title=\&quot;Wikipedia: \\1\&quot;&gt;\\1&lt;/a&gt;&quot;, $this-&gt;currentItem-&gt;more );
  }
    
    function wikiLink( $text ) {
        $links = preg_match_all( &quot;/(\[\[.+?\]\])/&quot;, $text, $wiki, PREG_SET_ORDER );
        
        for( $i=0; $i&lt;$links; $i++ ) {
            $link = preg_match( &quot;/^\[\[(.+?)\]\]$/&quot;, $wiki[$i][0], $item );
            //$info .= $item[1];
            $split = explode( &quot;|&quot;, $item[1] );
            if ( count($split) == 2 ) {
                $linkage = &quot;&lt;a href=\&quot;http://en.wikipedia.org/wiki/$split[0]\&quot; target=\&quot;_blank\&quot; title=\&quot;Wikipedia: $split[0]\&quot;&gt;$split[1]&lt;/a&gt;&quot;;
            } else {
                $linkage = &quot;&lt;a href=\&quot;http://en.wikipedia.org/wiki/$split[0]\&quot; target=\&quot;_blank\&quot; title=\&quot;Wikipedia: $split[0]\&quot;&gt;$split[0]&lt;/a&gt;&quot;;
            }
            $text = str_replace( $item[0], $linkage, $text );
        }
        return($text);</code></pre></div><p>any idea out there please?</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (mystic)]]></author>
			<pubDate>Fri, 09 Feb 2007 00:05:59 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/86841/#p86841</guid>
		</item>
	</channel>
</rss>
