<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeff Malterre</title>
	<atom:link href="http://www.jeffmalterre.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffmalterre.com</link>
	<description>accessible web programmer, SEO specialist, e-commerce professional</description>
	<lastBuildDate>Tue, 05 Oct 2010 18:23:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress Plugin jQuery Image Lazy Load &#8211; Targeting main content and not the sidebar.</title>
		<link>http://www.jeffmalterre.com/2010/09/17/wordpress-plugin-jquery-image-lazy-load-targeting-main-content-and-not-the-sidebar/</link>
		<comments>http://www.jeffmalterre.com/2010/09/17/wordpress-plugin-jquery-image-lazy-load-targeting-main-content-and-not-the-sidebar/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 13:41:38 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=1011</guid>
		<description><![CDATA[Recently I found this plugin called jQuery Image LazyLoad, and it&#8217;s been around for 3 years now. In history, web designers and developers wanted their images preloaded when a user browses to their page, in order for it to display properly and look seamless &#8211; you can find a plethora of old JavaScripts out there [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I found this plugin called <a href="http://wordpress.org/extend/plugins/jquery-image-lazy-loading/" title="jQuery Image Lazy Load">jQuery Image LazyLoad</a>, and it&#8217;s been around for 3 years now.  In history, web designers and developers wanted their images preloaded when a user browses to their page, in order for it to display properly and look seamless &#8211; you can find a plethora of old JavaScripts out there that do this.  However, this was mostly intended for the design, and not for the content.  Lazy Load is intended for content, not design, and it works in the exact opposite way.</p>
<p><a href="http://www.appelsiini.net/projects/lazyload">Lazy Load</a> will display images (content) that are on the visible portion of the web page, images that are outside of the visible are of the page are not loaded until the user scrolls down the page &#8211; this is when Lazy Load will load those images.  The idea is to save page load time.  Since the images outside of the visible area are not loaded until the user scrolls to them, load time is saved.  Let&#8217;s see we&#8217;re looking at a blog that displays 20 articles on a page and has several images in each post.  When we load the page, we&#8217;re probably only seeing the first 2 articles on top, while we&#8217;d have to scroll down to see the rest of the posts.  Well, since we&#8217;re not actively looking at the rest of the posts at that time, then we wouldn&#8217;t need the images within those posts loaded, right?  We&#8217;d only need to see those images when we scroll down the page to view those posts.  That&#8217;s the great idea behind this tool, it will load the images outside of the active visible area of the browser when the user scrolls down to that part of the web page.  Load time is saved because those images outside the active visible area of the page are simply not loaded, but are waiting to be loaded when the user gets to that part of the page.</p>
<p>Ok, so now we know how great this idea is, and how wonderful of a tool we have here.  Now we&#8217;re going to focus on the plugin for WordPress that implements this tool.  I recently installed this plugin and noticed only 1 thing it was missing &#8211; a setting to target elements.  Why do we need this setting?  Well, if you&#8217;ve installed this plugin and used it, you&#8217;ll notice that some images that are in the active visible area of the screen aren&#8217;t loading until the user scrolls to the bottom of the page (actually, to the bottom of the main content area &#8211; the posts.)  An example of this would be a sidebar, and this is because the HTML for that sidebar would come after the HTML for the main posts &#8211; towards the bottom of the page.  Even though the HTML for that sidebar is at the bottom of the page, CSS will bring it to the top (if that&#8217;s how your layout is being displayed.)</p>
<p><span id="more-1011"></span></p>
<p>First, let&#8217;s think of how we&#8217;re going to fix this problem.  The function is being applied to all elements of the page.  We know there&#8217;s a function that handles the lazy loader and if you&#8217;re familiar with jQuery, we know that that we can target specific elements, and apply the function to those specific elements.  We only want to target our posts and maybe the footer.  First determine what classes or ids of the elements that contain the content you want to target are.  In my case (at the time of this post) my I&#8217;m going to use #mainColumn and #footer, because those ids are applied to the elements of the content that I want to target.</p>
<p>Changing the code to target these elements is really easy, so let&#8217;s change it!  First let&#8217;s take a look at the original code that call&#8217;s this function (we don&#8217;t need to change the function, just the call to the function.)</p>
<p><strong>~/wp-content/plugins/jquery-image-lazy-loading/jq_img_lazy_load.php</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">/*
  Plugin Name: jQuery lazy load plugin
  Plugin URI: http://github.com/ayn/wp-jquery-lazy-load/
  Description: a quick and dirty wordpress plugin to enable image lazy loading.
  Version: v0.10
  Author: Andrew Ng
  Author URI: http://blog.andrewng.com
  */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> jquery_lazy_load_headers<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$plugin_path</span> <span style="color: #339933;">=</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$lazy_url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$plugin_path</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'javascripts/jquery.lazyload.mini.js'</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$jq_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'</span><span style="color: #339933;">;</span>
  wp_deregister_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$jq_url</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1.4.2'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquerylazyload'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lazy_url</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jquery'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1.5.0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> jquery_lazy_load_ready<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$placeholdergif</span> <span style="color: #339933;">=</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'images/grey.gif'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;eof
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(document).ready(function($){
  if (navigator.platform == &quot;iPad&quot;) return;
  jQuery(&quot;img&quot;).lazyload({
    effect:&quot;fadeIn&quot;,
    placeholder: &quot;$placeholdergif&quot;
  });
});
&lt;/script&gt;
EOF</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
  add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jquery_lazy_load_headers'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jquery_lazy_load_ready'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">12</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The description of this plugin is completely accurate, quick and dirty. The only thing it really lacks is a configuration for the selector that the function is called from &#8211; <strong>jQuery(&#8220;img&#8221;).lazyload</strong> on <strong>line 27</strong>.  This is what is applying the Lazy Load function to every image on the page.  We&#8217;re going to change it so that it only selects what we want it to, again in my case (at this time) it&#8217;s #mainColumn and #footer.</p>
<p>We&#8217;re going to change the line 27 of that same document we have opened to this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  jQuery<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#mainColumn,#footer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>find<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;img&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>lazyload<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>All this says is &#8220;jQuery, find all the image tags in the #mainColumn and #footer elements, and apply the lazyload function to them!&#8221;;  Like I said, very easy <img src='http://www.jeffmalterre.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2010/09/17/wordpress-plugin-jquery-image-lazy-load-targeting-main-content-and-not-the-sidebar/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 &#8211; Logitech MX 5500 &#8211; Getting keyboard mail notifications to work</title>
		<link>http://www.jeffmalterre.com/2010/03/07/ubuntu-9-10-logitech-mx-5500-getting-keyboard-mail-notifications-to-work/</link>
		<comments>http://www.jeffmalterre.com/2010/03/07/ubuntu-9-10-logitech-mx-5500-getting-keyboard-mail-notifications-to-work/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 21:17:47 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=996</guid>
		<description><![CDATA[First I&#8217;d like to say how happy I am that *every* key/mouse button works except the Flip 3D/Zoom keyboard buttons &#8211; which I&#8217;m going to be working on soon. Everything works out of the box, even horizontal scrolling with mouse wheel tilt left/right. I&#8217;m pretty impressed! With all the keys working and utilities available for [...]]]></description>
			<content:encoded><![CDATA[<p>First I&#8217;d like to say how happy I am that *every* key/mouse button works except the Flip 3D/Zoom keyboard buttons &#8211; which I&#8217;m going to be working on soon.  Everything works out of the box, even horizontal scrolling with mouse wheel tilt left/right.  I&#8217;m pretty impressed!</p>
<p>With all the keys working and utilities available for the MX5500, getting mail notifications via keyboard is really easy to do.  What keyboard notifications am I talking about?  In Windows, the keyboard will give a little <em>beep</em> when a new email is received.  Also, a mail icon will pop up in the LCD on the keyboard.</p>
<p><span id="more-996"></span></p>
<p>First we need a mail notification application that can run custom commands on new email received and email checked (we need something to get rid of the mail icon once the mail notification has been acknowledged.)  Here&#8217;s a good one: <a href="http://www.nongnu.org/mailnotify/">Mail Notification</a>.  Note: if you have problems with getting SSL to work, you&#8217;ll need to add a source to the repository to get an updated version (see <a href="https://launchpad.net/~mail-notification-ssl/+archive/ppa">https://launchpad.net/~mail-notification-ssl/+archive/ppa</a>).</p>
<p>Once we get Mail Notification installed, we&#8217;re going to need a utility to control the keyboard functions (such as the <em>beep</em> and LCD icons.)  This utility is called mx5000-tool.  We&#8217;re not going to go into instructions on installing this, as they are readily available via a quick Google search.  Here is a good link to follow to get this utility installed: <a href="http://www.gentoo-wiki.info/Logitech_Cordless_Desktop_MX_5000#Installing_mx5000-tools">http://www.gentoo-wiki.info/Logitech_Cordless_Desktop_MX_5000#Installing_mx5000-tools</a>.</p>
<p>Next we&#8217;re going to make two scripts, one for new mail and one for read mail.  I like to keep things organized in my home directory, you can place these scripts anywhere you want.<br />
~/.scripts/mx5500/mail_new.sh:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#send a beep to the keyboard</span>
mx5000-tool <span style="color: #660033;">--device</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hiddev0 <span style="color: #660033;">-b</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#set the mail icon on the keyboard to 1 - on</span>
mx5000-tool <span style="color: #660033;">--device</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hiddev0 <span style="color: #660033;">-i</span> <span style="color: #000000;">1000</span></pre></td></tr></table></div>

<p>~/.scripts/mx5500/mail_read.sh:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#set the mail icon on the keyboard to 0 - off</span>
mx5000-tool <span style="color: #660033;">--device</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hiddev0 <span style="color: #660033;">-i</span> 0000</pre></td></tr></table></div>

<p>Remember you need to make these 2 files executable: <strong>chmod +x ~/.scripts/mx5500/*</strong></p>
<p>Now to pass these scripts as custom commands for the mail notification app.</p>
<p>Run <strong>gconf-editor</strong> by either running that in a terminal or hit ALT+F2, type &#8216;gconf-editor&#8217; an hit ENTER.  Browse to apps -> mail-notification -> commands.  Here we see &#8216;mail-changed&#8217;, &#8216;mail-read&#8217; and &#8216;new-mail&#8217;.</p>
<p>Click on &#8216;new-mail&#8217; and change the &#8216;command&#8217; value to &#8220;~/.scripts/mx5500/mail_new.sh&#8221; (without quotes.)</p>
<p>Click on &#8216;mail-read&#8217;.  Now when I was entering the custom command for this function, the &#8216;command&#8217; value was set as an integer.  Go ahead and double click it and change it to a string.  Now, change the &#8216;command&#8217; value to &#8220;~/.scripts/mx5500/mail_read.sh&#8221; (again, without quotes.)</p>
<p><strong>That&#8217;s it!</strong>  You can now sit back and enjoy the keyboard <em>beep boop</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2010/03/07/ubuntu-9-10-logitech-mx-5500-getting-keyboard-mail-notifications-to-work/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Enabling the Developer menu in Safari 4 (for Vista and Windows 7)</title>
		<link>http://www.jeffmalterre.com/2010/01/19/enabling-the-developer-menu-in-safari-4-for-vista-and-windows-7/</link>
		<comments>http://www.jeffmalterre.com/2010/01/19/enabling-the-developer-menu-in-safari-4-for-vista-and-windows-7/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 19:41:47 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=989</guid>
		<description><![CDATA[Had a little bit of a run-around trying to do this because some information I found was for another version so I thought I&#8217;d post a quick &#8216;how-to&#8217; up here. We&#8217;re going to be editing the preferences file for Safari. This file has a .plist extension and to edit it you&#8217;ll need to get this. [...]]]></description>
			<content:encoded><![CDATA[<p>Had a little bit of a run-around trying to do this because some information I found was for another version so I thought I&#8217;d post a quick &#8216;how-to&#8217; up here.  We&#8217;re going to be editing the preferences file for Safari.  This file has a .plist extension and to edit it you&#8217;ll need to get <a href="http://www.ipodrobot.com/plistset.exe" title="plist editor for Windows">this</a>.  After you finish downloading and installing it, launch it.  Now go to File -> Open, and browse to this location: <strong>\Users\&lt;your user name&gt;\AppData\Roaming\Apple Computer\Preferences\</strong>, the file we need to edit is <strong>com.apple.Safari.plist</strong> so go ahead and open it.</p>
<p>Append these lines before the final &lt;/dict&gt; and &lt;/plist&gt; elements:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>IncludeDebugMenu<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;true</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Restart Safari, you&#8217;ll now notice the &#8216;Develop&#8217; menu option next to &#8216;Bookmarks&#8217; and &#8216;Window&#8217;.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2010/01/19/enabling-the-developer-menu-in-safari-4-for-vista-and-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SingleFeed Export Module for Magento &#8211; How to strip HTML tags and special characters</title>
		<link>http://www.jeffmalterre.com/2009/10/24/singlefeed-export-module-for-magento-how-to-strip-html-tags-and-special-characters/</link>
		<comments>http://www.jeffmalterre.com/2009/10/24/singlefeed-export-module-for-magento-how-to-strip-html-tags-and-special-characters/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 19:27:49 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[data feed]]></category>
		<category><![CDATA[google base]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=971</guid>
		<description><![CDATA[Tested on: SingleFeed Export Module v1.1.0 Magento v1.3.2.4 So I found this great module for Magento the other day, made by SingleFeed. It will export a product data feed every night. Then, we can import this feed into things like Google Base. I ran into a problem though. You can&#8217;t import a data feed into [...]]]></description>
			<content:encoded><![CDATA[<p>Tested on:<br />
SingleFeed Export Module v1.1.0<br />
Magento v1.3.2.4</p>
<p>So I found <a title="SingleFeed Export Module" href="http://www.magentocommerce.com/extension/712/singlefeed-export-module">this great module</a> for Magento the other day, made by <a title="SingleFeed" href="http://www.singlefeed.com/">SingleFeed</a>.  It will export a product data feed every night.  Then, we can import this feed into things like Google Base.</p>
<p>I ran into a problem though.  You can&#8217;t import a data feed into Google Base that contains HTML tags and special characters.  Most of the clients I work with prefer to have a WYSIWYG editor for things like the CMS pages, product descriptions, etc., which will add HTML formatting in the database.  The SingleFeed Export Module does not automatically strip HTML on the fly (however I believe if you sign-up for an account at their website, they have a wizard that can do it for you.)</p>
<p><span id="more-971"></span></p>
<p>I poked around at the code for a bit and discovered that stripping the HTML tags and special chars would be quite easy using two functions: strip_tags, htmlspecialchars_decode.</p>
<p>Open <strong>app/code/community/SingleFeed/Export/Model/Mysql4/Profile.php</strong> and goto <strong>line 360</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// format product data as needed</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$products</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$id</span><span style="color: #339933;">=&gt;&amp;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$attr</span><span style="color: #339933;">=&gt;&amp;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// replace raw numeric values with source option labels</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attr</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'options'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span> <span style="color: #b1b100;">as</span> <span style="color: #339933;">&amp;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #000088;">$v</span> <span style="color: #339933;">=</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #666666; font-style: italic;">// combine multiselect values</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">join</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #666666; font-style: italic;">// process special cases of loaded attributes</span>
    <span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$attr</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// product url</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'url_path'</span><span style="color: #339933;">:</span>
      <span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;singlefeed.url&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$baseUrl</span><span style="color: #339933;">.</span><span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I love well-written code, especially with good comments.  All we&#8217;re going to do is add in our new formatting (in this case, just for the product description.)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// format product data as needed</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$products</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$id</span><span style="color: #339933;">=&gt;&amp;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$attr</span><span style="color: #339933;">=&gt;&amp;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// replace raw numeric values with source option labels</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attr</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'options'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span> <span style="color: #b1b100;">as</span> <span style="color: #339933;">&amp;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #000088;">$v</span> <span style="color: #339933;">=</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #666666; font-style: italic;">// combine multiselect values</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">join</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #666666; font-style: italic;">// process special cases of loaded attributes</span>
    <span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$attr</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// product url</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'url_path'</span><span style="color: #339933;">:</span>
      <span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;singlefeed.url&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$baseUrl</span><span style="color: #339933;">.</span><span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// product descriptions</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'description'</span><span style="color: #339933;">:</span>
      <span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;description&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlspecialchars_decode</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That was almost a little <em>too</em> easy&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/10/24/singlefeed-export-module-for-magento-how-to-strip-html-tags-and-special-characters/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>DD-WRT350N v24 SP2 &#8211; Updated!</title>
		<link>http://www.jeffmalterre.com/2009/08/05/dd-wrt350n-v24-sp2-updated/</link>
		<comments>http://www.jeffmalterre.com/2009/08/05/dd-wrt350n-v24-sp2-updated/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 20:51:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[DD-WRT]]></category>
		<category><![CDATA[usb fix]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=943</guid>
		<description><![CDATA[Originally I had thought my USB storage device was successfully connecting to router, it wasn&#8217;t. After reading a bit I discovered why&#8230; From www-947.ibm.com: The USB 2.0 specification requires a 10ms reset recovery time (TRSTRCY) after port resets before commands are issued to USB devices. However linux kernels before 2.6.11 do not implement this recovery [...]]]></description>
			<content:encoded><![CDATA[<p>Originally I had thought my USB storage device was successfully connecting to router, it wasn&#8217;t.  After reading a bit I discovered why&#8230;</p>
<p><a href="http://www-947.ibm.com/systems/support/supportsite.wss/docdisplay?lndocid=MIGR-62059&amp;brandind=5000020">From www-947.ibm.com:</a><br />
<blockquote>
<p>The USB 2.0 specification requires a 10ms reset recovery time (TRSTRCY) after port resets before commands are issued to USB devices.</p>
<p>However linux kernels before 2.6.11 do not implement this recovery time leading to failures on USB 2.0 devices.</p>
<p>This failure is intermittent and seen on some devices (If other system activity causes there to be a 10ms delay between port resume and device access, then it works, else it would fail).</p>
<p>It also depends on the Host controller implementation.</p>
<p>The EHCI controller in the Broadcom HT1000 (BCM5785) SouthBridge does not like this violation of the spec. and fails to initialize devices.</p></blockquote>
<p>I was using DD-WRT v24-sp1, and unfortunately I was having this problem.  Luckily there is an unstable SVN version that fixes this problem.</p>
<p><span id="more-943"></span></p>
<p><a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=44986">From www.dd-wrt.com:</a><br />
<blockquote>
<p>The unstable SVN version is in the others/EKO directory</p>
<p>Eko TNG svn 11296<br />
<a href="http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fothers%2Feko%2FV24_TNG%2Fsvn11296/">http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fothers%2Feko%2FV24_TNG%2Fsvn11296/</a></p>
<p>dd-wrt.v24-11296_NEWD_mega.bin<br />
TNG means the next generation,V24 SP2<br />
NEWD means new driver, 500gpv2 should use NEWD version</p></blockquote>
<p>I was nervous about installing this because it&#8217;s not an official release, but I felt re-assured after seeing several other people with the same router (Linksys WRT350N) running this SVN version.  Installation went perfectly, and there is a new section/tab for USB.</p>
<p style="text-align: center;"><a href="http://www.jeffmalterre.com/wp-content/uploads/2009/09/dd-wrt_ss.jpg"><img class="size-medium wp-image-952 aligncenter" title="DD-WRT v24-sp2 USB Screenshot" src="http://www.sibble.com/wp-content/dd-wrt_ss-300x221.jpg" alt="DD-WRT v24-sp2 USB Screenshot" width="300" height="221" /></a></p>
<p>After I could see that everything was working properly, I temporarily moved the data on the USB storage and re-partitioned the hard drive.  I made 4 partitions: opt (2GB ext3), jffs (2GB ext3), swap (2GB linux swap), storage (~ FAT32.)  I did this so that I would be able to install optware packages onto the USB storage instead of using the memory on the router.  The memory on the router is very limited, mounting optware to the USB storage now gives me the space to install whatever I want.</p>
<p>After everything was said and done, I installed Samba and now the FAT32 partition is shared over my network.  I&#8217;m not going to go over all the steps involved such as mounting the partitions and installing Samba, because this is already covered on the <a href="http://www.dd-wrt.com/wiki">DD-WRT Wiki</a>.  Good luck!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/08/05/dd-wrt350n-v24-sp2-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TweetSuite for WordPress Plugin &#8211; W3C Validation Error: Fixed</title>
		<link>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/</link>
		<comments>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 19:53:23 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[invalid markup]]></category>
		<category><![CDATA[tweetsuite]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=947</guid>
		<description><![CDATA[TweetSuite is a great plugin, it has a widget for displaying your latest tweets, displays tweetbacks, and lets you add in links to tweet or re-tweet a post on your blog. There&#8217;s more then a few things that need to be fixed with this plugin (ref: TweetSuite Errors and Troubleshooting), right now I&#8217;m just going [...]]]></description>
			<content:encoded><![CDATA[<p>TweetSuite is a great plugin, it has a widget for displaying your latest tweets, displays tweetbacks, and lets you add in links to tweet or re-tweet a post on your blog.  There&#8217;s more then a few things that need to be fixed with this plugin (ref: <a href="http://www.geoffmanning.com/twitter/tweetsuite-errors-and-troubleshooting/">TweetSuite Errors and Troubleshooting</a>), right now I&#8217;m just going to focus on some markup validation errors I came across.</p>
<p>The widget for displaying your latest tweets lists each tweet enclosed with li (listed item) tags.  Unfortunately, these listed items have no unordered or ordered list parent tag.  This causes a the markup to be invalid.  To fix this is quite easy&#8230;</p>
<p><span id="more-947"></span></p>
<p>Open <strong>TweetSuite.php</strong> and goto <strong>line 907</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>907
908
909
910
911
912
913
914
915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$buff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table_name</span> order by datetime desc limit <span style="color: #006699; font-weight: bold;">$max</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$buff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$tweet</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/y h:ia'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">datetime</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>and add in the appropriate opening and closing tags&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>907
908
909
910
911
912
913
914
915
916
917
918
919
920
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$buff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table_name</span> order by datetime desc limit <span style="color: #006699; font-weight: bold;">$max</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$buff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$tweet</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/y h:ia'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">datetime</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will enclose all the listed items with an unordered list tag, thus fixing the invalid markup.</p>
<p>The other problem I found was that some of the tweets had special characters (such as an ampersand) that were not converted to the specific html character code.  This will also cause validation errors.  To convert any special characters to use the appropriate special character code, we&#8217;ll need to make a real simple change.</p>
<p>Open <strong>TweetSuite.php</strong> and goto <strong>line 915</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>and change it to&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweet</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will now convert any special characters in a tweet to use special character code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DD-WRT350N &#8211; USB Multimedia</title>
		<link>http://www.jeffmalterre.com/2009/03/01/dd-wrt350n-usb-multimedia/</link>
		<comments>http://www.jeffmalterre.com/2009/03/01/dd-wrt350n-usb-multimedia/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 21:35:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=937</guid>
		<description><![CDATA[So I run DD-WRT on my Linksys WRT-350N router. I know the router comes with a media server, allowing music and videos to be played through a wireless connection. My goal is to get this working using DD-WRT, but I&#8217;m having trouble figuring out how to do this. My first step was to upgrade my [...]]]></description>
			<content:encoded><![CDATA[<p>So I run DD-WRT on my Linksys WRT-350N router.  I know the router comes with a media server, allowing music and videos to be played through a wireless connection.  My goal is to get this working using DD-WRT, but I&#8217;m having trouble figuring out how to do this.</p>
<p>My first step was to upgrade my version of DD-WRT to v24-FINAL.  Doing this gave me the option to enable USB via the web control panel.  The upgrade went flawlessly.  I enabled USB and my external hard drive is connected.</p>
<p>This is where I am right now.  I&#8217;m doing a bit of reading into where to go from here, but it looks like I&#8217;m going to have to install some Optware packages.  My main concern now is how much space I have on the router to be able install the packages I will need.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/03/01/dd-wrt350n-usb-multimedia/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Adding a mini login box to Magento</title>
		<link>http://www.jeffmalterre.com/2009/01/16/adding-a-mini-login-box-to-magento/</link>
		<comments>http://www.jeffmalterre.com/2009/01/16/adding-a-mini-login-box-to-magento/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 18:29:54 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[login box]]></category>
		<category><![CDATA[mini-login]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=924</guid>
		<description><![CDATA[I&#8217;m surprised there is not one in the default template for Magento.  Nevertheless, it&#8217;s pretty common to see a login box on a sidebar, and I need one.  This is actually pretty simple to do, we&#8217;re going to be modifying templates, layouts, and unfortunatly we&#8217;re going to have to alter the core (for something really [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m surprised there is not one in the default template for <a href="http://www.magentocommerce.com">Magento</a>.  Nevertheless, it&#8217;s pretty common to see a login box on a sidebar, and I need one.  This is actually pretty simple to do, we&#8217;re going to be modifying templates, layouts, and unfortunatly we&#8217;re going to have to alter the core (for something really silly.)</p>
<p><span id="more-924"></span></p>
<p>First, lets go ahead and make a template for the mini login box.  Take a look in <strong>&frasl;template&frasl;customer&frasl;form&frasl;</strong>&#8230;  What&#8217;s this!?  We already see that there is a <strong>mini.login.phtml</strong>.  For a closer look:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPostActionUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
    &lt;table width=&quot;100%&quot; class=&quot;mini-login&quot;&gt;
        &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Email'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>:&lt;/td&gt;&lt;td&gt;&lt;input name=&quot;login[username]&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Password'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>:&lt;/td&gt;&lt;td&gt;&lt;input name=&quot;login[password]&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;submit&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Login'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;/table&gt;
&lt;/form&gt;</pre></div></div>

<p>We&#8217;ll, even though functional, this isn&#8217;t styled nor does it fit in with the default Magento template.  So let&#8217;s change this.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;box base-mini mini-login-form&quot;&gt;
    &lt;div class=&quot;head&quot;&gt;
        &lt;h4&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Login'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h4&gt;
    &lt;/div&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPostActionUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot; id=&quot;login-form&quot;&gt;
        &lt;div class=&quot;content&quot;&gt;
            &lt;ul class=&quot;form-list&quot;&gt;
                    &lt;li&gt;
                        &lt;label for=&quot;email&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Email Address'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;/label&gt;&lt;br /&gt;
                        &lt;input name=&quot;login[username]&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">htmlEscape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUsername</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Email Address'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; id=&quot;email&quot; type=&quot;text&quot; class=&quot;input-text required-entry&quot; style=&quot;width:122px;&quot; /&gt;
                    &lt;/li&gt;
                    &lt;li&gt;
                        &lt;label for=&quot;pass&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Password'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;/label&gt;&lt;br /&gt;
                        &lt;input name=&quot;login[password]&quot; type=&quot;password&quot; class=&quot;input-text required-entry validate-password&quot; id=&quot;pass&quot; style=&quot;width:122px;&quot; /&gt;
                    &lt;/li&gt;
                &lt;/ul&gt;
                &lt;p class=&quot;required&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'* Required Fields'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;
          &lt;/div&gt;
    &lt;div class=&quot;actions&quot;&gt;
        &lt;button class=&quot;form-button-alt&quot; type=&quot;submit&quot; name=&quot;send&quot; id=&quot;send2&quot;&gt;&lt;span&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Login'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;&lt;/button&gt;
    &lt;/div&gt;
&lt;/form&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    var dataForm = new VarienForm('login-form', true);
&lt;/script&gt;
&lt;/div&gt;</pre></div></div>

<p>Also add this to your CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.mini-login-form</span> h4 <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../images/icon_page_white_text.gif</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Now that we have a template (mini.login.phtml), we&#8217;re going to have to add it to our block structure.  Open <strong>layout/customer.xml</strong>, and make this change starting at <strong>line 65</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;customer_logged_out<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;reference</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;top.links&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">&quot;addLink&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label title&quot;</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;customer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Log In<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;url</span> <span style="color: #000066;">helper</span>=<span style="color: #ff0000;">&quot;customer/getLoginUrl&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Log In<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;prepare</span><span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;urlParams</span><span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;position<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>100<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/position<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/action<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/reference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;remove</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;wishlist_sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/remove<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;remove</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;reorder&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/remove<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;reference</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;right&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;block</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;customer/form_login&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;mini_login&quot;</span> <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;customer/form/mini.login.phtml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/reference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/customer_logged_out<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Remember to copy this file/folder structure and put it in <strong>app/code/local</strong>.  We do this, because when you go to upgrade your Magento installation, your core files get patched, thus erasing all the hard work you did <img src='http://www.jeffmalterre.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/01/16/adding-a-mini-login-box-to-magento/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>3 books I&#039;d like to read</title>
		<link>http://www.jeffmalterre.com/2008/12/19/3-books-id-like-to-read/</link>
		<comments>http://www.jeffmalterre.com/2008/12/19/3-books-id-like-to-read/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 23:10:06 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[text editor]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=919</guid>
		<description><![CDATA[VIM is probably one of the most powerful text editors I&#8217;ve ever come across. I can&#8217;t even begin to tell you what it&#8217;s capabilities are. This book is probably a little advanced for me, but I&#8217;ll still be able to learn from it. Java is always something I wanted to learn. Also, I enjoy reading [...]]]></description>
			<content:encoded><![CDATA[<p>VIM is probably one of the most powerful text editors I&#8217;ve ever come across.  I can&#8217;t even begin to tell you what it&#8217;s capabilities are.  This book is probably a little advanced for me, but I&#8217;ll still be able to learn from it.</p>
<p>Java is always something I wanted to learn.  Also, I enjoy reading books published by Apress.</p>
<p>MooTools is a light, modular JavaScript framework that makes adding Ajax, animations, and interactive elements to your site a breeze.  This would help a lot with web animation, and avoiding building applications in Flash.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2008/12/19/3-books-id-like-to-read/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinkpad x61 with Ubuntu: Getting the 3rd mouse button to work.</title>
		<link>http://www.jeffmalterre.com/2008/12/19/thinkpad-x61-with-ubuntu-getting-the-3rd-mouse-button-to-work/</link>
		<comments>http://www.jeffmalterre.com/2008/12/19/thinkpad-x61-with-ubuntu-getting-the-3rd-mouse-button-to-work/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 17:11:01 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Thinkpad X61]]></category>
		<category><![CDATA[3rd mouse button]]></category>
		<category><![CDATA[mouse wheel]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=915</guid>
		<description><![CDATA[There are two different methods I found, which work for different version of Ubuntu. Ubuntu 8.10 First, copy/paste below &#60;match key=&#34;info.product&#34; string=&#34;TPPS/2 IBM TrackPoint&#34;&#62; &#60;merge key=&#34;input.x11_options.EmulateWheel&#34; type=&#34;string&#34;&#62;true&#60;/merge&#62; &#60;merge key=&#34;input.x11_options.EmulateWheelButton&#34; type=&#34;string&#34;&#62;2&#60;/merge&#62; &#60;merge key=&#34;input.x11_options.YAxisMapping&#34; type=&#34;string&#34;&#62;4 5&#60;/merge&#62; &#60;merge key=&#34;input.x11_options.XAxisMapping&#34; type=&#34;string&#34;&#62;6 7&#60;/merge&#62; &#60;merge key=&#34;input.x11_options.Emulate3Buttons&#34; type=&#34;string&#34;&#62;true&#60;/merge&#62; &#60;merge key=&#34;input.x11_options.EmulateWheelTimeout&#34; type=&#34;string&#34;&#62;200&#60;/merge&#62; &#60;/match&#62; Then, make a new file /etc/hal/fdi/policy/mouse-wheel.fdi sudo vi /etc/hal/fdi/policy/mouse-wheel.fdi Insert [...]]]></description>
			<content:encoded><![CDATA[<p>There are two different methods I found, which work for different version of Ubuntu.</p>
<p><span id="more-915"></span></p>
<h2>Ubuntu 8.10</h2>
<p>First, copy/paste below</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;info.product&quot;</span> <span style="color: #000066;">string</span>=<span style="color: #ff0000;">&quot;TPPS/2 IBM TrackPoint&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.EmulateWheel&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merge<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.EmulateWheelButton&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merge<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.YAxisMapping&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>4 5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merge<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.XAxisMapping&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>6 7<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merge<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.Emulate3Buttons&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merge<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.EmulateWheelTimeout&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>200<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merge<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/match<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Then, make a new file <em>/etc/hal/fdi/policy/mouse-wheel.fdi</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hal<span style="color: #000000; font-weight: bold;">/</span>fdi<span style="color: #000000; font-weight: bold;">/</span>policy<span style="color: #000000; font-weight: bold;">/</span>mouse-wheel.fdi</pre></div></div>

<p>Insert a new line <em>by hitting the letter i</em><br />
Paste <em>by hitting shift+ctrl+v</em><br />
Save and quit <em>by typing :wq</em><br />
Reboot.<br />
That&#8217;s it, pretty hard eh?</p>
<h2>Ubuntu 7.10</h2>
<p>Replace the mouse entry of your <em>/etc/X11/xorg.conf</em> with the following (its a good idea to back up your xorg.conf before making any changes):</p>

<div class="wp_syntax"><div class="code"><pre class="xorg" style="font-family:monospace;">Section &quot;InputDevice&quot;
&nbsp;
Identifier &quot;Mouse1&quot;
&nbsp;
Driver &quot;mouse&quot;
&nbsp;
Option &quot;Protocol&quot; &quot;ExplorerPS/2&quot; # IMPS/2 is not recommend for TrackPoints
&nbsp;
Option &quot;Device&quot; &quot;/dev/input/mice&quot;
&nbsp;
Option &quot;EmulateWheel&quot; &quot;on&quot;
&nbsp;
Option &quot;EmulateWheelTimeout&quot; &quot;200&quot;
&nbsp;
Option &quot;EmulateWheelButton&quot; &quot;2&quot;
&nbsp;
Option &quot;YAxisMapping&quot; &quot;4 5&quot;
&nbsp;
Option &quot;XAxisMapping&quot; &quot;6 7&quot;
&nbsp;
EndSection</pre></div></div>

<p>Reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2008/12/19/thinkpad-x61-with-ubuntu-getting-the-3rd-mouse-button-to-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
