<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Chris Antoine</title>
	<atom:link href="http://www.chrisantoine.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chrisantoine.net</link>
	<description>PHP / MySQL / JavaScript / Ajax Development.</description>
	<pubDate>Tue, 15 Jul 2008 04:24:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5-RC1</generator>
	<language>en</language>
			<item>
		<title>Prettier Accessible Forms with Zend Form and Zend Config</title>
		<link>http://www.chrisantoine.net/2008/07/15/prettier-accessible-forms-with-zend-form-and-zend-config/</link>
		<comments>http://www.chrisantoine.net/2008/07/15/prettier-accessible-forms-with-zend-form-and-zend-config/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 04:23:10 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Zend Framework]]></category>

		<category><![CDATA[Prettier Accessible Forms]]></category>

		<category><![CDATA[Zend Config]]></category>

		<category><![CDATA[Zend Form]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=22</guid>
		<description><![CDATA[When I first started working with Zend Framework and showed a designer the output from Zend Form we had a few days of conversations back and forth and researched on whether or not the dl/dt setup was going to be sufficient for what we wanted and also &#8220;correct usage&#8221;.
While working through our first project we [...]]]></description>
			<content:encoded><![CDATA[<p>When I first started working with <a href="http://framework.zend.com" title="Zend Framework" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Framework</a> and showed a designer the output from <a href="http://framework.zend.com/manual/en/zend.form.html" title="Zend Form" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Form</a> we had a few days of conversations back and forth and researched on whether or not the dl/dt setup was going to be sufficient for what we wanted and also &#8220;correct usage&#8221;.</p>
<p>While working through our first project we ran into issues with this structure of forms.  I didn&#8217;t run into any problems but in order to stop the complaints from the designers in our office I decided to work on getting <a href="http://framework.zend.com/manual/en/zend.form.html" title="Zend Form" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Form</a> to generate forms in the style laid out at <a href="http://www.alistapart.com/articles/prettyaccessibleforms" title="Prettier Accessible Forms" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.alistapart.com');">A List Apart.</a></p>
<p>I didn&#8217;t figure this would really be all that difficult because most of the documentation for <a href="http://framework.zend.com" title="Zend Framework" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Framework</a> fairly good.  Little did I know that the documentation and examples for <a href="http://framework.zend.com/manual/en/zend.form.html" title="Zend Form" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Form</a> with <a href="http://framework.zend.com/manual/en/zend.config.html" title="Zend Config" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Config</a> were fairly hard to find.  When I did find documentation the decorators stilled confused me for a while.  Then everything just seemed to click one day and I was successful in getting exactly what I wanted.  Now I don&#8217;t have designers complaining anymore because they have forms structured exactly the way they want(Sorry Rob <img src='http://www.chrisantoine.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).  In order to get the results I wanted I ended up with a form defined in my ini file like the following:</p>
<pre>
[signInForm]
form.id = "signInForm"
form.method = "post"
form.action = "/sign-in/"

; Form Decorators
form.disableLoadDefaultDecorators = true
form.decorators.formElements.decorator = "FormElements"
form.decorators.description.decorator = "Description"
form.decorators.form.decorator = "Form"

; Global Element Decorators
form.elementDecorators.decorator = "ViewHelper"
form.elementDecorators.error.decorator = "Errors"
form.elementDecorators.description.decorator = "Description"
form.elementDecorators.label.decorator = "Label"
form.elementDecorators.formElements.decorator = "HtmlTag"
form.elementDecorators.formElements.options.tag = "li"

; Group Decorators
form.displayGroupDecorators.decorator = "FormElements"
form.displayGroupDecorators.formElements.decorator = "HtmlTag"
form.displayGroupDecorators.formElements.options.tag = "ol"
form.displayGroupDecorators.fieldset.decorator = "FieldSet"

; Form Groups
form.displayGroups.signinGroup.elements.username    = "username"
form.displayGroups.signinGroup.elements.password    = "password"
form.displayGroups.signinGroup.elements.rememberMe  = "rememberMe"

form.displayGroups.submitGroup.elements.submit = "submit"

; username element
form.elements.username.type = "text"
form.elements.username.options.validators.notempty.validator = "NotEmpty"
form.elements.username.options.validators.notempty.breakChainOnFailure = true
form.elements.username.options.validators.strlen.validator = "StringLength"
form.elements.username.options.validators.strlen.options.min = 6
form.elements.username.options.validators.strlen.options.max = 20
form.elements.username.options.required = true
form.elements.username.options.label = "Username:"

; password element
form.elements.password.type ="password"
form.elements.password.options.validators.notempty.validator = "NotEmpty"
form.elements.password.options.validators.notempty.breakChainOnFailure = true
form.elements.password.options.validators.strlen.validator = "StringLength"
form.elements.password.options.validators.strlen.options.min = "6"
form.elements.password.options.required = true
form.elements.password.options.label = "Password:"

; remember me element
form.elements.rememberMe.type = "checkbox"
form.elements.rememberMe.options.label = "Remember Me?"

; login button element
form.elements.submit.type = "button"
form.elements.submit.options.name = "SignIn"
form.elements.submit.options.value = "Sign In"
form.elements.submit.options.label = "Sign In"
</pre>
<p>I hope this helps someone else as I could not find a good solid example of how to get this working.  If anyone has any feedback on a better way of handling this let me know in the comments.<br />
Thanks,<br />
Chris</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/07/15/prettier-accessible-forms-with-zend-form-and-zend-config/feed/</wfw:commentRss>
		</item>
		<item>
		<title>UniqueField Validate Helper</title>
		<link>http://www.chrisantoine.net/2008/07/14/uniquefield-validate-helper/</link>
		<comments>http://www.chrisantoine.net/2008/07/14/uniquefield-validate-helper/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 03:56:30 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Zend Framework]]></category>

		<category><![CDATA[Helpers]]></category>

		<category><![CDATA[Validate Helper]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=21</guid>
		<description><![CDATA[The last 4 projects that I have created I have built using Zend Framework.  The more I use it the more I find things that make my life easier.  My first shot at creating a validator was for checking whether or not a username is unique.  .  I need this functionality [...]]]></description>
			<content:encoded><![CDATA[<p>The last 4 projects that I have created I have built using Zend Framework.  The more I use it the more I find things that make my life easier.  My first shot at creating a validator was for checking whether or not a username is unique.  .  I need this functionality in pretty much every application I build.  I realized while writing the same code again(more or less a copy and paste but still <img src='http://www.chrisantoine.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) in the 3 or 4th project that I should take advantage of the custom validators that I had read about but hadn&#8217;t tackled.</p>
<p>The following is probably revision 2 of the original idea.  I realized after writing it the first time I should have made it more generic so I could use it on multiple fields without changing anything except the properties in the config ini for each form field.</p>
<p>To add the validator to a field using Zend Config you would do the following:</p>
<pre>
        form.elements.email.options.validators.uniqueField.validator = "uniqueField"
        form.elements.email.options.validators.uniqueField.options.modelName = "Notification"
        form.elements.email.options.validators.uniqueField.options.fieldname = "notification_email"
</pre>
<pre>
<code class="php">
< ?php
class Robyn_Validate_UniqueField extends Zend_Validate_Abstract
{
    /**
     * @var String
     */
    const NOT_UNIQUE = 'error';

    /**
     * @var String
     */
    protected $_modelName = 'User';

    /**
     * @var String
     */
    protected $_fieldName = 'user_username';

    /**
     * @var array
     */
    protected $_messageTemplates = array(
                                         self::NOT_UNIQUE => &#8216;The data given is not unique.&#8217;
                                         );

    /**
     * Sets validator options
     *
     * @param  string $modelName
     * @param  string $fieldName
     * @return void
     */
    public function __construct($modelName = &#8216;User&#8217;, $fieldName = &#8216;user_username&#8217;)
    {
        $this->setModelName($modelName);
        $this->setFieldName($fieldName);
    }

    /**
     * Defined by Zend_Validate_Interface
     *
     * Returns true if and only if the email address is found to NOT have a match in the fieldname in the model specified
     *
     * @param Array $value
     * @param Array $request
     * @return boolean
     */
    public function isValid($value, $request = null)
    {
        // Set the value
        $value = (string) $value;
        $this->_setValue($value);

        // Get our model and do a search for that username
        $table = new $this->_modelName();
        $result = $table->fetchAll($table->select()->where($this->_fieldName . &#8216; = ?&#8217;, $value))->toArray();

        // Check to see if we got any results
        if (count($result) == 0) {
            return true;
        }

        $this->_error(self::NOT_UNIQUE);
        return false;
    }

    /**
     * Set the model name.
     *
     * @param string $modelName
     * @return Zend_Validate_UniqueUsername Provides a fluent interface
     */
    public function setModelName($modelName)
    {
        $this->_modelName = $modelName;

        return $this;
    }

    /**
     * Set the field name.
     *
     * @param string $fieldName
     * @return Zend_Validate_UniqueUsername Provides a fluent interface
     */
    public function setFieldName($fieldName)
    {
        $this->_fieldName = $fieldName;

        return $this;
    }
}
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/07/14/uniquefield-validate-helper/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zend History Action Helper(Codeutopia)</title>
		<link>http://www.chrisantoine.net/2008/07/14/zend-history-action-helpercodeutopia/</link>
		<comments>http://www.chrisantoine.net/2008/07/14/zend-history-action-helpercodeutopia/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 03:42:31 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=17</guid>
		<description><![CDATA[Back a few weeks ago I came across a very handy Zend Framework Helper for tracking a user’s browsing history(here).  I was needing something very similar for a project I was working on, actually I need it for most projects I work on.  While implementing it I noticed there were some things that I wanted [...]]]></description>
			<content:encoded><![CDATA[<p>Back a few weeks ago I came across a very handy <a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html" title="Zend Framework Helpers" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Framework Helper</a> for tracking a user’s browsing history(<a href="http://codeutopia.net/blog/2008/03/07/tracking-the-users-browsing-history-with-php/" title="Codeutopia" onclick="javascript:pageTracker._trackPageview ('/outbound/codeutopia.net');" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/codeutopia.net');">here</a>).  I was needing something very similar for a project I was working on, actually I need it for most projects I work on.  While implementing it I noticed there were some things that I wanted to modify in order to get the true functionality I needed.</p>
<p>The modifications were pretty basic in that the code was tracking ALL requests and there are a few requests that I did not want to track(namely Ajax and page reloads).  By not tracking these requests I feel I get a much more accurate representation of the path the user is following through the application.  The one thing I am still yet to conquer is how to find out if a requests is triggering a 404 page and if so to not track it.  I’m not sure that it is even possible because of when the helper is triggered but I haven’t delved very deep either(just something I want to put in at some point but if you know how let me know in the comments).So without further ado the code:</p>
<pre>
<code class="php">
&lt;?php
Zend_Loader::loadClass('Zend_Controller_Action_Helper_Abstract');
Zend_Loader::loadClass('Zend_Controller_Action_HelperBroker');
Zend_Loader::loadClass('Zend_Session_Namespace');
/**
* This helper tracks the user's browsing history
*
* @copyright 2008 Jani Hartikainen &lt;www.codeutopia.net&gt;
* @author Jani Hartikainen &lt;firstname at codeutopia net&gt;
* @author Chris Antoine &lt;chris@spinweb.net&gt;(Modifications)
*/
class SoulOpinion_Action_Helper_History extends Zend_Controller_Action_Helper_Abstract
{
/**
* @var Zend_Session_Namespace
*/
private $_namespace;

/**
* How many history URLs to track?
*
* @var int
*/
private $_trackAmount = 0;

/**
* Track Ajax Requests?
*
* @var int
*/
private $_ajax = 0;

/**
* Current URL
*
* @var string
*/
private $_currentUrl = null;

/**
* @param int $trackAmount [optional] How many history URLs to track
*/
public function __construct($trackAmount = 5)
{
$this-&gt;setTrackAmount($trackAmount);

$this-&gt;_initSession();
}

/**
* Initialize the history from session
*/
private function _initSession()
{
$this-&gt;_namespace = new Zend_Session_Namespace('Zend_Controller_Action_Helper_History');

// Break out if we don't want to track the request
if ($this-&gt;trackableRequest() == false) {
return true;
}

if (!is_array($this-&gt;_namespace-&gt;history)) {
$this-&gt;_namespace-&gt;history = array();

if(!empty($_SERVER['HTTP_REFERER'])) {
array_unshift($this-&gt;_namespace-&gt;history, $_SERVER['HTTP_REFERER']);
}
} else {
array_splice($this-&gt;_namespace-&gt;history, $this-&gt;_trackAmount);
}
}

public function preDispatch()
{
$urlHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Url');
$this-&gt;_currentUrl = $urlHelper-&gt;url();

// Break out if we don't want to track the request
if ($this-&gt;trackableRequest() == false) {
return true;
}

if (!is_array($this-&gt;_namespace-&gt;history)) {
$this-&gt;_namespace-&gt;history = array();
}

array_unshift($this-&gt;_namespace-&gt;history, $this-&gt;_currentUrl);
}

/**
* Set how many history URLs to track
*
* @param int $trackAmount
*/
public function setTrackAmount($trackAmount)
{
$this-&gt;_trackAmount = $trackAmount;
}

/**
* Redirects the browser back in history
*
* @param int $amount How many URLs to go back
*/
public function goBack($amount = 1)
{
Zend_Controller_Action_HelperBroker::getStaticHelper('Redirector')
-&gt;setPrependBase(false)
-&gt;gotoUrl($this-&gt;_namespace-&gt;history[$amount]);
}

/**
* Returns an URL from history
*
* @param int $amount How many URLs to go back
* @return string
*/
public function getPreviousUrl($amount = 1)
{
return $this-&gt;_namespace-&gt;history[$amount];
}

/**
* Return all previous URLs
*
* @return array
*/
public function getArray()
{
return $this-&gt;_namespace-&gt;history;
}

public function getName()
{
return 'History';
}

/**
* Validate that we want to track the request
*
* @return Boolean
*/
private function trackableRequest()
{
// Decide whether or not we should track Ajax Requests
if ($this-&gt;_ajax == 0) {
Zend_Loader::loadClass('Zend_Controller_Request_Http');
$request = new Zend_Controller_Request_Http();

if ($request-&gt;isXmlHttpRequest()) {
return false;
}
}

// Now we are going to verify the user didn't just reload the page or click the same link.
// No reason to track page reloads.
if ($this-&gt;_currentUrl == $this-&gt;_namespace-&gt;history[0]) {
return false;
}

// Need to come up with a way to check for a 404 error so we don't track bad requests.

return true;
}
}
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/07/14/zend-history-action-helpercodeutopia/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Robyn</title>
		<link>http://www.chrisantoine.net/2008/07/14/robyn/</link>
		<comments>http://www.chrisantoine.net/2008/07/14/robyn/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 03:04:36 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[My Projects]]></category>

		<category><![CDATA[Online Scheduling]]></category>

		<category><![CDATA[Robyn]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=20</guid>
		<description><![CDATA[At SpinWeb we have started creating an online scheduling application, Robyn.  Our goal is to make the best online scheduling app.  Obviously that may be a little lofty but we have to have a goal in mind :-).  We have launched the first &#8220;teaser&#8221; page so go signup for the mailing list and we&#8217;ll get [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.spinweb.net" title="SpinWeb, Inc." target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.spinweb.net');">SpinWeb</a> we have started creating an online scheduling application, <a href="http://www.getrobyn.com" title="Robyn" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.getrobyn.com');">Robyn</a>.  Our goal is to make the best online scheduling app.  Obviously that may be a little lofty but we have to have a goal in mind :-).  We have launched the first &#8220;teaser&#8221; page so go signup for the mailing list and we&#8217;ll get you into our beta testing later this year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/07/14/robyn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zend Coding Standards</title>
		<link>http://www.chrisantoine.net/2008/05/07/zend-coding-standards/</link>
		<comments>http://www.chrisantoine.net/2008/05/07/zend-coding-standards/#comments</comments>
		<pubDate>Thu, 08 May 2008 01:25:16 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Coding Standards]]></category>

		<category><![CDATA[Zend]]></category>

		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=15</guid>
		<description><![CDATA[I&#8217;ve always adhered to my own &#8220;standards&#8221; when writing code but once I started working more with other developers I realized that we didn&#8217;t agree on what the &#8220;right&#8221; way of writing code was.  Most of it was just simple things like does the curly brace go on the same line or on the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always adhered to my own &#8220;standards&#8221; when writing code but once I started working more with other developers I realized that we didn&#8217;t agree on what the &#8220;right&#8221; way of writing code was.  Most of it was just simple things like does the curly brace go on the same line or on the next line.  At <a href="http://www.spinweb.net" title="SpinWeb, Inc." target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.spinweb.net');">SpinWeb</a> we have had coding standards in place for a while.  We all kinda loosely followed the standards because they were in place pretty much before we got there and they didn&#8217;t fit with how each of us felt.</p>
<p>While looking at using the <a href="http://framework.zend.com" title="Zend Framework" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Framework</a> for our work at <a href="http://www.spinweb.net" title="SpinWeb, Inc." target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.spinweb.net');">SpinWeb</a> I came across the coding standards and realized there are a lot of benefits to having someone else set the standards.  Just one example is there are less discussions on the &#8220;right&#8221; way and we can make small modifications if we all agree but otherwise we just live with the <a href="http://framework.zend.com/manual/en/coding-standard.html" title="Zend Framework Coding Standards" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">standards</a> that Zend has laid out.</p>
<p>What I have come realize is that even while I was always trying to follow my own standards I would always stretch them when I was in a hurry or something else had my attention and since they were my own standards it wasn&#8217;t that big of a deal[for some reason].  I&#8217;ve been doing my best to follow the <a href="http://framework.zend.com/manual/en/coding-standard.html" title="Zend Coding Standards" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Coding Standards</a> for a couple months now and everything has really become habit and I find myself really pushing myself more and more to follow the standards.</p>
<p>If you run into the same types of issues or just want more &#8220;official&#8221; standards Zend has a nice start.</p>
<p><a href="http://framework.zend.com/manual/en/coding-standard.html" title="Zend Coding Standards" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Coding Standard</a><br />
<a href="http://framework.zend.com" title="Zend Framework" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/framework.zend.com');">Zend Framework</a><br />
<a href="http://www.spinweb.net" title="SpinWeb, Inc." target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.spinweb.net');">SpinWeb, Inc.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/05/07/zend-coding-standards/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript print_r()</title>
		<link>http://www.chrisantoine.net/2008/05/02/javascript-print_r/</link>
		<comments>http://www.chrisantoine.net/2008/05/02/javascript-print_r/#comments</comments>
		<pubDate>Sat, 03 May 2008 00:23:42 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[print_r]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=18</guid>
		<description><![CDATA[If you are anything like me I constantly fight with having an object/array in JS and I want to see what all of its properties are.  I ran into this the other day and decided to actually find a solution to the problem of not knowing what properties there are for an event.  [...]]]></description>
			<content:encoded><![CDATA[<p>If you are anything like me I constantly fight with having an object/array in JS and I want to see what all of its properties are.  I ran into this the other day and decided to actually find a solution to the problem of not knowing what properties there are for an event.  While doing some searching I came across <a href="http://www.brandnewbox.co.uk/logbook/article/a_print_r_equivalent_for_javascript/" title="brandnewbox.co.uk" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.brandnewbox.co.uk');">this</a> site.  It has been a great solution to what I needed.  The code is as follows:</p>
<pre>   <code class="javascript">
function print_r(theObj){
   if(theObj.constructor == Array || theObj.constructor == Object){
      document.write("&lt;ul&gt;")
      for(var p in theObj){
         if(theObj[p].constructor == Array || theObj[p].constructor == Object){
            document.write("&lt;li&gt;["+p+"] => "+typeof(theObj)+"&lt;/li&gt;");
            document.write("&lt;ul&gt;")
            print_r(theObj[p]);
            document.write("&lt;/ul&gt;")
         } else {
            document.write("&lt;li&gt;["+p+"] => "+theObj[p]+"&lt;/li&gt;");
         }
      }
      document.write("&lt;/ul&gt;")
   }
}
 </code></pre>
<p>Its a pretty simple little snippet of code but was VERY handy for me while troubleshooting an event problem and having to deal with each individual browser as each of them have different event properties.  Hope it helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/05/02/javascript-print_r/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Wordpress Excerpts - &#8220;Read More&#8221;</title>
		<link>http://www.chrisantoine.net/2008/04/02/using-wordpress-excerpts-read-more/</link>
		<comments>http://www.chrisantoine.net/2008/04/02/using-wordpress-excerpts-read-more/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 16:52:33 +0000</pubDate>
		<dc:creator>Jeff Rothe</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=6</guid>
		<description><![CDATA[I got asked this question today;

I’d like my postings to be condensed with some type of “Read More” link at the bottom to expand them for reading

Having an additional link to &#8220;read more&#8221; in your Wordpress posting is a great idea for a couple of reasons.  
The first reason is a matter of preference. [...]]]></description>
			<content:encoded><![CDATA[<p>I got asked this question today;</p>
<blockquote><p>
I’d like my postings to be condensed with some type of “Read More” link at the bottom to expand them for reading
</p></blockquote>
<p>Having an additional link to &#8220;read more&#8221; in your Wordpress posting is a great idea for a couple of reasons.  </p>
<p><strong>The first reason is a matter of preference.</strong>  By default, Wordpress will use the built in function of &#8220;the_content&#8221;, which is located in at least one file in your default theme directory, the homepage file which is the &#8220;index.php&#8221; file.  What this means is that Wordpress will show full posts, with the title being a link to the full post in the &#8220;single.php&#8221; where a user can comment on your post and see other additional information.  If you don&#8217;t make any to the default theme, Wordpress will show something like 10 posts on your homepage, and depending on your ability to write concisely:) you can have a long scrolling page.  This is a preference, some people don&#8217;t mind this, others really don&#8217;t like it at all.</p>
<p><strong>The second reason, and the more important reason for having &#8220;excerpts&#8221; is for search engine reasons.</strong>  Google doesn&#8217;t like duplicate content, within a site, or one website that has plagerized another.  You have the possibility of being black listed for blantant obvious violations.  So, using the power of having an &#8220;excerpt&#8221; allows you to either write a custom hook for your homepage to lure in readers to the article, or you can just insert a tag to use a portion of the already written post as the hook.</p>
<h3>How to change your theme to use excerpts</h3>
<p>Again, in the post gui, you have a &#8220;more&#8221; button that you can insert some text called &#8220;<!-more->&#8221; and this will automatically cut off your post and make an excerpt for you.  But, if you would like to option to not have to remember to add that snippet of code every time you post, and have the excerpts happen automatically, you set that up by modifying your theme. Open up your index.php file in your default theme folder and look at approximately line 14 where you will see this code inside the php tags;</p>
<p><strong>php the_content(&#8217;Read the rest of this entry &raquo;&#8217;);</strong></p>
<p>Change that line to read this instead;</p>
<p><strong>php the_excerpt();</strong></p>
<p>More information about this template tag / function / class or whatever you want to call it:) is located in the <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/codex.wordpress.org');">Wordpress codex on the_excerpt</a> (which is a programmers term for code manual).</p>
<h3>How I use excerpts on my blog</h3>
<p>I wasn&#8217;t satisfied with the fuction that the Wordpress developers provide.  The problem I had with the_excerpt, is that it strips html.  So your posts will look like a non-formatted, run on mess.  I felt like strongly about being as customizable as possible, and frankly, more professional as a designer.  I don&#8217;t know much about php, so I wouldn&#8217;t be able to hack the core code.  Besides, I wouldn&#8217;t want to, because my changes would have to ported over each time I upgraded my version of Wordpress.</p>
<p>So, I found a great little plugin for Wordpress that allows me to format my excerpts all I like.  It&#8217;s called <a href="http://robsnotebook.com/the-excerpt-reloaded/" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/robsnotebook.com');">The Excerpt Reloaded</a>, and it let&#8217;s you set a ton of options like excerpt length, the name of your &#8220;read more&#8221; link, the allowed html in the excerpt and more. </p>
<p>Here is a screenshot from Rotheblog showing how I have been able to use both div&#8217;s and images and other formatting in my excerpts to make the hook for the post really appealing;</p>
<div class="centerBorder"><img src="/images/wordpress/excerptreload_screen.jpg" alt="The Excerpt Reloaded Configured Screen" /></div>
<p>Make sure to use version R1.4, and not R1.1.  Version R1.1 had issues where it wouldn&#8217;t close the allowed tags which would then close a tag in the layout of the site and break the visual look.  Fortunately another developer took over and made those changes, but you will want to look at the <a href="http://guff.szub.net/2005/02/26/the_excerpt-reloaded/" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/guff.szub.net');">original Excerpt Reloaded page</a> to see all the template tag parameters for setting up your excerpt.</p>
<h5>Questions? Comments?</h5>
<p>Leave a comment.  Has anyone modified the code base for Wordpress to leverage the_excerpt template tag to do the same thing as the plugin?  I&#8217;d love to hear about it if you have.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/04/02/using-wordpress-excerpts-read-more/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blog Indiana Conference - August 2008</title>
		<link>http://www.chrisantoine.net/2008/03/29/blog-indiana-conference-august-2008/</link>
		<comments>http://www.chrisantoine.net/2008/03/29/blog-indiana-conference-august-2008/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 21:57:23 +0000</pubDate>
		<dc:creator>Jeff Rothe</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=5</guid>
		<description><![CDATA[
The Blog Indiana Conference has been in the works now for at least five months, if not a lot longer.  There are a handful of individuals who, tired of all of the great technology conferences taking place in cities on the east and west coast, decided to plan the conference themselves.  The conference [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/misc/blogindiana_logo.gif" alt="Blog Indiana Logo" class="floatrightbor" /></p>
<p>The <a href="http://conference.blogindiana.com" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/conference.blogindiana.com');">Blog Indiana Conference</a> has been in the works now for at least five months, if not a lot longer.  There are a handful of individuals who, tired of all of the great technology conferences taking place in cities on the east and west coast, decided to plan the conference themselves.  The conference will be great for individuals interested in learning more about blogging with topics ranging from &#8220;Basics of Blogging&#8221; to &#8220;Web Analytics&#8221; and &#8220;Driving Traffic&#8221;.</p>
<p><img src="/images/misc/thepoint_logo.jpg" alt="The Point Logo" class="floatleftbor" /></p>
<p>The planning for the Blog Indiana conference started as a campaign on &#8220;<a href="http://www.thepoint.com" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.thepoint.com');">The Point.com</a>&#8220;.  There were a number of local Indianapolis bloggers who supported the campaign, trying to get the necessary funds to hold the blogging event.  But the blog conference organizers announced this past week that they found two sponsors, IUPUI and Compedium Blogware, and that the conference was going to be held in August on IUPUI&#8217;s campus.</p>
<p>Not only is this news exciting just because the conference is happening here locally, but the fact that there is a limit of only 250 spots for the conference is a huge plus.  The other huge plus is the affordable price tag, only $49.00 for two days! Wow.</p>
<p>I have my reservations about the first conference.  I will be attending, but I am looking for some very useful information on how to monetize my blog.  Some of the local blogging talent has been announced, but I don&#8217;t know anything about the listed individuals.  The topics haven&#8217;t been assigned, so it is hard to tell the how useful the information will be.  Will the tips given be very specific to the grassroots success that worked for these bloggers?  Will their knowledge be very specific to their topic area?  They may be able to write, but are they good speakers?</p>
<p>The only other reservation I have is Noah Coffey (Coffey Design.com), one of the organizers.  Another contact of mine recommended that I hook up with Noah if I had any excess work, or any programming work that where I would need a collaborator.  I emailed Noah directly using the contact form on his site, but I didn&#8217;t get a reply.  I would think that any work referral is a great thing, but maybe not.  I am hoping that Noah&#8217;s just didn&#8217;t get my email, or just made a mistake and missed it somehow, then I can excuse a lapse in manners. To plan an event like this takes some serious dedication, so I have to believe that how the conference is run does not reflect how he responds to work request through his web development business.</p>
<p>Do the research yourself about the Blog Indiana conference.  I will be reading more about the speakers, and for $50.00 for two days with networking in a small friendly setting, you can hardly go wrong no matter the content.  I imagine that the first conference will have some success hiccups and some lapses in content.  But as a local designer and blogger, we need to support this effort and continue for years to come to keep such a great conference coming back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/03/29/blog-indiana-conference-august-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Beginning</title>
		<link>http://www.chrisantoine.net/2008/03/19/the-beginning/</link>
		<comments>http://www.chrisantoine.net/2008/03/19/the-beginning/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 21:32:15 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Developer]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[SpinWeb]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.chrisantoine.net/?p=3</guid>
		<description><![CDATA[This is the beginning of what will hopefully become a regular place for me to share all those things I come across that should be shared.  I guess I should start with some general information about me.  My name is Chris Antoine(if you hadn&#8217;t figured that out then just leave now), I&#8217;m 25 [...]]]></description>
			<content:encoded><![CDATA[<p>This is the beginning of what will hopefully become a regular place for me to share all those things I come across that should be shared.  I guess I should start with some general information about me.  My name is Chris Antoine(if you hadn&#8217;t figured that out then just leave now), I&#8217;m 25 and live in Fishers, IN.  My career and my primary hobby are one in the same&#8230;.Programming.</p>
<p>I currently work for <a href="http://www.spinweb.net" title="SpinWeb, Inc." target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.spinweb.net');">SpinWeb, Inc.</a> as a Media Developer.  My primary day to day job includes PHP/JavaScript programming (MySQL if you want to include that into programming) and I have been working with PHP for 7 years.  I am currently using the Zend Framework and jQuery as my base structure for building all my apps.</p>
<p>My latest personal project is an application currently with no name.  It will be an application that hopefully I will be able to share VERY soon.  It is very much a niche application but currently it does not have any competition and it doesn&#8217;t appear that anyone is really interested in solving the problems for the industry.  I believe no one is solving the problems because everyone involved is only looking out for number one.  Which is how I got involved anyway but the application will be expanded to help more than just number one.</p>
<p>Chris</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisantoine.net/2008/03/19/the-beginning/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
