<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Devthought</title>
	
	<link>http://devthought.com</link>
	<description>Wordpress, Symfony, MooTools, jQuery and all the stuff you love</description>
	<pubDate>Thu, 11 Jun 2009 07:21:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/devthought" type="application/rss+xml" /><item>
		<title>Turn /etc into a version control system repository</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/sCZTgkXayqA/</link>
		<comments>http://devthought.com/tumble/2009/06/turn-etc-into-a-version-control-system-repository/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 07:20:25 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Tumble]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=1009</guid>
		<description><![CDATA[I just discovered a gem called etckeeper, which I&#8217;m sure will change the way we&#8217;re used to work with server configurations.
The official website describes it pretty well:
etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers including yum [...]


Related posts:<ol><li><a href='http://devthought.com/blog/projects-news/2009/03/wp-o-matic-15-what-to-expect/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.5: What to expect'>WP-o-Matic 1.5: What to expect</a></li><li><a href='http://devthought.com/tumble/2009/04/how-to-change-wordpress-default-emoticons/' rel='bookmark' title='Permanent Link: How to change Wordpress default emoticons'>How to change Wordpress default emoticons</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I just discovered a gem called <code class="inline">etckeeper</code>, which I&#8217;m sure will change the way we&#8217;re used to work with server configurations.</p>
<p>The <a href="http://kitenet.net/~joey/code/etckeeper/">official website</a> describes it pretty well:</p>
<blockquote class="quotebox"><div>etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers including yum and pacman-g2) to automatically commit changes made to /etc during package upgrades.</div>
</blockquote>
<p>All it took me to set it up on my Debian Lenny <a href="http://slicehost.com">slice</a> was:</p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=1009&hash=0e2bdebd9f041be439ad3b02a4795f94">Download code</a></li></div><div class="code"><pre class="bash bash" style="font-family: Monaco, Monospace; font-size: 11px">$ <span style="color: #728059;">aptitude</span> <span style="color: #728059;">install</span> etckeeper
<span style="color: #666666; font-style: italic;"># aptitude will install Git as the version control system, which is pretty neat!</span>
$ <span style="color: #728059;">cd</span> <span style="color: #6078BF">/</span>etc<span style="color: #6078BF">/</span>
$ <span style="color: #728059;">sudo</span> etckeeper init <span style="color: #596380">-m</span> <span style="color: #805978">&quot;initial commit&quot;</span>
Initialized empty Git repository <span style="color: #728059;">in</span> <span style="color: #6078BF">/</span>etc<span style="color: #6078BF">/</span>.git<span style="color: #6078BF">/</span></pre></div></div>

<p>The best part is that it&#8217;ll detect changes made by <code class="inline">apt</code>, commit whatever changes you had made previously, and even enable you to make your own commits, after your manual modifications. Do try it out!</p>


<p>Related posts:<ol><li><a href='http://devthought.com/blog/projects-news/2009/03/wp-o-matic-15-what-to-expect/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.5: What to expect'>WP-o-Matic 1.5: What to expect</a></li><li><a href='http://devthought.com/tumble/2009/04/how-to-change-wordpress-default-emoticons/' rel='bookmark' title='Permanent Link: How to change Wordpress default emoticons'>How to change Wordpress default emoticons</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/tumble/2009/06/turn-etc-into-a-version-control-system-repository/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/tumble/2009/06/turn-etc-into-a-version-control-system-repository/</feedburner:origLink></item>
		<item>
		<title>Fix `ereg is deprecated` errors in PHP 5.3</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/6DSuiIE2SMU/</link>
		<comments>http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-php-53/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 02:32:51 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Tumble]]></category>

		<category><![CDATA[migration]]></category>

		<category><![CDATA[php 5.3]]></category>

		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=1003</guid>
		<description><![CDATA[If you upgraded to PHP 5.3, chances are high you&#8217;re going to run into a few warnings or deprecated function messages.
An example is the ereg family of functions, which are gone for good, as they were slower and felt less familiar than the alternative Perl-compatible preg family.
To migrate ereg():

ereg&#40;'\.([^\.]*$)', $this-&#62;file_src_name, $extension&#41;;

becomes

preg_match&#40;'/\.([^\.]*$)/', $this-&#62;file_src_name, $extension&#41;;

Notice that I [...]


Related posts:<ol><li><a href='http://devthought.com/tumble/2009/01/append-your-blog-description-to-the-window-title-in-wordpress/' rel='bookmark' title='Permanent Link: Append your blog description to the window title in Wordpress'>Append your blog description to the window title in Wordpress</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>If you upgraded to PHP 5.3, chances are high you&#8217;re going to run into a few warnings or <em>deprecated function</em> messages.<br />
An example is the <code class="inline">ereg</code> family of functions, which are gone for good, as they were slower and felt less familiar than the alternative Perl-compatible <code class="inline">preg</code> family.</p>
<p>To migrate <code class="inline">ereg()</code>:</p>

<div class="syntax"><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #728059;">ereg</span><span style="color: #6078BF">&#40;</span><span style="">'\.([^\.]*$)'</span><span style="color: #6078BF">,</span> <span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_src_name</span><span style="color: #6078BF">,</span> <span style="color: #596380">$extension</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>becomes</p>

<div class="syntax"><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #728059;">preg_match</span><span style="color: #6078BF">&#40;</span><span style="">'/\.([^\.]*$)/'</span><span style="color: #6078BF">,</span> <span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_src_name</span><span style="color: #6078BF">,</span> <span style="color: #596380">$extension</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>Notice that I wrapped the pattern (<code class="inline">\.([^\.]*$)</code>) around <code class="inline">/ /</code>, which are RegExp delimiters. If you find yourself escaping <code class="inline">/</code> too much (for an URL for example), you might want to use the <code class="inline">#</code> delimiter instead.</p>
<p>To migrate <code class="inline">ereg_replace()</code>:</p>

<div class="syntax"><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_dst_name_body</span> <span style="color: #6078BF">=</span> <span style="color: #728059;">ereg_replace</span><span style="color: #6078BF">&#40;</span><span style="">'[^A-Za-z0-9_]'</span><span style="color: #6078BF">,</span> <span style="">''</span><span style="color: #6078BF">,</span> <span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_dst_name_body</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>becomes</p>

<div class="syntax"><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_dst_name_body</span> <span style="color: #6078BF">=</span> <span style="color: #728059;">preg_replace</span><span style="color: #6078BF">&#40;</span><span style="">'/[^A-Za-z0-9_]/'</span><span style="color: #6078BF">,</span> <span style="">''</span><span style="color: #6078BF">,</span> <span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_dst_name_body</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>Again, I just added delimiters to the pattern.<br />
If you are using <code class="inline">eregi</code> functions (which are the case-insensitive version of ereg), you&#8217;ll notice there&#8217;re no equivalent pregi functions. This is because this functionality is handled by <em>RegExp modifiers</em>.</p>
<p>Basically, to make the pattern match characters in a case-insensitive way, append <code class="inline">i</code> after the delimiter:</p>

<div class="syntax"><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #728059;">eregi</span><span style="color: #6078BF">&#40;</span><span style="">'\.([^\.]*$)'</span><span style="color: #6078BF">,</span> <span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_src_name</span><span style="color: #6078BF">,</span> <span style="color: #596380">$extension</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>becomes</p>

<div class="syntax"><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #728059;">preg_match</span><span style="color: #6078BF">&#40;</span><span style="">'/\.([^\.]*$)/i'</span><span style="color: #6078BF">,</span> <span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">file_src_name</span><span style="color: #6078BF">,</span> <span style="color: #596380">$extension</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>



<p>Related posts:<ol><li><a href='http://devthought.com/tumble/2009/01/append-your-blog-description-to-the-window-title-in-wordpress/' rel='bookmark' title='Permanent Link: Append your blog description to the window title in Wordpress'>Append your blog description to the window title in Wordpress</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-php-53/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-php-53/</feedburner:origLink></item>
		<item>
		<title>TextboxList 0.4: On-Demand suggestions</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/Bx80Q-SkXEo/</link>
		<comments>http://devthought.com/blog/client-side/2009/06/textboxlist-04-on-demand-suggestions/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 12:07:42 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Client side]]></category>

		<category><![CDATA[autocomplete]]></category>

		<category><![CDATA[release]]></category>

		<category><![CDATA[textboxlist]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=983</guid>
		<description><![CDATA[TextboxList 0.4 is out, with new features:

check option, which can allow you to specify a function to filter out new boxes that do not meet a requirement
encode now receives the complete values, not only the id or string of the bit. This gives you full control of what you want to send to the server.

Autocomplete [...]


Related posts:<ol><li><a href='http://devthought.com/blog/client-side/2009/04/textboxlist-03-and-jquery-version-out/' rel='bookmark' title='Permanent Link: TextboxList 0.3 and jQuery version out!'>TextboxList 0.3 and jQuery version out!</a></li><li><a href='http://devthought.com/blog/projects-news/2008/07/wp-o-matic-10rc4-released/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0RC4 released'>WP-o-Matic 1.0RC4 released</a></li><li><a href='http://devthought.com/blog/projects-news/2008/05/wp-o-matic-10rc3-beta-shipping/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0RC3 beta shipping.'>WP-o-Matic 1.0RC3 beta shipping.</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>TextboxList 0.4 <a href="/projects/mootools/textboxlist/">is out</a>, with new features:</p>
<ul>
<li><code class="inline">check</code> option, which can allow you to specify a function to filter out new boxes that do not meet a requirement</li>
<li><code class="inline">encode</code> now receives the complete values, not only the id or string of the bit. This gives you full control of what you want to send to the server.</li>
<li>
<p>Autocomplete now works with on-demand suggestions. As easy as this:</p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=983&hash=24f3e53c5c456305f26ca28e8b98e3a5">Download code</a></li></div><div class="code"><pre class="javascript javascript" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #728059;">new</span> TextboxList<span style="color: #6078BF">&#40;</span><span style="color: #805978">'form_tags_input_4'</span><span style="color: #6078BF">,</span> <span style="color: #6078BF">&#123;</span>unique<span style="color: #6078BF">:</span> <span style="color: #728059;">true</span><span style="color: #6078BF">,</span> plugins<span style="color: #6078BF">:</span> <span style="color: #6078BF">&#123;</span>autocomplete<span style="color: #6078BF">:</span> <span style="color: #6078BF">&#123;</span>
	minLength<span style="color: #6078BF">:</span> <span style="color: #A8885A">3</span><span style="color: #6078BF">,</span>
	queryRemote<span style="color: #6078BF">:</span> <span style="color: #728059;">true</span><span style="color: #6078BF">,</span>
	remote<span style="color: #6078BF">:</span> <span style="color: #6078BF">&#123;</span>url<span style="color: #6078BF">:</span> <span style="color: #805978">'autocomplete2.php'</span><span style="color: #6078BF">&#125;</span>
<span style="color: #6078BF">&#125;</span><span style="color: #6078BF">&#125;</span><span style="color: #6078BF">&#125;</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

</li>
</ul>
<p>And some bugfixes:</p>
<ul>
<li>Fixed missing index when unique: false and autocomplete were used, which resulted in an error</li>
<li>Fixed problems with items with id 0, which incorrectly evaluated as false.</li>
</ul>
<p>Head to <a href="/wp-content/projects/mootools/textboxlist/Demo/">the demo</a> to see the new autocomplete in action, and as usual, report any bugs you might encounter.<br />
Update: 0.5 is out already, which fixes a bug with the traditional use of Autocomplete. Sorry for the trouble!</p>


<p>Related posts:<ol><li><a href='http://devthought.com/blog/client-side/2009/04/textboxlist-03-and-jquery-version-out/' rel='bookmark' title='Permanent Link: TextboxList 0.3 and jQuery version out!'>TextboxList 0.3 and jQuery version out!</a></li><li><a href='http://devthought.com/blog/projects-news/2008/07/wp-o-matic-10rc4-released/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0RC4 released'>WP-o-Matic 1.0RC4 released</a></li><li><a href='http://devthought.com/blog/projects-news/2008/05/wp-o-matic-10rc3-beta-shipping/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0RC3 beta shipping.'>WP-o-Matic 1.0RC3 beta shipping.</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/blog/client-side/2009/06/textboxlist-04-on-demand-suggestions/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/blog/client-side/2009/06/textboxlist-04-on-demand-suggestions/</feedburner:origLink></item>
		<item>
		<title>Sending email with Symfony 1.2 and Swift 4</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/zxHz1KwqEws/</link>
		<comments>http://devthought.com/blog/server-side/2009/05/sending-email-with-symfony-12-and-swift-4/#comments</comments>
		<pubDate>Sun, 31 May 2009 18:11:48 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Server side]]></category>

		<category><![CDATA[email]]></category>

		<category><![CDATA[smtp]]></category>

		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=971</guid>
		<description><![CDATA[If you had used Symfony 1.2 with Swift 3 before, you probably sent emails like this:


Download codetry
&#123;
  $mailer = new Swift&#40;new Swift_Connection_NativeMail&#40;&#41;&#41;;
  $message = new Swift_Message&#40;'The subject', 'The body &#60;b&#62;html&#60;/b&#62;', 'text/html'&#41;;
  $mailer-&#62;send&#40;$message, 'to@user.com', 'noreply@company.com'&#41;;
  $mailer-&#62;disconnect&#40;&#41;;
&#125;
catch &#40;Exception $e&#41;
&#123;
  $mailer-&#62;disconnect&#40;&#41;;
&#125;

However, due to API changes in Swift 4, that would have thrown an [...]


Related posts:<ol><li><a href='http://devthought.com/blog/2009/02/custom-fields-in-editnew-admin-generator-views-in-symfony/' rel='bookmark' title='Permanent Link: Custom fields in edit/new admin generator views in Symfony'>Custom fields in edit/new admin generator views in Symfony</a></li><li><a href='http://devthought.com/blog/server-side/2009/04/symfony-scaling-moving-your-uploads-to-a-nfs-share/' rel='bookmark' title='Permanent Link: Symfony scaling: moving your uploads to a NFS share'>Symfony scaling: moving your uploads to a NFS share</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>If you had used Symfony 1.2 with Swift 3 before, you probably sent emails like this:</p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=971&hash=00e7fa877ca3dda27d5703d3a2816136">Download code</a></li></div><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px">try
<span style="color: #6078BF">&#123;</span>
  <span style="color: #596380">$mailer</span> <span style="color: #6078BF">=</span> <span style="color: #728059;">new</span> Swift<span style="color: #6078BF">&#40;</span><span style="color: #728059;">new</span> Swift_Connection_NativeMail<span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#41;</span>;
  <span style="color: #596380">$message</span> <span style="color: #6078BF">=</span> <span style="color: #728059;">new</span> Swift_Message<span style="color: #6078BF">&#40;</span><span style="">'The subject'</span><span style="color: #6078BF">,</span> <span style="">'The body &lt;b&gt;html&lt;/b&gt;'</span><span style="color: #6078BF">,</span> <span style="">'text/html'</span><span style="color: #6078BF">&#41;</span>;
  <span style="color: #596380">$mailer</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">send</span><span style="color: #6078BF">&#40;</span><span style="color: #596380">$message</span><span style="color: #6078BF">,</span> <span style="">'to@user.com'</span><span style="color: #6078BF">,</span> <span style="">'noreply@company.com'</span><span style="color: #6078BF">&#41;</span>;
  <span style="color: #596380">$mailer</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">disconnect</span><span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#41;</span>;
<span style="color: #6078BF">&#125;</span>
catch <span style="color: #6078BF">&#40;</span>Exception <span style="color: #596380">$e</span><span style="color: #6078BF">&#41;</span>
<span style="color: #6078BF">&#123;</span>
  <span style="color: #596380">$mailer</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">disconnect</span><span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#41;</span>;
<span style="color: #6078BF">&#125;</span></pre></div></div>

<p>However, due to API changes in Swift 4, that would have thrown an error:</p>

<div class="syntax"><div class="code"><pre class="bash bash" style="font-family: Monaco, Monospace; font-size: 11px">Fatal error: Cannot instantiate abstract class Swift <span style="color: #728059;">in</span> <span style="color: #6078BF">/</span><span style="color: #6078BF">&#91;</span>...<span style="color: #6078BF">&#93;</span><span style="color: #6078BF">/</span>apps<span style="color: #6078BF">/</span>frontend<span style="color: #6078BF">/</span>modules<span style="color: #6078BF">/</span><span style="color: #6078BF">&#91;</span>...<span style="color: #6078BF">&#93;</span><span style="color: #6078BF">/</span>actions<span style="color: #6078BF">/</span>actions.class.php on line <span style="color: #A8885A">40</span></pre></div></div>

<p>It turns out that now the class <code class="inline">Swift</code> is defined as <em>abstract</em>, which means it can&#8217;t be instantiated. Now, classes that you used to instantiate directly, like <code class="inline">Swift_Message</code>, have been added factory methods called <code class="inline">newInstance</code></p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=971&hash=372d2b0dfc4b158105ed9bde38e916d1">Download code</a></li></div><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #728059;">require_once</span><span style="color: #6078BF">&#40;</span><span style="">'lib/vendor/swift/swift_init.php'</span><span style="color: #6078BF">&#41;</span>; <span style="color: #666666; font-style: italic;"># needed due to symfony autoloader</span>
<span style="color: #596380">$mailer</span> <span style="color: #6078BF">=</span> Swift_Mailer<span style="color: #6078BF">::</span><span style="color: #728059">newInstance</span><span style="color: #6078BF">&#40;</span>Swift_MailTransport<span style="color: #6078BF">::</span><span style="color: #728059">newInstance</span><span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#41;</span>;
<span style="color: #596380">$message</span> <span style="color: #6078BF">=</span> Swift_Message<span style="color: #6078BF">::</span><span style="color: #728059">newInstance</span><span style="color: #6078BF">&#40;</span><span style="">'The subject'</span><span style="color: #6078BF">&#41;</span>
         <span style="color: #6078BF">-&gt;</span><span style="color: #728059">setFrom</span><span style="color: #6078BF">&#40;</span><span style="color: #728059;">array</span><span style="color: #6078BF">&#40;</span><span style="">'noreply@company.com'</span> <span style="color: #6078BF">=&gt;</span> <span style="">'Mailer Name'</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#41;</span>
         <span style="color: #6078BF">-&gt;</span><span style="color: #728059">setTo</span><span style="color: #6078BF">&#40;</span><span style="color: #728059;">array</span><span style="color: #6078BF">&#40;</span><span style="">'email@email.com'</span> <span style="color: #6078BF">=&gt;</span> <span style="">'Name Lastname'</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#41;</span>
         <span style="color: #6078BF">-&gt;</span><span style="color: #728059">setBody</span><span style="color: #6078BF">&#40;</span><span style="">'The body &lt;b&gt;html&lt;/b&gt;'</span><span style="color: #6078BF">,</span> <span style="">'text/html'</span><span style="color: #6078BF">&#41;</span>;  
<span style="color: #596380">$mailer</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">send</span><span style="color: #6078BF">&#40;</span><span style="color: #596380">$message</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>Remember that it&#8217;s good practise to get the body HTML from a partial, instead of hardcoding it into the action.</p>

<div class="syntax"><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #596380">$mailBody</span> <span style="color: #6078BF">=</span> <span style="color: #596380">$this</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">getPartial</span><span style="color: #6078BF">&#40;</span><span style="">'emailPartial'</span><span style="color: #6078BF">,</span> <span style="color: #728059;">array</span><span style="color: #6078BF">&#40;</span><span style="color: #666666; font-style: italic;">/* parameters */</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#41;</span>;
<span style="color: #473C45">// ... </span>
<span style="color: #6078BF">-&gt;</span><span style="color: #728059">setBody</span><span style="color: #6078BF">&#40;</span><span style="color: #596380">$mailBody</span><span style="color: #6078BF">,</span> <span style="">'text/html'</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>The code has become a lot more readable, easier to customize and write.<br />
More information <a href="http://swiftmailer.org/docs/message-quickref">here</a> and <a href="http://swiftmailer.org/docs/sending-quickref">here</a>.</p>


<p>Related posts:<ol><li><a href='http://devthought.com/blog/2009/02/custom-fields-in-editnew-admin-generator-views-in-symfony/' rel='bookmark' title='Permanent Link: Custom fields in edit/new admin generator views in Symfony'>Custom fields in edit/new admin generator views in Symfony</a></li><li><a href='http://devthought.com/blog/server-side/2009/04/symfony-scaling-moving-your-uploads-to-a-nfs-share/' rel='bookmark' title='Permanent Link: Symfony scaling: moving your uploads to a NFS share'>Symfony scaling: moving your uploads to a NFS share</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/blog/server-side/2009/05/sending-email-with-symfony-12-and-swift-4/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/blog/server-side/2009/05/sending-email-with-symfony-12-and-swift-4/</feedburner:origLink></item>
		<item>
		<title>An IE6 post</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/V0Un-s1oItE/</link>
		<comments>http://devthought.com/blog/client-side/2009/05/an-ie6-post/#comments</comments>
		<pubDate>Thu, 21 May 2009 11:10:37 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Client side]]></category>

		<category><![CDATA[browsers]]></category>

		<category><![CDATA[ie6]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=957</guid>
		<description><![CDATA[No matter how much we all hate IE6, we never seem to agree on what&#8217;s the best way to finally get rid of it. Web designers and developers alike have realized that investing too much time and effort in fixing its quirks is not viable from a business perspective, but they still want to reach [...]


Related posts:<ol><li><a href='http://devthought.com/blog/client-side/2007/03/ie7-still-creating-problems-for-developers/' rel='bookmark' title='Permanent Link: IE7 still creating problems for developers?'>IE7 still creating problems for developers?</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>No matter how much we all hate IE6, we never seem to agree on what&#8217;s the best way to finally get rid of it. Web designers and developers alike have realized that investing too much time and effort in fixing its quirks is not viable from a business perspective, but they still want to reach that audience.</p>
<p>This ambivalence is what still drives people, like myself, to keep writing about the infamous browser. </p>
<p><span id="more-957"></span></p>
<h3>The tradeoff</h3>
<p>The first premise we have to take into account is best summarized by <a href="http://dowebsitesneedtolookexactlythesameineverybrowser.com/">this little website</a>. There&#8217;s only two scenarios in which you can go to great lengths to make your website look (almost) exactly the same on IE6 and the rest:</p>
<ul>
<li>You have a very big budget, and a potentially huge IE6 audience. This is the case of websites like Facebook. If you read the Javascript and CSS of their widgets, you&#8217;ll know what I mean. The tradeoff here: money invested, poor markup and hacks all around</li>
<li>Your website is just too simple. Why would you not try to fix a few CSS issues if your website is just too simple? If there&#8217;s no complex Javascript going on, and you have a nice little fixed-width website, there&#8217;s no reason why your site should look extremely different.</li>
</ul>
<h3>Mistake 1: make your site look like crap on IE6</h3>
<p>The <a href="http://forabeautifulweb.com/blog/about/universal_internet_explorer_6_css/">Universal Internet Explorer 6 CSS</a> is the first big mistake I want to talk about. The idea here is that instead of wasting time on IE6 hacks, you just use a premade stylesheet, instead of disabling styling altogether. <a href="http://forabeautifulweb.com/demo/2009/05/21/alistapart.html">This is</a> what A List Apart would look like if it was implemented.</p>
<p>This approach is flawed for a wide range of reasons:</p>
<ul>
<li>The idea behind this universal stylesheet is that disabling style would make your website look broken. However, your sites <strong>will</strong> look broken.
<ul>
<li>If you use a logo with a dark background, it&#8217;ll definitely not fit the white background the stylesheet imposes. The same goes for menus and any other graphical item that might not be ready for a white contrast.</li>
<li>If a prior version of your website or brand did work on IE6, and after a redesign you implement this, again, people will think something is really off.</li>
<li>There&#8217;s no &#8220;Universal JavaScript&#8221; solution. And as we all know, many of our scripts interact with the CSS present in the page. Disabling styling will also mean either disabling JavaScript or having to fix it for IE6 too, with the sort of hacks the universal stylesheet wanted to avoid in the first place (for example, conditional styling).</li>
</ul>
</li>
<li>It shouldn&#8217;t be black and white, there&#8217;s gray. At this time, most IE6 quirks have been perfectly documented. Most have very easy solutions: it&#8217;s almost a second-nature for me to add <code class="inline">zoom: 1</code> to clear floats. Of course, making border-radius work on IE6 can be painful, but that&#8217;s exactly what you should be doing. Don&#8217;t go for all the small details: shadows, rounded corners, transparency. Or do it if the budget and time allows it. The key here is that <em>you can still deliver your brand identity to IE6 without major efforts</em>.</li>
</ul>
<p>Developers strive to deliver an identity to all possible mediums. If they design custom iPhone versions, why can&#8217;t they streamline their stylesheet to make it look fairly good on IE? As an example, my website worked almost perfectly on IE6 with little work. However, when I triggered the rain in my clouds, it just crashed. As a result, I just disabled that particular effect.</p>
<h3>Mistake 2: not explaining the user why IE6 is bad</h3>
<p>As I was reading the comments on <a href="http://www.zeldman.com/2009/05/21/a-new-answer-to-the-ie6-question/#comments">Jeffrey Zeldman&#8217;s post</a>, I couldn&#8217;t help but be reminded of how condescending developers can be towards their users. The key here is that <em>people will switch if they understand why</em>.</p>
<p>Let&#8217;s look at some of the proposed solutions to make users switch.</p>
<ul>
<li><a href="http://css-tricks.com/ie-6-blocker-script/">IE 6 Blocker overlay</a>. Blocks content, doesn&#8217;t explain why the switch is encouraged</li>
<li><a href="http://www.pushuptheweb.com/">Push up the web</a>. Doesn&#8217;t block content, but doesn&#8217;t explain why the switch is encouraged and to top it off, it presents itself as sort of a deceiving &#8220;operating system important notice&#8221;.</li>
<li><a href="http://ie6update.com/">IE6Update</a> takes the cake. Not only does it completely imitate a Microsoft warning in a deceptive way, but chances a very high that the user itself closed a similar message box a long time ago! Remember that Microsoft itself pushed the upgrade to IE7, even through the system automated updates. To top it off, this message doesn&#8217;t remotely explain how your website is better in a modern browser, so it&#8217;s an &#8220;easy close&#8221; for your average IE6 visitor.</li>
</ul>
<h3>The correct approach</h3>
<ol>
<li>Deliver the content</li>
<li>Make your website look OK on IE6, and somewhat similar.</li>
<li><strong>Encourage</strong> the switch. If you&#8217;re looking for a universal solution for this, I would suggest placing a prominent link to <a href="http://www.quirksmode.org/upgrade.html">PPK upgrade page</a>. He presents the information in a very concise and reasonable way, that everyone can understand. The best idea, however, is to customize the message for <em>your</em> visitors. Explain why your website would be better in another browser. What they&#8217;re missing. How easier some tasks would become with better JavaScript widgets or how nicer the navigation could be.</li>
</ol>


<p>Related posts:<ol><li><a href='http://devthought.com/blog/client-side/2007/03/ie7-still-creating-problems-for-developers/' rel='bookmark' title='Permanent Link: IE7 still creating problems for developers?'>IE7 still creating problems for developers?</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/blog/client-side/2009/05/an-ie6-post/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/blog/client-side/2009/05/an-ie6-post/</feedburner:origLink></item>
		<item>
		<title>BarackSlideshow 0.3</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/7iHLbS_2xy8/</link>
		<comments>http://devthought.com/blog/projects-news/2009/05/barackslideshow-03/#comments</comments>
		<pubDate>Tue, 12 May 2009 02:40:08 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Projects]]></category>

		<category><![CDATA[mootools plugin]]></category>

		<category><![CDATA[release]]></category>

		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=954</guid>
		<description><![CDATA[Due to popular request, I&#8217;ve made some changes to BarackSlideshow:

New project page with documentation and how to use explanation
It includes the upcoming, updated and optimized Fx.MorphList
The download package has been fixed for a very easy deployment.



Related posts:BarackSlideshow and MorphList updatedThe new TextboxList is hereBarackSlideshow - An elegant, lightweight slideshow script


Related posts:<ol><li><a href='http://devthought.com/blog/projects-news/2009/01/barackslideshow-and-morphlist-updated/' rel='bookmark' title='Permanent Link: BarackSlideshow and MorphList updated'>BarackSlideshow and MorphList updated</a></li><li><a href='http://devthought.com/blog/projects-news/2009/04/the-new-textboxlist-is-here/' rel='bookmark' title='Permanent Link: The new TextboxList is here'>The new TextboxList is here</a></li><li><a href='http://devthought.com/blog/projects-news/2008/06/barackslideshow-an-elegant-lightweight-slideshow-script/' rel='bookmark' title='Permanent Link: BarackSlideshow - An elegant, lightweight slideshow script'>BarackSlideshow - An elegant, lightweight slideshow script</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Due to popular request, I&#8217;ve made some changes to <a href="/projects/mootools/barackslideshow">BarackSlideshow</a>:</p>
<ul>
<li>New <a href="/projects/mootools/barackslideshow">project page</a> with documentation and how to use explanation</a></li>
<li>It includes the upcoming, updated and optimized Fx.MorphList</a></li>
<li>The download package has been fixed for a very easy deployment.</li>
</ul>


<p>Related posts:<ol><li><a href='http://devthought.com/blog/projects-news/2009/01/barackslideshow-and-morphlist-updated/' rel='bookmark' title='Permanent Link: BarackSlideshow and MorphList updated'>BarackSlideshow and MorphList updated</a></li><li><a href='http://devthought.com/blog/projects-news/2009/04/the-new-textboxlist-is-here/' rel='bookmark' title='Permanent Link: The new TextboxList is here'>The new TextboxList is here</a></li><li><a href='http://devthought.com/blog/projects-news/2008/06/barackslideshow-an-elegant-lightweight-slideshow-script/' rel='bookmark' title='Permanent Link: BarackSlideshow - An elegant, lightweight slideshow script'>BarackSlideshow - An elegant, lightweight slideshow script</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/blog/projects-news/2009/05/barackslideshow-03/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/blog/projects-news/2009/05/barackslideshow-03/</feedburner:origLink></item>
		<item>
		<title>PHP URL Shortening Class released</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/vLS_eQGwzIg/</link>
		<comments>http://devthought.com/blog/server-side/2009/04/php-url-shortening-class-released/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 16:27:34 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Server side]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=921</guid>
		<description><![CDATA[I&#8217;ve just released PHPShortener, a PHP class that makes it very easy to encode/decode URLs with services such as tr.im, is.gd, and others.
Encoding and decoding is a simple as this:


Download code$s = new PHPShortener&#40;&#41;;
// encode a long url
$shorturl = $s-&#62;encode&#40;'http://devthought.com/projects/php/phpshortener/', 'is.gd'&#41;;
// decode a short url (autodetects the service)
$longurl = $s-&#62;decode&#40;'http://tr.im/jBBp'&#41;;

Head to the project page for [...]


Related posts:<ol><li><a href='http://devthought.com/projects/php/phpshortener/' rel='bookmark' title='Permanent Link: PHPShortener'>PHPShortener</a></li><li><a href='http://devthought.com/blog/projects-news/2008/07/wp-o-matic-10rc4-released/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0RC4 released'>WP-o-Matic 1.0RC4 released</a></li><li><a href='http://devthought.com/blog/projects-news/2007/10/wp-o-matic-10-to-be-released/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0 to be released'>WP-o-Matic 1.0 to be released</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released <a href="/projects/php/phpshortener/">PHPShortener</a>, a PHP class that makes it very easy to encode/decode URLs with services such as tr.im, is.gd, and others.</p>
<p>Encoding and decoding is a simple as this:</p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=921&hash=64414bae7f58e84628f5c7b103c94988">Download code</a></li></div><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #596380">$s</span> <span style="color: #6078BF">=</span> <span style="color: #728059;">new</span> PHPShortener<span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#41;</span>;
<span style="color: #473C45">// encode a long url</span>
<span style="color: #596380">$shorturl</span> <span style="color: #6078BF">=</span> <span style="color: #596380">$s</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">encode</span><span style="color: #6078BF">&#40;</span><span style="">'http://devthought.com/projects/php/phpshortener/'</span><span style="color: #6078BF">,</span> <span style="">'is.gd'</span><span style="color: #6078BF">&#41;</span>;
<span style="color: #473C45">// decode a short url (autodetects the service)</span>
<span style="color: #596380">$longurl</span> <span style="color: #6078BF">=</span> <span style="color: #596380">$s</span><span style="color: #6078BF">-&gt;</span><span style="color: #728059">decode</span><span style="color: #6078BF">&#40;</span><span style="">'http://tr.im/jBBp'</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>Head to the <a href="/projects/php/phpshortener/">project page</a> for downloads and documentation. Fork me on <a href="http://github.com/Guille/phpshortener/tree/master">GitHub</a> if you want to contribute!</p>


<p>Related posts:<ol><li><a href='http://devthought.com/projects/php/phpshortener/' rel='bookmark' title='Permanent Link: PHPShortener'>PHPShortener</a></li><li><a href='http://devthought.com/blog/projects-news/2008/07/wp-o-matic-10rc4-released/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0RC4 released'>WP-o-Matic 1.0RC4 released</a></li><li><a href='http://devthought.com/blog/projects-news/2007/10/wp-o-matic-10-to-be-released/' rel='bookmark' title='Permanent Link: WP-o-Matic 1.0 to be released'>WP-o-Matic 1.0 to be released</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/blog/server-side/2009/04/php-url-shortening-class-released/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/blog/server-side/2009/04/php-url-shortening-class-released/</feedburner:origLink></item>
		<item>
		<title>How to change Wordpress default emoticons</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/FDyqdAN_CFg/</link>
		<comments>http://devthought.com/tumble/2009/04/how-to-change-wordpress-default-emoticons/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:21:26 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Tumble]]></category>

		<category><![CDATA[emoticons]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=889</guid>
		<description><![CDATA[
Install the Smilies Themer plugin
Activate it.
Go to Settings &#62; Smilies Themer and pick a theme pack. If you want to create a custom one, keep reading
Create a folder with the name of your theme pack in wp-content/themes/smilies-themer/. In my case I called it devthought

Place your emoticons in that folder and a file called package-config.php



Place a [...]


Related posts:<ol><li><a href='http://devthought.com/tumble/2009/01/append-your-blog-description-to-the-window-title-in-wordpress/' rel='bookmark' title='Permanent Link: Append your blog description to the window title in Wordpress'>Append your blog description to the window title in Wordpress</a></li><li><a href='http://devthought.com/tumble/2009/04/improve-your-404-pages-with-google/' rel='bookmark' title='Permanent Link: Improve your 404 pages with Google'>Improve your 404 pages with Google</a></li><li><a href='http://devthought.com/projects/wordpress/feedburnercount/' rel='bookmark' title='Permanent Link: FeedBurnerCount'>FeedBurnerCount</a></li></ol>]]></description>
			<content:encoded><![CDATA[<ol>
<li>Install the <a href="http://wordpress.org/extend/plugins/smilies-themer/">Smilies Themer</a> plugin</li>
<li>Activate it.</li>
<li>Go to <em>Settings &gt; Smilies Themer</em> and pick a theme pack. If you want to create a custom one, keep reading</li>
<li>Create a folder with the name of your theme pack in <code class="inline">wp-content/themes/smilies-themer/</code>. In my case I called it <code class="inline">devthought</code></li>
<li>
<p>Place your emoticons in that folder and a file called <code class="inline">package-config.php</code></p>
<p><a class="thumb" href="http://devthought.com/wp-content/uploads/2009/04/art.jpg"><img src="http://devthought.com/wp-content/uploads/2009/04/art-300x195.jpg" alt="art" title="art" width="300" height="195" class="alignright size-medium wp-image-892" /></a>
</li>
<li>
<p>Place a code like this in <code class="inline">package-config.php</code></p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=889&hash=c6a8c58e84a18b46f42f26a174129d30">Download code</a></li></div><div class="code"><pre class="php php" style="font-family: Monaco, Monospace; font-size: 11px"><span style="color: #728059;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
 * Package-Name: Theme name
 * Package-URI: http://yourwebsite.com
 * Package-Description: Your theme description
 * Package-Author: Your name
 * Package-Author-URI: http://yourwebsite.com
 */</span>
&nbsp;
<span style="color: #596380">$wp_smilies</span> <span style="color: #6078BF">=</span> <span style="color: #728059;">array</span><span style="color: #6078BF">&#40;</span>
	<span style="">'&gt;:o'</span>      <span style="color: #6078BF">=&gt;</span> <span style="">'angryface.png'</span><span style="color: #6078BF">,</span>
	<span style="">'&gt;:-O'</span>   <span style="color: #6078BF">=&gt;</span> <span style="">'angryface.png'</span><span style="color: #6078BF">,</span>
	<span style="">':-['</span>       <span style="color: #6078BF">=&gt;</span> <span style="">'blush.png'</span><span style="color: #6078BF">,</span>
	<span style="">':['</span>         <span style="color: #6078BF">=&gt;</span> <span style="">'blush.png'</span><span style="color: #6078BF">,</span>
<span style="color: #6078BF">&#41;</span>;
<span style="color: #473C45">// add as many as you want respecting the same format:</span>
<span style="color: #473C45">// 'emoticon' =&gt; 'file.jpg',</span></pre></div></div>

</li>
<li>Go to Settings and choose your package!</li>
</ol>
<p>Now you&#8217;re done! <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/smile.png' alt=':)' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/blush.png' alt=':[' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/angryface.png' alt='&gt;:o' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/gasp.png' alt=':o' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/lipsaresealed.png' alt=':X' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/undecided.png' alt=':-/' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/wink.png' alt=';)' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/grin.png' alt=':D' class='wp-smiley' /> <img src='http://devthought.com/wp-content/plugins/smilies-themer/devthought/halo.png' alt='o:)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://devthought.com/tumble/2009/01/append-your-blog-description-to-the-window-title-in-wordpress/' rel='bookmark' title='Permanent Link: Append your blog description to the window title in Wordpress'>Append your blog description to the window title in Wordpress</a></li><li><a href='http://devthought.com/tumble/2009/04/improve-your-404-pages-with-google/' rel='bookmark' title='Permanent Link: Improve your 404 pages with Google'>Improve your 404 pages with Google</a></li><li><a href='http://devthought.com/projects/wordpress/feedburnercount/' rel='bookmark' title='Permanent Link: FeedBurnerCount'>FeedBurnerCount</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/tumble/2009/04/how-to-change-wordpress-default-emoticons/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/tumble/2009/04/how-to-change-wordpress-default-emoticons/</feedburner:origLink></item>
		<item>
		<title>TextboxList 0.3 and jQuery version out!</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/tEv70j9V_3w/</link>
		<comments>http://devthought.com/blog/client-side/2009/04/textboxlist-03-and-jquery-version-out/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 15:17:02 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Client side]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=855</guid>
		<description><![CDATA[Moo TextboxList 0.3 changes:

HTML for bits not showing properly fixed
highlightSelector not working (due to a typo) fixed
GrowingInput missing pad function added (only affected if you customized growing.mini option)
Improved clicking the whole widget behavior
Other tiny enhancements / cleanup

Secondly, in the best interest of the JavaScript community, I&#8217;ve ported TextboxList to jQuery. The API changes slightly due [...]


Related posts:<ol><li><a href='http://devthought.com/blog/client-side/2009/06/textboxlist-04-on-demand-suggestions/' rel='bookmark' title='Permanent Link: TextboxList 0.4: On-Demand suggestions'>TextboxList 0.4: On-Demand suggestions</a></li><li><a href='http://devthought.com/blog/client-side/2009/04/javascript-regexp-based-highlighting-function-for-mootools-and-jquery/' rel='bookmark' title='Permanent Link: JavaScript RegExp based highlighting for MooTools and jQuery'>JavaScript RegExp based highlighting for MooTools and jQuery</a></li><li><a href='http://devthought.com/blog/projects-news/2009/04/the-new-textboxlist-is-here/' rel='bookmark' title='Permanent Link: The new TextboxList is here'>The new TextboxList is here</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Moo TextboxList 0.3 changes:</p>
<ul>
<li>HTML for bits not showing properly fixed</li>
<li><code class="inline">highlightSelector</code> not working (due to a typo) fixed</li>
<li><code class="inline">GrowingInput</code> missing pad function added (only affected if you customized growing.mini option)</li>
<li>Improved clicking the whole widget behavior</li>
<li>Other tiny enhancements / cleanup</li>
</ul>
<p>Secondly, in the best interest of the JavaScript community, I&#8217;ve ported TextboxList to jQuery. The API changes slightly due to the different OOP approach, but all the functionality is intact. Head to <a href="/projects/jquery/textboxlist/">jQuery TextboxList</a> project page for more.</p>
<p>Update: 0.2 is out for jQuery. Bugs in autocompleter and IE have been addressed.</p>


<p>Related posts:<ol><li><a href='http://devthought.com/blog/client-side/2009/06/textboxlist-04-on-demand-suggestions/' rel='bookmark' title='Permanent Link: TextboxList 0.4: On-Demand suggestions'>TextboxList 0.4: On-Demand suggestions</a></li><li><a href='http://devthought.com/blog/client-side/2009/04/javascript-regexp-based-highlighting-function-for-mootools-and-jquery/' rel='bookmark' title='Permanent Link: JavaScript RegExp based highlighting for MooTools and jQuery'>JavaScript RegExp based highlighting for MooTools and jQuery</a></li><li><a href='http://devthought.com/blog/projects-news/2009/04/the-new-textboxlist-is-here/' rel='bookmark' title='Permanent Link: The new TextboxList is here'>The new TextboxList is here</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/blog/client-side/2009/04/textboxlist-03-and-jquery-version-out/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/blog/client-side/2009/04/textboxlist-03-and-jquery-version-out/</feedburner:origLink></item>
		<item>
		<title>Determine if caps lock is on with MooTools</title>
		<link>http://feedproxy.google.com/~r/devthought/~3/xlDqdtz-kzo/</link>
		<comments>http://devthought.com/tumble/2009/04/determine-if-caps-lock-is-on-with-mootools/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 12:33:53 +0000</pubDate>
		<dc:creator>Guillermo Rauch</dc:creator>
		
		<category><![CDATA[Tumble]]></category>

		<category><![CDATA[keyboard]]></category>

		<category><![CDATA[tip]]></category>

		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://devthought.com/?p=848</guid>
		<description><![CDATA[This is a quick idea I came up with. We extend the Event native like this:


Download codeEvent.implement&#40;&#123;
&#160;
   hasCapsLock: function&#40;&#41;&#123;
      return &#40;&#40;this.code &#62; 64 &#38;&#38; this.code &#60; 91 &#38;&#38; !this.shift&#41; 
           &#124;&#124; &#40;this.code &#62; 96 &#38;&#38; this.code &#60; 123 [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>This is a quick idea I came up with. We extend the Event native like this:</p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=848&hash=e8aa8e89c2bf77ed8b9aaa1df404cf7f">Download code</a></li></div><div class="code"><pre class="javascript javascript" style="font-family: Monaco, Monospace; font-size: 11px">Event.<span style="color: #728059">implement</span><span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#123;</span>
&nbsp;
   hasCapsLock<span style="color: #6078BF">:</span> <span style="color: #728059;">function</span><span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#123;</span>
      <span style="color: #728059;">return</span> <span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#40;</span><span style="color: #728059;">this</span>.<span style="color: #728059">code</span> <span style="color: #6078BF">&gt;</span> <span style="color: #A8885A">64</span> <span style="color: #6078BF">&amp;&amp;</span> <span style="color: #728059;">this</span>.<span style="color: #728059">code</span> <span style="color: #6078BF">&lt;</span> <span style="color: #A8885A">91</span> <span style="color: #6078BF">&amp;&amp;</span> <span style="color: #6078BF">!</span><span style="color: #728059;">this</span>.<span style="color: #728059">shift</span><span style="color: #6078BF">&#41;</span> 
           || <span style="color: #6078BF">&#40;</span><span style="color: #728059;">this</span>.<span style="color: #728059">code</span> <span style="color: #6078BF">&gt;</span> <span style="color: #A8885A">96</span> <span style="color: #6078BF">&amp;&amp;</span> <span style="color: #728059;">this</span>.<span style="color: #728059">code</span> <span style="color: #6078BF">&lt;</span> <span style="color: #A8885A">123</span> <span style="color: #6078BF">&amp;&amp;</span> <span style="color: #728059;">this</span>.<span style="color: #728059">shift</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#41;</span>;
   <span style="color: #6078BF">&#125;</span>
&nbsp;
<span style="color: #6078BF">&#125;</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>And then access the method from a <code class="inline">keypress</code> event:</p>

<div class="syntax">
<div class="toolbar"><ul><li><a href="http://devthought.com/wp-content/plugins/wp-syntax/snippet.php?postid=848&hash=01df45ddfffc311eb351cb20071e6616">Download code</a></li></div><div class="code"><pre class="javascript javascript" style="font-family: Monaco, Monospace; font-size: 11px">$<span style="color: #6078BF">&#40;</span><span style="color: #805978">'test'</span><span style="color: #6078BF">&#41;</span>.<span style="color: #728059">addEvent</span><span style="color: #6078BF">&#40;</span><span style="color: #805978">'keypress'</span><span style="color: #6078BF">,</span> <span style="color: #728059;">function</span><span style="color: #6078BF">&#40;</span>event<span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#123;</span>
   <span style="color: #728059;">if</span> <span style="color: #6078BF">&#40;</span>event.<span style="color: #728059">hasCapsLock</span><span style="color: #6078BF">&#40;</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#41;</span><span style="color: #6078BF">&#123;</span>
      <span style="color: #473C45">// do something</span>
   <span style="color: #6078BF">&#125;</span>
<span style="color: #6078BF">&#125;</span><span style="color: #6078BF">&#41;</span>;</pre></div></div>

<p>The only drawback is that it relies on sniffing alphabet characters and whether the shift key was pressed. This means that if the user presses the caps lock key, you won&#8217;t know it until another character is inserted.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://devthought.com/tumble/2009/04/determine-if-caps-lock-is-on-with-mootools/feed/</wfw:commentRss>
		<feedburner:origLink>http://devthought.com/tumble/2009/04/determine-if-caps-lock-is-on-with-mootools/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 2.051 seconds --><!-- Cached page generated by WP-Super-Cache on 2009-07-05 13:48:15 --><!-- Compression = gzip -->
