<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>clay loveless &#187; trac</title>
	<atom:link href="http://claylo.com/tag/trac/feed" rel="self" type="application/rss+xml" />
	<link>http://claylo.com</link>
	<description></description>
	<lastBuildDate>Tue, 27 Oct 2009 08:17:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP MimeViewer for Trac</title>
		<link>http://claylo.com/php-mimeviewer-for-trac</link>
		<comments>http://claylo.com/php-mimeviewer-for-trac#comments</comments>
		<pubDate>Sun, 24 Sep 2006 22:41:48 +0000</pubDate>
		<dc:creator>@claylo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://claylo.com/2006/09/24/php-mimeviewer-for-trac/</guid>
		<description><![CDATA[As John Herren pointed out in the comments to yesterday's post, my suggestion for PHP syntax coloring wasn't working for several versions of Trac.
After a little digging, it turned out that my CSS rules were based on the non-standard SilverCity highlighting output, rather than the newer and more common native PHP highlighting.
While reviewing the output [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fclaylo.com%2Fphp-mimeviewer-for-trac"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fclaylo.com%2Fphp-mimeviewer-for-trac" height="61" width="51" /></a></div><p>As John Herren pointed out in the comments to yesterday's post, my suggestion for PHP syntax coloring wasn't working for several versions of Trac.</p>
<p>After a little digging, it turned out that my CSS rules were based on the non-standard SilverCity highlighting output, rather than the newer and more common native PHP highlighting.</p>
<p>While reviewing the output from the native PHP highlighter, I noticed that Trac's manipulation of the output from highlight_string() isn't quite right. The way things are now, as of Trac 0.10rc1, an intended multi-line docblock only has the first "/**" highlighted as a comment ... the rest of the docblock is highlighted as default PHP (the code-lang class).</p>
<p>I've been clamoring for good PHP syntax coloring output in Trac <a href="http://lists.edgewall.com/archive/trac/2005-April/002593.html">for a long time</a>. Rather than pass the buck and put this on the Trac team, I've released a little PHP-based shell script called <a href="http://pearified.com/index.php?package=Tools_PHP_MimeView">php_mimeview</a>.</p>
<p>With <tt>php_mimeview</tt> installed, simply update the <tt>[mimeviewer]</tt> config section of <tt>trac.ini</tt> in your Trac project to point <tt>php_path</tt> to the full path location of <tt>php_mimeview</tt>. With that script, plus these rules in your <tt>site_css.cs</tt> template file:</p>
<p>
[source language=":css"]<br />
.code-keyword { color: #007700; }<br />
.code-lang { color: #0000BB; }<br />
.code-comment { color: #FF8000; }<br />
.code-string { color: #DD0000; }<br />
[/source]
</p>
<p>... you'll get what you're probably used to seeing in syntax-highlighted PHP code.</p>
<p>Thanks to John Herren for the nudge to investigate this further.</p>
]]></content:encoded>
			<wfw:commentRss>http://claylo.com/php-mimeviewer-for-trac/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quickie Trac Notes</title>
		<link>http://claylo.com/quickie-trac-notes</link>
		<comments>http://claylo.com/quickie-trac-notes#comments</comments>
		<pubDate>Sun, 24 Sep 2006 00:26:05 +0000</pubDate>
		<dc:creator>@claylo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://claylo.com/2006/09/23/quickie-trac-notes/</guid>
		<description><![CDATA[Two quick notes for Trac users out there:

I banged out all 33 lines of my first Trac plugin last night. The FlexJsPlugin allows Trac users to add JavaScript to the &#60;head&#62; block of their Trac-powered sites without needing to hack ClearSilver templates.
For PHP source files to display in the Trac Browser with default PHP syntax [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fclaylo.com%2Fquickie-trac-notes"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fclaylo.com%2Fquickie-trac-notes" height="61" width="51" /></a></div><p>Two quick notes for <a href="http://trac.edgewall.com/">Trac</a> users out there:</p>
<ul>
<li>I banged out all 33 lines of my first Trac plugin last night. The <a href="http://trac-hacks.org/wiki/FlexJsPlugin">FlexJsPlugin</a> allows Trac users to add JavaScript to the <tt>&lt;head&gt;</tt> block of their Trac-powered sites without needing to hack ClearSilver templates.</li>
<li>For PHP source files to display in the Trac Browser with default PHP syntax highlighting colors, use this:
<pre>
/* trac php syntax highlighting */
.code-block {
    line-height: 1em;
    font-family: Courier, monotype;
    font-size: 12px;
    }
.h_question { color: #0000BB; } /* highlight.default */
.hphp_commentline { color: #FF8000; } /* highlight.comment */
.hphp_operator { color: #007700; } /* highlight.keyword */
.hphp_word { color: #007700; } /* highlight.keyword */
.hphp_default {}
.hphp_variable { color: #0000BB; } /* highlight.default */
.hphp_hstring { color: #DD0000; } /* highlight.string */
.hphp_simplestring { color: #DD0000; } /* highlight.string */
.h_tagunknown {}
.h_default {}
</pre>
</li>
</ul>
<p>Drop the CSS in your project's site_css.cs file and you'll feel a little less like a stranger in a strange land. And while I haven't started playing too much with what some easily customizable JavaScript can bring to a Trac project, I'm looking forward to experimenting. Trac is great, but for all its coolness, it's lacking a bit in the area of today's JavaScript coolness.</p>
]]></content:encoded>
			<wfw:commentRss>http://claylo.com/quickie-trac-notes/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
