<?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>Linden LAN</title>
	<atom:link href="http://www.lindenlan.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lindenlan.net</link>
	<description></description>
	<lastBuildDate>Thu, 21 Jan 2010 14:29:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>On “Modern CSS Typography and Font Styling Examples”</title>
		<link>http://www.lindenlan.net/2010/01/21/on-modern-css-typography-and-font-styling-examples/</link>
		<comments>http://www.lindenlan.net/2010/01/21/on-modern-css-typography-and-font-styling-examples/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:28:36 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=367</guid>
		<description><![CDATA[I read an article titled, “Modern CSS Typography and Font Styling Examples”, and though mistakes and omissions weren’t major, I felt compelled to comment on them.  My comment got so long, I figured a quick blog post would be better than a long-winded comment.

Smallcaps is not the same as uppercase.  Even if you [...]]]></description>
			<content:encoded><![CDATA[<p>I read an article titled, “<a href="http://www.dlocc.com/articles/modern-css-typography-and-font-styling-examples/">Modern CSS Typography and Font Styling Examples</a>”, and though mistakes and omissions weren’t major, I felt compelled to comment on them.  My comment got so long, I figured a quick blog post would be better than a long-winded comment.</p>
<p><span id="more-367"></span></p>
<p>Smallcaps is not the same as uppercase.  Even if you can simulate smallcaps using uppercase letters (similar to simulating italics or bold), fonts that employ smallcaps are specifically created to maintain proper balance and weight.</p>
<p>Furthermore, it’s important to use glyphs as intended with proper formatting.  This is a small detail, but in the CNN example, a double-hyphen is incorrect.  An emdash should be used instead and without the spaces.  Many CMSes and blogging software, WordPress included, are able to convert typographic shorthand like double– and triple-hyphens and convert them to their proper glyphs.  An old but timeless article: <a href="http://www.alistapart.com/articles/typography/">Typography Matters</a> covers this topic.  Also it wouldn’t hurt to look at print style guides such as the Chicago Manual of Style.  </p>
<p>Also not mentioned but useful to know is to make sure that when using justified text (most everything is on the web is flush-left), that it should be used in combination with hyphenation.  See <a href="http://kingdesk.com/projects/wp-typography/">wp-Typography</a> for example.</p>
<p>As for the top-10 list (I disagree that Dreamweaver should be on the list), it’s important that the imagery is consistent.  The Photoshop icon sticks out like a sore thumb.  Also if the list is ordered, it would make sense to provide some way to indicate that it is ordered like numbers.  That sets it apart from an itemized list.</p>
<p>I like Georgia since it is one of the better looking serif fonts among the web core fonts.  However, since this is supposed to be a post about <em>modern</em> typography, the author should have mentioned upcoming font-embedding  technology that would allow the use of much better looking fonts than Georgia.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2010/01/21/on-modern-css-typography-and-font-styling-examples/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Watch Your Cat From Across The Country</title>
		<link>http://www.lindenlan.net/2009/12/28/how-to-watch-your-cat-from-across-the-country/</link>
		<comments>http://www.lindenlan.net/2009/12/28/how-to-watch-your-cat-from-across-the-country/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 03:27:13 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=364</guid>
		<description><![CDATA[I went to Florida for my Christmas holiday.  In order to not stress out the cat too much, the cat stayed home rather than go to a kennel.  No professional pet sitter was available where I live.  So I opted to create a home surveillance system from hardware I had lying around [...]]]></description>
			<content:encoded><![CDATA[<p>I went to Florida for my Christmas holiday.  In order to not stress out the cat too much, the cat stayed home rather than go to a kennel.  No professional pet sitter was available where I live.  So I opted to create a home surveillance system from hardware I had lying around and free software.</p>
<p><span id="more-364"></span></p>
<p>Obtained a dynamic DNS hostname from DynDNS.  Even though my IP address doesn’t change all that often, it is dynamic.  Therefore, there’s no guarantee that the IP would work.  This was an extra precaution I wanted to take.  Plus it gave me something easier to remember.</p>
<p>Installed LogMeIn.  I did not require any of the features you get in the pay version.  This allowed me to start/stop software as needed and manage the pictures captured by the webcam.  Other remote admin services would work as well.  VNC is a great alternative.</p>
<p>Flashed my router with the Tomato firmware.  The WRT54G stock firmware doesn’t let you forward the magic packet to use wake-on-LAN to turn on a computer.  Tomato lets you log into the admin interface and send the packet to any MAC address on the LAN side of the network.  I did this just in case the power went out and I needed to turn-on the computer again.</p>
<p>I tried out two different webcam servers for Windows, Broadcam and TinCam.  Broadcam is much easier to setup and will automatically setup port forwarding if your router supports UPnP, but it is limited to live video.  TinCam has a lot more features, but it isn’t as user-friendly and you have to manually open up a port on the router.  Both have trial periods, but are fully functional during the trial period.  I tried setting up a Linux webcam server, but a lack of GUI or an easy to use config file meant it was faster to use Windows.  I did not test any Mac webcam servers since my MacBook was coming with me.  I ultimately settled on using TinCam day-to-day because I could schedule it to record a pic every 5 minutes of every hour (e.g., 1:00, 1:05, 1:10, and so on).  Furthermore, the date and time of day is used for the filename.  TinCam won’t let you capture pictures and run the video server simultaneously.  You can run the image server though which updates every 5 seconds.  So if you need an image log and live video, neither will work for you.</p>
<p>With the image server, I was able to watch what was on the webcam currently.  In order to see the log, I installed Dropbox.  Then I configured TinCam to save the captured images in a Dropbox folder.  Now I can see a picture log not just on my laptop but also on my iPhone using the Dropbox app.  This was VERY convenient.  Furthermore, the app overlays the filename so I can see when the pic was taken.</p>
<p>Finally, I installed Skype on the computer with the webcam so I could occasionally talk to the cat.  I created an account specifically for this.  I configured Skype to auto-answer and maximize when video is initiated.  Though I think as comforting as a familiar sound is to a pet, the cat appeared both excited and confused hearing a disembodied voice. </p>
<p>That’s how I mashed up available hardware and software to keep an eye on my cat while I was gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/12/28/how-to-watch-your-cat-from-across-the-country/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Portfolio</title>
		<link>http://www.lindenlan.net/2009/11/14/new-portfolio/</link>
		<comments>http://www.lindenlan.net/2009/11/14/new-portfolio/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 07:04:17 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=360</guid>
		<description><![CDATA[I launched my new portfolio to showcase some of the work I have accomplished over the past year.  I technically launched it at the beginning of the week, but didn’t add the last item until today.   I put it on a separate domain so that I can brand myself and have a [...]]]></description>
			<content:encoded><![CDATA[<p>I launched my new portfolio to showcase some of the work I have accomplished over the past year.  I technically launched it at the beginning of the week, but didn’t add the last item until today.   I put it on a separate domain so that I can brand myself and have a site focused on my work, plus any visitors would not be distracted by my blog posts.  </p>
<p>It’s built using WordPress, but you wouldn’t know it by looking at it.  This way I can add and remove samples easily.  I opted to go with a (mostly) single-page site.  There’s a second page for a contact form.   jQuery and various plugins handle the dynamic features.  I definitely prefer this over what I had before.</p>
<p>Feel free to check it out by clicking the Portfolio link above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/11/14/new-portfolio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hyphenation!</title>
		<link>http://www.lindenlan.net/2009/11/13/hyphenation/</link>
		<comments>http://www.lindenlan.net/2009/11/13/hyphenation/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 05:04:43 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=357</guid>
		<description><![CDATA[Do you like typography?  Are you tired of ragged right text?  Do you have a WordPress blog?  Go here now!  wp-Typography is the merger of wp-Typogrify and, more importantly, wp-Hyphenate.  I do LaTeX typesetting, and as a result, I’ve acquired an appreciation for properly formatted text.  If you ever [...]]]></description>
			<content:encoded><![CDATA[<p>Do you like typography?  Are you tired of ragged right text?  Do you have a WordPress blog?  Go <a href="http://kingdesk.com/projects/wp-typography/">here</a> now!  wp-Typography is the merger of wp-Typogrify and, more importantly, wp-Hyphenate.  I do LaTeX typesetting, and as a result, I’ve acquired an appreciation for properly formatted text.  If you ever tried using the CSS property <code>text-align</code>, you inevitably are disappointed with the results because it resembles nothing like what LaTeX can produce.  You often have to make your text eye-jarringly wide to make it useable, and that doesn’t always work.   This is because the browser lacks built-in support for hyphenation.  This plugin makes up for this browser deficiency by inserting hyphenation hints, known as soft-hyphens, which the browser does understand.  The algorithm is based on the one used in TeX to boot!  Brilliant!   </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/11/13/hyphenation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Simultaneously Add Multiple Products To A Magento Shopping Cart</title>
		<link>http://www.lindenlan.net/2009/09/27/how-to-simultaneously-add-multiple-products-to-a-magento-shopping-cart/</link>
		<comments>http://www.lindenlan.net/2009/09/27/how-to-simultaneously-add-multiple-products-to-a-magento-shopping-cart/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 02:01:38 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=349</guid>
		<description><![CDATA[This post is a bit overdue considering the project for which I did this was completed months ago.  I finally got around to documenting it.  Magento’s product list view lets customers add products to the shopping cart one at a time.  The client wanted customers to be able to add multiple products [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a bit overdue considering the project for which I did this was completed months ago.  I finally got around to documenting it.  Magento’s product list view lets customers add products to the shopping cart one at a time.  The client wanted customers to be able to add multiple products to the shopping cart simultaneously.  Given the time constraints for the projects, I created an ad hoc AJAX method to accomplish this feature request.</p>
<p><span id="more-349"></span></p>
<p>Adding a product to a Magento (ver. 1.3.1) shopping cart is accomplished through an HTTP GET request.  It will look like or similar to this:</p>
<pre class="brush: sh">
/path/to/app/checkout/cart/add?product=[id]&amp;qty=[qty]
</pre>
<p>That URL is output by the template helper:</p>
<pre class="brush: php">
$this-&gt;getAddToCartUrl($_product)
</pre>
<p>Since adding a product to the shopping cart is nothing more than a GET request, then all that needs to be done is queue up the URLs of the desired products, make each request in order, and then reload the page when done.</p>
<p>First, in app/design/frontend/
<package>/
<theme>/template/catalog/product/list.html, I first added checkboxes to allow customers to select which products they want and also hidden fields for storing the URLs to add the product and text fields for the quantity. </p>
<pre class="brush: php">
&lt;input type=&quot;checkbox&quot; class=&quot;input-checkbox add&quot; name=&quot;add_&lt;?php echo $_iterator; ?&gt;&quot; id=&quot;add_&lt;?php echo $_iterator; ?&gt;&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;url_&lt;?php echo $_iterator; ?&gt;&quot; id=&quot;url_&lt;?php echo $_iterator; ?&gt;&quot; value=&quot;&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;&quot; /&gt;
&lt;?php if(!$_product-&gt;isGrouped()): ?&gt;
     &lt;input type=&quot;text&quot; class=&quot;input-text qty&quot; name=&quot;qty_&lt;?php echo $_iterator; ?&gt;&quot; id=&quot;qty_&lt;?php echo $_iterator; ?&gt;&quot; maxlength=&quot;12&quot; value=&quot;&lt;?php echo $this-&gt;getMinimalQty($_product) ?&gt;&quot; /&gt;
&lt;?php endif; ?&gt;
</pre>
<p>I added this code within the loop that generate the HTML for the product line items for the list.  Next, I added the JavaScript that does the actual processing, also within the list section right after the script block that contains: <code>decorateList('products-list', 'none-recursive')</code>.</p>
<pre class="brush: javascript">
&lt;script type=&quot;text/javascript&quot;&gt;
    function processNext(urls, i) {
        var next = i + 1;
        $(&#039;processing-text&#039;).update(&#039;Processing item &#039; + next);
        if (next &lt; urls.size()) {
            new Ajax.Request(urls[i], {
              method: &#039;get&#039;,
              onComplete: function(transport) {
                processNext(urls, next);
              }
            });
        } else {
            new Ajax.Request(urls[i], {
              method: &#039;get&#039;,
              onComplete: function(transport) {
                window.location.reload();
              }
            });
        }
    }

    function addItemsToCart() {
        $(&#039;add-items-to-cart&#039;).hide();
        $(&#039;waiting&#039;).show();

        var addToCartUrls = [];
        $$(&#039;input.add&#039;).each(function(e){
            if(e.checked == true) {
                var id = e.readAttribute(&#039;id&#039;).split(&#039;_&#039;)[1];
                var qty = Number($(&#039;qty_&#039; + id).value);
                if (qty &lt; 1) qty = 1;
                addToCartUrls.push($(&#039;url_&#039; + id).value + &#039;qty/&#039; + qty);
            }
        });

        if (addToCartUrls.size() &gt; 0) {
            processNext(addToCartUrls, 0);
        } else {
            $(&#039;add-items-to-cart&#039;).show();
            $(&#039;waiting&#039;).hide();
            alert(&#039;Please check off the items you want to add.&#039;);
        }
    }
&lt;/script&gt;
</pre>
<p>At the bottom of the list I added a submit button.</p>
<pre class="brush: php">
&lt;div style=&quot;margin-bottom:5px; text-align:right;&quot;&gt;&lt;button id=&quot;add-items-to-cart&quot; class=&quot;form-button&quot; onclick=&quot;addItemsToCart()&quot;&gt;&lt;span&gt;&lt;?php echo $this-&gt;__(&#039;Add Items to Cart&#039;) ?&gt;&lt;/span&gt;&lt;/button&gt;&lt;div id=&quot;waiting&quot; style=&quot;height:22px; display:none; line-height:22px;&quot;&gt;&lt;span id=&quot;processing-text&quot;&gt;Processing...&lt;/span&gt; &lt;img src=&quot;&lt;?php echo $this-&gt;getSkinUrl().&#039;images/wait22trans.gif&#039;; ?&gt;&quot; width=&quot;22&quot; height=&quot;22&quot; style=&quot;display:inline; vertical-align:middle;&quot;/&gt;&lt;/div&gt;&lt;/div&gt;
</pre>
<p>Clicking the button calls the function <code>addItemsToCart()</code>.  The function hides the button to prevent a double click and unhides the status message.  Next, the function determines which checkboxes are checked.  For each checked checkbox, the function finds the corresponding URL field and quantity field, concatenates the two values, and stores the new URL in an array.  If the length of the array is greater than 0, then the function calls <code>processNext()</code>, otherwise it displays an error message and resets the submit button.</p>
<p>The function <code>processNext()</code> first updates the processing message.  The function takes the array of URLs and an index, and then creates an AJAX GET request using the URL at the given index in the array.  If the AJAX request completes, it calls processNext() with the same array but with an incremented index while the index is less than the array length.  If the incremented index is greater than the array length, then that ends the processing and the function reloads the page.</p>
<p>That’s it.  If there is anything wrong with the code, it assumes that all the GET requests will complete.  Unfortunately, given the time constraints there was no time to account for the scenario where a GET request fails.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/09/27/how-to-simultaneously-add-multiple-products-to-a-magento-shopping-cart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post-Install Ruby on Rails with Passenger on Media Temple (dv) 3.5</title>
		<link>http://www.lindenlan.net/2009/08/11/post-install-ruby-on-rails-with-passenger-on-media-temple-dv/</link>
		<comments>http://www.lindenlan.net/2009/08/11/post-install-ruby-on-rails-with-passenger-on-media-temple-dv/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 05:32:24 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=338</guid>
		<description><![CDATA[So Greg Goodwin has a very good post on installing Ruby on Rails with Passenger on a Media Temple dedicated virtual server.  However, there were some post-install gotchas I ran into.  I don’t recall running into these problems before.  Perhaps I did and solved them last time, but did not write the [...]]]></description>
			<content:encoded><![CDATA[<p>So <a href="http://greggoodwin.com/post/86665217/rubyonrailswithpassengeronmediatempledv35">Greg Goodwin</a> has a very good post on installing Ruby on Rails with Passenger on a Media Temple dedicated virtual server.  However, there were some post-install gotchas I ran into.  I don’t recall running into these problems before.  Perhaps I did and solved them last time, but did not write the solutions down.  Well now I’m going to.</p>
<p><span id="more-338"></span></p>
<ol>
<li>
<p>The mysql gem will error out if you use:</p>
<p><code>gem install mysql</code></p>
<p>You need to use:</p>
<p><code>gem install mysql -- --with-mysql-config=/usr/lib/mysql/mysql_config</p>
</li>
<li>
<p>If you use capistrano, the apache user needs write access to the folders under <code>shared</code>.  <code>chown -R FTPUSER:psaserv shared</code> should do the trick</li>
<li>
<p>For setting up actionmailer, make sure delivery_method is set to :sendmail.</p>
</li>
<li>
<p>Some gems/plugins have external dependencies and may fail silently, for example Paperclip which depends on ImageMagick.  <code>yum install ImageMagick</code> will fix that.  Is there a way to check for these sort of dependencies similar to config.gem?</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/08/11/post-install-ruby-on-rails-with-passenger-on-media-temple-dv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are People Abusing The Cash For Clunkers Program?</title>
		<link>http://www.lindenlan.net/2009/08/08/are-people-abusing-the-cash-for-clunkers-program/</link>
		<comments>http://www.lindenlan.net/2009/08/08/are-people-abusing-the-cash-for-clunkers-program/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 02:41:57 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Politics]]></category>
		<category><![CDATA[Honda]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=333</guid>
		<description><![CDATA[I wouldn’t have believed it, unless I saw it with my own eyes, but I think I saw my first Cash for Clunkers scam.  I’m not 100% sure if that’s what it is, but the cynic in me thinks so.  Take a look for yourself.


This seller managed to trade in a vehicle, presumably [...]]]></description>
			<content:encoded><![CDATA[<p>I wouldn’t have believed it, unless I saw it with my own eyes, but I think I saw my first <a href="http://www.cars.gov/">Cash for Clunkers</a> scam.  I’m not 100% sure if that’s what it is, but the cynic in me thinks so.  Take a look for yourself.</p>
<p><span id="more-333"></span></p>
<p><a href="http://denver.craigslist.org/cto/1310099926.html"><img src="http://www.lindenlan.net/wp-content/uploads/2009/08/fit_scam.gif" alt="fit_scam" title="fit_scam" width="609" height="565" class="alignnone size-full wp-image-332" /></a></p>
<p>This seller managed to trade in a vehicle, presumably worth less than the voucher, otherwise they would’ve straight up sold it.  What they ended up paying for the Fit is $15480 — 4500 = $10980.  That $11000 is presumably financed because if you had over $10000 in disposable income, I can’t see how you’d be hard-up for money.  Shopping around you could get 5% and beat the 7% average, and of course the auto dealer may want a piece of that pie and try to beat 5%.  In any case, we’re looking at just over $200 for a 5 year loan.  A $200 car payment is quite affordable if your other expenses aren’t outrageous.  If this seller could not get a $200 monthly payment, they’ve got bad credit or they don’t know how to negotiate or shop around for the best rate.  In any case, the monthly payment would have been disclosed to them ahead of time, and they would’ve known if they could afford it, impulse buy or not.  Their excuse about overextending themselves sounds dubious.  Anyhow, they’re willing to knock $1000 off their asking price, which is $14480.  After paying off their loan, they pocket $3500 in cash.  So unless their clunker was worth more than $3500, they made money, perhaps up to an extra $1000 or more, not to mention all the time saved from not having to post their car or haggle over the price.  </p>
<p>Am I being cynical?  Perhaps this person did just make a financial mistake.  I would’ve given them the benefit of the doubt until I saw this listing posted 2 days before:</p>
<p><a href="http://denver.craigslist.org/cto/1305545294.html"><img src="http://www.lindenlan.net/wp-content/uploads/2009/08/fit_scam2.jpg" alt="fit_scam2" title="fit_scam2" width="614" height="897" class="alignnone size-full wp-image-334" /></a></p>
<p>I mean, really?  Who turns around and resells a high-demand car with only 14 miles on it?  Or one that’s still at the dealer?  Two different people in two days?  </p>
<p>At least the program is more or less doing its job, and the realist in me understands that people abuse situations all the time.  There’s always a few bad eggs no matter what.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/08/08/are-people-abusing-the-cash-for-clunkers-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use .htaccess To Password Protect All But The Index File</title>
		<link>http://www.lindenlan.net/2009/07/31/use-htaccess-to-password-protect-all-but-the-index-file/</link>
		<comments>http://www.lindenlan.net/2009/07/31/use-htaccess-to-password-protect-all-but-the-index-file/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 20:14:14 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=328</guid>
		<description><![CDATA[I helped deploy a Magento store today, but the client did not have all the products entered in the database, and won’t be ready to launch that part of the site for another month.  So they wanted a “Coming Soon!” splash page to be at the subdirectory where the store is and password protect [...]]]></description>
			<content:encoded><![CDATA[<p>I helped deploy a Magento store today, but the client did not have all the products entered in the database, and won’t be ready to launch that part of the site for another month.  So they wanted a “Coming Soon!” splash page to be at the subdirectory where the store is and password protect everything else.  To do that I had to reconfigure the .htaccess file.</p>
<p><span id="more-328"></span></p>
<p>First I needed to chage the default index file.  That’s simple.  Change…</p>
<pre class="brush: php">
DirectoryIndex index.php
</pre>
<p>to…</p>
<pre class="brush: php">
DirectoryIndex index.html
</pre>
<p>Next I needed to password protect the site.  That accomplished by using htpassword to setup the users and groups, followed by adding the following directives to the end of the .htaccess file.</p>
<pre class="brush: php">
AuthType Basic
AuthName &quot;protected area&quot;
AuthUserFile /home/68571/.htpasswd
AuthGroupFile /home/68571/.htgroup
Require group group
Require user username
</pre>
<p>That will password protect everything.  Finally, I need to allow the index.html file for the splash page.</p>
<pre class="brush: php">
&lt;FilesMatch &quot;^$|store|index.html&quot;&gt;
  Allow from all
  Satisfy any
&lt;/FilesMatch&gt;
</pre>
<p>The first regex will match against “subdir/”, the second regex matches “subdir”, and the third matches “subdir/index.html”.  That’s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/07/31/use-htaccess-to-password-protect-all-but-the-index-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MyGoogleCal is now RESTYLEgc</title>
		<link>http://www.lindenlan.net/2009/07/06/mygooglecal-is-now-restylegc/</link>
		<comments>http://www.lindenlan.net/2009/07/06/mygooglecal-is-now-restylegc/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 16:24:40 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RESTYLEgc]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=323</guid>
		<description><![CDATA[I finally got around to spinning off MyGoogleCal as a separate website.  I opted to rename the script to RESTYLEgc to avoid stepping on Google’s toes.  It was something that’s been gestating over the past year.  I completed the site over the holiday weekend since I had the time available.  The [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got around to spinning off MyGoogleCal as a separate website.  I opted to rename the script to RESTYLEgc to avoid stepping on Google’s toes.  It was something that’s been gestating over the past year.  I completed the site over the holiday weekend since I had the time available.  The new site is at <a href="http://www.restylegc.com/">www.restylegc.com</a>.  I’m also hosting the script at <a href="http://code.google.com/p/restylegc">Google Code</a>, and I even added a <a href="http://groups.google.com/group/RESTYLEgc">Google Group</a> to facilitate discussions.  After seeing the comments top 100, I realize a blog really isn’t suitable for lengthy discussions.  Hopefully, the forum and wiki features will be better for the end-user.</p>
<p>I updated MyGoogleCal4 with a small bugfix this weekend as well.  That will be the last update.  Future development will continue with RESTYLEgc.  Since the code was originally public domain, I opted to go with an MIT open source license.  I also got the code in a Subversion repository which I should’ve done a long time ago.  With the Issues tab at Google Code, I can better track and encourage bug reports and feature requests.</p>
<p>The code is still free, but paid support is available.  I’ve also got some other ideas of where I want to take the site.  So stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/07/06/mygooglecal-is-now-restylegc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To Fake a Magento Subpage</title>
		<link>http://www.lindenlan.net/2009/04/21/how-to-fake-a-magento-subpage/</link>
		<comments>http://www.lindenlan.net/2009/04/21/how-to-fake-a-magento-subpage/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 14:52:50 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.lindenlan.net/?p=308</guid>
		<description><![CDATA[Magento, an open-source PHP ecommerce solution, has a very comprehensive feature list.  However, its built-in CMS doesn’t support hierarchical pages.  You can fake it, though.  

Let’s say you have a page with an SEF (search engine friendly) URL Identifier of “foo”.  You’d like to have a subpage “bar” nested under foo. [...]]]></description>
			<content:encoded><![CDATA[<p>Magento, an open-source PHP ecommerce solution, has a very comprehensive feature list.  However, its built-in CMS doesn’t support hierarchical pages.  You can fake it, though.  </p>
<p><span id="more-308"></span></p>
<p>Let’s say you have a page with an SEF (search engine friendly) URL Identifier of “foo”.  You’d like to have a subpage “bar” nested under foo.  The CMS doesn’t let you create parent-child relationships, but Magento will let you include forward slashes in the SEF URL Identifier so that it is “foo/bar”.  </p>
<p>That’s the good news.  The bad news is if you want to use the breadcrumbs block, it won’t work out of the box.  The Magento CMS is flat, so the default breadcrumbs will always look like “Home / My Page Title.”  The optimal solution is to override the breadcrumbs module and parse the SEF URL Identifier and construct the breadcrumbs from that.  (I may write a post about it in the future so stay tuned.)  The good news for those designers out there, you don’t have to dive into code.  </p>
<p>Magento’s CMS has a feature where each page has a way to override its XML layout.  When you’re editing a page, go to the “Custom Design” tab.  There you’ll see a form field called “Layout Update XML”.  This is the key.  Here’s where you add XML to first unset the breadcrumbs block and then add it back in but with your specific breadcrumbs.  Here’s the code:</p>
<pre class="brush: html">
&lt;reference name=&quot;root&quot;&gt;
&lt;action method=&quot;unsetChild&quot;&gt;&lt;alias&gt;breadcrumbs&lt;/alias&gt;&lt;/action&gt;
&lt;/reference&gt;

&lt;reference name=&quot;root&quot;&gt;
&lt;block type=&quot;page/html_breadcrumbs&quot; name=&quot;breadcrumbs&quot; as=&quot;breadcrumbs&quot;&gt;
    &lt;action method=&quot;addCrumb&quot;&gt;
        &lt;crumbName&gt;home&lt;/crumbName&gt;
        &lt;crumbInfo&gt;&lt;label&gt;Home&lt;/label&gt;&lt;title&gt;Go to Home Page&lt;/title&gt;&lt;link&gt;/&lt;/link&gt;&lt;/crumbInfo&gt;
    &lt;/action&gt;
    &lt;action method=&quot;addCrumb&quot;&gt;
        &lt;crumbName&gt;foo&lt;/crumbName&gt;
        &lt;crumbInfo&gt;&lt;label&gt;Foo&lt;/label&gt;&lt;title&gt;Foo&lt;/title&gt;&lt;link&gt;/foo/&lt;/link&gt;&lt;/crumbInfo&gt;
    &lt;/action&gt;
    &lt;action method=&quot;addCrumb&quot;&gt;
        &lt;crumbName&gt;cms_page&lt;/crumbName&gt;
        &lt;crumbInfo&gt;&lt;label&gt;Bar&lt;/label&gt;&lt;title&gt;Bar&lt;/title&gt;&lt;/crumbInfo&gt;
    &lt;/action&gt;
&lt;/block&gt;
&lt;/reference&gt;
</pre>
<p>The first reference tells Magento to call the unset action on the root block to remove the original breadcrumbs.  The second reference tells Magento to add a new breadcrumbs block.  Then within that block it tells Magento to add three new breadcrumbs, one for “home”, one for “foo”, and another for “bar”.  crumbName is just a unique identifier.  Under crumbInfo, label is the link text, title is the hover text, and link is the URL.  You need to include the root forward slash.  The trailing slash is optional, but to be consistent with Magento you should include it.</p>
<p>And that’s all there is to it.  If you have a Magento site with lots of CMS subpages or pages that are deeply nested, then this method can get tedious.  That’s why I said the optimal solution is to override the breadcrumbs module in core as a local modification.  If you don’t have many CMS subpages and they’re only one-level deep, then this method is adequate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lindenlan.net/2009/04/21/how-to-fake-a-magento-subpage/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
