<?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>Bucky Schwarz dot Net &#187; php</title>
	<atom:link href="http://buckyschwarz.net/blog/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://buckyschwarz.net/blog</link>
	<description>development. gaming. photography. awesome.</description>
	<lastBuildDate>Tue, 13 Jul 2010 16:18:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>RTFM, Noob</title>
		<link>http://buckyschwarz.net/blog/rtfm-noob/</link>
		<comments>http://buckyschwarz.net/blog/rtfm-noob/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 02:45:26 +0000</pubDate>
		<dc:creator>Bucky</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[readme]]></category>
		<category><![CDATA[rtfm]]></category>
		<category><![CDATA[syntax highlighter evolved]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://buckyschwarz.net/blog/?p=102</guid>
		<description><![CDATA[I&#8217;m a bit mad with myself. I&#8217;ve been using the Syntax Highlighter Evolved plugin on my WordPress blog to highlight my code. Well, I would have been using it to highlight my code if it had been working as advertised. There wasn&#8217;t any kind of highlighting happening &#8211; the code inside the generated pre tags [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a bit mad with myself. I&#8217;ve been using the <a title="Syntax Highlighter Evolved WordPress plugin" href="http://wordpress.org/extend/plugins/syntaxhighlighter/">Syntax Highlighter Evolved</a> plugin on my WordPress blog to highlight my code. Well, I would have been using it to highlight my code if it had been working as advertised. There wasn&#8217;t any kind of highlighting happening &#8211; the code inside the generated pre tags looked the same as the rest of the text on the page.</p>
<p>I&#8217;ve hacked together my own <a title="WordPress template documentations" href="http://codex.wordpress.org/Templates">WordPress template</a> for fun and posterity to integrate into my site. See, I&#8217;m a pretty big newbie to all of this, and it didn&#8217;t help that the /blog directory under my main site actually pulls from a separate blog directory one level up (don&#8217;t ask me why I did this, I was probably drunk &#8211; in hindsight it&#8217;s pretty obviously boneheaded). Regardless, I had a suspicion that this had something to do with why the syntax highlighting wasn&#8217;t working. I did searches and couldn&#8217;t really turn up many good results. It seemed pretty obvious that most people with normal working blogs weren&#8217;t having issues.</p>
<p>I ended up looking at the plugin code in the WordPress plugins editor to see if there was something obvious causing it. I spent about 15 minutes looking through it when I figured that there was some kind of issue resolving the directory/URL structure between where the blog was being included and where it was actually located. I found the following code:</p>
<pre class="brush: php;">

// Initalize the plugin by registering the hooks
 function __construct() {
 // Check WordPress version
 if ( !function_exists( 'plugins_url' ) ) return;

 // Load localization domain
 load_plugin_textdomain( 'syntaxhighlighter', false, '/syntaxhighlighter/localization' );

 // Register brush scripts
 wp_register_script( 'syntaxhighlighter-core',             plugins_url('syntaxhighlighter/syntaxhighlighter/scripts/shCore.js'),            array(),                         $this-&gt;agshver );
 wp_register_script( 'syntaxhighlighter-brush-as3',        plugins_url('syntaxhighlighter/syntaxhighlighter/scripts/shBrushAS3.js'),        array('syntaxhighlighter-core'), $this-&gt;agshver );
</pre>
<p>I figured it had something to do with the function</p>
<pre class="brush: php;">

plugins_url()
</pre>
<p>not returning the correct location of the plugins directory where Syntax Highlighter is located. I figured it couldn&#8217;t resolve the location of the plugins directory and therefore couldn&#8217;t find the JavaScripts that color the code. I spent about an hour tooling around with</p>
<pre class="brush: php;">

plugins_url()
</pre>
<p>trying to get it to work in various ways and permutations, all to no avail.</p>
<p>I was starting to get frustrated when I noticed, for the first time, right next to the code editor a list of plugin files to edit. One of them was titled ReadMe.txt. &#8220;What the hell,&#8221; I figured, it can&#8217;t hurt to take a look at it. I scrolled down about half way until I saw a FAQ. Right there, in the middle of the page, like a veritable bullhorn shouting, &#8220;You freaking moron!!!&#8221; at me, was my solution.</p>
<blockquote><p>The code is just being displayed raw. It isn&#8217;t being converted into a code box or anything. What&#8217;s wrong?</p></blockquote>
<p>The answer, of course, was to call the</p>
<pre class="brush: php;">

wp_footer()
</pre>
<p>function in the blog&#8217;s footer. Man, did I feel like a jackass. Here I was, making things difficult, wearing my Big Boy Coder&#8217;s™ pants, trying to hack up functions and make things more complicated than they are, when all I had to do was <a title="You know what this is" href="http://en.wikipedia.org/wiki/Rtfm">RTFM</a> like the noob that I am and find the function to include.</p>
<p>So naturally, the first thing I had to do (after fixing it) was write a post about it rife with Syntax Highlighting. Thanks, <a title="Alex Gorbatchev" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">Alex Gorbatchev</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://buckyschwarz.net/blog/rtfm-noob/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site redesign &#8216;09</title>
		<link>http://buckyschwarz.net/blog/site-redesign-09/</link>
		<comments>http://buckyschwarz.net/blog/site-redesign-09/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 04:01:19 +0000</pubDate>
		<dc:creator>Bucky</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[redesign]]></category>
		<category><![CDATA[site]]></category>

		<guid isPermaLink="false">http://buckyschwarz.net/blog/?p=52</guid>
		<description><![CDATA[I&#8217;ve finished the second redesign of my site. After using jQuery extensively while preparing a presentation for my local ColdFusion usergroup, I decided that I wanted to redo my site with more jQuery. I initially wrote it using PHP, styled it, and published it, but quickly grew tired of the dark scheme. I&#8217;ve restyled it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finished the second redesign of my site. After using <a href="http://jquery.com/">jQuery</a> extensively while preparing a presentation for my local <a href="http://tacfug.org/">ColdFusion usergroup</a>, I decided that I wanted to redo my site with more jQuery. I initially wrote it using PHP, styled it, and published it, but quickly grew tired of the dark scheme. I&#8217;ve restyled it now with a lighter theme, which I&#8217;m pretty pleased with. I&#8217;ve also gotten my WordPress custom theme pages working correctly, and it was surprisingly easy.</p>
<p>So that&#8217;s about it. </p>
]]></content:encoded>
			<wfw:commentRss>http://buckyschwarz.net/blog/site-redesign-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
