<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Pretty Code module</title>
        <description> I got bored the other day and decided to write a module that makes the  tags prettier.

See it in action: [goodpacket.com]

Here it is in all of it&amp;#039;s glory.

Hope it helps someone.</description>
        <link>https://www.phorum.org/support/read.php?16,118884,118884#msg-118884</link>
        <lastBuildDate>Tue, 13 Oct 2026 05:38:53 -0500</lastBuildDate>
        <generator>Phorum 6.0.4</generator>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,119474#msg-119474</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,119474#msg-119474</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>mmakaay</strong><br />
I think it might be a better idea to introduce a special [php] tag, which can be used for PHP coloring the code contained within that tag.</div></blockquote>
<br />
I took your advice and got rid of the formatting, but I&#039;m still noticing what Hiiri mentioned.  Any URLs that are posted within the code tags are truncated and formatted according to the bbcode bare URL formatter.<br />
<br />
I&#039;ve played with the bbcode module a bit to try to make it exclude any URLs that are in code tags, but have been unsuccessful so far.  If you modify the bbcode module to disable bare url formatting by commenting out the following line it works, but any other URLs that you may want formatted are not formatted.<br />
<pre class="bbcode">
// convert bare urls into bbcode tags as best we can
// the haystack has to have a space in front of it for the preg to work.
$body = preg_replace(&quot;/([^=&#039;\&quot;([url\]|[img\])])((http|https|ftp):\/\/[a-z0-9;\/\?:@=\&amp;\$\-_\.\+!*&#039;\(\),~%#]+)/i&quot;, &quot;$1:$rnd:$2:/$rnd:&quot;, &quot; $body&quot;);</pre>
<br />
I also uploaded the newest version of the formatter.]]></description>
            <dc:creator>cgardner</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Fri, 12 Jan 2007 18:14:52 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,119162#msg-119162</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,119162#msg-119162</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>cgardner</strong><br />Yes, it will highlight the code for PHP only, but there is absolutely no reason you wouldn&#039;t be able to use it for other languages or just for fun.</div></blockquote>
<br />
One problem with that, is that any other preformatted text will be PHP code highlighted as well. For example ASCII art or HTML code (see the examples I posted on the URL you mentioned above).<br />
<br />
I think it might be a better idea to introduce a special [php] tag, which can be used for PHP coloring the code contained within that tag. I see two advantages for that:<br />
<br />
1) The users can still create preformatted text using <pre class="bbcode"> without the highlighting;

2) There will be no module ordering problems with the bbcode mod, which implements the <pre class="bbcode"> tag as well (which is probably the problem that Hiiri is running into).</pre></pre>]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Wed, 03 Jan 2007 06:08:34 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,118996#msg-118996</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,118996#msg-118996</link>
            <description><![CDATA[ Works perfect, thanks alot. :)<br />
<br />
Maybe you could add a fix for links in comments, which get posted with their whole phorum code, in &lt;a&gt; tags etc.]]></description>
            <dc:creator>Hiiri</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Thu, 21 Dec 2006 17:52:55 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,118992#msg-118992</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,118992#msg-118992</link>
            <description><![CDATA[ ok, I&#039;ll try it and tell yo how it goes..]]></description>
            <dc:creator>Rec-Sec</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Thu, 21 Dec 2006 15:22:39 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,118965#msg-118965</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,118965#msg-118965</link>
            <description><![CDATA[ Yes, it will highlight the code for PHP only, but there is absolutely no reason you wouldn&#039;t be able to use it for other languages or just for fun.<br />
<br />
I made some updates, but unfortunately I don&#039;t have any PHP4 servers that I can test with...]]></description>
            <dc:creator>cgardner</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Wed, 20 Dec 2006 12:49:49 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,118939#msg-118939</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,118939#msg-118939</link>
            <description><![CDATA[ It doesn&#039;t work with this: [<a href="http://www.phorum.org/phorum5/read.php?16,112350,112369#msg-112369" target="_blank" >www.phorum.org</a>]<br />
<br />
I need that for the inbodyattachments module, otherwise it wouldn&#039;t scale <img src="http://-tags." class="bbcode" border="0" />]]></description>
            <dc:creator>Hiiri</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Tue, 19 Dec 2006 05:53:45 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,118902#msg-118902</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,118902#msg-118902</link>
            <description><![CDATA[ I can&#039;t run it under php/4.4.4 (doesn&#039;t support htmlspecialchars_decode() ).<br />
Is there a way to run it under 4.4.4 version of php?]]></description>
            <dc:creator>Rec-Sec</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Sun, 17 Dec 2006 20:53:57 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,118885#msg-118885</guid>
            <title>Re: Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,118885#msg-118885</link>
            <description><![CDATA[ so thats essentially a php-code highlighter?<br />
I don&#039;t think its a general &quot;pretty code&quot; mod as there are quite some other kinds of code ;).]]></description>
            <dc:creator>Thomas Seifert</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Sat, 16 Dec 2006 03:39:10 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?16,118884,118884#msg-118884</guid>
            <title>Pretty Code module</title>
            <link>https://www.phorum.org/support/read.php?16,118884,118884#msg-118884</link>
            <description><![CDATA[ I got bored the other day and decided to write a module that makes the <pre class="bbcode"> tags prettier.

See it in action: [<a href="http://goodpacket.com/read.php?4,59" target="_blank"  rel="nofollow">goodpacket.com</a>]

Here it is in all of it&#039;s glory.

Hope it helps someone.</pre>]]></description>
            <dc:creator>cgardner</dc:creator>
            <category>5.1 Phorum Modules / Add-Ons</category>
            <pubDate>Fri, 15 Dec 2006 17:50:10 -0600</pubDate>
        </item>
    </channel>
</rss>
