<?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>Chris Monnat</title>
	
	<link>http://www.christophermonnat.com</link>
	<description>Programmer Extraordinaire</description>
	<lastBuildDate>Mon, 01 Oct 2012 17:44:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ChrisMonnat" /><feedburner:info uri="chrismonnat" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>ChrisMonnat</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Creating Custom Widgets for dashEE</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/SDE3ITnFhwA/</link>
		<comments>http://www.christophermonnat.com/2012/02/creating-custom-widgets-for-dashee/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 11:00:05 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1631</guid>
		<description><![CDATA[There&#8217;s a new ExpressionEngine (EE) add-on type in town and it&#8217;s name is Widget! We&#8217;re all familiar with the standard EE add-ons: modules, fieldtypes, accessories, extensions and plug-ins. But did you know there was an additional type that allowed you to customize the control panel homepage with your own content and functionality? It&#8217;s called a widget and in this post I&#8217;ll review how you can create your own widgets that work with the dashEE module to assemble your own custom EE control panel dashboard. Before we get started it&#8217;s important to note that widgets are not a standard EE add-on type. To use them you first need to install the open source dashEE module which is a complete alternate dashboard with drag-and-drop functionality as well as saved layouts and a handful of other useful features. The module comes standard with about 10 included widgets but the true power lies in the ability to create your own custom widgets. Once created you can then distribute them either as stand alone widgets or package them with your modules to add extra functionality to your existing code. Getting Started Just like other EE add-ons, Widget file names are always preceded with wgt. and then the name of your file and followed by .php. In our example we&#8217;re going to build a widget that displays the most recent tweets from a selected Twitter feed. So if the name of our widget is Tweets then our file name will be wgt.tweets.php. Widgets also require a language file. If the widget is being packaged with a module then you can use the modules language file. But if the widget is being distributed on it&#8217;s own you will either have to instruct the user to use dashEEs or include a language file with your widget. Each widget requires two language variables that follow your chosen naming convention: wgt_tweets_name and wgt_tweets_description. These variables are important to remember because they are used when displaying your widget in the widget listing of the module. The code above shows the beginning of our widget file. Following the standard EE add-on naming conventions, our class name will always begin with Wgt_ and be followed by our file name which in this case is tweets. Each widget file should have at least two public class variables defined: title and wclass. The title variable is used to display the name of your widget in the widget title bar (across the top of your widget) and wclass is a placeholder for any additional CSS class names you wish to assign to your widgets container div. You can also add a settings variable if your widget has settings but we&#8217;ll discuss that later in the post. Beyond those three you will likely want a variable for the EE object and then any additional variables that you choose. Index Method The only real required method within your widget file is index(). This is the method that gets called by dashEE when a user has installed your widget. After loading the widget file dashEE calls the index method and packages it&#8217;s return value within the CSS wrappings of a widget and puts it together with the other widgets to assemble the dashboard. So this method is required and it&#8217;s expected to return an HTML string. Back to our example, we&#8217;ll be using the Twitter API to get the most recent tweets from a chosen Twitter user for display and then returning them as formatted HTML. That&#8217;s it, we&#8217;re done. For the sake of testing our example go ahead and add the two language variables to the dashEE language file and upload the widget file to the widgets directory of the dashEE module. Click the Widgets button and you should see Tweets listed. Click Install and you should see the widget added to your dashboard. Permissions One topic that has caused some confusion is permissions. Obviously if a members group doesn&#8217;t have permission to access a given module then they shouldn&#8217;t be able to access that modules widgets either. To solve this problem there is an additional method you can add to your widget file called permissions(). For our example we only want Super Admins to have access to this widget so we&#8217;ll check the users group and return FALSE if they are not a Super Admin. A widgets permissions method is called every time the widget is loaded which ensures as a members or modules settings/permissions change the dashboard will be adjusted appropriately. You can do whatever permission checking in this method you wish, all dashEE expects in return is a boolean true if the user should be able to access the widget or false if they shoudln&#8217;t. While it is recommended that you include a permissions method with your widget it&#8217;s not required. Widget Settings Back to our example, the widget we have created is functional but not necessarily usable if the user has to modify the code every time they want to change the Twitter account they want to watch. To assist with this we can add a settings_form() method to our widget file to allow the user to modify the widgets settings from within the dashboard. If your widget file has a settings_form method then an additional icon will be displayed when users mouse over it&#8217;s title on the dashboard. When clicked dashEE calls the settings_form method for the widget in question and displays it&#8217;s return value within the widget. It&#8217;s expected that this method return a form containing the settings that you want to allow the user to change. For our example that&#8217;s going to be the Twitter username and the number of tweets the widget should display. It&#8217;s worth noting that it&#8217;s not necessary to specify the form action because the module will handle it&#8217;s submission via ajax and as for field names those are up to you. Just remember what you named your form fields because you will use those same names when referencing those settings back in the index method. When adding settings to your widget it&#8217;s also important to declare default values for the settings in the widget constructor so your code has something to go off of when initially installed. Now that we have our settings_form method squared away we can update the index method to reference our newly saved settings. dashEE saves all widget settings as a JSON encoded value along with the widget in the DB and that value is then decoded and passed to the index method through the $settings variable as an object. To learn more about settings you can reference the wgt.feed_reader.php and wgt.blank.php widget files in the Widgets directory as both have settings of their own or refer to the documentation. That&#8217;s it, you&#8217;ve created your first dashEE widget. Feel free to download the completed code to refer to for help. Hopefully this has peaked your imagination and gotten you thinking about other cool things you can develop for dashEE. Visit the Widget Directory to see what other developers have created or submit your own widgets for others to download. As always post a comment with any questions or problems.]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s a new ExpressionEngine (EE) add-on type in town and it&#8217;s name is Widget! We&#8217;re all familiar with the standard EE add-ons: modules, fieldtypes, accessories, extensions and plug-ins. But did you know there was an additional type that allowed you to customize the control panel homepage with your own content and functionality? It&#8217;s called a widget and in this post I&#8217;ll review how you can create your own widgets that work with the <a title="dashEE – EE Dashboard Alternative" href="http://www.christophermonnat.com/code/dashee/">dashEE</a> module to assemble your own custom EE control panel dashboard.</p>
<p><span id="more-1631"></span></p>
<p>Before we get started it&#8217;s important to note that widgets are not a standard EE add-on type. To use them you first need to install the open source dashEE module which is a complete alternate dashboard with drag-and-drop functionality as well as saved layouts and a handful of other useful features. The module comes standard with about 10 included widgets but the true power lies in the ability to create your own custom widgets. Once created you can then distribute them either as stand alone widgets or package them with your modules to add extra functionality to your existing code.</p>
<h2>Getting Started</h2>
<p>Just like other EE add-ons, Widget file names are always preceded with <strong>wgt.</strong> and then the name of your file and followed by <strong>.php</strong>. In our example we&#8217;re going to build a widget that displays the most recent tweets from a selected Twitter feed. So if the name of our widget is Tweets then our file name will be <strong>wgt.tweets.php</strong>.</p>
<p>Widgets also require a language file. If the widget is being packaged with a module then you can use the modules language file. But if the widget is being distributed on it&#8217;s own you will either have to instruct the user to use dashEEs or include a language file with your widget. Each widget requires two language variables that follow your chosen naming convention: <strong>wgt_tweets_name</strong> and <strong>wgt_tweets_description</strong>. These variables are important to remember because they are used when displaying your widget in the widget listing of the module.</p>
<pre class="brush: php; title: ; notranslate">
class Wgt_tweets
{
     public $title;
     public $settings;
     public $wclass;

     private $_EE;

     /**
      * Constructor
      */
     public function __construct()
     {
          $this-&gt;title      = 'Tweets';
          $this-&gt;wclass     = 'eedefault';

          $this-&gt;_EE        =&amp; get_instance();
     }
}
</pre>
<p>The code above shows the beginning of our widget file. Following the standard EE add-on naming conventions, our class name will always begin with <strong>Wgt_ </strong>and be followed by our file name which in this case is <strong>tweets</strong>. Each widget file should have at least two public class variables defined: title and wclass. The title variable is used to display the name of your widget in the widget title bar (across the top of your widget) and wclass is a placeholder for any additional CSS class names you wish to assign to your widgets container div. You can also add a settings variable if your widget has settings but we&#8217;ll discuss that later in the post. Beyond those three you will likely want a variable for the EE object and then any additional variables that you choose.</p>
<h2>Index Method</h2>
<p>The only real required method within your widget file is <strong>index()</strong>. This is the method that gets called by dashEE when a user has installed your widget. After loading the widget file dashEE calls the index method and packages it&#8217;s return value within the CSS wrappings of a widget and puts it together with the other widgets to assemble the dashboard. So this method is required and it&#8217;s expected to return an HTML string. Back to our example, we&#8217;ll be using the Twitter API to get the most recent tweets from a chosen Twitter user for display and then returning them as formatted HTML.</p>
<pre class="brush: php; title: ; notranslate">
public function index()
{
     $tweet_count    = 5;
     $twitter_user   = 'chrismonnat';
     $twitter_url    = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $twitter_user . '&amp;count=' . $tweet_count;

     $ch = curl_init();

     curl_setopt($ch, CURLOPT_URL, $twitter_url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_HEADER, 0);

     $twitter_data = curl_exec($ch);

     curl_close($ch);

     $tweets = json_decode($twitter_data);

     $display = '';
     foreach($tweets as $tweet)
     {
         $display .= '&lt;p&gt;' . auto_link($tweet-&gt;text, 'url', TRUE) . '&lt;/p&gt;';
     }

     return $display;
}
</pre>
<p>That&#8217;s it, we&#8217;re done. For the sake of testing our example go ahead and add the two language variables to the dashEE language file and upload the widget file to the widgets directory of the dashEE module. Click the <strong>Widgets</strong> button and you should see Tweets listed. Click <strong>Install</strong> and you should see the widget added to your dashboard.</p>
<h2>Permissions</h2>
<p>One topic that has caused some confusion is permissions. Obviously if a members group doesn&#8217;t have permission to access a given module then they shouldn&#8217;t be able to access that modules widgets either. To solve this problem there is an additional method you can add to your widget file called <strong>permissions()</strong>. For our example we only want Super Admins to have access to this widget so we&#8217;ll check the users group and return FALSE if they are not a Super Admin.</p>
<pre class="brush: php; title: ; notranslate">
public function permissions()
{
     if($this-&gt;_EE-&gt;session-&gt;userdata('group_id') != 1)
     {
          return FALSE;
     }

     return TRUE;
}
</pre>
<p>A widgets permissions method is called every time the widget is loaded which ensures as a members or modules settings/permissions change the dashboard will be adjusted appropriately. You can do whatever permission checking in this method you wish, all dashEE expects in return is a boolean <strong>true</strong> if the user should be able to access the widget or <strong>false </strong>if they shoudln&#8217;t. While it is recommended that you include a permissions method with your widget it&#8217;s not required.</p>
<h2>Widget Settings</h2>
<p>Back to our example, the widget we have created is functional but not necessarily usable if the user has to modify the code every time they want to change the Twitter account they want to watch. To assist with this we can add a <strong>settings_form()</strong> method to our widget file to allow the user to modify the widgets settings from within the dashboard.</p>
<pre class="brush: php; title: ; notranslate">
public function settings_form($settings)
{
     return form_open('', array('class' =&gt; 'dashForm')).'

        &lt;p&gt;&lt;label for=&quot;username&quot;&gt;Twitter Username:&lt;/label&gt;
        &lt;input type=&quot;text&quot; name=&quot;username&quot; value=&quot;'.$settings-&gt;username.'&quot; /&gt;&lt;/p&gt;

        &lt;p&gt;&lt;label for=&quot;num&quot;&gt;Number of tweets:&lt;/label&gt;
        &lt;input type=&quot;text&quot; name=&quot;num&quot; value=&quot;'.$settings-&gt;num.'&quot; /&gt;&lt;/p&gt;

        &lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Save&quot; /&gt;&lt;/p&gt;

        '.form_close();
}
</pre>
<p>If your widget file has a settings_form method then an additional icon will be displayed when users mouse over it&#8217;s title on the dashboard. When clicked dashEE calls the settings_form method for the widget in question and displays it&#8217;s return value within the widget. It&#8217;s expected that this method return a form containing the settings that you want to allow the user to change.</p>
<p>For our example that&#8217;s going to be the Twitter username and the number of tweets the widget should display. It&#8217;s worth noting that it&#8217;s not necessary to specify the form action because the module will handle it&#8217;s submission via ajax and as for field names those are up to you. Just remember what you named your form fields because you will use those same names when referencing those settings back in the index method.</p>
<p>When adding settings to your widget it&#8217;s also important to declare default values for the settings in the widget constructor so your code has something to go off of when initially installed.</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Constructor
 */
public function __construct()
{
     $this-&gt;title      = 'Tweets';
     $this-&gt;wclass     = 'eedefault';

     $this-&gt;settings = array(
          'username' =&gt; 'chrismonnat',
          'num'      =&gt; 5
          );

     $this-&gt;_EE        =&amp; get_instance();
}
</pre>
<p>Now that we have our settings_form method squared away we can update the index method to reference our newly saved settings. dashEE saves all widget settings as a JSON encoded value along with the widget in the DB and that value is then decoded and passed to the index method through the <strong>$settings</strong> variable as an object. To learn more about settings you can reference the wgt.feed_reader.php and wgt.blank.php widget files in the Widgets directory as both have settings of their own or refer to <a href="http://www.christophermonnat.com/code/dashee/creating-widgets/" title="Creating Widgets">the documentation</a>.</p>
<pre class="brush: php; title: ; notranslate">
public function index($settings = NULL)
{
     $tweet_count   = $settings-&gt;num;
     $twitter_user  = $settings-&gt;username;
     $twitter_url   = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $twitter_user . '&amp;amp;count=' . $tweet_count;

     $ch = curl_init();

     curl_setopt($ch, CURLOPT_URL, $twitter_url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_HEADER, 0);

     $twitter_data = curl_exec($ch);

     curl_close($ch);

     $tweets = json_decode($twitter_data);

     if(isset($tweets-&gt;error))
     {
          $display = '&lt;p&gt;' . $tweets-&gt;error . '&lt;/p&gt;';
     }
     else
     {
          $display = '';
          foreach($tweets as $tweet)
          {
               $display .= '&lt;p&gt;' . auto_link($tweet-&gt;text, 'url', TRUE) . '&lt;/p&gt;';
          }
     }

     return $display;
}
</pre>
<p>That&#8217;s it, you&#8217;ve created your first dashEE widget. Feel free to <a href="http://www.christophermonnat.com/wp-content/uploads/2012/02/wgt.tweets.php_.zip">download the completed code</a> to refer to for help. Hopefully this has peaked your imagination and gotten you thinking about other cool things you can develop for dashEE. Visit the <a href="https://mrtopher.wufoo.com/reports/z5p8w8/">Widget Directory</a> to see what other developers have created or <a href="/code/dashee/widget-directory/">submit your own widgets</a> for others to download. As always post a comment with any questions or problems.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=SDE3ITnFhwA:2rYpFbmwFoA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=SDE3ITnFhwA:2rYpFbmwFoA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=SDE3ITnFhwA:2rYpFbmwFoA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=SDE3ITnFhwA:2rYpFbmwFoA:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/SDE3ITnFhwA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2012/02/creating-custom-widgets-for-dashee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2012/02/creating-custom-widgets-for-dashee/</feedburner:origLink></item>
		<item>
		<title>Wufee – The Power of Wufoo in EE</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/feAVkAMm8ok/</link>
		<comments>http://www.christophermonnat.com/2012/02/wufee-the-power-of-wufoo-in-ee/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 20:24:18 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1608</guid>
		<description><![CDATA[I&#8217;m proud to announce the launch of my first commercial add-on for ExpressionEngine: Wufee. Wufee is an EE module for connecting your website with your Wufoo account. Wufoo users will be able to access their forms, fields, entries and reports all from within the EE control panel. The module ships with a full featured control panel interface (see video above), an accessory so you can access your form data anywhere from within the control panel, a custom fieldtype for relating your Wufoo forms with channel entries, template tags for displaying forms and entries on your website and dashEE compatible widgets so you can access your forms and reports right from your EE dashboard. Visit devot-ee.com for purchase information or check out the documentation to learn more.]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m proud to announce the launch of my first commercial add-on for <a href="http://expressionengine.com">ExpressionEngine</a>: Wufee. Wufee is an EE module for connecting your website with your <a href="http://wufoo.com">Wufoo</a> account.</p>
<p><center><iframe id="vzvd-913796" title="vzaar video player" name="vzvd-913796" src="http://view.vzaar.com/913796/player" frameborder="0" width="576" height="432"></iframe></center></p>
<p class="vzPowered">Wufoo users will be able to access their forms, fields, entries and reports all from within the EE control panel. The module ships with a full featured control panel interface (see video above), an accessory so you can access your form data anywhere from within the control panel, a custom fieldtype for relating your Wufoo forms with channel entries, template tags for displaying forms and entries on your website and <a title="dashEE – EE Dashboard Alternative" href="http://www.christophermonnat.com/code/dashee/">dashEE</a> compatible widgets so you can access your forms and reports right from your EE dashboard.</p>
<p class="vzPowered"><span id="more-1608"></span></p>
<p class="vzPowered">Visit <a href="http://devot-ee.com/add-ons/wufee">devot-ee.com</a> for purchase information or check out <a title="Control Panel" href="http://www.christophermonnat.com/code/wufee/control-panel/">the documentation</a> to learn more.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=feAVkAMm8ok:wW47K47Z_L4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=feAVkAMm8ok:wW47K47Z_L4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=feAVkAMm8ok:wW47K47Z_L4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=feAVkAMm8ok:wW47K47Z_L4:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/feAVkAMm8ok" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2012/02/wufee-the-power-of-wufoo-in-ee/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2012/02/wufee-the-power-of-wufoo-in-ee/</feedburner:origLink></item>
		<item>
		<title>Introducing dashEE – The Missing ExpressionEngine Dashboard</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/y4Yj7Mx99GA/</link>
		<comments>http://www.christophermonnat.com/2011/09/introducing-dashee-the-missing-expressionengine-dashboard/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 10:00:16 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[ExpressionEngine]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1381</guid>
		<description><![CDATA[Today I&#8217;m excited to announce the release of a new EE module called dashEE. dashEE is a completely customizable control panel dashboard alternative that gives developers the ability to create custom widgets either as stand alone add-ons or as part of their existing custom modules. Check out the new code section of my blog for more details.]]></description>
				<content:encoded><![CDATA[<p>Today I&#8217;m excited to announce the release of a new EE module called dashEE. dashEE is a completely customizable control panel dashboard alternative that gives developers the ability to create custom widgets either as stand alone add-ons or as part of their existing custom modules. Check out the new <a href="http://www.christophermonnat.com/code/dashee/" title="dashEE – EE Dashboard Alternative">code section</a> of my blog for more details.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=y4Yj7Mx99GA:njos1CBbJZk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=y4Yj7Mx99GA:njos1CBbJZk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=y4Yj7Mx99GA:njos1CBbJZk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=y4Yj7Mx99GA:njos1CBbJZk:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/y4Yj7Mx99GA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2011/09/introducing-dashee-the-missing-expressionengine-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2011/09/introducing-dashee-the-missing-expressionengine-dashboard/</feedburner:origLink></item>
		<item>
		<title>CodeIgniter 2.0: First Look at Reactor</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/uzYhS4smVuU/</link>
		<comments>http://www.christophermonnat.com/2011/02/codeigniter-2-0-first-look-at-reactor/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 10:00:43 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1222</guid>
		<description><![CDATA[If you are a PHP programmer then you have undoubtedly heard of the CodeIgniter (CI) framework at least once. First released in 2006, by EllisLab, CI has grown into the lightweight, fully functional and easy to use application framework of choice for developers across the web. A big milestone was reached two weeks ago with the release of version 2.0 and there has never been a better time to kick the tires and take it for a spin. Not Just Any Old Framework There are A LOT of open source PHP frameworks on the web today. Some of them are pretty nice tools and some of them aren&#8217;t. When evaluating a framework you need to look at several factors: community, documentation, features, support options and learning curve. Depending on your individual requirements you might have some additional criteria but I think that&#8217;s a decent baseline. Let&#8217;s see how CI stands up: Community Last look at the forums puts registered members at 190,000. Now that&#8217;s not necessarily active users, but that&#8217;s the number of developers who thought enough of the framework to get a forum account and join in on the conversation. EllisLab places a very high premium on their developer community and a number of the additions in 2.0 were added at their request. Documentation I have played around with a number of different PHP frameworks and you will be hard pressed to find a framework with better documentation than CI. The users guide is complete, easy to understand and up to date with all the latest bells and whistles. Any PHP developer with a basic understanding of object oriented programming (OOP) should be able to pick things up pretty easily. It&#8217;s worth noting that with the release of 2.0 some new sections of the users guide are still being fleshed out, but there is enough there to help get you started. Features This is the true question: &#8220;can the framework do what I need it to do?&#8221; This question really depends on what it is you need it to do. But CI has most of the standard framework features including model view controller (MVC) architecture, database abstraction, form validation, session handing, error handling, flexible/scalable architecture and libraries to handle tasks like uploading files, displaying event calendars, implementing carts for e-commerce sites and much more. If that&#8217;s not enough CI also lets you add any additional functionality you want/need by building your own custom library or extending core libraries that are already there. Support Options So you invest all this time and effort into learning a framework and building your business around it, what do you do if things suddenly stop working? While CI doesn&#8217;t offer any kind of commercial support, the community is full of folks on the forum waiting to lend a hand when necessary. There are also a number of bloggers out there who share their CI knowledge and can be tapped for help from time to time. The other thing worth mentioning here is that CI is backed by a successful commercial company in EllisLab (makers of ExpressionEngine CMS). So it&#8217;s a pretty safe bet that it&#8217;s not going anywhere anytime soon. Learning Curve We&#8217;re all on a timeline, so how long will it take to get up to speed? As I mentioned under documentation, CI is very well documented and has an active and vibrant community. With that said, anyone with a fair understanding of OOP should be able to pick things up pretty quickly. New to Version 2.0 So now that I have your attention, let&#8217;s take a look at the exciting new additions to CI in version 2.0: 2 Flavors: Core and Reactor As I mentioned above, CI is backed by a commercial company and is used by that company to develop their commercial products like ExpressionEngine and MojoMotor. That means that the development of the framework was limited to the needs of their products and the community got a little frustrated feeling that the development of the framework had stalled over time. In true EllisLab fashion they listened and in version 2.0 have released two different lines of development: Core and Reactor. You now have the option of working with CI Core (maintained by EllisLab) or CI Reactor (maintained by the community). Core is the version of CI that EllisLab uses and will only change when they need to make a change for their products. This version should be used by those looking for true stability and backward/forward compatibility. Reactor, on the other hand, is maintained by a team of community engineers who collectively monitor community needs/wants and incorporate new features on a more frequent basis. Since all changes made to Core will be incorporated into Reactor and that Reactor will be the more active of the two code bases it&#8217;s recommended that everyone use Reactor from this point forward. PHP5 Support A common point of contention with previous version of CI was that it wasn&#8217;t native PHP5 meaning the framework was backwards compatible with PHP4 and certain PHP5 features didn&#8217;t work or were not used. With the release of 2.0 this is no longer the case. PHP4 is no longer supported and you must be running PHP 5.1.6 or higher in order to use the framework. So feel free to start taking advantage of the OOP improvements of PHP5. Packages Distributing code for reuse or releasing complex libraries (for things like authentication) to the community has always been a somewhat clunky process. You would typically need to copy and paste certain files into certain places within your install in order for everything to work correctly. Config files in the config folder, libraries in their respective folder, etc. CI 2.0 does away with this issue by introducing a new way of collecting and distributing code called packages. Packages are similar in theory to modular development in that all the resources you are distributing are self contained. All packages will have their own libraries, models, helpers, config, and language files collected in their own directory which can then be placed into the application/third_party directory of the framework for use. This provides developers with a much easier way of sharing/releasing code for use by the community. This also opens the doors for more module based application development with CI. Drivers In previous versions of CI there hasn&#8217;t been an elegant way of creating classes that all share a common parent class and not their sibling classes (handy in certain situations). You can now accomplish this with a new type of library called a driver. Drivers allow you to create a parent class with unlimited child classes that have no access to their siblings (for things like DB abstraction). This is a nice architecture for providing the same type of functionality only using different tools or implementation methods. Along with being able to create your own drivers, CI 2.0 identifies three drivers in the documentation: Cacheing, Database and Javascript. Javascript Library Saving the best for last, the item I was most excited about with this release was the Javascript Library. CI 2.0 now gives you the ability to plug your favorite javascript framework into CI using drivers so you can incorporate javascript into your apps more easily. jQuery is being distributed with the framework by default but you can be sure there will be other drivers released shortly for other javascript frameworks. Upgrading So far this post has been mostly about what&#8217;s new and exciting in version 2.0 but there have also been some changes to the framework that might trip up seasoned developers and those of you looking to upgrade from an earlier version. First and foremost, all CI core classes are now prefixed with CI_. This means that all controllers, models, etc. now need to extend CI_Controller, CI_Model, etc. respectively. You will want to be sure to update your code accordingly when upgrading to version 2 (this already tripped me up once). Second, some old features and functionality have finally been removed for good like scaffolding, plugins and the validation library. Plugins never really gained much traction with CI developers and have been deprecated for some time now. The CI core CAPTCHA plugin has been converted to a helper and any plugins you have developed should be converted to helpers also. The validation library, which has been replaced for a while now by form_validation, is gone. So if you have been putting off updating your code to use the new form_validation library now is the time to do it. Finally, a number of improvements have been made to the encryption library which will prevent you from decrypting data that you have encrypted with a previous version. To deal with this, you will have to run an update on your data using the new encode_from_legacy() method which will decode your data and return a re-encrypted string using the new method for storage. Those are the big things to look out for when upgrading from a previous version. Visit the users guide for complete upgrading instructions. Is that it? This is just a quick list of my top 5 changes/additions to the framework that have been released in 2.0. There&#8217;s a lot more where that came from like new cache drivers with APC, memcached, and file-based support, new security library and over 50 bug fixes. You can see the complete list of what&#8217;s new in the change log. So what are you waiting for? Take CodeIgniter 2.0 for a spin today!]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2011/01/ci-logo.png"><img class="alignright size-full wp-image-1251" title="ci-logo" src="http://www.christophermonnat.com/wp-content/uploads/2011/01/ci-logo.png" alt="" width="183" height="50" /></a>If you are a PHP programmer then you have undoubtedly heard of the <a href="http://codeigniter.com">CodeIgniter</a> (CI) framework at least once. First released in 2006, by <a href="http://ellislab.com">EllisLab</a>, CI has grown into the lightweight, fully functional and easy to use application framework of choice for developers across the web. A big milestone was reached two weeks ago with the release of version 2.0 and there has never been a better time to kick the tires and take it for a spin.</p>
<p><span id="more-1222"></span></p>
<h2>Not Just Any Old Framework</h2>
<p>There are A LOT of open source PHP frameworks on the web today. Some of them are pretty nice tools and some of them aren&#8217;t. When evaluating a framework you need to look at several factors: community, documentation, features, support options and learning curve. Depending on your individual requirements you might have some additional criteria but I think that&#8217;s a decent baseline. Let&#8217;s see how CI stands up:</p>
<p><strong>Community</strong></p>
<p>Last look at the forums puts registered members at 190,000. Now that&#8217;s not necessarily active users, but that&#8217;s the number of developers who thought enough of the framework to get a forum account and join in on the conversation. EllisLab places a very high premium on their developer community and a number of the additions in 2.0 were added at their request.</p>
<p><strong>Documentation</strong></p>
<p>I have played around with a number of different PHP frameworks and you will be hard pressed to find a framework with better documentation than CI. The <a href="http://codeigniter.com/user_guide/index.html" target="_blank">users guide</a> is complete, easy to understand and up to date with all the latest bells and whistles. Any PHP developer with a basic understanding of object oriented programming (OOP) should be able to pick things up pretty easily.</p>
<p>It&#8217;s worth noting that with the release of 2.0 some new sections of the users guide are still being fleshed out, but there is enough there to help get you started.</p>
<p><strong>Features</strong></p>
<p>This is the true question: &#8220;can the framework do what I need it to do?&#8221; This question really depends on what it is you need it to do. But CI has most of the <a href="http://codeigniter.com/user_guide/overview/features.html" target="_blank">standard framework features</a> including model view controller (MVC) architecture, database abstraction, form validation, session handing, error handling, flexible/scalable architecture and libraries to handle tasks like uploading files, displaying event calendars, implementing carts for e-commerce sites and much more. If that&#8217;s not enough CI also lets you add any additional functionality you want/need by building your own custom library or extending core libraries that are already there.</p>
<p><strong>Support Options</strong></p>
<p>So you invest all this time and effort into learning a framework and building your business around it, what do you do if things suddenly stop working? While CI doesn&#8217;t offer any kind of commercial support, the community is full of folks on the <a href="http://codeigniter.com/forums/" target="_blank">forum</a> waiting to lend a hand when necessary. There are also a number of bloggers out there who share their CI knowledge and can be tapped for help from time to time.</p>
<p>The other thing worth mentioning here is that CI is backed by a successful commercial company in EllisLab (makers of <a href="http://www.expressionengine.com" target="_blank">ExpressionEngine CMS</a>). So it&#8217;s a pretty safe bet that it&#8217;s not going anywhere anytime soon.</p>
<p><strong>Learning Curve</strong></p>
<p>We&#8217;re all on a timeline, so how long will it take to get up to speed? As I mentioned under documentation, CI is very well documented and has an active and vibrant community. With that said, anyone with a fair understanding of OOP should be able to pick things up pretty quickly.</p>
<h2>New to Version 2.0</h2>
<p>So now that I have your attention, let&#8217;s take a look at the exciting new additions to CI in version 2.0:</p>
<h3>2 Flavors: Core and Reactor</h3>
<p>As I mentioned above, CI is backed by a commercial company and is used by that company to develop their commercial products like ExpressionEngine and MojoMotor. That means that the development of the framework was limited to the needs of their products and the community got a little frustrated feeling that the development of the framework had stalled over time. In true EllisLab fashion they listened and in version 2.0 have released two different lines of development: Core and Reactor.</p>
<p>You now have the option of working with CI Core (maintained by EllisLab) or CI Reactor (maintained by the community). Core is the version of CI that EllisLab uses and will only change when they need to make a change for their products. This version should be used by those looking for true stability and backward/forward compatibility. Reactor, on the other hand, is maintained by a team of community engineers who collectively monitor community needs/wants and incorporate new features on a more frequent basis.</p>
<p>Since all changes made to Core will be incorporated into Reactor and that Reactor will be the more active of the two code bases it&#8217;s recommended that everyone use Reactor from this point forward.</p>
<h3>PHP5 Support</h3>
<p>A common point of contention with previous version of CI was that it wasn&#8217;t native PHP5 meaning the framework was backwards compatible with PHP4 and certain PHP5 features didn&#8217;t work or were not used. With the release of 2.0 this is no longer the case. PHP4 is no longer supported and you must be running PHP 5.1.6 or higher in order to use the framework. So feel free to start taking advantage of the OOP improvements of PHP5.</p>
<h3>Packages</h3>
<p>Distributing code for reuse or releasing complex libraries (for things like authentication) to the community has always been a somewhat clunky process. You would typically need to copy and paste certain files into certain places within your install in order for everything to work correctly. Config files in the config folder, libraries in their respective folder, etc. CI 2.0 does away with this issue by introducing a new way of collecting and distributing code called packages.</p>
<p><a href="http://codeigniter.com/user_guide/libraries/loader.html" target="_blank">Packages</a> are similar in theory to modular development in that all the resources you are distributing are self contained. All packages will have their own libraries, models, helpers, config, and language files collected in their own directory which can then be placed into the application/third_party directory of the framework for use. This provides developers with a much easier way of sharing/releasing code for use by the community. This also opens the doors for more module based application development with CI.</p>
<h3>Drivers</h3>
<p>In previous versions of CI there hasn&#8217;t been an elegant way of creating classes that all share a common parent class and not their sibling classes (handy in certain situations). You can now accomplish this with a new type of library called a driver. <a href="http://codeigniter.com/user_guide/general/drivers.html" target="_blank">Drivers</a> allow you to create a parent class with unlimited child classes that have no access to their siblings (for things like DB abstraction). This is a nice architecture for providing the same type of functionality only using different tools or implementation methods.</p>
<p>Along with being able to create your own drivers, CI 2.0 identifies three drivers in the documentation: Cacheing, Database and Javascript.</p>
<h3>Javascript Library</h3>
<p>Saving the best for last, the item I was most excited about with this release was the <a href="http://codeigniter.com/user_guide/libraries/javascript.html" target="_blank">Javascript Library</a>. CI 2.0 now gives you the ability to plug your favorite javascript framework into CI using drivers so you can incorporate javascript into your apps more easily. <a href="http://jquery.com" target="_blank">jQuery</a> is being distributed with the framework by default but you can be sure there will be other drivers released shortly for other javascript frameworks.</p>
<h2>Upgrading</h2>
<p>So far this post has been mostly about what&#8217;s new and exciting in version 2.0 but there have also been some changes to the framework that might trip up seasoned developers and those of you looking to upgrade from an earlier version. First and foremost, all CI core classes are now prefixed with CI_. This means that all controllers, models, etc. now need to extend CI_Controller, CI_Model, etc. respectively. You will want to be sure to update your code accordingly when upgrading to version 2 (this already tripped me up once).</p>
<p>Second, some old features and functionality have finally been removed for good like scaffolding, plugins and the validation library. Plugins never really gained much traction with CI developers and have been deprecated for some time now. The CI core CAPTCHA plugin has been converted to a helper and any plugins you have developed should be converted to helpers also. The validation library, which has been replaced for a while now by form_validation, is gone. So if you have been putting off updating your code to use the new form_validation library now is the time to do it.</p>
<p>Finally, a number of improvements have been made to the encryption library which will prevent you from decrypting data that you have encrypted with a previous version. To deal with this, you will have to run an update on your data using the new encode_from_legacy() method which will decode your data and return a re-encrypted string using the new method for storage.</p>
<p>Those are the big things to look out for when upgrading from a previous version. Visit the users guide for <a href="http://codeigniter.com/user_guide/installation/upgrading.html" target="_blank">complete upgrading instructions</a>.</p>
<h2>Is that it?</h2>
<p>This is just a quick list of my top 5 changes/additions to the framework that have been released in 2.0. There&#8217;s a lot more where that came from like new cache drivers with APC, memcached, and file-based support, new security library and over 50 bug fixes. You can see the complete list of what&#8217;s new in the <a href="http://codeigniter.com/user_guide/changelog.html" target="_blank">change log</a>. So what are you waiting for? Take CodeIgniter 2.0 for a spin today!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=uzYhS4smVuU:hNogjR-HynI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=uzYhS4smVuU:hNogjR-HynI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=uzYhS4smVuU:hNogjR-HynI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=uzYhS4smVuU:hNogjR-HynI:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/uzYhS4smVuU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2011/02/codeigniter-2-0-first-look-at-reactor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2011/02/codeigniter-2-0-first-look-at-reactor/</feedburner:origLink></item>
		<item>
		<title>Lost in the Forrst</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/EEHeKd9WstU/</link>
		<comments>http://www.christophermonnat.com/2011/02/lost-in-the-forrst/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 10:00:26 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Misc.]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1075</guid>
		<description><![CDATA[I know what you&#8217;re thinking, Eagle scouts should know their way around the woods. That is true but I&#8217;m not talking about smokey bears forest, I&#8217;m talking about the web designer and developer community Forrst. I&#8217;ve been playing in the digital woods for a while now and I&#8217;m impressed. I have mixed feelings about the whole &#8220;walled garden&#8221; thing because there are so many communities and networks around now a days (Facebook, LinkedIn, Ning, etc.)  it&#8217;s usually better to leverage one of them rather than build your own community. However, in this instance, I was pleasantly surprised. In this post I&#8217;ll give you a glimpse at what Forrst is and tell you how you can join in on the conversation. What is Forrst? For those unfamiliar with the site, Forrst is a private community for web designers and developers. A place where we can go and ask questions, request critiques, share ideas and seek inspiration. Each user has a profile and can create posts. Posts are divided into 4 categories: questions, snaps, links and code. If posting isn&#8217;t your thing, you can respond/comment on other peoples posts contributing your knowledge and experience to the community. The site revolves around a forum architecture where users can post interesting content/questions and other users can comment or contribute to the conversation. I&#8217;ve never really participated in forums before but there is something about Forrst that has me hooked. Not sure if it&#8217;s the sites focus or just that the site isn&#8217;t inundated with tons of users yet, but I find myself checking in several times a day and contributing when I have something useful to add. Although Forrst is mostly about posts it&#8217;s important to note that there&#8217;s more to this community than just sharing content. They have partnered with AppSumo to offer special software package deals to members, users can create their own forrst.me profile pages and there are plans for a job/gig board in the near future. With these and other planned features Forrst is quickly becoming the place to be for designers and developers on the web. How do I join? I think One of the secrets to the sites success is that not just anyone can join. Each month existing members get a certain number of invitations based on their participation in the community (max 5 per month I think). Members then browse through those people who have applied for membership and invite those who they feel have something to contribute to the community. The interesting thing here is that your participation in the community then has an impact on the member who invited you. This forces members to be somewhat choosey about those who they extend invites too. It&#8217;s an interesting approach to a pretty common social networking feature that I think helps contribute to a great community of web workers. If you would like to become a Forrst member, visit http://forrst.com and fill out the membership form. For those of you that are already members, share what you like/dislike the most about Forrst in the comments below.]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/10/forrst-logo.png"><img class="alignright size-full wp-image-1214" title="forrst-logo" src="http://www.christophermonnat.com/wp-content/uploads/2010/10/forrst-logo.png" alt="" width="109" height="150" /></a>I know what you&#8217;re thinking, Eagle scouts should know their way around the woods. That is true but I&#8217;m not talking about smokey bears forest, I&#8217;m talking about the web designer and developer community <a href="http://forrst.com">Forrst</a>. I&#8217;ve been playing in the digital woods for a while now and I&#8217;m impressed. I have mixed feelings about the whole &#8220;walled garden&#8221; thing because there are so many communities and networks around now a days (Facebook, LinkedIn, Ning, etc.)  it&#8217;s usually better to leverage one of them rather than build your own community. However, in this instance, I was pleasantly surprised. In this post I&#8217;ll give you a glimpse at what Forrst is and tell you how you can join in on the conversation.</p>
<p><span id="more-1075"></span></p>
<h2>What is Forrst?</h2>
<p>For those unfamiliar with the site, Forrst is a private community for web designers and developers. A place where we can go and ask questions, request critiques, share ideas and seek inspiration. Each user has a profile and can create posts. Posts are divided into 4 categories: questions, snaps, links and code. If posting isn&#8217;t your thing, you can respond/comment on other peoples posts contributing your knowledge and experience to the community.</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2011/02/forrst-home.png"><img class="aligncenter size-full wp-image-1278" title="forrst-home" src="http://www.christophermonnat.com/wp-content/uploads/2011/02/forrst-home.png" alt="" width="595" height="325" /></a></p>
<p>The site revolves around a forum architecture where users can post interesting content/questions and other users can comment or contribute to the conversation. I&#8217;ve never really participated in forums before but there is something about Forrst that has me hooked. Not sure if it&#8217;s the sites focus or just that the site isn&#8217;t inundated with tons of users yet, but I find myself checking in several times a day and contributing when I have something useful to add.</p>
<p>Although Forrst is mostly about posts it&#8217;s important to note that there&#8217;s more to this community than just sharing content. They have partnered with AppSumo to offer special software package deals to members, users can create their own forrst.me profile pages and there are plans for a job/gig board in the near future. With these and other planned features Forrst is quickly becoming the place to be for designers and developers on the web.</p>
<h2>How do I join?</h2>
<p>I think One of the secrets to the sites success is that not just anyone can join. Each month existing members get a certain number of invitations based on their participation in the community (max 5 per month I think). Members then browse through those people who have applied for membership and invite those who they feel have something to contribute to the community. The interesting thing here is that your participation in the community then has an impact on the member who invited you. This forces members to be somewhat choosey about those who they extend invites too. It&#8217;s an interesting approach to a pretty common social networking feature that I think helps contribute to a great community of web workers.</p>
<p>If you would like to become a Forrst member, visit <a href="http://forrst.com/" target="_blank">http://forrst.com</a> and fill out the membership form. For those of you that are already members, share what you like/dislike the most about Forrst in the comments below.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=EEHeKd9WstU:Wy9RYyn2b1c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=EEHeKd9WstU:Wy9RYyn2b1c:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=EEHeKd9WstU:Wy9RYyn2b1c:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=EEHeKd9WstU:Wy9RYyn2b1c:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/EEHeKd9WstU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2011/02/lost-in-the-forrst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2011/02/lost-in-the-forrst/</feedburner:origLink></item>
		<item>
		<title>Review: PHP5 Social Networking</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/SUMYw3Izp10/</link>
		<comments>http://www.christophermonnat.com/2011/02/review-php5-social-networking/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 01:30:58 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1247</guid>
		<description><![CDATA[At this point in human history we are all pretty well versed in social networking. Our pets are even getting in on the whole social web experience. We&#8217;re all familiar with what social networks are and why we should, or should not, use them. But how does one go about building one from scratch? While the overall complexity of building a social networking site really depends on the requirements, the typical features for most networks (relationships, etc.) can get rather complex. Before you start pulling your hair out or reverse engineering Drupal, there is a new book called PHP5 Social Networking that might be just the thing to help you out. In this post I&#8217;m going to give you a glance at this new book published by Packt and tell you if it&#8217;s worth adding to your tech library. What&#8217;s it about? PHP5 Social Networking by Michael Peacock is a complete detail packed reference on how to build your own social network. Weighing in at over 400 pages this book isn&#8217;t a quick read but it has a wealth of information for those people looking for answers to common social network construction questions. Everything is covered from user profiles and groups to activity streams and events. You will even construct your own API. The author starts off deconstructing a handfull of popular social networks down to their most basic features and functions. He then puts together a list of the features they all have in common and that becomes the feature list of the network you will build throughout the book. From that point on the author walks  you step by step through the creation of your own PHP framework and social network for dinosaur owners (yeah, I said dinosaurs). Finally, the book wraps up with some sections on hosting and maintaining your site as well as marketing it to your users. Pros and Cons I could have really used this book a year or two ago when I first started building myScoutPath. Everything is here to get you well on your way to a fully functioning social network with all the bells and whistles. The author does a good job at walking the reader through each solution and what they can do to improve them further. The examples are also clear enough where you can take what you learn and implement it with whatever framework or architecture you choose. If they could improve anything I would say cut down on the code samples a little bit. Complete code libraries are printed throughout the book and I think it makes it unnecessarily big and potentially overwhelming to some. Maybe just provide excerpts from libraries within the book; users can view the complete source code later on if they wish anyway. I don&#8217;t recommend sitting down and reading this book cover to cover unless you&#8217;re in for a nap (as with any technical book). Seek out the sections that you&#8217;re curious about the most and dig in. There&#8217;s a little something for everybody.]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2011/01/php5-social-networking.png"><img class="alignright size-full wp-image-1257" title="php5-social-networking" src="http://www.christophermonnat.com/wp-content/uploads/2011/01/php5-social-networking.png" alt="" width="114" height="140" /></a>At this point in human history we are all pretty well versed in social networking. <a href="http://www.mydogspace.com/" target="_blank">Our</a> <a href="http://www.mycatspace.com/" target="_blank">pets</a> are even getting in on the whole social web experience. We&#8217;re all familiar with what social networks are and why we should, or should not, use them. But how does one go about building one from scratch? While the overall complexity of building a social networking site really depends on the requirements, the typical features for most networks (relationships, etc.) can get rather complex. Before you start pulling your hair out or reverse engineering <a href="http://www.drupal.org">Drupal</a>, there is a new book called <a href="https://www.packtpub.com/php-5-social-networking/book" target="_blank">PHP5 Social Networking</a> that might be just the thing to help you out. In this post I&#8217;m going to give you a glance at this new book published by <a href="http://www.packtpub.com" target="_blank">Packt</a> and tell you if it&#8217;s worth adding to your tech library.</p>
<p><span id="more-1247"></span></p>
<h2>What&#8217;s it about?</h2>
<p>PHP5 Social Networking by Michael Peacock is a complete detail packed reference on how to build your own social network. Weighing in at over 400 pages this book isn&#8217;t a quick read but it has a wealth of information for those people looking for answers to common social network construction questions. Everything is covered from user profiles and groups to activity streams and events. You will even construct your own API.</p>
<p>The author starts off deconstructing a handfull of popular social networks down to their most basic features and functions. He then puts together a list of the features they all have in common and that becomes the feature list of the network you will build throughout the book. From that point on the author walks  you step by step through the creation of your own PHP framework and social network for dinosaur owners (yeah, I said dinosaurs). Finally, the book wraps up with some sections on hosting and maintaining your site as well as marketing it to your users.</p>
<h2>Pros and Cons</h2>
<p>I could have really used this book a year or two ago when I first started building myScoutPath. Everything is here to get you well on your way to a fully functioning social network with all the bells and whistles. The author does a good job at walking the reader through each solution and what they can do to improve them further. The examples are also clear enough where you can take what you learn and implement it with whatever framework or architecture you choose.</p>
<p>If they could improve anything I would say cut down on the code samples a little bit. Complete code libraries are printed throughout the book and I think it makes it unnecessarily big and potentially overwhelming to some. Maybe just provide excerpts from libraries within the book; users can view the complete source code later on if they wish anyway.</p>
<p>I don&#8217;t recommend sitting down and reading this book cover to cover unless you&#8217;re in for a nap (as with any technical book). Seek out the sections that you&#8217;re curious about the most and dig in. There&#8217;s a little something for everybody.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=SUMYw3Izp10:Xnw848iV89c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=SUMYw3Izp10:Xnw848iV89c:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=SUMYw3Izp10:Xnw848iV89c:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=SUMYw3Izp10:Xnw848iV89c:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/SUMYw3Izp10" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2011/02/review-php5-social-networking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2011/02/review-php5-social-networking/</feedburner:origLink></item>
		<item>
		<title>CodeIgniter 2.0 Released</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/ZXuX_QSR67A/</link>
		<comments>http://www.christophermonnat.com/2011/01/codeigniter-2-0-released/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 14:26:12 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1250</guid>
		<description><![CDATA[The wait is over, CodeIgniter 2.0 has been released!! Apparently this happened last Friday and I simply didn&#8217;t notice until now. This release is exciting for 2 reasons, first it brings with it a shit load of new features and fixes and second it introduces CI Reactor which is a community driven branch of the framework. Theres a lot to digest and get excited about so check out the blog post for yourself and get coding!]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2011/01/ci-logo.png"><img class="alignright size-full wp-image-1251" title="ci-logo" src="http://www.christophermonnat.com/wp-content/uploads/2011/01/ci-logo.png" alt="" width="183" height="50" /></a>The wait is over, CodeIgniter 2.0 has been released!! Apparently this happened last Friday and I simply didn&#8217;t notice until now. This release is exciting for 2 reasons, first it brings with it a shit load of <a href="http://codeigniter.com/user_guide/changelog.html" target="_blank">new features and fixes</a> and second it introduces CI Reactor which is a community driven branch of the framework. Theres a lot to digest and get excited about so check out the <a href="http://codeigniter.com/news/codeigniter_2.0.0_released" target="_blank">blog post</a> for yourself and get coding!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=ZXuX_QSR67A:_tOEW6XtV9Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=ZXuX_QSR67A:_tOEW6XtV9Q:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=ZXuX_QSR67A:_tOEW6XtV9Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=ZXuX_QSR67A:_tOEW6XtV9Q:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/ZXuX_QSR67A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2011/01/codeigniter-2-0-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2011/01/codeigniter-2-0-released/</feedburner:origLink></item>
		<item>
		<title>Make Phone Calls with Code Using Twilio</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/_82Uc5zOIFM/</link>
		<comments>http://www.christophermonnat.com/2010/12/communicate-with-your-users-using-twilio/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 10:00:53 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1096</guid>
		<description><![CDATA[Web applications are better than old school applications that get installed on your hard drive because you can access them from anywhere using the web. They do however suffer from the same limited communication channel as typical software because they can only interact with users via the computer. Users provide input via the keyboard and the app provides output via the screen. Wouldn&#8217;t it be cool if we could take advantage of other communication channels like phone and text messages to communicate with our users? Well now we can with the help of Twilio. In this post I&#8217;ll walk you through building an application that can make phone calls and send text messages using the Twilio API. Background For those of you who don&#8217;t know, Twilio is a web service API that empowers programmers with the ability to make phone calls and send SMS text messages programmatically. I first came across the service a while back and have been keeping an eye on it ever since because I think it has a lot of potential uses in modern web applications. In the past, having your application make a phone call used to entail a lot of programming and hardware overhead ($$$). Twilio makes it as simple as one single API call (that doesn&#8217;t break the bank) and you&#8217;re done. In this post I&#8217;m going to be building a sample application to illustrate some of what Twilio is capable of. Have you ever used a website or other service that required you to confirm your phone number by receiving a call and then entering a code given to you over the phone? Well that&#8217;s what we&#8217;re going to build. The concept is that a user fills out a generic registration form on your site and includes their phone number. Upon submission we will leverage Twilio to call the user and recite a 4 digit confirmation code that they will then have to enter in step 2 of the registration process. Upon validating the entered code from step 2 we will either send the user a SMS text message confirming a successful activation or display an error. For the purposes of this example I am leveraging the CodeIgniter framework simply for the sake of development speed. The code that actually interacts with the API can easily be transplanted into any application and still work. When it comes to interacting with the API, Twilio has a number of client libraries to choose from. Our weapon of choice is PHP, so I will be using the PHP client library. To make things a little easier I&#8217;m providing two downloads, one is the complete source code with all the code included. The other is just the framework preconfigured with the necessary libraries and helpers. This way, if you want to follow along, we won&#8217;t have to waste a lot of time setting up and configuring CodeIgniter. Step 1 &#8211; Get a Twilio Account Before you can access the Twilio API you first need to create an account to get access information. You typically have to pay to use Twilios service, but they do provide a free trial that comes with $30.00 worth of credit which you can use for the purposes of this example. Visit https://www.twilio.com/try-twilio and fill out the provided form. After creating your account, and logging in for the first time, you will be presented with your account dashboard. Your account dashboard is a collection of all of your account information in one easy to understand and access place. This is where you will find your Account SID and Auth Token. These are the two values you will need in order to make API requests. The dashboard also shows your account balance along with a rough calculation as to how that dollar amount translates into API requests. Your developer sandbox information is also displayed here, however we won&#8217;t be doing anything with the sandbox in this example. The other thing you will need to do before continuing is to setup an outgoing called ID number within Twilio. For obvious reasons you can&#8217;t just go placing calls and sending text messages from any old number. You first need to enter and confirm a caller ID number within your account and then you can use that number when making API requests. Within your Twilio account click Phone Numbers from the sub nav. At the bottom of this screen if where you can manage your called ID numbers. Click the Add Caller ID button and enter your phone number. Twilio will call you and request you enter a confirmation code (similar to the app we are about to build). After entering the code you should be all set. OK, so now that you have your API access information and have setup your caller ID your ready to jump in and get coding. Step 2 &#8211; Setup If you have not done so already, download a copy of the source code (blank or complete) and unzip the archive onto your desktop. For our registration example you will need to create a database and update CodeIgniters database settings (/application/config/database.php) with the appropriate access information. Once you have created your database, use the following SQL statement to create the one table we will be using. Now that you have created your database and updated the code you can upload everything to your development environment. You will notice that if you bring up the application in a browser you will most likely get an error. That&#8217;s because we haven&#8217;t created our default controller yet, but that&#8217;s the next step. Step 3 &#8211; Create the Controller Now that we&#8217;re up and running with our code and database we can get to coding. First thing to do is create a new controller called register.php in /application/controllers. When a user first visits our application we want to display our registration form so let&#8217;s setup our controller to do that by default. The above code leverages CodeIgniters default controller function index() to automatically display our registration form when a user first visits our application. Now we need to create our registration form view file. Create a new folder in /application/views called register and a new file in that folder called index.php. This view file contains just a simple four field registration form the user will complete to begin the registration process. Save and upload your changes and when you visit the application in a browser you should see the following form displayed. But before we go much further be sure to update the class variables at the top of the controller with your Account SID, Auth Token and caller ID number. Please note, the caller ID number should start with a plus sign (+), include the country code and have no hyphens. Step 4 &#8211; Access the API We now have our controller and registration form. You may notice however that when you submit the registration form nothing happens. The form is looking for a controller function called confirm(). This function will begin our user registration process by validating the form input, generating the users confirmation code and contacting the Twilio API to call our user and recite the code. Let&#8217;s go ahead and create this function now in our controller. The majority of this code should be pretty self explanatory (for those familiar with CI) but let&#8217;s review just to be safe. The first 13 lines are all about validation. We are using CodeIgniters form_validation library to validate our form input and ensure we have valid data. If there are any errors we display the form again with error messages. On line 19 we create a random 4 digit number that we will use as our confirmation code. This is the code we will pass to Twilio to recite to our users and then test for in step 2 of our process. This will be stored in our database along with our other user data. Lines 21-31 handle the database insertion for our user record using CIs active record library. 33-38 are where we contact the Twilio API and make our request to call the user (I&#8217;ll review these lines in a moment). The remainder of the function displays step 2 of our registration form which is just a single field asking the user to enter their confirmation code. Before we forget let&#8217;s create this new view file called confirm.php in /application/views/registration. As I mentioned above, lines 33-38 are where we actually make our API request to Twilio. The first thing we do here is determine if we need to make the call or not by checking the $call variable passed to the function. I put this in here to avoid making additional API calls if the user enters a wrong confirmation code (this will make sense later on). Next we create a new instance of TwilioRestClient which is the PHP client library and pass it our Account SID and Auth Token for authentication. Using our new TwilioRestClient object, we make a request to the API using the request() function. This function takes 3 arguments: the path to the API method your calling, the type of request your making (POST, GET, etc.) and any data you are passing along to the API (as an array). Something to make note of here is the path to the API method we are passing. In a rather odd turn of events, each API call must include your Account SID. I find this rather odd and verbose but alas it is required. There are ways to make this easier to use within your code by making a minor modification to their library, but I chose to keep things just the way they provide for the purposes of our example. So we are calling the /Accounts/Calls API method and passing it a &#8220;From&#8221; phone number, &#8220;To&#8221; phone number and &#8220;Url&#8221; to handle the call. The &#8220;From&#8221; number is the phone number the call will be made from (your Twilio called ID number). The &#8220;To&#8221; number is the number Twilio will be calling. It&#8217;s worth noting that this number must inclue the country code and contain no hyphens. The code should probably include some sanitization to ensure this, but I kept it out for simplicity. Finally the URL to handle the call is where Twilio will look for instructions on what to do for this call. This is where we have to provide it with instructions using TwiML or Twilio Markup Language. Step 5 &#8211; TwiML There is an entire section of documentation dedicated to TwiML, so I don&#8217;t intend on spending a tremendous amount of time on it. Suffice it to say it is the XML format that Twilio expects when looking for instructions on what to do when placing a phone call. You have several options to choose from but all we care to do is place a call and read a script. Let&#8217;s go ahead and create a new function in our controller called handle_call() to generate the necessary TwiML. The above code basically creates the following XML document. The first thing we do here is find our user based on ID in the DB. Next we take their confirmation code and put spaces between the numbers. Without doing this Twilio will pronounce the number as a complete number instead of digit by digit which would be a bummer for our users. Finally we put it all together in a script and call the addSay() function adding a loop attribute of 2 to make sure Twilio repeats the message twice. If you were to visit this function in your browser (/registration/handle_call) you would hopefully see the XML I provided above as an example. Step 6 &#8211; Confirmation We now have the majority of our application in place. The only thing we&#8217;re missing is the processing code to handle step 2 of our registration process. Let&#8217;s create a new function in our controller called confirm_code() to handle the final bit of validation. The above code processes the confirmation code submission and checks to see if our user entered the correct code or not. If correct, we send the user a SMS text message using Twilio and display a view called account_activated.php. If incorrect, we simply display a view called account_error.php. Let&#8217;s create those two views now in /application/views/register. The code for sending the text message is very similar to the block we used to make the phone call above. This time we are requesting the /SMS/Messages API method to send a text message and passing along &#8220;From&#8221;, &#8220;To&#8221; and &#8220;Body&#8221; as parameters. Just like above &#8220;From&#8221; is the phone number we are sending from (our Twilio caller ID number), &#8220;To&#8221; is the number we are sending to and &#8220;Body&#8221; is the actual content of the text message. It&#8217;s worth mentioning that text messages don&#8217;t require any TwiML instructions, only phone calls. And there you have it. If you save and upload your changes you should now have a functioning example. Enter your phone number in the phone number field of the registration form (being sure to include the country code and no hyphens) and hit submit. You should shortly receive a phone call reciting your confirmation code. Enter that code in the confirmation code form and submit. You should then see the success message and receive a congratulatory text message. Debugging When I was first building this app I was not having much luck with placing phone calls. Twilio would call me but say there was a system error and then hang up (very frustrating). Come to find out that I had my site password protected and it couldn&#8217;t get to the handle_call() function for the TwiML instructions. The point of this story is I wouldn&#8217;t have been able to figure out what the problem was without the Twilio Debugger available through your Twilio account. The debugger, available when you log-in and click Debugger from the sub nav, is your first stop when trying to deal with Twilio issues. It should give you the information you need to determine what the problem is. There is also some documentation available to help you deal with common issues. And if all else fails you can contact support for additional assistance. Conclusion This is obviously not a complete and well polished application but it does illustrate some of what Twilio is capable of. Some possible enhancements to this code could include adding a country code drop down menu to the registration form so the user doesn&#8217;t have to enter it as part of their phone number, better phone number validation to ensure processing and maybe e-mail integration since we are collecting the users e-mail address. Feel free to experiment on your own and let me know how you make out by leaving a comment. I know this was a long post but thanks for sticking with me. To learn more about what Twilios capable of, be sure to visit their documentation and implementation gallery.]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/twilio-logo.png"><img class="alignright size-full wp-image-1137" title="twilio-logo" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/twilio-logo.png" alt="" width="130" height="130" /></a>Web applications are better than old school applications that get installed on your hard drive because you can access them from anywhere using the web. They do however suffer from the same limited communication channel as typical software because they can only interact with users via the computer. Users provide input via the keyboard and the app provides output via the screen. Wouldn&#8217;t it be cool if we could take advantage of other communication channels like phone and text messages to communicate with our users? Well now we can with the help of <a href="http://www.twilio.com" target="_blank">Twilio</a>. In this post I&#8217;ll walk you through building an application that can make phone calls and send text messages using the Twilio API.</p>
<p><span id="more-1096"></span></p>
<h2>Background</h2>
<p>For those of you who don&#8217;t know, Twilio is a web service API that empowers programmers with the ability to make phone calls and send SMS text messages programmatically. I first came across the service a while back and have been keeping an eye on it ever since because I think it has a lot of potential uses in modern web applications. In the past, having your application make a phone call used to entail a lot of programming and hardware overhead ($$$). Twilio makes it as simple as one single API call (that doesn&#8217;t break the bank) and you&#8217;re done.</p>
<p>In this post I&#8217;m going to be building a sample application to illustrate some of what Twilio is capable of. Have you ever used a website or other service that required you to confirm your phone number by receiving a call and then entering a code given to you over the phone? Well that&#8217;s what we&#8217;re going to build. The concept is that a user fills out a generic registration form on your site and includes their phone number. Upon submission we will leverage Twilio to call the user and recite a 4 digit confirmation code that they will then have to enter in step 2 of the registration process. Upon validating the entered code from step 2 we will either send the user a SMS text message confirming a successful activation or display an error.</p>
<p>For the purposes of this example I am leveraging the <a href="http://codeigniter.com" target="_blank">CodeIgniter framework</a> simply for the sake of development speed. The code that actually interacts with the API can easily be transplanted into any application and still work. When it comes to interacting with the API, Twilio has a number of <a href="http://www.twilio.com/docs/libraries/" target="_blank">client libraries to choose from</a>. Our weapon of choice is PHP, so I will be using the PHP client library.</p>
<p>To make things a little easier I&#8217;m providing two downloads, one is the <a href="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-complete.zip">complete source code</a> with all the code included. The other is <a href="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-blank.zip">just the framework</a> preconfigured with the necessary libraries and helpers. This way, if you want to follow along, we won&#8217;t have to waste a lot of time setting up and configuring CodeIgniter.</p>
<h2>Step 1 &#8211; Get a Twilio Account</h2>
<p>Before you can access the Twilio API you first need to create an account to get access information. You typically have to pay to use Twilios service, but they do provide a free trial that comes with $30.00 worth of credit which you can use for the purposes of this example.</p>
<p>Visit <a href="https://www.twilio.com/try-twilio" target="_blank">https://www.twilio.com/try-twilio</a> and fill out the provided form.</p>
<p><center><a href="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-signup.png"><img class="aligncenter size-full wp-image-1183" title="twilio-signup" src="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-signup.png" alt="" width="400" height="309" /></a></center>After creating your account, and logging in for the first time, you will be presented with your account dashboard.</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/twilio-dashboard.png"><img class="aligncenter size-full wp-image-1145" title="twilio-dashboard" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/twilio-dashboard.png" alt="" width="595" height="615" /></a></p>
<p>Your account dashboard is a collection of all of your account information in one easy to understand and access place. This is where you will find your Account SID and Auth Token. These are the two values you will need in order to make API requests. The dashboard also shows your account balance along with a rough calculation as to how that dollar amount translates into API requests. Your developer sandbox information is also displayed here, however we won&#8217;t be doing anything with the sandbox in this example.</p>
<p>The other thing you will need to do before continuing is to setup an outgoing called ID number within Twilio. For obvious reasons you can&#8217;t just go placing calls and sending text messages from any old number. You first need to enter and confirm a caller ID number within your account and then you can use that number when making API requests.</p>
<p><center><a href="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-numbers.png"><img class="aligncenter size-full wp-image-1201" title="twilio-numbers" src="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-numbers.png" alt="" width="595" height="342" /></a></center>Within your Twilio account click Phone Numbers from the sub nav. At the bottom of this screen if where you can manage your called ID numbers. Click the Add Caller ID button and enter your phone number. Twilio will call you and request you enter a confirmation code (similar to the app we are about to build). After entering the code you should be all set.</p>
<p>OK, so now that you have your API access information and have setup your caller ID your ready to jump in and get coding.</p>
<h2>Step 2 &#8211; Setup</h2>
<p>If you have not done so already, download a copy of the source code (<a href="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-blank.zip">blank</a> or <a href="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-complete.zip">complete</a>) and unzip the archive onto your desktop. For our registration example you will need to create a database and update CodeIgniters database settings (/application/config/database.php) with the appropriate access information. Once you have created your database, use the following SQL statement to create the one table we will be using.</p>
<pre class="brush: sql; title: ; notranslate">
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL auto_increment,
`fname` varchar(50) NOT NULL,
`lname` varchar(50) NOT NULL,
`email` varchar(200) NOT NULL,
`phone` varchar(12) NOT NULL,
`confirm_code` varchar(4) default NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
</pre>
<p>Now that you have created your database and updated the code you can upload everything to your development environment. You will notice that if you bring up the application in a browser you will most likely get an error. That&#8217;s because we haven&#8217;t created our default controller yet, but that&#8217;s the next step.</p>
<h2>Step 3 &#8211; Create the Controller</h2>
<p>Now that we&#8217;re up and running with our code and database we can get to coding. First thing to do is create a new controller called <strong>register.php</strong> in /application/controllers. When a user first visits our application we want to display our registration form so let&#8217;s setup our controller to do that by default.</p>
<pre class="brush: php; title: ; notranslate">
class Register extends Controller
{
private $_account_sid = '';
private $_auth_token  = '';
private $_from_phone  = '';

public function __construct()
{
parent::__construct();

require_once(APPPATH . 'libraries/twilio.php');
}

// ------------------------------------------------------------------------

/**
 * Display app registration form.
 *
 * @access public
 * @return void
 */
public function index()
{
$temp_data = array(
'page_title' =&amp;amp;amp;gt; lang('application'),
'content_main' =&amp;amp;amp;gt; $this-&amp;amp;amp;gt;load-&amp;amp;amp;gt;view('register/index', 0, TRUE)
);

$this-&amp;amp;amp;gt;load-&amp;amp;amp;gt;view('_layouts/default', $temp_data);
}
}
</pre>
<p>The above code leverages CodeIgniters default controller function index() to automatically display our registration form when a user first visits our application. Now we need to create our registration form view file. Create a new folder in /application/views called <strong>register</strong> and a new file in that folder called <strong>index.php</strong>.</p>
<pre class="brush: php; title: ; notranslate">
&lt;h1&gt;&lt;?php echo lang('application'); ?&gt;&lt;/h1&gt;
&lt;?php echo display_form_error(validation_errors()); ?&gt;

&lt;?php echo form_open('register/confirm'); ?&gt;

&lt;p&gt;&lt;label for=&quot;fname&quot;&gt;First name: &lt;em&gt;*&lt;/em&gt;&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;fname&quot; id=&quot;fname&quot; value=&quot;&lt;?php echo set_value('fname'); ?&gt;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;label for=&quot;lname&quot;&gt;Last name: &lt;em&gt;*&lt;/em&gt;&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;lname&quot; id=&quot;lname&quot; value=&quot;&lt;?php echo set_value('lname'); ?&gt;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;label for=&quot;email&quot;&gt;Email address: &lt;em&gt;*&lt;/em&gt;&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&lt;?php echo set_value('email'); ?&gt;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;label for=&quot;phone&quot;&gt;Phone number: &lt;em&gt;*&lt;/em&gt;&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;phone&quot; id=&quot;phone&quot; maxlength=&quot;12&quot; value=&quot;&lt;?php echo set_value('phone'); ?&gt;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Register now&quot; /&gt;&lt;/p&gt;

&lt;?php echo form_close(); ?&gt;
</pre>
<p>This view file contains just a simple four field registration form the user will complete to begin the registration process. Save and upload your changes and when you visit the application in a browser you should see the following form displayed. But before we go much further be sure to update the class variables at the top of the controller with your Account SID, Auth Token and caller ID number. Please note, the caller ID number should start with a plus sign (+), include the country code and have no hyphens.</p>
<p><center><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/twilio-reg-form.png"><img class="aligncenter size-full wp-image-1161" title="twilio-reg-form" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/twilio-reg-form.png" alt="" width="595" height="270" /></a></center></p>
<h2>Step 4 &#8211; Access the API</h2>
<p>We now have our controller and registration form. You may notice however that when you submit the registration form nothing happens. The form is looking for a controller function called confirm(). This function will begin our user registration process by validating the form input, generating the users confirmation code and contacting the Twilio API to call our user and recite the code. Let&#8217;s go ahead and create this function now in our controller.</p>
<pre class="brush: php; title: ; notranslate">
public function confirm($call = TRUE)
{
$this-&amp;amp;gt;load-&amp;amp;gt;library('form_validation');

$this-&amp;amp;gt;form_validation-&amp;amp;gt;set_error_delimiters('&amp;amp;lt;li&amp;amp;gt;', '&amp;amp;lt;/li&amp;amp;gt;');

$rules = array(
array('field' =&amp;amp;gt; 'fname', 'label' =&amp;amp;gt; 'first name', 'rules' =&amp;amp;gt; 'trim|required|htmlentities'),
array('field' =&amp;amp;gt; 'lname', 'label' =&amp;amp;gt; 'last name', 'rules' =&amp;amp;gt; 'trim|required|htmlentities'),
array('field' =&amp;amp;gt; 'email', 'label' =&amp;amp;gt; 'email address', 'rules' =&amp;amp;gt; 'trim|required|valid_email|htmlentities'),
array('field' =&amp;amp;gt; 'phone', 'label' =&amp;amp;gt; 'phone number', 'rules' =&amp;amp;gt; 'trim|required|htmlentities'),
);

$this-&amp;amp;gt;form_validation-&amp;amp;gt;set_rules($rules);

if($this-&amp;amp;gt;form_validation-&amp;amp;gt;run())
{
// generate random 4 digit confirmation code
$confirm_code = rand(1000,9999);

// add new user to DB
$user_data = array(
'fname' =&amp;amp;gt; $this-&amp;amp;gt;input-&amp;amp;gt;post('fname'),
'lname' =&amp;amp;gt; $this-&amp;amp;gt;input-&amp;amp;gt;post('lname'),
'email' =&amp;amp;gt; $this-&amp;amp;gt;input-&amp;amp;gt;post('email'),
'phone' =&amp;amp;gt; $this-&amp;amp;gt;input-&amp;amp;gt;post('phone'),
'confirm_code' =&amp;amp;gt; $confirm_code
);

$this-&amp;amp;gt;db-&amp;amp;gt;insert('users', $user_data);
$user_id = $this-&amp;amp;gt;db-&amp;amp;gt;insert_id();

if($call)
{
// make call request to Twilio
$twilio = new TwilioRestClient($this-&amp;amp;gt;_account_sid, $this-&amp;amp;gt;_auth_token);
$result = $twilio-&amp;amp;gt;request('2010-04-01/Accounts/' . $this-&amp;amp;gt;_account_sid . '/Calls', 'POST', array('From' =&amp;amp;gt; $this-&amp;amp;gt;_from_phone, 'To' =&amp;amp;gt; $this-&amp;amp;gt;input-&amp;amp;gt;post('phone'), 'Url' =&amp;amp;gt; site_url('register/handle_call/' . $user_id)));
}

// display confirmation form
$page_data = array(
'user_id' =&amp;amp;gt; $this-&amp;amp;gt;db-&amp;amp;gt;insert_id()
);

$temp_data = array(
'page_title' =&amp;amp;gt; lang('application'),
'content_main' =&amp;amp;gt; $this-&amp;amp;gt;load-&amp;amp;gt;view('register/confirm', $page_data, TRUE)
);

$this-&amp;amp;gt;load-&amp;amp;gt;view('_layouts/default', $temp_data);
}
else
{
// display form errors
$this-&amp;amp;gt;index();
}
}
</pre>
<p>The majority of this code should be pretty self explanatory (for those familiar with CI) but let&#8217;s review just to be safe. The first 13 lines are all about validation. We are using CodeIgniters form_validation library to validate our form input and ensure we have valid data. If there are any errors we display the form again with error messages. On line 19 we create a random 4 digit number that we will use as our confirmation code. This is the code we will pass to Twilio to recite to our users and then test for in step 2 of our process. This will be stored in our database along with our other user data. Lines 21-31 handle the database insertion for our user record using CIs active record library. 33-38 are where we contact the Twilio API and make our request to call the user (I&#8217;ll review these lines in a moment). The remainder of the function displays step 2 of our registration form which is just a single field asking the user to enter their confirmation code. Before we forget let&#8217;s create this new view file called <strong>confirm.php</strong> in /application/views/registration.</p>
<pre class="brush: php; title: ; notranslate">
&lt;h1&gt;&lt;?php echo lang('application'); ?&gt;&lt;/h1&gt;

&lt;h2&gt;Confirm Your Identity&lt;/h2&gt;

&lt;p&gt;You will receive a phone call shortly providing a 4 digit confirmation code.
Please enter that code below and click &lt;strong&gt;Confirm&lt;/strong&gt;.&lt;/p&gt;

&lt;?php echo display_form_error(validation_errors()); ?&gt;

&lt;?php echo form_open('register/confirm_code'); ?&gt;

&lt;input type=&quot;hidden&quot; name=&quot;user_id&quot; value=&quot;&lt;?php echo $user_id; ?&gt;&quot; /&gt;

&lt;p&gt;&lt;label for=&quot;confirm_code&quot;&gt;Confirmation code: &lt;em&gt;*&lt;/em&gt;&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;confirm_code&quot; id=&quot;confirm_code&quot; maxlength=&quot;4&quot; value=&quot;&quot; /&gt;
&lt;input type=&quot;submit&quot; value=&quot;Confirm&quot; /&gt;&lt;/p&gt;

&lt;?php echo form_close(); ?&gt;
</pre>
<p>As I mentioned above, lines 33-38 are where we actually make our API request to Twilio.</p>
<pre class="brush: php; title: ; notranslate">
if($call)
{
// make call request to Twilio
$twilio = new TwilioRestClient($this-&amp;amp;gt;_account_sid, $this-&amp;amp;gt;_auth_token);
$result = $twilio-&amp;amp;gt;request('2010-04-01/Accounts/' . $this-&amp;amp;gt;_account_sid . '/Calls', 'POST', array('From' =&amp;amp;gt; $this-&amp;amp;gt;_from_phone, 'To' =&amp;amp;gt; $this-&amp;amp;gt;input-&amp;amp;gt;post('phone'), 'Url' =&amp;amp;gt; site_url('register/handle_call/' . $user_id)));
}
</pre>
<p>The first thing we do here is determine if we need to make the call or not by checking the $call variable passed to the function. I put this in here to avoid making additional API calls if the user enters a wrong confirmation code (this will make sense later on). Next we create a new instance of TwilioRestClient which is the PHP client library and pass it our Account SID and Auth Token for authentication. Using our new TwilioRestClient object, we make a request to the API using the request() function. This function takes 3 arguments: the path to the API method your calling, the type of request your making (POST, GET, etc.) and any data you are passing along to the API (as an array).</p>
<p>Something to make note of here is the path to the API method we are passing. In a rather odd turn of events, each API call must include your Account SID. I find this rather odd and verbose but alas it is required. There are ways to make this easier to use within your code by making a minor modification to their library, but I chose to keep things just the way they provide for the purposes of our example.</p>
<p>So we are calling the <a href="http://www.twilio.com/docs/api/2010-04-01/rest/call" target="_blank">/Accounts/Calls API method</a> and passing it a &#8220;From&#8221; phone number, &#8220;To&#8221; phone number and &#8220;Url&#8221; to handle the call. The &#8220;From&#8221; number is the phone number the call will be made from (your Twilio called ID number). The &#8220;To&#8221; number is the number Twilio will be calling. It&#8217;s worth noting that this number must inclue the country code and contain no hyphens. The code should probably include some sanitization to ensure this, but I kept it out for simplicity. Finally the URL to handle the call is where Twilio will look for instructions on what to do for this call. This is where we have to provide it with instructions using TwiML or Twilio Markup Language.</p>
<h2>Step 5 &#8211; TwiML</h2>
<p>There is an <a href="http://www.twilio.com/docs/api/2010-04-01/twiml/" target="_blank">entire section of documentation</a> dedicated to TwiML, so I don&#8217;t intend on spending a tremendous amount of time on it. Suffice it to say it is the XML format that Twilio expects when looking for instructions on what to do when placing a phone call. You have several options to choose from but all we care to do is place a call and read a script. Let&#8217;s go ahead and create a new function in our controller called <strong>handle_call()</strong> to generate the necessary TwiML.</p>
<pre class="brush: php; title: ; notranslate">
public function handle_call($user_id = NULL)
{
if(!is_null($user_id))
{
$user = $this-&gt;db-&gt;get_where('users', array('id' =&gt; $user_id))-&gt;row();

// put spaces between code so Twilio will pronounce digits instead of the complete number
$confirm_code = '';
for($i=0; $i&lt;=3; ++$i)
{
$confirm_code .= $user-&gt;confirm_code[$i] . ' ';
}

$script = 'Hello your confirmation code is ' . $confirm_code . '.';
}
else
{
$script = 'Im sorry but your account could not be verified.';
}

$twilio = new Response();
$twilio-&gt;addSay($script, array('loop' =&gt; 2));
$twilio-&gt;Respond();
}
</pre>
<p>The above code basically creates the following XML document.</p>
<pre class="brush: xml; title: ; notranslate">
&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot; ?&amp;amp;gt;
&amp;amp;lt;Response&amp;amp;gt;
     &amp;amp;lt;Say loop=&amp;amp;quot;2&amp;amp;quot;&amp;amp;gt;Hello your confirmation code is XXXX.&amp;amp;lt;/Say&amp;amp;gt;
&amp;amp;lt;/Response&amp;amp;gt;
</pre>
<p>The first thing we do here is find our user based on ID in the DB. Next we take their confirmation code and put spaces between the numbers. Without doing this Twilio will pronounce the number as a complete number instead of digit by digit which would be a bummer for our users. Finally we put it all together in a script and call the addSay() function adding a loop attribute of 2 to make sure Twilio repeats the message twice. If you were to visit this function in your browser (/registration/handle_call) you would hopefully see the XML I provided above as an example.</p>
<h2>Step 6 &#8211; Confirmation</h2>
<p>We now have the majority of our application in place. The only thing we&#8217;re missing is the processing code to handle step 2 of our registration process. Let&#8217;s create a new function in our controller called confirm_code() to handle the final bit of validation.</p>
<pre class="brush: php; title: ; notranslate">
function confirm_code()
{
$this-&gt;load-&gt;library('form_validation');

$this-&gt;form_validation-&gt;set_error_delimiters('&lt;li&gt;', '&lt;/li&gt;');

$rules = array(
array('field' =&gt; 'confirm_code', 'label' =&gt; 'confirmation code', 'rules' =&gt; 'trim|numeric|max_length[4]|htmlentities'),
);

$this-&gt;form_validation-&gt;set_rules($rules);

if($this-&gt;form_validation-&gt;run())
{
$user = $this-&gt;db-&gt;get_where('users', array('id' =&gt; $this-&gt;input-&gt;post('user_id')))-&gt;row();

if($user-&gt;confirm_code == $this-&gt;input-&gt;post('confirm_code'))
{
$this-&gt;db-&gt;update('users', array('confirm_code' =&gt; NULL), array('id' =&gt; $user-&gt;id));

// make SMS request to Twilio
$twilio = new TwilioRestClient($this-&gt;_account_sid, $this-&gt;_auth_token);
$result = $twilio-&gt;request('2010-04-01/Accounts/' . $this-&gt;_account_sid . '/SMS/Messages', 'POST', array('From' =&gt; $this-&gt;_from_phone, 'To' =&gt; $user-&gt;phone, 'Body' =&gt; 'Hi ' . $user-&gt;fname . ', Thanks for activating your account.'));

$content_main = $this-&gt;load-&gt;view('register/account_activated', 0, TRUE);
}
else
{
$content_main = $this-&gt;load-&gt;view('register/account_error', 0, TRUE);
}

$temp_data = array(
'page_title' =&gt; lang('application'),
'content_main' =&gt; $content_main
);

$this-&gt;load-&gt;view('_layouts/default', $temp_data);
}
else
{
$this-&gt;confirm(FALSE);
}
}
</pre>
<p>The above code processes the confirmation code submission and checks to see if our user entered the correct code or not. If correct, we send the user a SMS text message using Twilio and display a view called <strong>account_activated.php</strong>. If incorrect, we simply display a view called <strong>account_error.php</strong>. Let&#8217;s create those two views now in /application/views/register.</p>
<pre class="brush: php; title: ; notranslate">
&lt;h1&gt;&lt;?php echo lang('application'); ?&gt;&lt;/h1&gt;

&lt;p&gt;Your account has been activated.&lt;/p&gt;
</pre>
<pre class="brush: php; title: ; notranslate">
&lt;h1&gt;&lt;?php echo lang('application'); ?&gt;&lt;/h1&gt;

&lt;p&gt;Your account could not be verified at this time.&lt;/p&gt;
</pre>
<p>The code for sending the text message is very similar to the block we used to make the phone call above.</p>
<pre class="brush: php; title: ; notranslate">
$twilio = new TwilioRestClient($this-&gt;_account_sid, $this-&gt;_auth_token);
$result = $twilio-&gt;request('2010-04-01/Accounts/' . $this-&gt;_account_sid . '/SMS/Messages', 'POST', array('From' =&gt; $this-&gt;_from_phone, 'To' =&gt; $user-&gt;phone, 'Body' =&gt; 'Hi ' . $user-&gt;fname . ', Thanks for activating your account.'));
</pre>
<p>This time we are requesting the <a href="http://www.twilio.com/docs/api/2010-04-01/rest/sms" target="_blank">/SMS/Messages API method</a> to send a text message and passing along &#8220;From&#8221;, &#8220;To&#8221; and &#8220;Body&#8221; as parameters. Just like above &#8220;From&#8221; is the phone number we are sending from (our Twilio caller ID number), &#8220;To&#8221; is the number we are sending to and &#8220;Body&#8221; is the actual content of the text message. It&#8217;s worth mentioning that text messages don&#8217;t require any TwiML instructions, only phone calls.</p>
<p>And there you have it. If you save and upload your changes you should now have a functioning example. Enter your phone number in the phone number field of the registration form (being sure to include the country code and no hyphens) and hit submit. You should shortly receive a phone call reciting your confirmation code. Enter that code in the confirmation code form and submit. You should then see the success message and receive a congratulatory text message.</p>
<h2>Debugging</h2>
<p>When I was first building this app I was not having much luck with placing phone calls. Twilio would call me but say there was a system error and then hang up (very frustrating). Come to find out that I had my site password protected and it couldn&#8217;t get to the handle_call() function for the TwiML instructions. The point of this story is I wouldn&#8217;t have been able to figure out what the problem was without the Twilio Debugger available through your Twilio account.</p>
<p><center><a href="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-debugger.png"><img class="aligncenter size-full wp-image-1198" title="twilio-debugger" src="http://www.christophermonnat.com/wp-content/uploads/2010/12/twilio-debugger.png" alt="" width="595" height="293" /></a></center>The debugger, available when you log-in and click Debugger from the sub nav, is your first stop when trying to deal with Twilio issues. It should give you the information you need to determine what the problem is. There is also <a href="http://www.twilio.com/docs/errors/" target="_blank">some documentation</a> available to help you deal with common issues. And if all else fails you can <a href="http://getsatisfaction.com/twilio/" target="_blank">contact support</a> for additional assistance.</p>
<h2>Conclusion</h2>
<p>This is obviously not a complete and well polished application but it does illustrate some of what Twilio is capable of. Some possible enhancements to this code could include adding a country code drop down menu to the registration form so the user doesn&#8217;t have to enter it as part of their phone number, better phone number validation to ensure processing and maybe e-mail integration since we are collecting the users e-mail address. Feel free to experiment on your own and let me know how you make out by leaving a comment.</p>
<p>I know this was a long post but thanks for sticking with me. To learn more about what Twilios capable of, be sure to visit their <a href="http://www.twilio.com/docs/index" target="_blank">documentation</a> and <a href="http://www.twilio.com/gallery" target="_blank">implementation gallery</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=_82Uc5zOIFM:YCsv9aTPWnU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=_82Uc5zOIFM:YCsv9aTPWnU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=_82Uc5zOIFM:YCsv9aTPWnU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=_82Uc5zOIFM:YCsv9aTPWnU:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/_82Uc5zOIFM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2010/12/communicate-with-your-users-using-twilio/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2010/12/communicate-with-your-users-using-twilio/</feedburner:origLink></item>
		<item>
		<title>Say “Hello” to Your Site Visitors With Hello Bar</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/fKkztzsLI44/</link>
		<comments>http://www.christophermonnat.com/2010/11/say-hello-to-your-site-visitors-with-hello-bar/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 10:00:23 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1104</guid>
		<description><![CDATA[Ya know those annoying, eh hem I mean cool, pop down bar type things that some websites have on load? You know the ones I&#8217;m talking about; after the homepage loads this little 25-50px tall bar slides down from the top of the window usually advertising some thing or other. With me so far? Good because I came across a new service whose sole purpose is to help you add this type of irritating, I mean nifty, functionality to your own website. It&#8217;s called Hello Bar and in this post I&#8217;ll take you on a tour and discuss whether you should add it to your own site. Now before we get started, you might have noticed a bit of sarcasm in the opening of this post about whether this type of functionality is really a good thing. Personally I place this feature in the same category as pop-up windows and those really annoying flash ads that start talking to you after loading (I hate those things). However, I wanted to do a post on this service because it&#8217;s really a pretty slick web app and it&#8217;s made by the same people that brought us SlideDeck which is totally cool! So in an attempt to give them the benefit of the doubt, and showcase a very well put together interface, I decided to take a swing at writing an impartial review of the service. Here goes nothing. Initial Setup To get started you will need an account. Hello Bar is currently in a private beta, so signing up on the homepage will only get you so far. I have a hand full of invites to share if anyone is interested (just leave a comment). After logging in for the first time you come to a dashboard of sorts that will eventually display all of your bars for management. The interface leaves little to the imagination as to what you need to do to get started with your first bar. Click the &#8220;Create New&#8221; button and you are served with the hello bar editor. The bulk of this service revolves around this bar editor screen. This is where you actually construct your hello bar and it&#8217;s loaded with options. You can either create a static bar with text you enter manually or populate the bar dynamically from an RSS feed (you can even configure it so you can update your bar via Twitter). Once you&#8217;ve decided on the type of bar you&#8217;re creating you can get to customizing every aspect like link text and colors. There really isn&#8217;t much that you can&#8217;t customize easily through the interface. Once you&#8217;re satisfied with your hello bar (by checking the preview) you are presented with a little bit of JavaScript to copy and paste into your websites body tag. After that you should be up and running with your brand new hello bar. Wait, is there more? Up until now you might be wondering why you would use such a service and not just go hunting for a jQuery plugin or something. Well the true value in Hello Bar comes after you copy and paste the JavaScript. Once you have created your bars you can manage them all collectively from your account, turning them on and off remotely as needed. I can see this as a very handy feature for those people who have several dispersed web properties to manage. And if that&#8217;s not enough for you there are also statistics. Hello Bar tracks impressions, clicks and the click through rate for each bar in your account. You can then filter that data by day, week or month. While it is true that you could track the same data leveraging a jQuery plugin (using Google Analytics) that takes time. I was up and running with my hello bar in LESS than 5 minutes. Setting up Google Analytics alone will take more time than that. Final Verdict When I first came across Hello Bar my thought was &#8220;Really?? Someone made an entire web app just for these annoying little drop down bar things?&#8221; However, after taking a look at all the features and statistics tracking I have to say I&#8217;m impressed. Seems like a useful feature set paired with a kick ass interface, definitely a winning combination. Now if it only wasn&#8217;t for those annoying drop down bar things that remind me of pop-up ads. All jokes aside, I will not personally be using this service, but I do recommend it to anyone looking for this type of functionality. Very solid tool!]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/parachute-man.png"><img class="alignright size-full wp-image-1108" title="Hello Bar parachute man" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/parachute-man.png" alt="" width="150" height="117" /></a>Ya know those annoying, eh hem I mean cool, pop down bar type things that some websites have on load? You know the ones I&#8217;m talking about; after the homepage loads this little 25-50px tall bar slides down from the top of the window usually advertising some thing or other. With me so far? Good because I came across a new service whose sole purpose is to help you add this type of irritating, I mean nifty, functionality to your own website. It&#8217;s called <a href="http://www.hellobar.com" target="_blank">Hello Bar</a> and in this post I&#8217;ll take you on a tour and discuss whether you should add it to your own site.</p>
<p><span id="more-1104"></span></p>
<p>Now before we get started, you might have noticed a bit of sarcasm in the opening of this post about whether this type of functionality is really a good thing. Personally I place this feature in the same category as pop-up windows and those really annoying flash ads that start talking to you after loading (I hate those things). However, I wanted to do a post on this service because it&#8217;s really a pretty slick web app and it&#8217;s made by the same people that brought us <a href="http://www.slidedeck.com" target="_blank">SlideDeck</a> which is totally cool! So in an attempt to give them the benefit of the doubt, and showcase a very well put together interface, I decided to take a swing at writing an impartial review of the service. Here goes nothing.</p>
<h2>Initial Setup</h2>
<p>To get started you will need an account. Hello Bar is currently in a private beta, so signing up on the homepage will only get you so far. I have a hand full of invites to share if anyone is interested (just leave a comment).</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-welcome.png"><img class="aligncenter size-full wp-image-1109" title="hello-bar-welcome" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-welcome.png" alt="" width="595" height="318" /></a></p>
<p>After logging in for the first time you come to a dashboard of sorts that will eventually display all of your bars for management. The interface leaves little to the imagination as to what you need to do to get started with your first bar. Click the &#8220;Create New&#8221; button and you are served with the hello bar editor.</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-add.png"><img class="aligncenter size-full wp-image-1110" title="hello-bar-add" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-add.png" alt="" width="595" height="415" /></a></p>
<p>The bulk of this service revolves around this bar editor screen. This is where you actually construct your hello bar and it&#8217;s loaded with options. You can either create a static bar with text you enter manually or populate the bar dynamically from an RSS feed (you can even configure it so you can update your bar via Twitter). Once you&#8217;ve decided on the type of bar you&#8217;re creating you can get to customizing every aspect like link text and colors. There really isn&#8217;t much that you can&#8217;t customize easily through the interface.</p>
<p>Once you&#8217;re satisfied with your hello bar (by checking the preview) you are presented with a little bit of JavaScript to copy and paste into your websites body tag. After that you should be up and running with your brand new hello bar.</p>
<h2>Wait, is there more?</h2>
<p>Up until now you might be wondering why you would use such a service and not just go hunting for a jQuery plugin or something. Well the true value in Hello Bar comes after you copy and paste the JavaScript. Once you have created your bars you can manage them all collectively from your account, turning them on and off remotely as needed. I can see this as a very handy feature for those people who have several dispersed web properties to manage.</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-manage.png"><img class="aligncenter size-full wp-image-1112" title="hello-bar-manage" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-manage.png" alt="" width="595" height="78" /></a></p>
<p>And if that&#8217;s not enough for you there are also statistics. Hello Bar tracks impressions, clicks and the click through rate for each bar in your account. You can then filter that data by day, week or month.</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-stats.png"><img class="aligncenter size-full wp-image-1113" title="hello-bar-stats" src="http://www.christophermonnat.com/wp-content/uploads/2010/11/hello-bar-stats.png" alt="" width="595" height="689" /></a></p>
<p>While it is true that you could track the same data leveraging a jQuery plugin (using Google Analytics) that takes time. I was up and running with my hello bar in LESS than 5 minutes. Setting up Google Analytics alone will take more time than that.</p>
<h2>Final Verdict</h2>
<p>When I first came across Hello Bar my thought was &#8220;Really?? Someone made an entire web app just for these annoying little drop down bar things?&#8221; However, after taking a look at all the features and statistics tracking I have to say I&#8217;m impressed. Seems like a useful feature set paired with a kick ass interface, definitely a winning combination. Now if it only wasn&#8217;t for those annoying drop down bar things that remind me of pop-up ads.</p>
<p>All jokes aside, I will not personally be using this service, but I do recommend it to anyone looking for this type of functionality. Very solid tool!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=fKkztzsLI44:ZijIdqAfGpU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=fKkztzsLI44:ZijIdqAfGpU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=fKkztzsLI44:ZijIdqAfGpU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=fKkztzsLI44:ZijIdqAfGpU:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/fKkztzsLI44" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2010/11/say-hello-to-your-site-visitors-with-hello-bar/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2010/11/say-hello-to-your-site-visitors-with-hello-bar/</feedburner:origLink></item>
		<item>
		<title>Website For Sale: Sign-Up-Sheet.com</title>
		<link>http://feedproxy.google.com/~r/ChrisMonnat/~3/ubGuTG9qpl4/</link>
		<comments>http://www.christophermonnat.com/2010/11/website-for-sale-sign-up-sheet-com/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 18:37:46 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Misc.]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=1094</guid>
		<description><![CDATA[That&#8217;s right, Sign-Up-Sheet.com is for sale. A lot has changed for me since the relaunch in May 2010 and I have decided to take a break from the side business thing. The site is currently listed on Flippa (http://bit.ly/cQcKW9) along with the appropriate details. Feel free to get in touch if interested.]]></description>
				<content:encoded><![CDATA[<p>That&#8217;s right, Sign-Up-Sheet.com is for sale. A lot has changed for me since the relaunch in May 2010 and I have decided to take a break from the side business thing. The site is currently listed on Flippa (<a href="http://bit.ly/cQcKW9">http://bit.ly/cQcKW9</a>) along with the appropriate details. Feel free to get in touch if interested.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=ubGuTG9qpl4:pnsgMKdUovk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=ubGuTG9qpl4:pnsgMKdUovk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChrisMonnat?a=ubGuTG9qpl4:pnsgMKdUovk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChrisMonnat?i=ubGuTG9qpl4:pnsgMKdUovk:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/ubGuTG9qpl4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2010/11/website-for-sale-sign-up-sheet-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.christophermonnat.com/2010/11/website-for-sale-sign-up-sheet-com/</feedburner:origLink></item>
	<item><title>Links for 2010-05-15 [del.icio.us]</title><link>http://feedproxy.google.com/~r/ChrisMonnat/~3/mWmn79sK2NQ/mrtopher</link><pubDate>Sun, 16 May 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://del.icio.us/mrtopher#2010-05-15</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://sign-up-sheet.com/"&gt;Online Event Registration and Attendee Management Made Easy.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/mWmn79sK2NQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/mrtopher#2010-05-15</feedburner:origLink></item><item><title>Links for 2010-03-04 [del.icio.us]</title><link>http://feedproxy.google.com/~r/ChrisMonnat/~3/KjZQ8ya5hus/mrtopher</link><pubDate>Fri, 05 Mar 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/mrtopher#2010-03-04</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.sitepoint.com/blogs/2010/03/04/how-to-override-php-configuration-settings/"&gt;How to Override PHP Configuration Options&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/KjZQ8ya5hus" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/mrtopher#2010-03-04</feedburner:origLink></item><item><title>Links for 2010-03-03 [del.icio.us]</title><link>http://feedproxy.google.com/~r/ChrisMonnat/~3/tmdPCxt0RWY/mrtopher</link><pubDate>Thu, 04 Mar 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/mrtopher#2010-03-03</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://freelanceswitch.com/freelancing-essentials/keeping-yourself-motivated/"&gt;Keeping Yourself Motivated&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/tmdPCxt0RWY" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/mrtopher#2010-03-03</feedburner:origLink></item><item><title>Links for 2010-02-25 [del.icio.us]</title><link>http://feedproxy.google.com/~r/ChrisMonnat/~3/5A8J5pFQods/mrtopher</link><pubDate>Fri, 26 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/mrtopher#2010-02-25</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.sitepoint.com/blogs/2010/02/25/why-you-need-facebook-fan-page/"&gt;12 Reasons You Need a Facebook Fan Page and 5 Easy Steps for Creating One&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/"&gt;Basic Pattern Matching Form Validation in CodeIgniter&lt;/a&gt;&lt;br/&gt;
Nice post by Michael Wales about extending CIs form validation library.&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/5A8J5pFQods" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/mrtopher#2010-02-25</feedburner:origLink></item><item><title>Links for 2010-02-23 [del.icio.us]</title><link>http://feedproxy.google.com/~r/ChrisMonnat/~3/VkV1pRysbwk/mrtopher</link><pubDate>Wed, 24 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/mrtopher#2010-02-23</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://artofmanliness.com/2010/02/22/8-reasons-you-need-to-rediscover-your-passion-for-exercise/"&gt;8 Reasons You Need to Rediscover Your Passion for Exercise&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.haughin.com/2010/02/23/building-utf8-compatible-codeigniter-applications/"&gt;Building UTF8 Compatible CodeIgniter Applications&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/VkV1pRysbwk" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/mrtopher#2010-02-23</feedburner:origLink></item><item><title>Links for 2010-02-22 [del.icio.us]</title><link>http://feedproxy.google.com/~r/ChrisMonnat/~3/izioN5pSkTQ/mrtopher</link><pubDate>Tue, 23 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/mrtopher#2010-02-22</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.smashingmagazine.com/2010/02/22/the-seven-deadly-sins-of-javascript-implementation/"&gt;The Seven Deadly Sins Of JavaScript Implementation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/izioN5pSkTQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/mrtopher#2010-02-22</feedburner:origLink></item><item><title>Links for 2010-02-15 [del.icio.us]</title><link>http://feedproxy.google.com/~r/ChrisMonnat/~3/4gZ26Noynic/mrtopher</link><pubDate>Tue, 16 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/mrtopher#2010-02-15</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.smashingmagazine.com/2010/02/13/the-definitive-guide-to-styling-web-links/"&gt;The Definitive Guide To Styling Web Links&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://royal.pingdom.com/2010/02/12/how-google-celebrated-science-in-2009/"&gt;How Google celebrated science in 2009&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/ChrisMonnat/~4/4gZ26Noynic" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/mrtopher#2010-02-15</feedburner:origLink></item></channel>
</rss>
