<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"> <channel><title>Comments for David Walsh :: Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</title> <link>http://davidwalsh.name</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 02 Sep 2010 19:57:16 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DavidWalshComments" /><feedburner:info uri="davidwalshcomments" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Comment on Create a Zip File Using PHP by Chris</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/s_Ix1pjl6Tc/comment-page-1</link> <dc:creator>Chris</dc:creator> <pubDate>Thu, 02 Sep 2010 19:57:16 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=2345#comment-19663</guid> <description>@daniel (or anyone else getting an "empty" zip file)I too was getting zip files of the appropriate size, but appeared empty when viewed and and I tried to extract, windows was telling me the file was invalid. After looking at the ZipArchive manual on php.net, the problem stems from:&lt;code&gt;$zip-&gt;addFile($file,$file);&lt;/code&gt;unless you have the function in the same directory as the files you want to zip, you will need to include the file path (which most people will if they use the function as an include). The 2nd parameter in addFile is the name of the file inside the zip, so if your $file var includes the path, that's where the nested folder issue is coming from. So to solve this, I changed the code to :&lt;code&gt;
$just_name = preg_replace("/(.*)\/?([^\/]+)/","$2",$file);
$zip-&gt;addFile($file,$just_name);
&lt;/code&gt;which will strip out the file path (if any) and leave you only the file name for the 2nd variable in addFile. Now my zips open and extract just fine = )</description> <content:encoded><![CDATA[<p>@daniel (or anyone else getting an &#8220;empty&#8221; zip file)</p><p>I too was getting zip files of the appropriate size, but appeared empty when viewed and and I tried to extract, windows was telling me the file was invalid. After looking at the ZipArchive manual on php.net, the problem stems from:</p><p><code>$zip-&gt;addFile($file,$file);</code></p><p>unless you have the function in the same directory as the files you want to zip, you will need to include the file path (which most people will if they use the function as an include). The 2nd parameter in addFile is the name of the file inside the zip, so if your $file var includes the path, that&#8217;s where the nested folder issue is coming from. So to solve this, I changed the code to :</p><p><code><br
/> $just_name = preg_replace("/(.*)\/?([^\/]+)/","$2",$file);<br
/> $zip-&gt;addFile($file,$just_name);<br
/> </code></p><p>which will strip out the file path (if any) and leave you only the file name for the 2nd variable in addFile. Now my zips open and extract just fine = )</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/s_Ix1pjl6Tc" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/create-zip-php/comment-page-1#comment-19663</feedburner:origLink></item> <item><title>Comment on Horizontally Center Your Website Structure Using CSS by Chris</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/SJHhlUsvS40/comment-page-2</link> <dc:creator>Chris</dc:creator> <pubDate>Thu, 02 Sep 2010 19:13:19 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/horizontally-center-website-structure-css/#comment-19662</guid> <description>Duuuuuuuuuuuuuude!Big thanks to you!!! I was ready to punch my keyboard in the left ventricle until I found this.XD</description> <content:encoded><![CDATA[<p>Duuuuuuuuuuuuuude!</p><p>Big thanks to you!!! I was ready to punch my keyboard in the left ventricle until I found this.</p><p>XD</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/SJHhlUsvS40" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/horizontally-center-website-structure-css/comment-page-2#comment-19662</feedburner:origLink></item> <item><title>Comment on Animated AJAX Record Deletion Using jQuery by Danny</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/UnJ5TtEfbpw/comment-page-3</link> <dc:creator>Danny</dc:creator> <pubDate>Thu, 02 Sep 2010 14:11:35 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=1725#comment-19660</guid> <description>Also, after reading a few other posts,For those who want the 'Are you sure message' to appear on click, you can actually pulll in a standard javascript call:onclick="return confirm(\'Are your sure you want to Delete this Item?\')"&gt;Add it to the href and hey presto.</description> <content:encoded><![CDATA[<p>Also, after reading a few other posts,</p><p>For those who want the &#8216;Are you sure message&#8217; to appear on click, you can actually pulll in a standard javascript call:</p><p>onclick=&#8221;return confirm(\&#8217;Are your sure you want to Delete this Item?\&#8217;)&#8221;&gt;</p><p>Add it to the href and hey presto.</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/UnJ5TtEfbpw" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/animated-ajax-jquery/comment-page-3#comment-19660</feedburner:origLink></item> <item><title>Comment on MooTools Plugin: Event.Mock by Elad Ossadon</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/5iwIFhUitx0/comment-page-1</link> <dc:creator>Elad Ossadon</dc:creator> <pubDate>Thu, 02 Sep 2010 13:27:12 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=5060#comment-19658</guid> <description>Very nice!
I would definitely use it for testing, but not in production code. I think that firing events manually isn't a best practice. I'd rather dividing into two functions - a listener and a performer, where the listener calls the performer (with or without event data). Then, I can call the performer from wherever I need in the code.</description> <content:encoded><![CDATA[<p>Very nice!<br
/> I would definitely use it for testing, but not in production code. I think that firing events manually isn&#8217;t a best practice. I&#8217;d rather dividing into two functions &#8211; a listener and a performer, where the listener calls the performer (with or without event data). Then, I can call the performer from wherever I need in the code.</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/5iwIFhUitx0" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/mootools-event/comment-page-1#comment-19658</feedburner:origLink></item> <item><title>Comment on Quick Tip:  Object Indexing vs. Array Collection by Richard K. Szabo</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/0g3s_eMlhNw/comment-page-1</link> <dc:creator>Richard K. Szabo</dc:creator> <pubDate>Thu, 02 Sep 2010 08:44:48 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=5052#comment-19655</guid> <description>As pointed out,
if($found_keywords[$keyword]) { //or array_key_exists($keyword,
requires isset() to test.Good ideas about checking up the items in JS!</description> <content:encoded><![CDATA[<p>As pointed out,<br
/> if($found_keywords[$keyword]) { //or array_key_exists($keyword,<br
/> requires isset() to test.</p><p>Good ideas about checking up the items in JS!</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/0g3s_eMlhNw" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/object-array-index/comment-page-1#comment-19655</feedburner:origLink></item> <item><title>Comment on 7 Quick CSS Enhancements for Better User Experience by Beben</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/_fduiLpgA0E/comment-page-2</link> <dc:creator>Beben</dc:creator> <pubDate>Thu, 02 Sep 2010 04:19:29 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=2388#comment-19653</guid> <description>share knowledge in the beauty of argument ;))
all is good if in accordance with the purposes and needs :)
bye bye :-h</description> <content:encoded><![CDATA[<p>share knowledge in the beauty of argument ;))<br
/> all is good if in accordance with the purposes and needs :)<br
/> bye bye :-h</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/_fduiLpgA0E" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/css-enhancements-user-experience/comment-page-2#comment-19653</feedburner:origLink></item> <item><title>Comment on 7 Quick CSS Enhancements for Better User Experience by Jeremy Carlson</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/v7NzD-kykn8/comment-page-1</link> <dc:creator>Jeremy Carlson</dc:creator> <pubDate>Thu, 02 Sep 2010 01:42:52 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=2388#comment-19650</guid> <description>I thought the new thing was to style :focus the same way you would style :hover, therefore eliminating the border wouldn't matter. I'm not familiar with what vision-impaired people go through, so is there something that the border does for them, that the same style from :hover wouldn't cover?</description> <content:encoded><![CDATA[<p>I thought the new thing was to style :focus the same way you would style :hover, therefore eliminating the border wouldn&#8217;t matter. I&#8217;m not familiar with what vision-impaired people go through, so is there something that the border does for them, that the same style from :hover wouldn&#8217;t cover?</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/v7NzD-kykn8" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/css-enhancements-user-experience/comment-page-1#comment-19650</feedburner:origLink></item> <item><title>Comment on Duplicate the jQuery Homepage Tooltips by cancel bubble</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/sqJtXSU9bjs/comment-page-1</link> <dc:creator>cancel bubble</dc:creator> <pubDate>Wed, 01 Sep 2010 22:17:10 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=5056#comment-19648</guid> <description>There's no background on the tooltips in PC FF 3.6.8</description> <content:encoded><![CDATA[<p>There&#8217;s no background on the tooltips in PC FF 3.6.8</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/sqJtXSU9bjs" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/jquery-tooltips/comment-page-1#comment-19648</feedburner:origLink></item> <item><title>Comment on Create a Zip File Using PHP by Mike</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/OZC0cStUKCo/comment-page-1</link> <dc:creator>Mike</dc:creator> <pubDate>Wed, 01 Sep 2010 21:05:56 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=2345#comment-19647</guid> <description>I'm getting this same behavior.  Work on Ubuntu archive mounter, but not in archive manager.  Doesn't work on windows.Here's the error message on linux:7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)Error: /home/michael/Downloads/dsat-assessment.zip: Can not open file as archiveErrors: 1Any suggestions?</description> <content:encoded><![CDATA[<p>I&#8217;m getting this same behavior.  Work on Ubuntu archive mounter, but not in archive manager.  Doesn&#8217;t work on windows.</p><p>Here&#8217;s the error message on linux:</p><p>7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30<br
/> p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)</p><p>Error: /home/michael/Downloads/dsat-assessment.zip: Can not open file as archive</p><p>Errors: 1</p><p>Any suggestions?</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/OZC0cStUKCo" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/create-zip-php/comment-page-1#comment-19647</feedburner:origLink></item> <item><title>Comment on An Open Letter to You, Webmaster by John</title><link>http://feedproxy.google.com/~r/DavidWalshComments/~3/jmIHcRJTqbw/comment-page-2</link> <dc:creator>John</dc:creator> <pubDate>Wed, 01 Sep 2010 18:55:58 +0000</pubDate> <guid isPermaLink="false">http://davidwalsh.name/?p=385#comment-19645</guid> <description>Laughable, but also true.</description> <content:encoded><![CDATA[<p>Laughable, but also true.</p> <img src="http://feeds.feedburner.com/~r/DavidWalshComments/~4/jmIHcRJTqbw" height="1" width="1"/>]]></content:encoded> <feedburner:origLink>http://davidwalsh.name/open-letter-webmaster/comment-page-2#comment-19645</feedburner:origLink></item> </channel> </rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 7/22 queries in 0.039 seconds using disk

Served from: davidwalsh.name @ 2010-09-02 20:28:20 -->
