<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Adam Fairholm's Internet Superworld</title>
	
	<link>http://blog.adamfairholm.com</link>
	<description />
	<lastBuildDate>Mon, 09 Jan 2012 15:14:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/adam-fairholm" /><feedburner:info uri="adam-fairholm" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Releasing “Pope Michael”</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/zsMWyh0JbqY/</link>
		<comments>http://blog.adamfairholm.com/releasing-pope-michael/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 15:02:53 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Pope Michael]]></category>
		<category><![CDATA[Video Projects]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=212</guid>
		<description><![CDATA[When I was an undergrad at Notre Dame, I made a <a href="http://www.youtube.com/watch?v=5NMWs5Ngz9o">short called "Pope Michael"</a>, about a guy in Kansas who believed that we was the rightfully-elected Roman Catholic pope. I loved making it, and soon after I graduated I decided to make a <a href="http://popemichaelfilm.com/">full-length documentary</a>. I believed it warranted the full-length treatment because there were new characters (two young followers moving in with him and his mother) and new situations to explore (Pope Michael going to Kansas University to give a talk).

Last month I released "Pope Michael" for free online (you can see it <a href="http://popemichaelfilm.com/watch">here</a>). It's a testament to the level of technology that the web has risen to over the past four years for me to embed my entire documentary in HD right here below this paragraph:

<iframe src="http://player.vimeo.com/video/33225730?title=0&#38;byline=0&#38;portrait=0&#38;color=ffffff" width="629" height="354" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <a href="http://blog.adamfairholm.com/releasing-pope-michael/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I was an undergrad at Notre Dame, I made a <a href="http://www.youtube.com/watch?v=5NMWs5Ngz9o">short called &#8220;Pope Michael&#8221;</a>, about a guy in Kansas who believed that we was the rightfully-elected Roman Catholic pope. I loved making it, and soon after I graduated I decided to make a <a href="http://popemichaelfilm.com/">full-length documentary</a>. I believed it warranted the full-length treatment because there were new characters (two young followers moving in with him and his mother) and new situations to explore (Pope Michael going to Kansas University to give a talk).</p>
<p>Last month I released &#8220;Pope Michael&#8221; for free online (you can see it <a href="http://popemichaelfilm.com/watch">here</a>). It&#8217;s a testament to the level of technology that the web has risen to over the past four years for me to embed my entire documentary in HD right here below this paragraph:</p>
<p><iframe src="http://player.vimeo.com/video/33225730?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff" width="629" height="354" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>It&#8217;s on <a href="http://www.youtube.com/watch?v=O3oXC9Txi4w">YouTube</a> and <a href="http://vimeo.com/33225730">Vimeo</a> which makes it available to pretty much any smart TV, smart phone, computer, or internet device around. The technology really is incredible. It&#8217;s free because I wanted people to see it with as few barriers to them clicking &#8220;play&#8221; as possible.</p>
<p>One question I&#8217;ve sometimes had is why didn&#8217;t &#8220;Pope Michael&#8221; premiere at any film festivals? The honest answer is that I was rejected from all of them! Embarrassing to admit, yes, but true. It wasn&#8217;t for lack of trying either &#8211; &#8220;Pope Michael&#8221; was rejected from 14 different film festivals from Sundance to Full Frame to the West Palm Beach Film Festival &#8211; right across the board.</p>
<p>I&#8217;m not exactly sure why it never won any favor with the powers that be in the film festival world, but I can&#8217;t help but doubt that it was because &#8220;Pope Michael&#8221; was lacking in originality. It&#8217;s never fun getting rejection letters (or emails), but it didn&#8217;t play a role in my lessening desire to make documentaries or the decision to put &#8220;Pope Michael&#8221; up online &#8211; those two things would&#8217;ve happened either way. Film festivals are competitive and although I wish &#8220;Pope Michael&#8221; premiered at one, I&#8217;d rather let the people who want to see it see it than hold out for a spot.</p>
<p>I learned a lot during the process of making &#8220;Pope Michael&#8221;. Probably the biggest lesson I figured out is that making documentaries is ultimately not what I&#8217;m interested in, although I continue to love watching them.</p>
<p>Even if it&#8217;s not what I&#8217;m ultimately interested in doing, the journey of making &#8220;Pope Michael&#8221; was well worth it in the end. I&#8217;ll never forget showing up at Bawden&#8217;s house one morning in October early enough to get a shot of snow falling on the grounds, or stopping at Cici&#8217;s Pizza on the way to the KU presentation, or immediately finding my iPhone after Tiki convened a group prayer to Saint Anthony after I told her I couldn&#8217;t find it. I owe a lot to my brother Derek, Doug Klinger, Michelle, and Andy Burd. I also owe a lot to many more people who were incredibly supportive of me taking time away from life to travel deep into the Kansas countryside.</p>
<p>I also owe a lot to my Poppa, who funded a good portion of &#8220;Pope Michael&#8221; and never got to see a frame of it. I think he&#8217;d like it.</p>
<p>Finally, probably the best thing to come out of the &#8220;Pope Michael&#8221; project has been my brother&#8217;s <a href="http://popemichaelfilm.com/soundtrack">amazing soundtrack</a>. He came up with something really incredible. We put it up on iTunes &#8211; I highly recommend you check it out.</p>
<p>- Adam</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/zsMWyh0JbqY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/releasing-pope-michael/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/releasing-pope-michael/</feedburner:origLink></item>
		<item>
		<title>Getting Your Add-ons ready for PyroCMS 2</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/vgvEixS6rlc/</link>
		<comments>http://blog.adamfairholm.com/getting-your-add-ons-ready-for-pyrocms-2/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 18:18:49 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PyroCMS]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[pyrocms]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=195</guid>
		<description><![CDATA[One of the nice things about an open source CMS project is it moves really fast and it isn't afraid to make big changes. Such is the case with <a href="http://pyrocms.com/">PyroCMS</a>, and the upcoming 2.0 release is a case in point. With PyroCMS 2, we get a whole new back end interface and some more back end tools for developing great add-ons.

So, if you happen to develop add-ons for PyroCMS, you'll need to do a little bit of work to make sure your shit don't break. Here are some tips to get your stuff working on PyroCMS 2 in no time.

<img class="alignnone size-full wp-image-198" title="interface" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/10/interface.jpg" alt="" width="640" height="302" />
 <a href="http://blog.adamfairholm.com/getting-your-add-ons-ready-for-pyrocms-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the nice things about an open source CMS project is it moves really fast and it isn&#8217;t afraid to make big changes. Such is the case with <a href="http://pyrocms.com/">PyroCMS</a>, and the upcoming 2.0 release is a case in point. With PyroCMS 2, we get a whole new back end interface and some more back end tools for developing great add-ons.</p>
<p>So, if you happen to develop add-ons for PyroCMS, you&#8217;ll need to do a little bit of work to make sure your shit don&#8217;t break. Here are some tips to get your stuff working on PyroCMS 2 in no time.</p>
<p><img class="alignnone size-full wp-image-198" title="interface" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/10/interface.jpg" alt="" width="640" height="302" /></p>
<h2>A Word on Standards</h2>
<p>With PyroCMS, I&#8217;ve thrown my hat into the ring to try and nail down some standards about how UI conventions should be used. You can find the running document <a href="https://github.com/pyrocms/pyrocms/wiki/Control-Panel-UI-Guidelines">here</a>. Some of them are common sense, but I highly recommend following these as much as you can to create a smooth UI experience across modules. If you have any questions, let me know on <a href="http://twitter.com/adamfairholm">Twitter</a>.</p>
<h2>The New Interface</h2>
<p>PyroCMS 0.x used an off the shelf admin interface, and then 1.x used an interface that was apparently designed by <a href="http://twitter.com/dhorrigan">Dan Horrigan</a>. I&#8217;m not even going to ask how that happened. Anyways, it was fine, but it had a vertical nav system that is so 2004 and took up too much screen real estate.</p>
<p>Luckily, the man behind the design of the <a href="http://www.pyrocms.com">PyroCMS</a> and <a href="http://fuelphp.com/">FuelPHP</a> websites, <a href="https://twitter.com/#!/ikreativ">Scott Parry</a>, has undertaken getting an admin interface going. It&#8217;s really fantastic. Based off of his <a href="https://github.com/iKreativ/Workless">Workless framework</a>, the new interface is colorful, flexible, and easy to implement.</p>
<p>Upgrading to the new interface is pretty easy, so let&#8217;s start with your view code. Here&#8217;s a quick comparison of a typical page:</p>
<div id="gist-1291157" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'>// PyroCMS 1.3.x and below:</div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="nt">&lt;h3&gt;</span>Your Title<span class="nt">&lt;/h3&gt;</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'><span class="nt">&lt;table&gt;</span></div><div class='line' id='LC6'>// Table Content Here</div><div class='line' id='LC7'><span class="nt">&lt;/table&gt;</span></div><div class='line' id='LC8'><br/></div><div class='line' id='LC9'>// PyroCMS 1.4</div><div class='line' id='LC10'><br/></div><div class='line' id='LC11'><span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">&quot;title&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC12'><span class="nt">&lt;h4&gt;</span>Your Title<span class="nt">&lt;/h4&gt;</span></div><div class='line' id='LC13'><span class="nt">&lt;/section&gt;</span></div><div class='line' id='LC14'><br/></div><div class='line' id='LC15'><span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">&quot;item&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC16'><span class="nt">&lt;table&gt;</span></div><div class='line' id='LC17'>// Table Content Here</div><div class='line' id='LC18'><span class="nt">&lt;/table&gt;</span></div><div class='line' id='LC19'><span class="nt">&lt;/section&gt;</span></div><div class='line' id='LC20'><br/></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1291157/6c328d67a6f61cf879144e628f0ffcbdd2db5bcb/gistfile1.html" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1291157#file_gistfile1.html" style="float:right;margin-right:10px;color:#666">gistfile1.html</a>
            <a href="https://gist.github.com/1291157">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>If you are not familiar, that is the HTML5 section tag that we are rocking. Yes, it is more markup, but it allows you to easily define a box of content on the backend &#8211; header and body.</p>
<p><img class="alignnone size-full wp-image-196" title="Screen Shot 2011-10-16 at 1.27.23 PM" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/10/Screen-Shot-2011-10-16-at-1.27.23-PM.png" alt="" width="658" height="177" /></p>
<p>The new interace is made up of these blocks, and beyond that, almost all of your current view code should work, including tables and other basic markup.</p>
<h2>Buttons</h2>
<p>We get to have some fun with buttons in PyroCMS 2. Workless comes with some shiny buttons that make the interface a little more fun. They come in two varieties: primary and secondary. Primary buttons take a class of &#8220;btn&#8221; and can have a color as a class (red, blue, gray, orange, green). So, for example:</p>
<p><code>&lt;button class="btn blue"&gt;Save&lt;/button&gt;</code></p>
<p>Luckily, PyroCMS has a button partial that you can pass data to, and it color codes the buttons by their function. So, if you are using the button partial, your Save, Delete, etc. buttons should already be upgraded. If not, get your head in the game. Secondary buttons are smaller and used for lists and other places where flashy buttons would be a distraction. These take a class of &#8220;button&#8221; and do not come in colors. If you are using the button partial and it is defaulting to the large ones, simply add a new param to get the secondary buttons:</p>
<p><code>&lt;?php $this-&gt;load-&gt;view('admin/partials/buttons', array('button_type'=&gt;'secondary', 'buttons' =&gt; array('edit' =&gt; array('id' =&gt; '../instances/edit/' . $widget-&gt;id), 'delete')) ); ?&gt; </code></p>
<p>It defaults to primary, so don&#8217;t worry about it if you want the primary buttons.</p>
<h2>Sections and Shortcuts</h2>
<p>The interface in PyroCMS 1.3 was made for simple modules, like &#8220;Redirects&#8221;, which is essentially a GUI crud for a DB table. If you want more functionality for sections of admin content within a module, you needed to roll your own solution. I did that for PyroStreams with a special level of nav that defined a &#8220;Fields&#8221; and &#8220;Streams&#8221; section. In PyroCMS 2, you can define &#8220;sections&#8221; in your details.php file. Here is an example:</p>
<div id="gist-1291186" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span> <span class="nb">defined</span><span class="p">(</span><span class="s1">&#39;BASEPATH&#39;</span><span class="p">)</span> <span class="k">or</span> <span class="k">exit</span><span class="p">(</span><span class="s1">&#39;No direct script access allowed&#39;</span><span class="p">);</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="k">class</span> <span class="nc">Module_Sample</span> <span class="k">extends</span> <span class="nx">Module</span> <span class="p">{</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'>	<span class="k">public</span> <span class="nv">$version</span> <span class="o">=</span> <span class="s1">&#39;1.0&#39;</span><span class="p">;</span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">info</span><span class="p">()</span></div><div class='line' id='LC8'>	<span class="p">{</span></div><div class='line' id='LC9'>		<span class="k">return</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC10'>			<span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC11'>				<span class="s1">&#39;en&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Sample&#39;</span><span class="p">,</span></div><div class='line' id='LC12'>			<span class="p">),</span></div><div class='line' id='LC13'>			<span class="s1">&#39;description&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC14'>				<span class="s1">&#39;en&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Only the samplest.&#39;</span></div><div class='line' id='LC15'>			<span class="p">),</span></div><div class='line' id='LC16'>			<span class="s1">&#39;frontend&#39;</span>	<span class="o">=&gt;</span> <span class="k">TRUE</span><span class="p">,</span></div><div class='line' id='LC17'>			<span class="s1">&#39;backend&#39;</span>	<span class="o">=&gt;</span> <span class="k">TRUE</span><span class="p">,</span></div><div class='line' id='LC18'>			<span class="s1">&#39;skip_xss&#39;</span>	<span class="o">=&gt;</span> <span class="k">TRUE</span><span class="p">,</span></div><div class='line' id='LC19'>			<span class="s1">&#39;menu&#39;</span>		<span class="o">=&gt;</span> <span class="s1">&#39;content&#39;</span><span class="p">,</span></div><div class='line' id='LC20'><br/></div><div class='line' id='LC21'>			<span class="s1">&#39;roles&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC22'>				<span class="s1">&#39;admin_module&#39;</span></div><div class='line' id='LC23'>			<span class="p">),</span></div><div class='line' id='LC24'><br/></div><div class='line' id='LC25'>			<span class="s1">&#39;sections&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC26'>			    <span class="s1">&#39;dogs&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC27'>				    <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;sample_dogs&#39;</span><span class="p">,</span></div><div class='line' id='LC28'>				    <span class="s1">&#39;uri&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;admin/sample&#39;</span><span class="p">,</span></div><div class='line' id='LC29'>				    <span class="s1">&#39;shortcuts&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC30'>						<span class="k">array</span><span class="p">(</span></div><div class='line' id='LC31'>					 	   <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;sample_new_dog&#39;</span><span class="p">,</span></div><div class='line' id='LC32'>						    <span class="s1">&#39;uri&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;admin/sample/create&#39;</span><span class="p">,</span></div><div class='line' id='LC33'>						<span class="p">),</span></div><div class='line' id='LC34'>					<span class="p">),</span></div><div class='line' id='LC35'>				<span class="p">),</span></div><div class='line' id='LC36'>			    <span class="s1">&#39;cats&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC37'>				    <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;sample_cats&#39;</span><span class="p">,</span></div><div class='line' id='LC38'>				    <span class="s1">&#39;uri&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;admin/sample/cats&#39;</span><span class="p">,</span></div><div class='line' id='LC39'>				    <span class="s1">&#39;shortcuts&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC40'>						<span class="k">array</span><span class="p">(</span></div><div class='line' id='LC41'>						    <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;cats_new_cat&#39;</span><span class="p">,</span></div><div class='line' id='LC42'>						    <span class="s1">&#39;uri&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;admin/sample/cats/create&#39;</span><span class="p">,</span></div><div class='line' id='LC43'>						<span class="p">),</span></div><div class='line' id='LC44'>				    <span class="p">),</span></div><div class='line' id='LC45'>			    <span class="p">),</span></div><div class='line' id='LC46'>		    <span class="p">),</span></div><div class='line' id='LC47'>		<span class="p">);</span></div><div class='line' id='LC48'>	<span class="p">}</span></div><div class='line' id='LC49'><br/></div><div class='line' id='LC50'><span class="p">}</span></div><div class='line' id='LC51'><br/></div><div class='line' id='LC52'><span class="cm">/* End of file details.php */</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1291186/a2bf604bd2cb94173c8193c77c23e126dd62a880/gistfile1.aw" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1291186#file_gistfile1.aw" style="float:right;margin-right:10px;color:#666">gistfile1.aw</a>
            <a href="https://gist.github.com/1291186">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>This way, you can easily separate your modules into different sections, and the interface will respond in kind:</p>
<p><img class="alignnone size-full wp-image-197" title="Screen Shot 2011-10-16 at 1.50.55 PM" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/10/Screen-Shot-2011-10-16-at-1.50.55-PM.png" alt="" width="337" height="152" /></p>
<p>The best way to integrate this is to separate your module into separate admin controllers. The admin.php controller, and another controller for each section. For the blog module, it would be admin_categories.php for the categories section.</p>
<p>PyroCMS knows what section you are in by reading a class variable in the section controller:</p>
<p><code>protected $section = 'categories';</code></p>
<p>Add one to each of your section controllers, and you are on your way.</p>
<h3>Shortcuts</h3>
<p>You might notice in the example above, that shortcuts are part of this array as well. In PyroCMS 2, shortcuts are no longer a partial &#8211; you add them to your details.php file. See the example above for the specifics.</p>
<p>For modules that do not have sections, the shortcuts section of the array is on the same leve with the &#8216;name&#8217; and &#8216;description&#8217; nodes.</p>
<h2>Filtering Data</h2>
<p>Many core PyroCMS modules us data filtering (such as the blog module), and yours may too. In PyroCMS 2, filtering is not handled by a partial &#8211; you need to add it to your views. Take the example of the blog filtering:</p>
<div id="gist-1291179" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="x">&lt;fieldset id=&quot;filters&quot;&gt;</span></div><div class='line' id='LC2'><span class="x">	</span></div><div class='line' id='LC3'><span class="x">	&lt;legend&gt;</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;global:filters&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x">&lt;/legend&gt;</span></div><div class='line' id='LC4'><span class="x">	</span></div><div class='line' id='LC5'><span class="x">	</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">form_open</span><span class="p">();</span> <span class="cp">?&gt;</span><span class="x"></span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'><span class="x">	</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">form_hidden</span><span class="p">(</span><span class="s1">&#39;f_module&#39;</span><span class="p">,</span> <span class="nv">$module_details</span><span class="p">[</span><span class="s1">&#39;slug&#39;</span><span class="p">]);</span> <span class="cp">?&gt;</span><span class="x"></span></div><div class='line' id='LC8'><span class="x">		&lt;ul&gt;  </span></div><div class='line' id='LC9'><span class="x">			&lt;li&gt;</span></div><div class='line' id='LC10'><span class="x">        		</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;blog_status_label&#39;</span><span class="p">,</span> <span class="s1">&#39;f_status&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x"></span></div><div class='line' id='LC11'><span class="x">        		</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">form_dropdown</span><span class="p">(</span><span class="s1">&#39;f_status&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="mi">0</span> <span class="o">=&gt;</span> <span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;global:select-all&#39;</span><span class="p">),</span> <span class="s1">&#39;draft&#39;</span><span class="o">=&gt;</span><span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;blog_draft_label&#39;</span><span class="p">),</span> <span class="s1">&#39;live&#39;</span><span class="o">=&gt;</span><span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;blog_live_label&#39;</span><span class="p">)));</span> <span class="cp">?&gt;</span><span class="x"></span></div><div class='line' id='LC12'><span class="x">    		&lt;/li&gt;</span></div><div class='line' id='LC13'><span class="x">		</span></div><div class='line' id='LC14'><span class="x">			&lt;li&gt;</span></div><div class='line' id='LC15'><span class="x">        		</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;blog_category_label&#39;</span><span class="p">,</span> <span class="s1">&#39;f_category&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x"></span></div><div class='line' id='LC16'><span class="x">        		</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">form_dropdown</span><span class="p">(</span><span class="s1">&#39;f_category&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="mi">0</span> <span class="o">=&gt;</span> <span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;global:select-all&#39;</span><span class="p">))</span> <span class="o">+</span> <span class="nv">$categories</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x"></span></div><div class='line' id='LC17'><span class="x">    		&lt;/li&gt;</span></div><div class='line' id='LC18'><span class="x">			</span></div><div class='line' id='LC19'><span class="x">			&lt;li&gt;</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">form_input</span><span class="p">(</span><span class="s1">&#39;f_keywords&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x">&lt;/li&gt;</span></div><div class='line' id='LC20'><span class="x">			&lt;li&gt;</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">anchor</span><span class="p">(</span><span class="nx">current_url</span><span class="p">()</span> <span class="o">.</span> <span class="s1">&#39;#&#39;</span><span class="p">,</span> <span class="nx">lang</span><span class="p">(</span><span class="s1">&#39;buttons.cancel&#39;</span><span class="p">),</span> <span class="s1">&#39;class=&quot;cancel&quot;&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x">&lt;/li&gt;</span></div><div class='line' id='LC21'><span class="x">		&lt;/ul&gt;</span></div><div class='line' id='LC22'><span class="x">	</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">form_close</span><span class="p">();</span> <span class="cp">?&gt;</span><span class="x"></span></div><div class='line' id='LC23'><span class="x">&lt;/fieldset&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1291179/7490c94f4ef353f311a71eb799582bc58c4a3f90/gistfile1.aw" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1291179#file_gistfile1.aw" style="float:right;margin-right:10px;color:#666">gistfile1.aw</a>
            <a href="https://gist.github.com/1291179">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Simply define a fieldset with the id of &#8220;filters&#8221; with a legend tag, and you can put a UL of params in there with your filtering options. Filtering should take place at the table-level, meaning that when a filter is applied, the table is changed, not the entire block of content. You can wrap your table (or other element you want filtered) in a div with an id of &#8220;filter-stage&#8221;:</p>
<p><code>&lt;div id="filter-stage"&gt;</code></p>
<h2>Misc Items</h2>
<p>- A new feature in PyroCMS  2allows action buttons on tables (such as a mass &#8220;Delete&#8221; function) to stay inactive until a user does something that would enable data to be acted upon (ie: checking a box). To enable this, just wrap your buttons in a div with a class of &#8220;table_action_buttons&#8221;.</p>
<p>- As with PyroCMS 1.3.2, $this-&gt;user is deprecated in favor of $this-&gt;current_user.</p>
<p>- To float buttons to the right in an action table column, give it a class of &#8220;actions&#8221;.</p>
<h2>Tags</h2>
<p>The one piece of the pie not yet in place is the new tag system, which is being rewritten. I&#8217;ve leave it to Phil Sturgeon to update the troops on that one, but you can follow the progress on the new tag parser library (called &#8220;Lex&#8221;) <a href="https://github.com/happyninjas/lex">here</a>.</p>
<h2>Go Forth and Update</h2>
<p>PyroCMS 2 is going to be a huge leap forward. Clients will love it, and it offers a lot more in terms of flexibility and style for Add-on developers. If you have any questions, comment below or ask in the <a href="http://pyrocms.com/forums">PyroCMS forums</a>.</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/vgvEixS6rlc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/getting-your-add-ons-ready-for-pyrocms-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/getting-your-add-ons-ready-for-pyrocms-2/</feedburner:origLink></item>
		<item>
		<title>Thoughts on CICON2011</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/K8MZwlfCQoo/</link>
		<comments>http://blog.adamfairholm.com/thoughts-on-cicon2011/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 05:12:05 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[codeigniter]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=166</guid>
		<description><![CDATA[<img class="alignnone size-full wp-image-173" title="CodeIgniter T-shirt" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/08/photo1.jpg" alt="" width="600" height="244" />

CICON2011 was last weekend in NYC, and I had a lot of fun. In March, I told Phil Sturgeon I'd love to help out if he needed it, and I ended up getting to be part of the three man crew (me, Phil, and Kenny Katzgrau) who put together the event.

It was the first of it's kind in the US, and I believe a hugely significant point for the CodeIgniter community as a whole, so I thought I'd get down my thoughts on the whole affair. Here we go!
 <a href="http://blog.adamfairholm.com/thoughts-on-cicon2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-173" title="CodeIgniter T-shirt" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/08/photo1.jpg" alt="" width="600" height="244" /></p>
<p>CICON2011 was last weekend in NYC, and I had a lot of fun. In March, I told Phil Sturgeon I&#8217;d love to help out if he needed it, and I ended up getting to be part of the three man crew (me, Phil, and Kenny Katzgrau) who put together the event.</p>
<p>It was the first of it&#8217;s kind in the US, and I believe a hugely significant point for the CodeIgniter community as a whole, so I thought I&#8217;d get down my thoughts on the whole affair. Here we go!</p>
<h2>It signaled a change in community/Ellislab relations</h2>
<p>In my opinion, CICON in NYC was a huge milestone for the relationship and communication between the CodeIgniter community and Ellislab. Why? <a href="http://ellislab.com/">Ellislab</a> was the premiere sponsor of CICON and their logo was all over the place, but right from the start the message was clear: CodeIgniter is driven by us.</p>
<p>The first announcement on Saturday was that <a href="https://github.com/EllisLab/CodeIgniter">CodeIgniter has moved to Github</a>, and Reactor is now CodeIgniter. If you are used to things on Github and yawn at the news, you&#8217;re suppressing several years of CodeIgniter memory where sending a pull request was not even possible, let alone so easy and in such a central and visible place. For many, CI in the past was open source, but you couldn&#8217;t touch it or contribute to it.</p>
<p>So, having Ellislab fully behind an event where a contest was held over the two day period to see who could make the most/best pull requests to CI is a huge sea change in the way Ellislab and the community interact, and a big leap forward.</p>
<p><em>(As a side note I think it&#8217;s a relationship that worked and felt natural: EllisLab showed their support in a substantial way, but everything else was planned, executed, and set up by the community.)</em></p>
<p><img class="alignright" title="Name Badges" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/08/photo-copy-3.jpg" alt="" width="322" height="330" /></p>
<h2>The line where CI ends is blurry</h2>
<p>I realized something a few hours into Saturday at CICON &#8211; many presentations, although informative, weren&#8217;t <em>just</em> about CodeIgniter. Kenny&#8217;s talk about stack optimization, Calvin&#8217;s talk about payment gateways, and even John Crepezzi&#8217;s talk about writing friendly libraries could conceivably be at home at several development conferences if you made some changes.</p>
<p>I&#8217;m not saying these presentations were not great or valuable. Just the opposite, they were great. I&#8217;m baffled by payment gateways, for instance, so Calvin&#8217;s talk on them was extremely valuable, as well as thorough and original. However, it says something about the way we use CodeIgniter. CI is so flexible and light that we often simply find ourselves talking about something else entirely without realizing it. In the same way CI doesn&#8217;t get in the way, we do not generally get bogged down in the constructs that our framework places on us &#8211; we build on top of it because CI works with us.</p>
<p>In other words, we were all there because of the tool we use, but we were not all there to figure out how to use it.</p>
<p><img title="Phil Sturgeon Speaking at CICON" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/08/photo-copy-2.jpg" alt="" width="600" height="450" /></p>
<p><em>Above: Phil giving the opening talk on Saturday.</em></p>
<h2>We walked away with a shared mission</h2>
<p>There was a great moment on Saturday where we were running well short of our schedule, and Phil asked Greg Aker to see if he could fill a gap with some group discussion. Greg was willing, and after some warm up time eventually got a huge group discussion going about where CI was going, and what was next. Kenny was taking minutes, and soon we had a <a href="http://pastie.org/pastes/2403308/text">really good list going</a>.</p>
<p>If <em>everyone</em> walked away with just one thing, I think group discussions like this one created a shared sense ownership of where CI is headed. That&#8217;s something new, and something that will help keep the CI community going.</p>
<h2>CICON was a true community effort, and it showed</h2>
<p>This may seem self-evident, but developers are not really the same type of people who excel at event planning. That being said, we stepped out of our element to try and provide all the things that a cool conference should have: a great venue, a great location, food, working A/V equipment, lanyards, fun t-shirts, a bar to go to after, etc.</p>
<p>Throughout the process, the community really stepped up to help. Ellislab was our main sponsor and additionally provided the resources to send Greg Aker (who was critical to the success of the conference). PHP Fog, Mindfulware, and Conflux Group generously sponsored. Whooz! (the people behind the very successful EECI conferences) not only sponsored but provided the design elements and web design for the conference. Although we put together the swag and other materials, their work on the design and look/feel saved us a lot of time and energy.</p>
<p>The last piece of the puzzle was the most important: the attendees. Everyone brought their enthusiasm, and as a result, we had a fantastic group of people who allowed us to go with the flow, improvise when we needed to, and hopefully create an environment that led to the important community milestone that CICON was.</p>
<p>CI has a bright future ahead of it.</p>
<p>PS: My offer still stands to pay Greg Aker $20 to merge in my echo helper pull request.</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/K8MZwlfCQoo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/thoughts-on-cicon2011/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/thoughts-on-cicon2011/</feedburner:origLink></item>
		<item>
		<title>Dynamic Pages with PyroCMS and PyroStreams</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/5RqTfhgNFXo/</link>
		<comments>http://blog.adamfairholm.com/dynamic-pages-with-pyrocms-and-pyrostreams/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 22:15:08 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PyroCMS]]></category>
		<category><![CDATA[pyrostreams]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=157</guid>
		<description><![CDATA[There has been a lot of questions on the <a href="http://www.addictaddons.com/forums/">PyroStreams forum</a> about one subject in particular - showing dynamic info on its own page - so what follows is a guide on how to do that. Once the new Addict site is up (which has a blog), I'll cross-post this over there.

<em>One note - I am using PyroStreams 2 beta syntax here with the {entries} tag inside of the cycle plugin. If you are using PyroStreams 1, please adjust accordingly. If you are using 2 beta, please update to the latest version (uploaded today at 6pm EST), as it contains fixes to the single function.</em>

Alright, let's get started!
 <a href="http://blog.adamfairholm.com/dynamic-pages-with-pyrocms-and-pyrostreams/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Update! September 16, 2011</h2>
<p>Since I wrote this blog post, there have been some new developments. First of all, the PyroCMS releases after 1.3.2 will <a href="https://github.com/pyrocms/pyrocms/commit/97a1d7a3581e69fb69e31c171a1804fa72460113">fix the bug mentioned below</a>. Secondly, I&#8217;ve released an add-on that makes it easier to manage your custom routes, called PyroRoutes. You can download it for free <a href="https://github.com/addict-addons/PyroRoutes">here</a>.</p>
<hr />
<p>There has been a lot of questions on the <a href="http://www.addictaddons.com/forums/">PyroStreams forum</a> about one subject in particular &#8211; showing dynamic info on its own page &#8211; so what follows is a guide on how to do that. Once the new Addict site is up (which has a blog), I&#8217;ll cross-post this over there.</p>
<p><em>One note &#8211; I am using PyroStreams 2 beta syntax here with the {entries} tag inside of the cycle plugin. If you are using PyroStreams 1, please adjust accordingly. If you are using 2 beta, please update to the latest version (uploaded today at 6pm EST), as it contains fixes to the single function.</em></p>
<p>Alright, let&#8217;s get started!</p>
<h2>Pages in PyroCMS</h2>
<p>First a little note on the relationship between pages and streams. When you create a stream, there is nothing created in the page system that tells PyroCMS to do anything but to create that stream and populate it with data. The display is up to you, which means that it is very flexible, but some things require a little bit of elbow grease.</p>
<p>If you&#8217;ve used ExpressionEngine before, you know that you can create a URL and EE will show you anything but a 404 (unless you have strict URLs turned on, and they are turned off by default). That means if you have a template group called products and a template inside of it called product, you could do <strong>products/product/sample-product</strong> or <strong>products/product/sample-product/features</strong> all you want. EE doesn&#8217;t really care about the URL as long as it can find something to show.</p>
<p>PyroCMS cares about your URL. If you give it the URL <strong>products/product/4</strong>, It is going to look for a page in your page tree called <strong>products/product/4</strong> and try and load that page. The trick is you need to tell PyroCMS to ignore certain segments in your URL, so it will load a base page (in this case <strong>products/product-page</strong>). On that page, we&#8217;ll pay attention to what&#8217;s in the URL, and display an entry based on that.</p>
<p>If you are confused, don&#8217;t worry! It&#8217;s easy &#8211; below is an example.</p>
<h2>Building a Simple Products Directory</h2>
<p>So if you are listing products on a page, you pretty much can tell how that goes. You create a &#8220;Products&#8221; page:</p>
<p><img class="alignnone size-full wp-image-158" title="products_edit" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/07/products_edit.jpg" alt="" width="650" height="305" /></p>
<p>In the page layout (let&#8217;s called it &#8220;Product Listing&#8221;) associated with that page (under the &#8220;Design&#8221; tab), you run through code that grabs your products:</p>
<pre>{pyro:streams:cycle stream="products"}

&lt;a href="products/product/{id}"&gt;{name}&lt;/a&gt;

{/pyro:streams:cycle}</pre>
<p>Easy enough! We are dynamically creating links to products by id. (Keep in mind, this could be a slug or something else you want to use, but for this example we&#8217;ll use IDs since every post has them.)</p>
<p>Now, we need to create a Product page as a child page of Products. This page has a URI of products/product-page. We can create a separate page layout for that as well. In this example we&#8217;ll call it &#8220;Product&#8221;.</p>
<p><img class="alignnone size-full wp-image-159" title="page_layouts" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/07/page_layouts.jpg" alt="" width="608" height="209" /></p>
<p><img class="alignnone size-full wp-image-160" title="product_layout" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/07/product_layout.jpg" alt="" width="586" height="236" /></p>
<p><img class="alignnone size-full wp-image-161" title="page_tree" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/07/page_tree.jpg" alt="" width="599" height="97" /></p>
<p>Now, if we go to our product listing, and click on a product, we get a 404, because PyroCMS is looking for a page called 2 (if the id is 2) that is a child page of Product. That doesn&#8217;t exist in our pages tree, so we need to add a route.</p>
<p>If you are not familiar with routes, they are a CodeIgniter thing, and they are located in <strong>system/pyrocms/config/routes.php</strong>. It is a simple array that has a standard format:</p>
<p><code>$route['uri to route'] = 'uri to route to';</code></p>
<p>You can also use :any and :num to signify anything in a URI segment and a number in the URI segment, respectively.</p>
<p>You might ask &#8220;what are we routing to&#8221;? The answer is the view function in the pages module. So our route is going to look like this:</p>
<p><code>$route['products/product/:any'] = 'pages/view/products/product-page';</code></p>
<p>What we are doing is saying that when PyroCMS encounters a URI with <strong>products/product/</strong>, and anything in the third segment (our id, slug, whatever), it will load up <strong>products/product-page</strong>. Notice that we don&#8217;t use any routing variables like $1 because we don&#8217;t want to pass dynamic info to the root value &#8211; we just want PyroCMS to ignore some segments.</p>
<h2>Bypassing a Bug</h2>
<p>I will add a pull request for this ASAP, but doing this throws an error in PyroCMS 1.2 and above. This is because of a bug (what I think is a bug anyways) in the pages module. Luckily, the fix is really easy. Go to <strong>system/pyrocms/modules/pages/controllers/pages.php</strong> and change line 43 to:</p>
<p><code>$url_segments = $this-&gt;uri-&gt;total_rsegments() &gt; 0 ? array_slice($this-&gt;uri-&gt;rsegment_array(), 2) : null;</code></p>
<p>That&#8217;s it! You should be set to go now.</p>
<h2>Displaying Dynamic Data</h2>
<p>No you should be able to click on any one of your product links, and you won&#8217;t get a 404. Awesome! Now we just need to display some dynamic data.</p>
<p>You can use the cycle plugin if you want but we have a simplified function called single in PyroStreams 2 that you can use. It basically just eliminates the need to use &#8220;entries&#8221; and limit 1 and all that stuff. So in our Product page layout, we have this code:</p>
<pre>{pyro:streams:single stream="products" id="[segment_3]"}

&lt;h1&gt;{name}&lt;/h1&gt;

{/pyro:streams:single}</pre>
<p>Simple as that &#8211; we can tell it to grab the ID using our (PyroStreams 2 only) segment variables. Using the cycle plugin you can do:</p>
<pre>{pyro:streams:cycle stream="products" where="id==seg_3" limit="1"}

{entries}

&lt;h1&gt;{name}&lt;/h1&gt;

{/entries}

{/pyro:streams:cycle}​</pre>
<p>That should cover it! I&#8217;ll be posting some more how-to&#8217;s here on PyroStreams just as soon as I get the last damn bits of PyroStreams 2 finished!</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/5RqTfhgNFXo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/dynamic-pages-with-pyrocms-and-pyrostreams/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/dynamic-pages-with-pyrocms-and-pyrostreams/</feedburner:origLink></item>
		<item>
		<title>ExpressionEngine CP Menu Manipulation with cp_menu_array</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/A03bkuG-pIs/</link>
		<comments>http://blog.adamfairholm.com/expressionengine-cp-menu-manipulation/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 18:50:49 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[ExpressionEngine]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=148</guid>
		<description><![CDATA[A few days ago Rob Sanchez <a href="http://twitter.com/#!/_rsan/status/86122073746968576">tweeted a screenshot</a> that caught my eye - a hook called <strong>cp_menu_array</strong> that is hanging out in expressionengine/libraries/Menu.php like it's nothing special. It was added in EE 2.1.5.

Good thing Rob caught that because I can't find any mention of it in the change log or the docs, and this thing is awesome. Why? We finally have direct control over the EE CP menu system.

<img src="http://blog.adamfairholm.com/./wp-content/uploads/2011/07/menu_item.jpg" alt="" title="menu_item" width="424" height="194" class="alignnone size-full wp-image-149" />
 <a href="http://blog.adamfairholm.com/expressionengine-cp-menu-manipulation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few days ago Rob Sanchez <a href="http://twitter.com/#!/_rsan/status/86122073746968576">tweeted a screenshot</a> that caught my eye &#8211; a hook called <strong>cp_menu_array</strong> that is hanging out in expressionengine/libraries/Menu.php like it&#8217;s nothing special. It was added in EE 2.1.5.</p>
<p>Good thing Rob caught that because I can&#8217;t find any mention of it in the change log or the docs, and this thing is awesome. Why? We finally have direct control over the EE CP menu system.</p>
<h2>A Brief Recent History of Messing with the CP Menu</h2>
<p>First, a little overview of where we&#8217;ve been in recent history of the menu.</p>
<p>In EE2, menus on a bookmarks model. A common example is you&#8217;ve got an install of <a href="http://buildwithstructure.com/">Structure</a> and you want to just have a link to go to the structure area so you don&#8217;t have to go through the Add-ons -&gt; Modules menu. You click the little +Add link on the top and you can add it as a custom-named link on the top.</p>
<p><img src="http://blog.adamfairholm.com/./wp-content/uploads/2011/07/structure.jpg" alt="" title="EE CP Bookmarks" width="650" height="115" class="alignnone size-full wp-image-133" /></p>
<p>This is great except that you&#8217;ll notice the controls for editing the name and order of these bookmarks are in your account section. IE, this bookmark is just for you, so that makes managing the experience for clients a lot harder. Make a new account for a client, and you need to add in these bookmarks if you want them to have that easy access.</p>
<p>If you wanted to extend the menu, you could use the cp_js_end hook and then used JS to add items to the menu using the DOM. This was fine, but messing around with adding/removing items with JS wasn&#8217;t an ideal solution. There is already an array with the items in there &#8211; just give us access!</p>
<h2>The Keys to the &#8230; Array</h2>
<p>So here comes cp_menu_array and basically EE is saying &#8220;here, take the entire menu array and have fun with it. Go nuts, really. Just give it back when you&#8217;re done.&#8221;</p>
<p>Awe. Some. This is that next level menu customization. Let&#8217;s have fun with it.</p>
<p>To play, you are going to need to use an extension. If you aren&#8217;t familiar with extensions, check out the <a href="http://expressionengine.com/user_guide/development/extensions.html">EE docs on the matter</a>. They are basically just functions that you can run at predetermined times in EE&#8217;s code.</p>
<p>Let&#8217;s look at the extension info in the <strong>activate_extension</strong> function:</p>
<pre>public function activate_extension()
	{
		$this->settings = array();

		$data = array(
			'class'	=> __CLASS__,
			'method'	=> 'build_custom_menu',
			'hook'	=> 'cp_menu_array',
			'settings'	=> serialize($this->settings),
			'version'	=> $this->version,
			'enabled'	=> 'y'
		);

		$this->EE->db->insert('extensions', $data);
	}</pre>
<p>Nothing surprising here. Just basically creating a regular extension, and we are saying we want to call the <strong>build_custom_menu</strong> function when EE gets around the to <strong>cp_menu_array</strong> hook.</p>
<p>Now, the fun part, our build_custom_menu function. This is actually really simple. The function just takes an array and expects you to give an array back. Here&#8217;s what a section looks like:</p>
<pre>    [content] => Array
        (
            [publish] => Array
                (
                    [Pages] => index.php?S={string}&amp;D=cp&amp;C=content_publish
&amp;M=entry_form&amp;channel_id=2
                    [Schools] => index.php?S={string}&amp;D=cp&amp;C=content_publish
&amp;M=entry_form&amp;channel_id=1
                )

            [edit] => index.php?S={string}&amp;D=cp&amp;C=content_edit
            [files] => Array
                (
                    [file_manager] => index.php?S={string}&amp;D=cp&amp;C=content_files
                    [0] => ----
                    [file_upload_preferences] => index.php?S={string}&amp;D=cp
&amp;C=content_files&amp;M=file_upload_preferences
                    [file_watermark_preferences] => index.php?S={string}&amp;D=cp
&amp;C=content_files&amp;M=watermark_preferences
                )

            [0] => ----
            [overview] => index.php?S={string}&amp;D=cp&amp;C=content
        )
</pre>
<p>The root key of the array is the content menu item we are all familiar with, with the publish sub-menu item underneath it. Pretty straight forward. Each array item can be a string or array, and the array is another sub menu.</p>
<h2>Example: Page Structure Link</h2>
<p>Let&#8217;s try a simple example. We want to add a link under &#8220;Content&#8221; that says &#8220;Page Structure&#8221; and links to our Structure module. Here is our <strong>build_custom_menu</strong> function:</p>
<pre>public function build_custom_menu($menu)
{
	$menu['content']['pages'] = BASE.AMP.'C=addons_modules'.AMP.'M=
show_module_cp'.AMP.'module=structure';

	return $menu;
}</pre>
<p>We are simple adding our own item to the &#8216;content&#8217; array inside of the $menu array and giving it a value of the link to the structure module.</p>
<p>Instead of naming the key &#8220;Page Structure&#8221; we need to keep than name in a language file and prefix it with &#8216;nav_&#8217;. So, inside language/english/custom_menu_lang.php we&#8217;d need this item in the $lang array:</p>
<p><code>'nav_pages' => 'Page Structure'</code></p>
<p>Now, we&#8217;ve got a sweet custom menu item!</p>
<p><img src="http://blog.adamfairholm.com/./wp-content/uploads/2011/07/menu_item.jpg" alt="" title="menu_item" width="424" height="194" class="alignnone size-full wp-image-149" /></p>
<h2>Obeying Member Permissions</h2>
<p>Okay so this looks awesome but remember that not everyone can access the Structure module so we shouldn&#8217;t tease them and show them what they could have if they were cool enough.</p>
<p>The solution to this is pretty simple: just do some checking for your particular menu item. Here is the user check from our example:</p>
<pre>public function build_custom_menu($menu)
{
	$assigned = $this->EE->session->userdata('assigned_modules');

	if(
		$this->EE->cp->allowed_group('can_access_modules') and
		(
			$this->EE->session->userdata('group_id') == 1 or
			(isset($assigned[15]) and $assigned[15] == 'yes')
		 )
	) {

	$menu['content']['pages'] = BASE.AMP.'C=addons_modules'.AMP
.'M=show_module_cp'.AMP.'module=structure';

	}

	return $menu;
}</pre>
<p>Above, we are checking that the user can access modules, and at they can access the Structure module. We need to check this by the module ID in the &#8216;assigned_modules&#8217; userdata item., which kind of sucks because this can change from install to install, so its best to get the module ID by the name and use that.</p>
<h2>Other Functions</h2>
<p>To remove an item, just unset that part of the array:</p>
<p><code>unset($menu['content']['overview']);</code></p>
<p>To add a menu break, add an array value of four dashes (&#8212;-).</p>
<p><code>$menu['content'][] = '----';</code></p>
<h2>Go Nuts!</h2>
<p>This gives add-on developers and site developers a really fine grain of control over how menus are structured. Modules can also now add an extension that adds custom menu items. You can control your client experience down to a fine grain, and that&#8217;s good for everyone.</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/A03bkuG-pIs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/expressionengine-cp-menu-manipulation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/expressionengine-cp-menu-manipulation/</feedburner:origLink></item>
		<item>
		<title>Introducing Fizl: Sites in Your Filesystem</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/GEIg0JnEUP4/</link>
		<comments>http://blog.adamfairholm.com/introducing-fizl-sites-in-your-filesystem/#comments</comments>
		<pubDate>Sat, 07 May 2011 19:24:39 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[fizl]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=127</guid>
		<description><![CDATA[<p>I don't like having to set up a huge CMS for a really small site that only I am going to update and edit, so when I saw Rick Ellis' <a href="http://rickellis.com/design/filedriver.html">FileDriver</a> demo, I thought a filesystem-based CMS was a great idea. It wasn't available to use though, so I tried my hand at creating my own.</p>

<iframe src="http://player.vimeo.com/video/23173377?title=0&#38;byline=0&#38;portrait=0" width="600" height="338" frameborder="0"></iframe> <a href="http://blog.adamfairholm.com/introducing-fizl-sites-in-your-filesystem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like having to set up a huge CMS for a really small site that only I am going to update and edit, so when I saw Rick Ellis&#8217; <a href="http://rickellis.com/design/filedriver.html">FileDriver</a> demo, I thought a filesystem-based CMS was a great idea. It wasn&#8217;t available to use though, so I tried my hand at creating my own.</p>
<p>Fizl&#8217;s main goal is to be simple while still having the ability to create some cool, functional stuff. At its core is the idea to build your site with HTML files in the filesystem. No logins, databases, or anything else needed. You can also embed pieces of content, write your content in markdown or textile, template content, show tweets, easily write navigation menus with a shorthand, list files, write and use configs, and more. It uses a simple tag-based system to allow for plugin functionality. You can also easily extend Fizl with your own plugins.</p>
<p>Fizl is open source, so you can download it and check out all the docs on <a href="http://1bitapps.com/fizl/">this mini-site</a>. If you have built something with it, I&#8217;d love to check it out!</p>
<p><iframe src="http://player.vimeo.com/video/23173377?title=0&amp;byline=0&amp;portrait=0" width="600" height="338" frameborder="0"></iframe></p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/GEIg0JnEUP4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/introducing-fizl-sites-in-your-filesystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/introducing-fizl-sites-in-your-filesystem/</feedburner:origLink></item>
		<item>
		<title>CICON 2011</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/TgNf8BuCEyI/</link>
		<comments>http://blog.adamfairholm.com/cicon-2011/#comments</comments>
		<pubDate>Wed, 04 May 2011 02:47:11 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[cicon2011]]></category>
		<category><![CDATA[codeigniter]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=121</guid>
		<description><![CDATA[A short time ago I somehow found myself helping out with the organizing of <a href="http://cicon2011.com/">CICON 2011</a> in New York City this August (CodeIgniter Con, for those not in the know).

Aside from some little things here and there for the website and getting to talk to the awesome people at <a href="http://www.ellislab.com">Ellislab</a>, I volunteered to make a <a href="http://vimeo.com/22658588">video</a> to promote CICON with interviews from other CI developers and CI community members. Check it out below:

<iframe src="http://player.vimeo.com/video/22658588?title=0&#38;byline=0&#38;portrait=0" width="500" height="295" frameborder="0"></iframe> <a href="http://blog.adamfairholm.com/cicon-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A short time ago I somehow found myself helping out with the organizing of <a href="http://cicon2011.com/">CICON 2011</a> in New York City this August (CodeIgniter Con, for those not in the know).</p>
<p>Aside from some little things here and there for the website and getting to talk to the awesome people at <a href="http://www.ellislab.com">Ellislab</a>, I volunteered to make a <a href="http://vimeo.com/22658588">video</a> to promote CICON with interviews from other CI developers and CI community members. Check it out below:</p>
<p><iframe src="http://player.vimeo.com/video/22658588?title=0&amp;byline=0&amp;portrait=0" width="500" height="295" frameborder="0"></iframe></p>
<p>First a side note for people into video: if you are going to do interviews via Skype, do some tests first. The video was recorded with <a href="http://shinywhitebox.com/ishowu-v1/">iShowU</a>, and when the audio didn&#8217;t want to work (which was 90% of the time), the audio was recorded with <a href="http://www.rogueamoeba.com/audiohijackpro/">Audio Hijack Pro</a> (also our jam for the <a href="http://www.filmedinsert.com/blog/tag/podcast-2/">FilmedInsert podcast</a>). Due to my stupidity, I found myself spending hours and hours synching audio and running video through export processes (thank you <a href="http://www.squared5.com/">MPEG Streamclip</a>) to get it all to work. FCP did some things I&#8217;ve never seen it do before, but I eventually got it all to work.</p>
<p>Anyways, it was really cool to talk to everyone, and the whole process reminded me why I love being a CodeIgniter developer &#8211; CI people are really nice/fun people. I had some experience before from interviewing people during EECI2009 in San Francisco, but it was neat to get people in their natural habitat (at a computer) and get an idea of where they are coming from as developers and why they are a part of the CI community.</p>
<p>The idea of this first video is to get you fired up about CICON. I think it&#8217;s really interesting to see that for even the guys at the top of the stack, CI really shaped the way they developed and was an important moment in their development history. I know it was for me, so it was really fun to see how many parallels existed between everyone when editing it together to tell a story. This was actually a relatively easy edit once the technical challenges were dealt with &#8211; people even finished each other&#8217;s sentences.</p>
<p>If you are a fan of CI, you probably recognize the man who appears first in the video &#8211; Rick Ellis. Ellis created CodeIgniter originally, and I thought it was a fitting intro to start with an &#8220;origin story&#8221; where a few months at the end of the year turned into something much bigger. You can tell when Rick says &#8220;and then I released it&#8230;&#8221; he is trying pretty hard not to say &#8220;&#8230;and guess how that turned out, BIATCH&#8221;.</p>
<p>The bottom line is &#8211; if you are a CodeIgniter developer, seriously consider making it out to NYC or London for CICON2011. The talks are going to be fantastic, and if you couldn&#8217;t tell from this video, the people that are going to be there are a great group to argue over if CI should have a cart class with.</p>
<p>Watch out for some more videos for CICON coming up soon! There was a lot of video material, so we will release some more videos on different subjects coming up.</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/TgNf8BuCEyI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/cicon-2011/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/cicon-2011/</feedburner:origLink></item>
		<item>
		<title>FuelPHP for CodeIgniter Developers</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/BsF3LyQtRfI/</link>
		<comments>http://blog.adamfairholm.com/fuelphp-for-codeigniter-developers/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 21:41:33 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[fuelphp]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=104</guid>
		<description><![CDATA[<img class="alignnone size-full wp-image-112" title="FuelPHP" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/02/Screen-shot-2011-02-27-at-4.36.09-PM.png" alt="" width="398" height="118" />

I started using <a href="http://www.codeigniter.com">CodeIgniter</a> in January 2008, and it was a huge milestone in my development education. It showed me new ways to build, and I'd never be making the things I am today if it wasn't for CI. I still love it and I still use it - it is getting better every day via <a href="https://bitbucket.org/ellislab/codeigniter-reactor">Reactor</a>, and it has a bright future.

That being said, PHP has changed a lot since CodeIgniter's core was developed. A few months ago, some stuff happened and Dan Horrigan decided to create <a href="http://fuelphp.com/">FuelPHP</a> - a framework loosely in the tradition of CodeIgniter, but built to take advantage of the bells and whistles of PHP 5.3+.

I decided to really delve into FuelPHP over the weekend and found a lot of things that I really love and a lot of things that were really different in both syntax and method to what was done with CodeIgniter. So, coming from a tried and true CI guy, here are some observations of what to look out for when using FuelPHP.

<em>Note: This isn't meant to win people over to FuelPHP or espouse the virtues of switching, but it is meant as an overview of some major changes in thinking/structure for CI developers looking to use FuelPHP.</em>
 <a href="http://blog.adamfairholm.com/fuelphp-for-codeigniter-developers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-112" title="FuelPHP" src="http://blog.adamfairholm.com/./wp-content/uploads/2011/02/Screen-shot-2011-02-27-at-4.36.09-PM.png" alt="" width="398" height="118" /></p>
<p>I started using <a href="http://www.codeigniter.com">CodeIgniter</a> in January 2008, and it was a huge milestone in my development education. It showed me new ways to build, and I&#8217;d never be making the things I am today if it wasn&#8217;t for CI. I still love it and I still use it &#8211; it is getting better every day via <a href="https://bitbucket.org/ellislab/codeigniter-reactor">Reactor</a>, and it has a bright future.</p>
<p>That being said, PHP has changed a lot since CodeIgniter&#8217;s core was developed. A few months ago, some stuff happened and Dan Horrigan decided to create <a href="http://fuelphp.com/">FuelPHP</a> &#8211; a framework loosely in the tradition of CodeIgniter, but built to take advantage of the bells and whistles of PHP 5.3+.</p>
<p>I decided to really delve into FuelPHP over the weekend and found a lot of things that I really love and a lot of things that were really different in both syntax and method to what was done with CodeIgniter. So, coming from a tried and true CI guy, here are some observations of what to look out for when using FuelPHP.</p>
<p><em>Note: This isn&#8217;t meant to win people over to FuelPHP or espouse the virtues of switching, but it is meant as an overview of some major changes in thinking/structure for CI developers looking to use FuelPHP.</em></p>
<h2>A Class is a Class</h2>
<p>In CodeIgniter you have models, controllers, and libraries. You may notice that these are all regular old PHP classes, they are just treated differently by CI.</p>
<p>In FuelPHP, everything that is a class goes in the &#8216;classes&#8217; folder. Controllers go in a &#8216;controller&#8217; sub folder and models go in a &#8216;model&#8217; sub folder. There are no libraries &#8211; they are just all classes and they all hang out in the classes folder. It&#8217;s a small change, but it may throw you off if you are used to having your controllers, models, and libraries lead separate lives.</p>
<p>PS: There are no helpers. They were dumb anyways. Which reminds me&#8230;</p>
<h2>There are no Helpers</h2>
<p>Most functionality that you&#8217;d find in helpers in CI is in classes in Fuel. You can still find old, completely useless friends like br() in the <a href="http://fuelphp.com/docs/classes/html.html">HTML class</a>. What that&#8217;s you say? You use helpers for literally everything, even the simplest of tasks? Well, Fuel has an <a href="http://fuelphp.com/docs/classes/html.html">h tag function</a>. Shit just got <strong>real</strong>.</p>
<h2>Get Ready for Static Methods and Properties</h2>
<p>You can use CI for years and never come across the concept of static methods and properties aside from defining parent classes for models/controllers. That&#8217;s mainly because in CodeIgniter, you were essentially dealing with a super object instance so everything uses the <strong>$this</strong> context in one way or another. That&#8217;s why if you wanted to &#8220;tap into&#8221; CI&#8217;s functionality in a library you needed to get a copy of it using <strong>$CI =&amp; get_instance()</strong>.</p>
<p>FuelPHP, you can use static classes. Here is a rough example. Instead of:</p>
<p><code>$this-&gt;load-&gt;library('Uri');<br />
$this-&gt;uri-&gt;segment(1);<br />
</code></p>
<p>you use:</p>
<p><code>Uri::segment(1);</code></p>
<p>(Yes, CI does load the Uri class by default, but you get the idea.)</p>
<p>A whole thing on PHP static methods is beyond the scope of this article, but basically using classes as static allows you to access properties and methods without having to create an object context.</p>
<p>When you are loading a library in CodeIgniter, you are creating an object instance, and you are dealing with that object when calling properties and methods. In many cases with FuelPHP, you are accessing static methods using the scope resolution operator (::). One thing many CI coders may rejoice in: this means you don&#8217;t have to load a lot of classes.</p>
<p>You can, of course, instantiate classes as objects and several FuelPHP native classes require this, such as the validation class. The syntax for that will look a little more familiar:</p>
<p><code>$val = Validation::factory();<br />
$val-&gt;add('username', 'Your username')-&gt;add_rule('required');</code></p>
<p>You&#8217;ll also notice if you are creating a class and using it as static, things that need an object context to work (like <strong>$this-&gt;</strong>) won&#8217;t work. You&#8217;ll need to use <strong>self::</strong> instead.</p>
<p>If you have never used double colons before with it being a typo, then this will be a change. However, it&#8217;s something to force you do do some PHP self::educating. See what I did there?</p>
<h2>Get Your Namespace On</h2>
<p>Namespaces don&#8217;t come up at all in CI, mainly because they are really new (5.3+), but they play a larger role in FuelPHP. A warning: my knowledge of namespaces is shaky. So here we go.</p>
<p>In CI, you may have gotten an error telling you you cannot redeclare a class if you have a library the same name as a controller, for instance. Then you have to name your library something stupid and it ruins your day. Am I right?</p>
<p>Namespaces solve that problem by allowing you to encapsulate classes under a certain namespace. Want two classes named Chicken? You got it, if they are under different namespaces.</p>
<p>FuelPHP&#8217;s core files are all under the namespace Fuel. What do you care? Well, you&#8217;ll care because you&#8217;ll start using core Fuel classes in your own classes with namespaces and they won&#8217;t work. You need to tell PHP that you want the root namespace, but putting a forward slash in front of the method call:</p>
<p><code>\Auth::check();</code></p>
<p>There may be more to it, but to start that&#8217;s what you need to know.</p>
<h2>
</h2>
<h2>So Much More</h2>
<p>There are a lot more cool things to discover in FuelPHP (HMVC built in, REST built in, command line integration, etc), but those are the biggies if you are a diehard CI guy. Just remember &#8211; FuelPHP is still developing, so if you don&#8217;t see something laid out in the docs, dive into the code and <a href="http://fuelphp.com/forums">the forums</a>. For example, there is a form class, but it hasn&#8217;t been documented yet, so don&#8217;t be a baby and just look at the damn class already.</p>
<p>Happy coding!</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/BsF3LyQtRfI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/fuelphp-for-codeigniter-developers/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/fuelphp-for-codeigniter-developers/</feedburner:origLink></item>
		<item>
		<title>My First Music Video – Sam Friend, “Part of the Show”</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/TuvMKcRWI5E/</link>
		<comments>http://blog.adamfairholm.com/my-first-music-video-sam-friend-part-of-the-show/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 20:04:16 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Video Projects]]></category>
		<category><![CDATA[music videos]]></category>
		<category><![CDATA[sam friend]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=101</guid>
		<description><![CDATA[<iframe src="http://player.vimeo.com/video/19662112?title=0&#38;byline=0&#38;portrait=0" width="620" height="349" frameborder="0"></iframe>

My brother, <a href="http://www.derekfairholm.com">Derek</a>, is crew with people in the Miami music scene since he himself is a musician (and in Miami). One of the people Derek plays/records/travels with a lot is <a href="http://samfriend.com">Sam Friend</a>, a singer/songwriter who has an EP and an album under his belt which have some really fantastic songs.

After I did some <a href="http://www.derekfairholm.com/video">live videos for Derek</a>, Sam and I got to talking and I pitched the idea of doing a music video for my favorite song of his, "Part of the Show". Several months later, the video is done and available to check out <a href="http://www.vimeo.com/19662112">here</a>.
 <a href="http://blog.adamfairholm.com/my-first-music-video-sam-friend-part-of-the-show/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/19662112?title=0&amp;byline=0&amp;portrait=0" width="620" height="349" frameborder="0"></iframe></p>
<p>My brother, <a href="http://www.derekfairholm.com">Derek</a>, is crew with people in the Miami music scene since he himself is a musician (and in Miami). One of the people Derek plays/records/travels with a lot is <a href="http://samfriend.com">Sam Friend</a>, a singer/songwriter who has an EP and an album under his belt which have some really fantastic songs.</p>
<p>After I did some <a href="http://www.derekfairholm.com/video">live videos for Derek</a>, Sam and I got to talking and I pitched the idea of doing a music video for my favorite song of his, &#8220;Part of the Show&#8221;. Several months later, the video is done and available to check out <a href="http://www.vimeo.com/19662112">here</a>.</p>
<p>Shot last December, the video is taken from one of my favorite games (when I lived in a place where I had cable): finding something ridiculous on TV and watching it. I love scrolling through Comcast at any given time and seeing stuff that really has no place being seen by other people. A need for too much niche programming has left a glut of shows that are cheaply made and insanely targeted. Just thinking about how many shows there are about people baking cakes.</p>
<p>Anyways, I wrote out a treatment that ended up being fairly close to the final product. The apartment scenes were done in downtown Miami when my brother and his girlfriend were moving out of their apartment so it was completely bare. &#8220;Swagger&#8221; was shot down the street in Miami, and the dog dinner scene as well as &#8220;Bulb Buddies&#8221; was shot at Doug Klinger&#8217;s parents house in Pompano Beach. Thanks to Doug&#8217;s parent&#8217;s awesome rooftop deck and a patient dog (Layla), we were able to get some awesome rooftop shots which we under-lit to give the feeling of a crappy daytime movie.</p>
<p>So since this is my first music video project, what have I learned? Well, for one, doing a music video for a slower song is much harder than doing one for an up-tempo number. Sam has a catalog of some fantastic songs, and out of them I connected with this one, so that&#8217;s the one I pitched, but getting the pacing and timing right to create some momentum turned out to be a real challenge.</p>
<p>Other than that, I learned making music videos is a really fun, interesting experience. That, and I probably shouldn&#8217;t be my own DP.</p>
<p>Sam (and Derek too) will be making a trek up to New York soon to make Sam&#8217;s next album. He&#8217;s the real deal, so I encourage you to check out his <a href="http://samfriend.com/">current catalog</a> (I especially recommend &#8220;Toetotoe&#8221;), enjoy the video, and look out for more from Sam in the future!</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/TuvMKcRWI5E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/my-first-music-video-sam-friend-part-of-the-show/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/my-first-music-video-sam-friend-part-of-the-show/</feedburner:origLink></item>
		<item>
		<title>New Short on the Derek Fairholm Trio</title>
		<link>http://feedproxy.google.com/~r/adam-fairholm/~3/gKVi5T11W6k/</link>
		<comments>http://blog.adamfairholm.com/new-short-on-the-derek-fairholm-trio/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 23:32:26 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Video Projects]]></category>
		<category><![CDATA[derek fairholm]]></category>
		<category><![CDATA[jazz]]></category>
		<category><![CDATA[miami]]></category>

		<guid isPermaLink="false">http://blog.adamfairholm.com/?p=99</guid>
		<description><![CDATA[<iframe src="http://player.vimeo.com/video/16485633?byline=0" width="620" height="349" frameborder="0"></iframe>

Lately I've been doing some work for my brother, Derek. He did an unbelievable amount of work scoring <a href="http://popemichaelfilm.com" target="_blank">Pope Michael</a> for me, so although I'd do anything for him for free, I feel like I am still in creative debt to him at this point! We recently <a href="http://www.derekfairholm.com/" target="_blank">launched a site</a> for him as well as a standard <a href="http://twitter.com/derekfairholm" target="_blank">Twitter</a>/<a href="http://www.facebook.com/derekfairholm" target="_blank">Facebook</a> combo.

A few weeks before I left Florida for Boston, I got the idea to record a little short about Derek and his trio at their usual Friday stomping grounds - Soya e Pomodoro, a cool little restaurant and lounge a few blocks from Derek's place in downtown Miami. Derek's trio consists of him on the keyboard, Brian Tate on the bass, and Dag Markhus on the drums. Lately the amazing Troy Roberts has been a fixture on saxophone and was playing the night we shot.
 <a href="http://blog.adamfairholm.com/new-short-on-the-derek-fairholm-trio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/16485633?byline=0" width="620" height="349" frameborder="0"></iframe></p>
<p>Lately I&#8217;ve been doing some work for my brother, Derek. He did an unbelievable amount of work scoring <a href="http://popemichaelfilm.com" target="_blank">Pope Michael</a> for me, so although I&#8217;d do anything for him for free, I feel like I am still in creative debt to him at this point! We recently <a href="http://www.derekfairholm.com/" target="_blank">launched a site</a> for him as well as a standard <a href="http://twitter.com/derekfairholm" target="_blank">Twitter</a>/<a href="http://www.facebook.com/derekfairholm" target="_blank">Facebook</a> combo.</p>
<p>A few weeks before I left Florida for Boston, I got the idea to record a little short about Derek and his trio at their usual Friday stomping grounds &#8211; Soya e Pomodoro, a cool little restaurant and lounge a few blocks from Derek&#8217;s place in downtown Miami. Derek&#8217;s trio consists of him on the keyboard, Brian Tate on the bass, and Dag Markhus on the drums. Lately the amazing Troy Roberts has been a fixture on saxophone and was playing the night we shot.</p>
<p>The idea was to create something short as a showpiece for Derek and the guys with interviews and performance footage. Unfortunately I was in a rush shooting Brian and Dag&#8217;s interviews so they look like crap, but Derek&#8217;s came out nice. We were there on a fantastic night for the group &#8211; they played an incredible show for the cameras.</p>
<p>Doug Klinger awesomely came down to Miami the night we shot this and provided his Canon XH-A1 which I&#8217;m operating on the right hand side. Doug is operating my little HVR-A1U. The different in the camera quality between the two makes for a really interesting contrast because we shot by lamp light and had the gain up on each. On the HVR-A1U it washes everything out which makes for some really cool tableaus. The XH-A1 handles it really well and we were able to get a nice golden color. The audio was recorded separately by a little doohickey Derek had.</p>
<p>I intentionally threw caution to the wind to create a funky look in terms of frame rates. Doug&#8217;s camera is running at 24p and mine at Sony&#8217;s fake Cineframe thing. FCP mixed them well on the timeline and then we spread it out to 30fps on the export to shake things up.</p>
<p>Originally Derek&#8217;s solo piece was the opener, but luckily we caught him off-guard while filming b-roll outside of Soya before the show. There was practically no one there at 9 when the show started, but two hours later it was standing room only.</p>
<img src="http://feeds.feedburner.com/~r/adam-fairholm/~4/gKVi5T11W6k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.adamfairholm.com/new-short-on-the-derek-fairholm-trio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.adamfairholm.com/new-short-on-the-derek-fairholm-trio/</feedburner:origLink></item>
	</channel>
</rss>

