<?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>Andrew Vayanis</title>
	<atom:link href="http://www.vayanis.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vayanis.com</link>
	<description>Developer, Gamer, Thinker</description>
	<pubDate>Wed, 07 May 2008 15:05:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Using Subversion with Network Drives in OS X</title>
		<link>http://www.vayanis.com/2008/05/04/using-subversion-with-network-drives-in-os-x/</link>
		<comments>http://www.vayanis.com/2008/05/04/using-subversion-with-network-drives-in-os-x/#comments</comments>
		<pubDate>Mon, 05 May 2008 01:55:05 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[OS X]]></category>

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

		<guid isPermaLink="false">http://www.vayanis.com/?p=33</guid>
		<description><![CDATA[Ever try to get subversion working between multiple Macs over a home network without WEB Dav or public key authentication over ssh?  Well, that was what I was trying to accomplish over this weekend and it apparently isn&#8217;t as straightforward as I thought.  There seems to be an issue with subversion (SVN) and [...]]]></description>
			<content:encoded><![CDATA[<p>Ever try to get subversion working between multiple Macs over a home network without WEB Dav or public key authentication over ssh?  Well, that was what I was trying to accomplish over this weekend and it apparently isn&#8217;t as straightforward as I thought.  There seems to be an issue with <a href="http://subversion.tigris.org/">subversion (SVN)</a> and apple&#8217;s AFP protocol, something to do with not being able to obtain exclusive locks?  Well, that is all I could find on the problem.  So, if anyone knows how to fix this, I would like to know.  However, I did find another solution on my own, that was just as useful to me as using an AFP mounted drive, but much more versatile.  Intoducing&#8230; <a href="http://code.google.com/p/macfuse/">MacFUSE</a>!<br />
<span id="more-33"></span></p>
<blockquote><p>MacFUSE implements a mechanism that makes it possible to implement a fully functional file system in a user-space program on Mac OS X (10.4 and above).</p></blockquote>
<p>In a nutshell, MacFUSE lets you turn any number of connection interfaces into a fully functional file system.  With the files provided in the link above, you can mount an FTP or SSH login as a network drive, thus solving my issue of using subversion over a network drive.  The best part is, I can now easily access my Mac Pro remotely as well.  Although, now that I think about it, I have never tried to mount a remote drive over AFP so that could have always been possible.</p>
<p>I have to admit this is my new favorite development tool since it makes working remotely much more pleasant.  Instead of opening files one at a time through <a href="http://cyberduck.ch/">Cyberduck</a>, my FTP client, and <a href="http://macromates.com/">Textmate</a>, I can now mount my FTP account as a network drive and create projects with Textmate to edit all my files.  This also happens to be a great solution for all the people wishing for FTP support within Textmate.</p>
<p>Anyhow, I hope this can be of help to someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2008/05/04/using-subversion-with-network-drives-in-os-x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating Tables with Zend_Form</title>
		<link>http://www.vayanis.com/2008/03/26/creating-tables-with-zend_form/</link>
		<comments>http://www.vayanis.com/2008/03/26/creating-tables-with-zend_form/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 05:47:17 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://www.vayanis.com/2008/03/26/creating-tables-with-zend_form/</guid>
		<description><![CDATA[I recently published an article trying to shed some light on the Zend_Form component, in particular, when using it with Zend_Config_Ini.  In the article I presented a config I developed while trying to learn Zend_Form myself, but unfortunately realized that using generic elementDecorators comes with a price.

Apparently, using elementDecorators overrides individual element level decorators. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently published an <a href="http://www.vayanis.com/2008/03/17/using-zend_form-with-zend_config/">article</a> trying to shed some light on the <a href="http://framework.zend.com/manual/en/zend.form.html">Zend_Form</a> component, in particular, when using it with Zend_Config_Ini.  In the article I presented a config I developed while trying to learn Zend_Form myself, but unfortunately realized that using generic <em>elementDecorators</em> comes with a price.<br />
<span id="more-29"></span><br />
Apparently, using elementDecorators overrides individual element level decorators.  This leads to some unexpected and annoying results.  For instance, in my previous example, I lose the ability to hide or even add individual attributes to specific elements.  This leaves me with a form that has labels for each element including the submit button:<br />
<img src='http://www.vayanis.com/wp-content/uploads/2008/03/zend_form-table-login-1.png' alt='Zend Form Table Login with all Labels' /></p>
<p>The only way I found to correct this problem is to add decorators to each element individually.  This is highly redundant and hardly ideal, but it gives the control necessary to fix this problem.  It also bloats the config file significantly; previously, the config was 31 lines long, but now it is 47 lines long:</p>

<div class="wp_syntax"><div class="code"><pre class="ini"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>login<span style="">&#93;</span></span>
<span style="color: #666666; font-style: italic;">; General Form Information</span>
login.action <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;login/submit&quot;</span>
login.method <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;post&quot;</span>
login.id <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;login&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Form Decorators</span>
login.decorators.elements.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;FormElements&quot;</span>
login.decorators.table.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
login.decorators.table.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;table&quot;</span>
login.decorators.form.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Form&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Username Element</span>
login.elements.username.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;text&quot;</span>
login.elements.username.options.label <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Username:&quot;</span>
login.elements.username.options.required <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> true</span>
login.elements.username.options.validators.alnum.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;alnum&quot;</span>
login.elements.username.options.validators.regex.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;regex&quot;</span>
login.elements.username.options.validators.regex.options.pattern <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;/^[a-z]/i&quot;</span>
login.elements.username.options.validators.strlen.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;StringLength&quot;</span>
login.elements.username.options.validators.strlen.options.min <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;5&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Username Decorators</span>
login.elements.username.options.decorators.helper <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;ViewHelper&quot;</span>
login.elements.username.options.decorators.tableData.decorator.td <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
login.elements.username.options.decorators.tableData.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
login.elements.username.options.decorators.label.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Label&quot;</span>
login.elements.username.options.decorators.label.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
login.elements.username.options.decorators.tableRow.decorator.tr <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
login.elements.username.options.decorators.tableRow.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;tr&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Password Element</span>
login.elements.password.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;password&quot;</span>
login.elements.password.options.label <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Password:&quot;</span>
login.elements.password.options.required <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> true</span>
login.elements.password.options.validators.strlen.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;StringLength&quot;</span>
login.elements.password.options.validators.strlen.options.min <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;6&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Password Decorators</span>
login.elements.password.options.decorators.helper <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;ViewHelper&quot;</span>
login.elements.password.options.decorators.tableData.decorator.td <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
login.elements.password.options.decorators.tableData.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
login.elements.password.options.decorators.label.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Label&quot;</span>
login.elements.password.options.decorators.label.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
login.elements.password.options.decorators.tableRow.decorator.tr <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
login.elements.password.options.decorators.tableRow.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;tr&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Submit Form Element</span>
login.elements.submit.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;submit&quot;</span>
login.elements.submit.options.label <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Submit&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Submit Decorators</span>
login.elements.submit.options.decorators.helper <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;ViewHelper&quot;</span>
login.elements.submit.options.decorators.tableData.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
login.elements.submit.options.decorators.tableData.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
login.elements.submit.options.decorators.label.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Label&quot;</span>
login.elements.submit.options.decorators.label.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
login.elements.submit.options.decorators.label.options.class <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;submit&quot;</span>
login.elements.submit.options.decorators.tableRow.decorator.tr <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
login.elements.submit.options.decorators.tableRow.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;tr&quot;</span></pre></div></div>

<p>Personally, I think this is poor design and feel it may even be a bug, but I will attempt to submit it to ZF&#8217;s issue tracker and see what they say.  Otherwise though, I still feel as though Zend_Form is a great component, and will continue to publish any discoveries I come across.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2008/03/26/creating-tables-with-zend_form/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Zend_Form with Zend_Config</title>
		<link>http://www.vayanis.com/2008/03/17/using-zend_form-with-zend_config/</link>
		<comments>http://www.vayanis.com/2008/03/17/using-zend_form-with-zend_config/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 05:35:41 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

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

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

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

		<category><![CDATA[Zend_Form Tables]]></category>

		<guid isPermaLink="false">http://www.vayanis.com/2008/03/17/using-zend_form-with-zend_config/</guid>
		<description><![CDATA[In my previous post Zend Framework, A First Look, I discussed the lacking nature of ZF&#8217;s documentation, in particular, with regards to Zend_Form.  I have since then learned that this is partly due to the fact that Zend_Form is a relatively new component.  However, I   still wanted to make use of [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post <a href="http://www.vayanis.com/2008/03/14/zend-framework-a-first-look/">Zend Framework, A First Look</a>, I discussed the lacking nature of ZF&#8217;s documentation, in particular, with regards to Zend_Form.  I have since then learned that this is partly due to the fact that Zend_Form is a relatively new component.  However, I   still wanted to make use of Zend_Form in my current project and decided to trudge through the learning curve of creating a simple custom login form in conjunction with Zend_Config; the end result being an easy to maintain, custom form and this guide.  Hopefully, this guide will make it easier for anyone else looking to take advantage of this very cool feature.<br />
<span id="more-28"></span><br />
Before I begin talking about how Zend_Form works, I think it is important to explain a bit about Zend_Config and how an INI file is translated into PHP.  As the <a href="http://framework.zend.com/manual/en/zend.config.html">Zend_Config Documentation</a> points out, it makes use of PHP native parse_ini_file, however, this only goes so far as reading in the contents of the file and turning it into a 1 dimensional associative array(2 if a section is provided).  Zend_Config extends this behavior by taking the keys of each association and breaking them down further based upon the specified <em>key separator (default is &#8216;.&#8217;).</em> and turning the remainder into arrays.  In the end, Zend_Config takes a series of declarations such as the following:</p>

<div class="wp_syntax"><div class="code"><pre class="ini">login.elements.username.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;text&quot;</span></pre></div></div>

<p>And turns it into:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #990000;">Array</span>
<span style="color: #009900;">&#40;</span>
    <span style="color: #009900;">&#91;</span>login<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">Array</span>
        <span style="color: #009900;">&#40;</span>
            <span style="color: #009900;">&#91;</span>elements<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">Array</span>
                <span style="color: #009900;">&#40;</span>
                    <span style="color: #009900;">&#91;</span>username<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">Array</span>
                        <span style="color: #009900;">&#40;</span>
                            <span style="color: #009900;">&#91;</span>type<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> text
                        <span style="color: #009900;">&#41;</span>
                <span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span></pre></div></div>

<p>Now, back to Zend_Form.  I think my biggest gripe with the documentation provided for Zend_Form is that it does not explain how anything is working behind the scenes.  For instance, it does not explain that Zend_Form normalizes config statements by prepending &#8217;set&#8217; when making calls to member methods.  This is invaluable as it explains why</p>

<div class="wp_syntax"><div class="code"><pre class="php">    <span style="color: #000033;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setElementDecorators</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ViewHelper'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>in PHP becomes</p>

<div class="wp_syntax"><div class="code"><pre class="ini">    elementDecorators.helper <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;ViewHelper&quot;</span></pre></div></div>

<p>in a Zend_Config_Ini.  Internally, elementDecorators tells Zend_Form to call setElementDecorators();  This small example also shows why it is important to know how Zend_Config_Ini actually translates an INI to PHP&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #990000;">Array</span>
<span style="color: #009900;">&#40;</span>
    <span style="color: #009900;">&#91;</span>elementDecorators<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">Array</span>
        <span style="color: #009900;">&#40;</span>
            <span style="color: #009900;">&#91;</span>helper<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> ViewHelper
        <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span></pre></div></div>

<p>As we can see this declares an array of decorators to be passed into setElementDecorators();  The keys, in this case &#8220;helper&#8221;, do not necessarily matter as it is only needed to index the array, the values are what matter, as that is what is passed and used within Zend_Form.  Similarly, it is important to know that almost all aspects of form and form elements, excluding form element type, are implemented internally as options.  The following is an example INI file with comments explaining particular sections.</p>

<div class="wp_syntax"><div class="code"><pre class="ini">    <span style="color: #666666; font-style: italic;">; A basic Form config</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; First level attributes are automatically treated as options.</span>
    <span style="color: #000099;">action</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;login/submit&quot;</span>
    <span style="color: #000099;">method</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;post&quot;</span>
    <span style="color: #000099;">id</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;login&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Form Decorators</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Again these decorators are treated as options of the main form.</span>
    decorators.elements.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;FormElements&quot;</span>
    decorators.table.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
    decorators.table.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;table&quot;</span>
    decorators.form.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Form&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Username Element</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Form Element Type is specified explicityly, not as an option.</span>
    elements.username.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;text&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Username attributes (Label, Required, and validators are all</span>
    <span style="color: #666666; font-style: italic;">; declared as options).</span>
    elements.username.options.label <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Username:&quot;</span>
    elements.username.options.required <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> true</span>
    elements.username.options.validators.alnum.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;alnum&quot;</span>
    elements.username.options.validators.regex.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;regex&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Validator parameters such as pattern to regex are also</span>
    <span style="color: #666666; font-style: italic;">; declared as options. I have not looked into it, but I</span>
    <span style="color: #666666; font-style: italic;">; assume this is due to the way Zend_Validate handles its</span>
    <span style="color: #666666; font-style: italic;">; own constructors.</span>
    elements.username.options.validators.regex.options.pattern <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;/^[a-z]/i&quot;</span>
    elements.username.options.validators.strlen.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;StringLength&quot;</span>
    elements.username.options.validators.strlen.options.min <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;5&quot;</span></pre></div></div>

<p>Bringing it all together, the following is the first version of my login form.</p>

<div class="wp_syntax"><div class="code"><pre class="ini">    <span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>login<span style="">&#93;</span></span>
    <span style="color: #666666; font-style: italic;">; General Form Information</span>
    login.action <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;login/submit&quot;</span>
    login.method <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;post&quot;</span>
    login.id <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;login&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Form Decorators</span>
    login.decorators.elements.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;FormElements&quot;</span>
    login.decorators.table.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
    login.decorators.table.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;table&quot;</span>
    login.decorators.form.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Form&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Username Element</span>
    login.elements.username.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;text&quot;</span>
    login.elements.username.options.label <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Username:&quot;</span>
    login.elements.username.options.required <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> true</span>
    login.elements.username.options.validators.alnum.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;alnum&quot;</span>
    login.elements.username.options.validators.regex.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;regex&quot;</span>
    login.elements.username.options.validators.regex.options.pattern <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;/^[a-z]/i&quot;</span>
    login.elements.username.options.validators.strlen.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;StringLength&quot;</span>
    login.elements.username.options.validators.strlen.options.min <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;5&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Password Element</span>
    login.elements.password.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;password&quot;</span>
    login.elements.password.options.label <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Password:&quot;</span>
    login.elements.password.options.required <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> true</span>
    login.elements.password.options.validators.strlen.validator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;StringLength&quot;</span>
    login.elements.password.options.validators.strlen.options.min <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;6&quot;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">; Submit Form Element</span>
    login.elements.submit.type <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;submit&quot;</span>
    login.elements.submit.options.label <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Submit&quot;</span>
&nbsp;
    login.elementDecorators.viewHelper <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;ViewHelper&quot;</span>
    login.elementDecorators.errors <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Errors&quot;</span>
&nbsp;
    login.elementDecorators.tableData.decorator.td <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
    login.elementDecorators.tableData.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
    login.elementDecorators.tableData.options.class <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;test2&quot;</span>
&nbsp;
    login.elementDecorators.label.decorator <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Label&quot;</span>
    login.elementDecorators.label.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;td&quot;</span>
&nbsp;
    login.elementDecorators.tableRow.decorator.tr <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;HtmlTag&quot;</span>
    login.elementDecorators.tableRow.options.tag <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;tr&quot;</span></pre></div></div>

<p>This creates a login form with a username and password field along with a submit button.  However, instead of being wrapped in a definition list using definition titles for labels and definition data for input fields, I have wrapped the labels and input fields within a table similar to the google login form.  Notice though, that I have sectioned this form using <em>[login]</em>.  Tthis is so that I can define all my necessary forms in one forms.ini file and load each form by section.  I have also prepended each declaration with <em>login.</em> as a way to keep my form definitions organized and easy to read (to me at least).  </p>
<p>Concluding this guide, I would like to reiterate, how useful I think Zend_Form is as it solves one of the most tedious process for any PHP project; form creation and validation.  I hope it continues to evolve and mature, and I hope others find it as handy as I have.  Although, if anyone has an easier solution, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2008/03/17/using-zend_form-with-zend_config/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zend Framework, A First Look</title>
		<link>http://www.vayanis.com/2008/03/14/zend-framework-a-first-look/</link>
		<comments>http://www.vayanis.com/2008/03/14/zend-framework-a-first-look/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 14:32:16 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

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

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

		<guid isPermaLink="false">http://www.vayanis.com/2008/03/14/zend-framework-a-first-look/</guid>
		<description><![CDATA[Having used Code Igniter for some small projects at work, I recently decided to take the time to acquaint myself with the Zend Framework(ZF) so that I could build my own comparison between two of the most, in my opinion, developed and used PHP frameworks.  While I love the flexibility and functionality offered by [...]]]></description>
			<content:encoded><![CDATA[<p>Having used <a href="http://www.codeigniter.com">Code Igniter</a> for some small projects at work, I recently decided to take the time to acquaint myself with the <a href="http://framework.zend.com">Zend Framework</a>(ZF) so that I could build my own comparison between two of the most, in my opinion, developed and used PHP frameworks.  While I love the flexibility and functionality offered by ZF, I have become very frustrated and annoyed with some of their documentation.  Even though it is detailed and expansive, it is no where near complete and somewhat frustrating to use.<br />
<span id="more-27"></span><br />
Zend_Form is a great example of this incomplete documentation.  Conceptually, I think the Zend_Form is great. It offers very useful, and much needed functionality for creating and validating forms within pages and although it offers 4 pages of documentation and highlights many features, it barely touches upon one of its most useful features: the ability to create a form by passing the constructor a Zend_Config_Ini object.  In its simplest form this amounts to the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000033;">$loginForm</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Form<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Zend_Config_Ini<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/path/to/form/config'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'login'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><em>This will create a Zend_Form object by passing it a Zend_Config_Ini object.</em></p>
<p>Unfortunately, when you decide to build a custom form using Zend_Config, the documentation on how this actually works, is extremely sparse.  There are three examples of using the Zend_Config, however, they are not commented and there is no explanation as to how it works, there is only a weak reference to PHP object oriented code from which to draw conclusions from.  Maybe, I am too used to the <a href="http://java.sun.com/javase/6/docs/api/">Java API documentation</a>.</p>
<p>Anyways, after a few days with ZF, it has become apparent to me, that ZF is a very well written, powerful, extensible, and versatile PHP framework.  However, due to its incomplete documentation, I would argue that its&#8217; learning curve is fairly high, much higher than Code Igniter&#8217;s.  In time though, I am sure the ZF developers will realize this, and make the effort to provide better documentation.  In the meantime though, I am going to continue to use ZF and hopefully, take it upon myself to provide some insight; a Zend_Form tutorial using Zend_Config is already in the works.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2008/03/14/zend-framework-a-first-look/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Starcraft 2 - Terran Gameplay Trailer</title>
		<link>http://www.vayanis.com/2007/10/14/starcraft-2-terran-gameplay-trailer/</link>
		<comments>http://www.vayanis.com/2007/10/14/starcraft-2-terran-gameplay-trailer/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 06:13:52 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Gaming]]></category>

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

		<category><![CDATA[Starcraft 2]]></category>

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

		<guid isPermaLink="false">http://www.vayanis.com/2007/10/14/starcraft-2-terran-gameplay-trailer/</guid>
		<description><![CDATA[I am not sure if it wasn&#8217;t publicized or if I just missed it, but the Starcraft 2, Terran gameplay trailer has arrived (officially on Sept. 13th).  Even though my favorite race is Zerg, I was still excited to view this video.  I mean, after watching the first gameplay trailer highlighting the Protoss, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.starcraft2.com" title="Starcraft 2 Logo"><img src="http://www.vayanis.com/wp-content/uploads/2007/05/starcraft2_logo.thumbnail.jpg" title="Starcraft 2 Logo" alt="Starcraft 2 Logo" align="left" /></a>I am not sure if it wasn&#8217;t publicized or if I just missed it, but the Starcraft 2, Terran gameplay trailer has arrived (officially on Sept. 13th).  Even though my favorite race is Zerg, I was still excited to view this video.  I mean, after watching the first gameplay trailer highlighting the Protoss, who wouldn&#8217;t be excited.</p>
<p>Since I don&#8217;t play the game as much as I did when it first game out, I have no business trying to analyze the flaws of the original compared to what Blizzard has done and is doing with the sequel.  Therefore, I will stick to enumerating the new additions found in this latest gameplay trailer.<br />
<span id="more-25"></span></p>
<h4>Highlights</h4>
<ol>
<li>The Terran <em>Command Center</em> now doubles as an scv transport.  This gives Terrans unprecedented mobility when trying to rebuild.</li>
<li>Terran buildings now have modular addons.  Each addon, provides special functionality.  In particular, the <em>Reactor</em> allows buildings such as barracks to double their output capacity.</li>
<li>The new detector, the <em>Sensor Tower</em>, upgrades into a radar tower which has a much larger range and allows players to detect enemies in the fog of war.</li>
<li><em>Battlecruisers</em> (and possibly all major units) are upgraded individually.  This means you must spend resources per <em>Battlecruiser</em> to give them your choice between the old Yammator Canon and the new Plasma array.</li>
<li>The <em>Viking</em> is the new <em>Valkyrie</em>.  It deals area of effect (AOE) damage to capital airships, but thats not all.  It can also transform into a ground assault unit.</li>
<li>The <em>Banshee</em> is the new <em>Wraith</em>.  It is an air unit with the ability to cloak, but unlike the <em>Wraith</em>, it is armed with AOE missiles (This seems a bit too much considering the new Viking, so I wonder if it is only an Air to Ground attack unit).</li>
<li>As was seen in the original gameplay trailer, the <em>Reaper</em> is a new light ground unit with the ability to traverse terrain obstacles.  However, this new trailer highlights the <em>Reaper&#8217;s</em> new armament: demolition charges.  These demolition charges are basically land mines with timers.</li>
<li>The Terran <em>Command Center</em> now has the ability to transform into a planetary fortress, giving it a heavy artillery canon for defending against enemies.</li>
<li>The <em>Thor</em> is the new Terran heavy siege unit.  It looks like a cross between a <em>Battlecruiser</em> and a <em>Siege Tank</em> as it has both, powerful laser canons and a siege mode.</li>
<li>Replacing the <em>Vulture</em> is the <em>Cobra</em>, a fast ground attack vehicle armed with a rail gun.</li>
<li>Last, but not least, are the <em>Ghosts</em>.  However, <em>Ghosts</em> are no longer weak attack units.  They come with a new &#8220;sniper&#8221; attack that is a slow and high damage (one shot against marines).  In addition to the traditional nukes, <em>Ghosts</em> can call down drop pods which are basically paratroopers.  This should make base raids and sieges particularly interesting.</li>
</ol>
<p>Since this is the third time I have seen the gameplay trailer, I must admit, I am impressed with the direction of Starcraft 2.  Although it stays true to the original in terms of gameplay, this sequel adds many new dynamics to the game.  Each race we have seen so far looks like they will have many more options for building effective armies.  Micromanagement will again most likely separate good players from great players, and as I said in <a href="http://www.vayanis.com/2007/05/31/starcraft-2-no-longer-a-rumor/">my last post</a>, terrain will probably be a big part of the game.  All we need now, is the Zerg&#8217;s gameplay trailer so that we can marvel in what will be Starcraft 2.</p>
<h4>Trailer Download</h4>
<p><a href="http://starcraft2.com/movies.xml">Blizzard&#8217;s Starcraft 2 movie page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2007/10/14/starcraft-2-terran-gameplay-trailer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sending POST requests with PHP</title>
		<link>http://www.vayanis.com/2007/08/28/sending-post-requests-with-php/</link>
		<comments>http://www.vayanis.com/2007/08/28/sending-post-requests-with-php/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 16:13:06 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

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

		<guid isPermaLink="false">http://www.vayanis.com/2007/08/28/sending-post-requests-with-php/</guid>
		<description><![CDATA[I recently found myself writing a REST web service, which, in my opinion, is the easiest way to create a web service, for a project at work.  Using XML.com&#8217;s How to Create a REST protocol as my Guide, I went to work.  However, when I tried to create a service to update some [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found myself writing a REST web service, which, in my opinion, is the easiest way to create a web service, for a project at work.  Using XML.com&#8217;s <a href="http://www.xml.com/pub/a/2004/12/01/restful-web.html">How to Create a REST protocol</a> as my Guide, I went to work.  However, when I tried to create a service to update some data, I wasn&#8217;t sure how to send my data in a POST request using PHP.  After some stumbling around, I found what I was looking for on <a href="http://netevil.org/blog/2006/nov/http-post-from-php-without-curl">Wez Furlong&#8217;s blog</a> which led me to PHP&#8217;s documentation on <a href="http://www.php.net/manual/en/wrappers.http.php">HTTP and HTTPS wrappers</a>.</p>
<p>The following is a code snippet from the HTTP and HTTPS documentation that shows how to easily send data using HTTP POST:<br />
<span id="more-24"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000033;">$postdata</span> <span style="color: #339933;">=</span> http_build_query<span style="color: #009900;">&#40;</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'var1'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'some content'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'var2'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'doh'</span>
    <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000033;">$opts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http'</span> <span style="color: #339933;">=&gt;</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'method'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'POST'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'header'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Content-type: application/x-www-form-urlencoded'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'content'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000033;">$postdata</span>
    <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000033;">$context</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">stream_context_create</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$opts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000033;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://example.com/submit.php'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000033;">$context</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Quick Explanation</h3>
<ol>
<li><a href="http://us.php.net/http_build_query">http_build_query</a>: Generates an URL-encoded string from an associative array.  Example: array(&#8217;key1&#8242; => &#8216;value1&#8242;, &#8216;key2&#8242; => &#8216;value2&#8242;) becomes &#8220;key1=value1&#038;key2=value2&#8243;
<p>This properly encodes the data for the post transaction.</p>
</li>
<li><a href="http://us.php.net/manual/en/function.stream-context-create.php">stream_context_create</a>: Creates and returns a resource to a stream context from an associative array of arrays in the format <em>$arr[&#8217;wrapper&#8217;][&#8217;option&#8217;] = $value</em>
<p>This creates a linear output stream to be sent during the request transmission.</p>
</li>
<li><a href="http://us3.php.net/manual/en/function.file-get-contents.php">file_get_contents</a>: Acts exactly like file(); except that it reads an entire file into a string.
<p>This requests a file resource and puts the result into a string.</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2007/08/28/sending-post-requests-with-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Command Center version 0.1</title>
		<link>http://www.vayanis.com/2007/08/14/command-center-version-01/</link>
		<comments>http://www.vayanis.com/2007/08/14/command-center-version-01/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 20:06:44 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

		<guid isPermaLink="false">http://www.vayanis.com/2007/08/14/command-center-version-01/</guid>
		<description><![CDATA[After another week of configuring this site, I have found another gap in functionality that I would like to have for my Wordpress installation.  Namely, the ability to integrate or centralize my site&#8217;s external services.  For this reason, I have started my first Wordpress plugin, Command Center, as a way to give myself [...]]]></description>
			<content:encoded><![CDATA[<p>After another week of configuring this site, I have found another gap in functionality that I would like to have for my Wordpress installation.  Namely, the ability to integrate or centralize my site&#8217;s external services.  For this reason, I have started my first Wordpress plugin, <a href="http://www.vayanis.com/wp-command-center/" title="Command Center homepage">Command Center</a>, as a way to give myself and of course, anyone else who shares this need, a way to integrate certain external resources into their own Wordpess control panel.  This plugin is still far from being mature, but I think it is at least stable and usable as a way to store, access, and manage a list of links.</p>
<p><span id="more-22"></span></p>
<p>As always, I am still busy with my own job, family, and other personal projects, but I will make sure to update and enchance the plugin&#8217;s functionality regularly.</p>
<p>Feel free to visit  the <a href="http://www.vayanis.com/wp-command-center/" title="Command Center homepage">Command Center Homepage</a> for more information and/or updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2007/08/14/command-center-version-01/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress 2.2&#8217;s - Link Widget Validation Errors</title>
		<link>http://www.vayanis.com/2007/08/09/wordpress-22s-link-widget-validation-errors/</link>
		<comments>http://www.vayanis.com/2007/08/09/wordpress-22s-link-widget-validation-errors/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 05:24:01 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

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

		<category><![CDATA[XHTML/CSS]]></category>

		<guid isPermaLink="false">http://www.vayanis.com/2007/08/09/wordpress-22s-link-widget-validation-errors/</guid>
		<description><![CDATA[Wordpress has really come a long way since I first started using it back when it was version 1.0.  It now has a nice clean admin interface (although I am currently using the tiger style admin), a clean and simple installation script, and my new favorites, dynamic sidebars and widgets.  However, I noticed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wordpress.org" title="Wordpress homepage">Wordpress</a> has really come a long way since I first started using it back when it was version 1.0.  It now has a nice clean admin interface (although I am currently using the <a href="http://orderedlist.com/wordpress-plugins/wp-tiger-administration/" title="Tiger Style Admin">tiger style admin</a>), a clean and simple installation script, and my new favorites, dynamic sidebars and widgets.  However, I noticed that the default links widget creates invalid XHTML markup.  After a few minutes of looking through the XHTML and widgets.php file, I realized that the culprit was in fact a core wordpress bug.  Currently, wordpress creates widgets with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span></pre></div></div>

<p><span id="more-20"></span></p>
<p>This has the nasty effect of creating widget wrappers according to their widget name due to the &#8220;%1$s&#8221;, which isn&#8217;t a deal until you actually have multiple instances of the same widget; in my case, the links widget.  Having figured out the problem, I began searching for solutions online and stumbled upon the actual Wordpress bug report in <a href="http://trac.wordpress.org/ticket/4287" title="wordpress bug report: 4287">trac</a>.  The proposed solution was to add the following line of code before the call to wp_list_bookmarks() in wp_widget_links():</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000033;">$before_widget</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/id=&quot;[^&quot;]*&quot;/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'id=&quot;%id&quot;'</span><span style="color: #339933;">,</span> <span style="color: #000033;">$before_widget</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Unfortunately, this solution wasn&#8217;t good enough for me because I didn&#8217;t want to have to remember this in case the next Wordpress release didn&#8217;t fix the bug.  So, after some quick thinking I came up with the following bit of code that can be added to any theme&#8217;s function.php file (I think, I am a bit new to Wordpress widgets, in fact, this will be my first).</p>
<p>Edit: This code is actually the exact copy of the widget_links code that ships with wordpress in the widget.php file.  All I did was add the previous fix and moved it into functions.php to create a custom widget.</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">function</span> widget_my_links<span style="color: #009900;">&#40;</span><span style="color: #000033;">$args</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">global</span> <span style="color: #000033;">$wp_db_version</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$args</span><span style="color: #339933;">,</span> EXTR_SKIP<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000033;">$wp_db_version</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">3582</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// This ONLY works with li/h2 sidebars.</span>
        get_links_list<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000033;">$before_widget</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/id=&quot;[^&quot;]*&quot;/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'id=&quot;%id&quot;'</span><span style="color: #339933;">,</span> <span style="color: #000033;">$before_widget</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        wp_list_bookmarks<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'title_before'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000033;">$before_title</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'title_after'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000033;">$after_title</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'category_before'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000033;">$before_widget</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'category_after'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000033;">$after_widget</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'show_images'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'linkcat widget'</span>
        <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_sidebar_widget'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
    register_sidebar_widget<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My Links'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'widget_my_links'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This should add a custom widget called &#8216;My Links&#8217; when you view the Presentation->Widgets menu.  Replace your current Links Widget with this one, and you should be set to go.  No more invalid markup, at least not from the links widget.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2007/08/09/wordpress-22s-link-widget-validation-errors/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I joined Technorati!</title>
		<link>http://www.vayanis.com/2007/08/08/i-joined-technorati/</link>
		<comments>http://www.vayanis.com/2007/08/08/i-joined-technorati/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 15:52:45 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.vayanis.com/2007/08/08/i-joined-technorati/</guid>
		<description><![CDATA[Technorati Profile
]]></description>
			<content:encoded><![CDATA[<p><a href="http://technorati.com/claim/3nfxq6pygd" rel="me">Technorati Profile</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2007/08/08/i-joined-technorati/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Web Standards - Not really standard</title>
		<link>http://www.vayanis.com/2007/08/06/web-standards-not-really-standard/</link>
		<comments>http://www.vayanis.com/2007/08/06/web-standards-not-really-standard/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 21:24:09 +0000</pubDate>
		<dc:creator>Andrew Vayanis</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

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

		<category><![CDATA[XHTML/CSS]]></category>

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

		<guid isPermaLink="false">http://www.vayanis.com/2007/08/06/web-standards-not-really-standard/</guid>
		<description><![CDATA[As defined by wikipedia,
Web standards is a general term for the formal standards and other technical specifications that define and describe aspects of the World Wide Web. In recent years, the term has been more frequently associated with the trend of endorsing a set of standardized best practices for building web sites, and a philosophy [...]]]></description>
			<content:encoded><![CDATA[<p>As defined by wikipedia,</p>
<blockquote><p><strong>Web standards</strong> is a general term for the formal <a href="http://en.wikipedia.org/wiki/Internet_standard" title="Internet standard">standards</a> and other technical <a href="http://en.wikipedia.org/wiki/Specification" title="Specification">specifications</a> that define and describe aspects of the <a href="http://en.wikipedia.org/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a>. In recent years, the term has been more frequently associated with the trend of endorsing a set of standardized <a href="http://en.wikipedia.org/wiki/Best_practices" title="Best practices">best practices</a> for building <a href="http://en.wikipedia.org/wiki/Web_site" title="Web site">web sites</a>, and a philosophy of <a href="http://en.wikipedia.org/wiki/Web_design" title="Web design">web design</a> and development that includes those methods.</p></blockquote>
<p>I have been a proponent of Web standards ever since I created my first web site back in early 2000.  Back then, I was only following what I thought was the correct way to do things, and having the word &#8217;standards&#8217; seemed to make this <em>movement</em> official for me. As I learned more about these web standards, the importance of the best practices set forth along with the concept and goals of creating markup that would display the same across browsers, the more it all seemed to make sense.</p>
<p>However, seven years later, I am still creating web sites/applications using PHP, XHTML and CSS, but I am getting ever so frustrated with these so called <em>&#8220;web standards,&#8221; </em>mainly due to the quirks and lack of support in IE6 and to some degree IE7.  I am not an XHTML or CSS guru, but I think I know enough to write decent markup and styles to be effective (please don&#8217;t judge me using this site, after all, this theme was found on a wordpress theme site and I haven&#8217;t had the time to clean it up).  Just the other day, I was working on a site that required a three column layout, with columns of equal height, so I decided to use alistapart&#8217;s <a href="http://www.alistapart.com/articles/holygrail" title="Holy Grail">Holy Grail</a>.</p>
<p><span id="more-17"></span></p>
<p>This worked great in Firefox, Safari, IE6/7 and even Opera, until I tried to accomplish my next task, adding a picture gallery created by floated elements.  As most of you might have guessed, everything was fine except with IE6.  Now why is it that I always have to find ways to hack my styles just to get them to work with IE6 or 7?  Why can&#8217;t Microsoft finally create a decent browser.  Well, on this day, I had had enough. I decided to scrap the <em>Holy Grail</em> layout and create my three columns using a table.  Yes, thats right, I used a table layout to accomplish my three columns and it worked great.  Not to mention I got it done without any hassles from any of the browsers I was testing with.
<p>Before anyone begins the flaming, I will start by stating that I know this isn&#8217;t semantic. I also know that this use of tables is deemed inappropriate by the w3c whom states:</p>
<blockquote><p>Tables should not be used purely as a means to layout document content   as this may present problems when rendering to non-visual media. Additionally,   when used with graphics, these tables may force users to scroll horizontally   to view a table designed on a system with a larger display. To minimize these   problems, authors should use style sheets to control layout rather than tables.</p></blockquote>
<p>I merely decided to save myself the agony of debugging IE6/7 issues. I still support web standards, but I don&#8217;t see how it is completely feasible to follow them blindly when we all know well and good that the most prevalent browser used worldwide, just doesn&#8217;t fully support them.  Until these set of best practices are adopted by all the major browsers, to their full extent, they will never be more than best practices, and even then the term will be somewhat misleading.</p>
<p>Maybe I have been a bit slow to come to this conclusion, after all, most things can be successfully conquered utilizing web standard, but I am not the first to point out its flaws.  Of course these really aren&#8217;t flaws of the standards set forth, but rather one prominent browser that fails to adhere to them.  As a young developer, and as a developer who plans to be in this field for a good portion of his working career, what can I do to further along the goals of standardizing XHTML/CSS best practices?  What is the rest of the community doing? And how well is it going?</p>
<p><em>Sorry for the rambling, but I have a dream&#8230; A dream that one day, all browsers will be created equal and all developers will blissfully enjoy writing clean concise markup and all users will see the same beautiful interface into what we call the world wide web.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vayanis.com/2007/08/06/web-standards-not-really-standard/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
