<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0">

<channel>
	<title>Ryan McDonnell</title>
	
	<link>http://www.ryanmcdonnell.com</link>
	<description>Pursuing Web Application Zen</description>
	<pubDate>Sun, 05 Jul 2009 18:30:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ryanmcdonnell" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Vista Media Center “Restricted Content” error on Live TV</title>
		<link>http://www.ryanmcdonnell.com/vista-media-center-restricted-content-error-on-live-tv/</link>
		<comments>http://www.ryanmcdonnell.com/vista-media-center-restricted-content-error-on-live-tv/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 19:56:25 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/vista-media-center-restricted-content-error-on-live-tv/</guid>
		<description><![CDATA[I&#8217;ve been using Windows Media Center on my primary television for several years now. First, with Windows XP Media Center Edition and now Windows Vista Home Premium. Until recently, the old Pentium 4 2.8Ghz (478-pin) with 2GB of RAM and an Nvidia FX5200 AGP video card was running fine. Unfortunately, the video card driver started crashing frequently and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Windows Media Center on my primary television for several years now. First, with Windows XP Media Center Edition and now Windows Vista Home Premium. Until recently, the old Pentium 4 2.8Ghz (478-pin) with 2GB of RAM and an Nvidia FX5200 AGP video card was running fine. Unfortunately, the video card driver started crashing frequently and I had to replace it with an ATI HD2400 (the only AGP card available in local stores). Switching to an ATI card meant that the Nvidia PureVideo decoder couldn&#8217;t off-load some of the decoding to the video card anymore. Video playback would get choppy on very rare occassions but it was still annoying. Finally I decided to replace the internals of the system and jump to a motherboard that supported PCI Express. I had a spare ASUS P5WD2 Premium laying around, so I dropped that in with a Pentium 4 3.4Ghz (775-pin) CPU. I also recovered an Nvidia 6600GT from storage and added that into the mix. I kept the same hard drive as before (Western Digital 250GB with 16MB buffer) as I didn&#8217;t want to reinstall Vista, lose my settings, recording schedule, etc.<span id="more-32"></span></p>
<p>After the upgrade, my wife and I started to notice that we couldn&#8217;t watch anything on the Encore channels anymore. After 2 or so minutes watching those channels, playback would stop and an error message would appear on screen saying:</p>
<p>&#8220;Restricted Content - Restrictions set by the broadcaster or the originator of the content prohibit playback of this program on this computer.&#8221;</p>
<p>After some searching on Google, I found this problem was caused by my hardware upgrades and the DRM licenses on the system needed to refreshed. I found links to the following Microsoft knowledgebase articles:</p>
<p><a href="http://support.microsoft.com/kb/913800">http://support.microsoft.com/kb/913800</a></p>
<p><a href="http://support.microsoft.com/kb/929642">http://support.microsoft.com/kb/929642</a></p>
<p>Both of them didn&#8217;t mention my problem exactly, but other users had reported success in using the article to solve similar problems.</p>
<p>Unfortunately for me, neither solved my problem. Clearing out on the files under C:\ProgramData\Microsoft\Windows\DRM? Didn&#8217;t change anything. Upgrading the DRM security components at <a href="http://drmlicense.one.microsoft.com/Indivsite/en/indivit.asp?force=1">http://drmlicense.one.microsoft.com/Indivsite/en/indivit.asp?force=1</a>? That didn&#8217;t even work. The &#8220;Upgrade&#8221; button was unclickable and the page reported a Javascript error.</p>
<p>Since I knew this was a DRM issue, I decided to load up the Zune software and see how that would handle my DRM issue. After installing the software and logging into my Zune account, I received more error messages when trying to download any music. But I had a feeling I was getting closer to a solution. The Zune software was giving me an error code: C00D12F5. After a quick search on the Zune support boards I had found a solution:</p>
<p><a href="http://go.microsoft.com/fwlink?linkid=105000">http://go.microsoft.com/fwlink?linkid=105000</a></p>
<p>Follow that link to download an executable named ResetDRM.exe. Running this program will reset the DRM licenses on your system. If you have previously recorded TV programs, I&#8217;ve been warned that you may not be able to watch them after resetting your DRM licenses. I would assume this applies mostly to content recorded from premium channels like HBO. I had a handful of recorded programs from network stations and didn&#8217;t have a problem.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=ziBXwlfc_pk:VOZOSMvzotY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=ziBXwlfc_pk:VOZOSMvzotY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=ziBXwlfc_pk:VOZOSMvzotY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=ziBXwlfc_pk:VOZOSMvzotY:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/ziBXwlfc_pk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/vista-media-center-restricted-content-error-on-live-tv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>“The path  is already mapped to workspace…”</title>
		<link>http://www.ryanmcdonnell.com/the-path-is-already-mapped-to-workspace/</link>
		<comments>http://www.ryanmcdonnell.com/the-path-is-already-mapped-to-workspace/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 15:00:58 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/the-path-is-already-mapped-to-workspace/</guid>
		<description><![CDATA[I just recently setup a new Team Foundation Server installation on a newer more powerful server. The older server was quickly taken offline. I stripped the source control bindings from old projects and proceeded to bind them to the new server. In doing so, I was given the following error:
The path &#60;path&#62; is already mapped [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently setup a new Team Foundation Server installation on a newer more powerful server. The older server was quickly taken offline. I stripped the source control bindings from old projects and proceeded to bind them to the new server. In doing so, I was given the following error:</p>
<p>The path &lt;path&gt; is already mapped to workspace &lt;workspace&gt;.<br />
<span id="more-31"></span><br />
A quick search lead me to a <a href="http://blogs.msdn.com/buckh/archive/2006/09/12/path_is_already_mapped_in_workspace.aspx">post by Buck Hodges</a>, the lead developer on the Team Foundation Build team.</p>
<p>The solution is fairly easy. An XML file named VersionControl.config stores the mappings you have to each workspace and Team Foundation Server. On Vista, this file is located at:</p>
<p>C:\Users\&lt;username&gt;\AppData\Local\Microsoft\TeamFoundation\1.0\Cache\VersionControl.config</p>
<p>Open up that file and remove the appropiate &lt;ServerInfo&gt; entry that pertains to the decommissioned server.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=oSvOIxpf5vA:rUQ5PzWFoOQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=oSvOIxpf5vA:rUQ5PzWFoOQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=oSvOIxpf5vA:rUQ5PzWFoOQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=oSvOIxpf5vA:rUQ5PzWFoOQ:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/oSvOIxpf5vA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/the-path-is-already-mapped-to-workspace/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Always show the PagerTemplate in GridView control</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/</link>
		<comments>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 13:00:08 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/</guid>
		<description><![CDATA[The PagerTemplate can be a handy place to put some frequently used controls or data in your GridView. I like to use the area to include the number and range of records displayed, some paging details and a DropDownList to let the user view more records at a time.

But what happens when the number of records doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>The PagerTemplate can be a handy place to put some frequently used controls or data in your GridView. I like to use the area to include the number and range of records displayed, some paging details and a DropDownList to let the user view more records at a time.<span id="more-26"></span></p>
<p><img border="0" width="488" src="http://www.ryanmcdonnell.com/wp-content/uploads/2007/08/pagertemplate1.png" alt="Sample PagerTemplate output" height="23" /></p>
<p>But what happens when the number of records doesn&#8217;t exceed the PageSize? The PagerTemplate isn&#8217;t displayed.</p>
<p>To get around that, extend the GridView in a custom server control and override the PageCount property to force the PagerTemplate to always be displayed. As long as the PageCount property is greater than one, the paging controls are rendered.</p>
<p><code>public override int PageCount {<br />
  </code><code>get {<br />
    // Override the PageCount if only one page exists to<br />
    </code><code>// force the PagerTemplate to always be displayed<br />
    int pageCount = base.PageCount;<br />
    if (pageCount == 1) {<br />
      // Only override the PageCount if the GridView.CreateChildControls is calling<br />
      </code><code>System.Diagnostics.StackFrame sf = new System.Diagnostics.StackFrame(1);<br />
      if (sf.GetMethod().Name == "CreateChildControls" &amp;&amp; sf.GetMethod().ReflectedType == typeof(GridView))<br />
      {<br />
        pageCount++;<br />
      }<br />
    }<br />
    return pageCount;<br />
  }<br />
} </code></p>
<p>The key part here is the StackFrame is looking up the stack and only returning an inflated PageCount if the calling method is the CreateChildControls method from the GridView. This keeps our PageCount number valid for display purposes and only tricks the GridView into thinking there is more than one page for purposes of forcing the paging controls to always be displayed.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=RDVFJtDufNU:88aDI5ittnM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=RDVFJtDufNU:88aDI5ittnM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=RDVFJtDufNU:88aDI5ittnM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=RDVFJtDufNU:88aDI5ittnM:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/RDVFJtDufNU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Multiple blogs, one WordPress install, zero code changes</title>
		<link>http://www.ryanmcdonnell.com/multiple-blogs-one-wordpress-install-zero-code-changes/</link>
		<comments>http://www.ryanmcdonnell.com/multiple-blogs-one-wordpress-install-zero-code-changes/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 13:00:22 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/multiple-blogs-one-wordpress-install-zero-code-changes/</guid>
		<description><![CDATA[Now I know there are plenty of patches and other projects out there to host multiple blogs from a single installation of WordPress. Many of them focus on trying to host multiple blogs that have a common element such as users, site design, or subdomains. What I wanted to do was a bit different.


One installation of [...]]]></description>
			<content:encoded><![CDATA[<p>Now I know there are <a href="http://codex.wordpress.org/Installing_Multiple_Blogs" target="_blank">plenty of patches and other projects</a> out there to host multiple blogs from a single installation of WordPress. Many of them focus on trying to host multiple blogs that have a common element such as users, site design, or subdomains. What I wanted to do was a bit different.</p>
<p><span id="more-23"></span></p>
<ul>
<li>One installation of WordPress to make future upgrades easy</li>
<li>Run multiple distinct and completely unique sites from that single installation</li>
<li>Each site is configured as its own virtual host within Apache</li>
<li>Each site has a unique design, theme, database, users, etc.</li>
<li>There should be zero changes to the code file included with WordPress.</li>
<li>Future version upgrades should be as easy as uploading the newest files.</li>
<li>Separate &#8216;wp-config.php&#8217; configuration file for each blog/site.</li>
<li>Everything about each blog/site is under one directory that I can provide different users access to via FTP.</li>
</ul>
<h3>Installing Wordpress</h3>
<p>First things first, I downloaded the latest version of WordPress, unzipped it and uploaded it via FTP to my server. I chose to to upload it to &#8220;/var/www/.wordpress&#8221; and gave it the appropriate permissions.</p>
<p>Open &#8216;wp-config.php&#8217; (create it if it doesn&#8217;t exist) and insert the following into it:</p>
<p><code>&lt;?php require('local/wp-config.php'); ?&gt;</code></p>
<p>That&#8217;s it. Your single installation is now ready to serve multiple sites.</p>
<h3>Setup a new blog</h3>
<p>Now comes the fun part. Create the folder you&#8217;ll see running the new blog under. For this example, I&#8217;ll use &#8216;/var/www/example.com&#8217;. This is the folder that will serve as the root folder for the virtual host under Apache.</p>
<p>Under the newly created folder, create an &#8216;.htaccess&#8217; file and insert the following line into it:</p>
<p><code>php_value include_path ".:/var/www/example.com/local/:/var/www/example.com/"</code></p>
<p>Now create a new folder called &#8220;local&#8221;. Within that folder, put the &#8216;wp-config.php&#8217; file that you would normally use with WordPress.</p>
<p><code>&lt;?php<br />
define('DB_NAME', 'wp_example');<br />
define('DB_USER', 'example');<br />
define('DB_PASSWORD', 'password');<br />
define('DB_HOST', 'localhost');<br />
prefix $table_prefix  = 'wp_';<br />
define('WPLANG', '');<br />
define('ABSPATH', '/var/www/example.com/');<br />
require_once(ABSPATH.'wp-settings.php');<br />
?&gt;</code></p>
<p>There is one key change you need to make. Edit the second to last line and define the &#8216;ABSPATH&#8217; variable to be an absolute path to the root of this site.</p>
<p>Now, drop back into the root folder of the site. Create a file called &#8216;wp-config.php&#8217; and put the following line in it:</p>
<p><code>&lt;?php require('local/wp-config.php'); ?&gt;</code></p>
<p>So now your file structure should look like this so far:</p>
<p>/www/var/example.com/.htaccess<br />
/www/var/example.com/wp-config.php<br />
/www/var/example.com/local/wp-config.php</p>
<p>We&#8217;re almost there. Now create symbolic links to all the actual WordPress files/folders except for the &#8216;wp-content&#8217; folder.</p>
<p>index.php -&gt; /var/www/.wordpress/index.php<br />
wp-admin -&gt; /var/www/.wordpress/wp-admin/<br />
wp-atom.php -&gt; /var/www/.wordpress/wp-atom.php<br />
wp-blog-header.php -&gt; /var/www/.wordpress/wp-blog-header.php<br />
wp-comments-post.php -&gt; /var/www/.wordpress/wp-comments-post.php<br />
wp-commentsrss2.php -&gt; /var/www/.wordpress/wp-commentsrss2.php<br />
wp-cron.php -&gt; /var/www/.wordpress/wp-cron.php<br />
wp-feed.php -&gt; /var/www/.wordpress/wp-feed.php<br />
wp-includes -&gt; /var/www/.wordpress/wp-includes/<br />
wp-links-opml.php -&gt; /var/www/.wordpress/wp-links-opml.php<br />
wp-login.php -&gt; /var/www/.wordpress/wp-login.php<br />
wp-mail.php -&gt; /var/www/.wordpress/wp-mail.php<br />
wp-pass.php -&gt; /var/www/.wordpress/wp-pass.php<br />
wp-rdf.php -&gt; /var/www/.wordpress/wp-rdf.php<br />
wp-register.php -&gt; /var/www/.wordpress/wp-register.php<br />
wp-rss.php -&gt; /var/www/.wordpress/wp-rss.php<br />
wp-rss2.php -&gt; /var/www/.wordpress/wp-rss2.php<br />
wp-settings.php -&gt; /var/www/.wordpress/wp-settings.php<br />
wp-trackback.php -&gt; /var/www/.wordpress/wp-trackback.php<br />
xmlrpc.php -&gt; /var/www/.wordpress/xmlrpc.php</p>
<p>I didn&#8217;t want to make symbolic link to the &#8216;wp-content&#8217; folder because I wanted to be able to edit the themes individually for each site. To get that working, create a folder called &#8216;wp-content&#8217; in your site (&#8217;/var/www/example.com/wp-content&#8217;). Under &#8216;wp-content&#8217;, create a &#8216;themes&#8217; folder and then make the following symbolic links:</p>
<p>/var/www/example.com/wp-content/index.php -&gt; /var/www/.wordpress/wp-content/index.php<br />
/var/www/example.com/wp-content/plugins -&gt; /var/www/.wordpress/wp-content/plugins/<br />
/var/www/example.com/wp-content/themes/default -&gt; /var/www/.wordpress/wp-content/themes/default</p>
<p>The last symbolic link will make the default theme available to you until you upload a new one.</p>
<p>Everything is go!</p>
<p>Proceed with your WordPress installation like normal (database setup, login into admin area, etc).</p>
<h3>Plugins</h3>
<p>The &#8216;plugins&#8217; folder has a central location under &#8216;/var/www/.wordpress/wp-content/plugins&#8217;. Upload your plugins there and all your blog can benefit from them. Each blog can enabled to use only the plugins you want to use.</p>
<h3>Future versions</h3>
<p>When future WordPress versions are released, just upload them to the &#8216;.wordpress&#8217; folder and you&#8217;ve updated all your blogs at once! With each new version, take a quick look at the files included incase they&#8217;ve added some new files which you&#8217;ll need to create symbolic links for.</p>
<h3>Caveats</h3>
<p>Unfortunately my method requires some command-like access via a terminal/SSH and this method cannot be used with most shared hosting providers. Perhaps someone can build a small script that builds the symbolic links?</p>
<p>Some directives in the &#8216;.htaccess&#8217; may not work unless you define &#8216;AllowOverrides All&#8217; in the Apache virtual host configuration.</p>
<h3>How it works</h3>
<p>Symbolic links can cause problems when using the include() or require() functions within PHP. The formatting of the requested file&#8217;s path can influence if the file is included from the symbolic link&#8217;s folder or the original folder that the site is running under.</p>
<p>My solution to that problem is contained within the &#8216;.htaccess&#8217; file. The PHP engine is configured to look for include files within a path before it the current folder is checked. This allows us to override the location of the &#8216;wp-config.php&#8217; file and always grab the copy located within the &#8216;local&#8217; folder on each site.</p>
<p>If you have any questions or issues please leave a comment below!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=N94TQOBgSA4:bwvTlomaGdE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=N94TQOBgSA4:bwvTlomaGdE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=N94TQOBgSA4:bwvTlomaGdE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=N94TQOBgSA4:bwvTlomaGdE:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/N94TQOBgSA4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/multiple-blogs-one-wordpress-install-zero-code-changes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Search engines agree on auto-discovering sitemap.xml</title>
		<link>http://www.ryanmcdonnell.com/search-engines-agree-on-auto-discovering-sitemapxml/</link>
		<comments>http://www.ryanmcdonnell.com/search-engines-agree-on-auto-discovering-sitemapxml/#comments</comments>
		<pubDate>Wed, 11 Apr 2007 22:38:53 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/search-engines-agree-on-auto-discovering-sitemapxml/</guid>
		<description><![CDATA[Google, Yahoo, MSN and Ask all announced today that they will support the sitemap.xml format. Furthermore, you can now include a line in the robots.txt file that points the search engines to the URL of your sitemap. Now sitemaps will be auto-discovered by the engines and no longer require manual submission.
Within your robots.txt file, add the [...]]]></description>
			<content:encoded><![CDATA[<p>Google, Yahoo, MSN and Ask all <a href="http://googlewebmastercentral.blogspot.com/2007/04/whats-new-with-sitemapsorg.html">announced today</a> that they will support the sitemap.xml format. Furthermore, you can now include a line in the robots.txt file that points the search engines to the URL of your sitemap. Now sitemaps will be auto-discovered by the engines and no longer require manual submission.<span id="more-18"></span></p>
<p>Within your robots.txt file, add the following line:</p>
<p>Sitemap: http://www.example.com/sitemap.xml</p>
<p>I&#8217;ll post some results down the road when I get around to implementing this myself.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=N40xQoO0spw:0sAy9feBtoY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=N40xQoO0spw:0sAy9feBtoY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=N40xQoO0spw:0sAy9feBtoY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=N40xQoO0spw:0sAy9feBtoY:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/N40xQoO0spw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/search-engines-agree-on-auto-discovering-sitemapxml/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Stop comment spam on a Wordpress blog</title>
		<link>http://www.ryanmcdonnell.com/stop-comment-spam-on-a-wordpress-blog/</link>
		<comments>http://www.ryanmcdonnell.com/stop-comment-spam-on-a-wordpress-blog/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 23:42:41 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/stop-comment-spam-on-a-wordpress-blog/</guid>
		<description><![CDATA[I originally posted this in the comments on a recent TechCrunch article, TechCrunch has 15,000 Spam Comments Per Day. I thought it was worth archiving here also.
 This is a method I&#8217;ve used successfully to bring comment spam to screaching halt on some of my clients&#8217; blogs.
First, rename wp-comments-post.php to something else.
Second, create a blank wp-comments-post.php file (just so [...]]]></description>
			<content:encoded><![CDATA[<p>I originally posted this in the comments on a recent TechCrunch article, <font color="#000000"><a href="http://www.techcrunch.com/2007/03/17/techcrunch-has-15000-spam-comments-per-day/trackback/">TechCrunch has 15,000 Spam Comments Per Day</a>.</font> I thought it was worth archiving here also.</p>
<p> This is a method I&#8217;ve used successfully to bring comment spam to screaching halt on some of my clients&#8217; blogs.<span id="more-17"></span></p>
<p>First, rename wp-comments-post.php to something else.</p>
<p>Second, create a blank wp-comments-post.php file (just so that the spammers still get a 200 HTTP status code)</p>
<p>Third, edit the “comments” page in your template. Leave the “action” attribute pointing to the default wp-comments-post.php page. Add some Javascript to the FORM tag’s “onSubmit” method. Something like:</p>
<p><code>onsubmit="this.action='location-of-new-wp-comments-post.php'; return true;"</code></p>
<p>Anyone with Javascript enabled (nearly 100%) will be able to post comments but the spam bots (which do not parse Javascript) will not.</p>
<p>You can even obfuscate the Javascript code further by throwing in some random concatenation…</p>
<p><code>onsubmit="this.action='location' + '-of-new-wp-comments-post.' + 'php'; return true;"</code></p>
<p>… or setting the URL in a variable and referencing the variable instead.</p>
<p> Using this technique brings comment spam to near zero. I&#8217;ve left Akismet in place to catch the small number of manual spam comments but I only see those maybe once every week, even on highly trafficked sites.</p>
<p>Note: I&#8217;ve not implemented this method on this site. This blog gets no comment spam since it gets very low traffic. Someday I&#8217;ll eat my own dog food.</p>
<p><strong>Update 7/11/2007:</strong> The above process works beautifully to stop spam but it&#8217;s a little more complicated than an easier solution that gets 95% of the benefit. The easiest way to stop comment spam is to simply rename the wp-comments-post.php to something else and edit the &lt;form&gt; tag in your theme to reference to the new name. I find it easiest to just throw some random characters at the end of the name. For example, on this site, I&#8217;ve renamed it to &#8220;wp-comments-post-3m0dw12&#215;35.php&#8221;.</p>
<p>The above method using the JavaScript just takes it a step further to combat those bots which actually check the HTML code for the URL the form is posting to.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=5o3j9try8Hs:EUB_tOmSh0E:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=5o3j9try8Hs:EUB_tOmSh0E:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=5o3j9try8Hs:EUB_tOmSh0E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=5o3j9try8Hs:EUB_tOmSh0E:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/5o3j9try8Hs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/stop-comment-spam-on-a-wordpress-blog/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Redirect /index.php to / with WordPress</title>
		<link>http://www.ryanmcdonnell.com/redirect-indexphp-to-with-wordpress/</link>
		<comments>http://www.ryanmcdonnell.com/redirect-indexphp-to-with-wordpress/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 05:28:24 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/redirect-indexphp-to-with-wordpress/</guid>
		<description><![CDATA[When evaluting the search engine rankings for some clients with WordPress blogs I noticed that many of the engines were indexing the http://www.domain.com/index.php and http://www.domain.com/ URLs separately. Obviously this is not ideal as it splits up the ranking and authority for that single page into two unique URLs. Having WordPress in the mix complicates the [...]]]></description>
			<content:encoded><![CDATA[<p>When evaluting the search engine rankings for some clients with WordPress blogs I noticed that many of the engines were indexing the http://www.domain.com/index.php and http://www.domain.com/ URLs separately. Obviously this is not ideal as it splits up the ranking and authority for that single page into two unique URLs. <span id="more-11"></span>Having WordPress in the mix complicates the solution because it already adds mod_rewrite rules to the .htaccess file to handle the permalinks for your blog. Here&#8217;s the trick to make it work:<br />
<code><br />
RewriteEngine On<br />
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]<br />
RewriteRule . / [R=301,L]<br />
</code><br />
Add the above rules <strong>before</strong> the WordPress mod_rewrite rules. The trick here is that the rule matches the actual URL specified in the HTTP request. If you try using a rule that matches REQUEST_URI (or similar) you&#8217;ll get an infinitely looping redirect because it conflicts with the WordPress rules.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=-voB7RZLDe4:pVDFp36Xfk8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=-voB7RZLDe4:pVDFp36Xfk8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=-voB7RZLDe4:pVDFp36Xfk8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=-voB7RZLDe4:pVDFp36Xfk8:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/-voB7RZLDe4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/redirect-indexphp-to-with-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FileSystemWatcher fires multiple times for the same event</title>
		<link>http://www.ryanmcdonnell.com/filesystemwatcher-fires-multiple-times-for-the-same-event/</link>
		<comments>http://www.ryanmcdonnell.com/filesystemwatcher-fires-multiple-times-for-the-same-event/#comments</comments>
		<pubDate>Tue, 07 Sep 2004 08:00:54 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/filesystemwatcher-fires-multiple-times-for-the-same-event/</guid>
		<description><![CDATA[The FileSystemWatcher component recently gave me some headaches when firing events in response to changes to files it was watching.  In one case, when modifying a file, the FileSystemWatcher was firing four times for the same event&#8230; or so it seemed. After some research and testing, I came to the realization that four events were being [...]]]></description>
			<content:encoded><![CDATA[<p>The FileSystemWatcher component recently gave me some headaches when firing events in response to changes to files it was watching.  In one case, when modifying a file, the FileSystemWatcher was firing <strong>four</strong> times for the same event&#8230; or so it seemed.<span id="more-16"></span> After some research and testing, I came to the realization that <strong>four </strong>events were being fired. The FileSystemWatcher was doing it&#8217;s job right. I had simply disregarded the effects of anti-virus and native application file system handling. A simple change of a text file in Notepad may seem like only one file system event, but adding an anti-virus program&#8217;s checks into the mix can easily make that single event turn into four unique file system actions.</p>
<p><a href="http://www.experts-exchange.com/Programming/Languages/.NET/Q_20708008.html">http://www.experts-exchange.com/Programming/Languages/.NET/Q_20708008.html</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=UocjLYELyys:md-uV_PZLuI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=UocjLYELyys:md-uV_PZLuI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=UocjLYELyys:md-uV_PZLuI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=UocjLYELyys:md-uV_PZLuI:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/UocjLYELyys" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/filesystemwatcher-fires-multiple-times-for-the-same-event/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting a file’s short name (8.3 format) in .NET</title>
		<link>http://www.ryanmcdonnell.com/getting-a-files-short-name-83-format-in-net/</link>
		<comments>http://www.ryanmcdonnell.com/getting-a-files-short-name-83-format-in-net/#comments</comments>
		<pubDate>Fri, 16 Jul 2004 08:00:24 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/getting-a-files-short-name-83-format-in-net/</guid>
		<description><![CDATA[Using short file names is not something that should be needed anymore, probably violates most “best practices“ and will likely be deprecated in the future. I assume this is why Microsoft did not provide an easy method for finding a file&#8217;s short name with the .NET Framework. Unfortunately, while writing an interface to an older, [...]]]></description>
			<content:encoded><![CDATA[<p>Using short file names is not something that should be needed anymore, probably violates most “best practices“ and will likely be deprecated in the future. I assume this is why Microsoft did not provide an easy method for finding a file&#8217;s short name with the .NET Framework. Unfortunately, while writing an interface to an older, poorly written application, I needed to supply the short name for some files.<span id="more-13"></span> The code below outlines how to do this. Usage should be self-explanatory. The System.Runtime.InteropServices and System.Text classes will need to be imported.</p>
<p><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Public</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Class</span> Interop</span><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent">    &lt;DllImport(<span style="font-size: 11px; color: #666666; font-family: Courier New; background-color: #e4e4e4">&#8220;kernel32.dll&#8221;</span>, SetLastError:=<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">True</span>, CharSet:=CharSet.<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Auto</span>)&gt; _<br />
    <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Public</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Shared</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Function</span> GetShortPathName(<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">ByVal</span> longPath <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">String</span>, &lt;MarshalAs(UnmanagedType.LPTStr)&gt; <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">ByVal</span> ShortPath <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> StringBuilder, &lt;MarshalAs(UnmanagedType.U4)&gt; <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">ByVal</span> bufferSize <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Integer</span>) <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Integer</span><br />
    <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">End</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Function</span></p>
<p><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">End</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Class</span></p>
<p></span><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent"><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Private</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Function</span> GetShortName(<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">ByVal</span> strPath <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">String</span>, <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">ByVal</span> blnIncludePath <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Boolean</span>) <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">String</span><br />
    <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Dim</span> sb <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> StringBuilder <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">New</span> StringBuilder(1024)<br />
    <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Dim</span> retVal <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">As</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Integer</span> <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> Interop.GetShortPathName(strPath, sb, 1024)<br />
    GetShortName <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> sb.ToString<br />
    <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">If</span> <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">Not</span> blnIncludePath <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Then</span><br />
       GetShortName <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Mid</span>(GetShortName, <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">InStrRev</span>(GetShortName, <span style="font-size: 11px; color: #666666; font-family: Courier New; background-color: #e4e4e4">&#8220;\&#8221;</span>) <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">+</span> 1)<br />
    <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">End</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">If</span><br />
<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">End</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">Function</span></span></span></span></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=V0m4D9HNbdc:4UfKlIDsFhE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=V0m4D9HNbdc:4UfKlIDsFhE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=V0m4D9HNbdc:4UfKlIDsFhE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=V0m4D9HNbdc:4UfKlIDsFhE:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/V0m4D9HNbdc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/getting-a-files-short-name-83-format-in-net/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quick browser window size adjustments</title>
		<link>http://www.ryanmcdonnell.com/quick-browser-window-size-adjustments/</link>
		<comments>http://www.ryanmcdonnell.com/quick-browser-window-size-adjustments/#comments</comments>
		<pubDate>Mon, 28 Jun 2004 08:00:03 +0000</pubDate>
		<dc:creator>Ryan McDonnell</dc:creator>
		
		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://www.ryanmcdonnell.com/quick-browser-window-size-adjustments/</guid>
		<description><![CDATA[When developing web-based applications, the resolution of the target user has to be taken into consideration. My development machine runs a resolution of 1280&#215;1024 but I frequently need to verify that a particular web application will fit on the screen of a user running 1024&#215;768 or even 800&#215;600. Rather than adjusting my resolution every time, [...]]]></description>
			<content:encoded><![CDATA[<p>When developing web-based applications, the resolution of the target user has to be taken into consideration. My development machine runs a resolution of 1280&#215;1024 but I frequently need to verify that a particular web application will fit on the screen of a user running 1024&#215;768 or even 800&#215;600. <span id="more-14"></span>Rather than adjusting my resolution every time, I&#8217;ve added a link under Favorites inside Internet Explorer that resizes the window to the size I wish.</p>
<p>In the Address bar, enter the following:</p>
<p><code>javascript:resizeTo(1024,768); moveTo(128,128);</code></p>
<p>This will resize the window and center it on a 1280&#215;1024 resolution display. Now just add this address to your Favorites. I place the bookmark under the Links folder to make it easily accessible on the toolbar. You can change the numbers to adjust the window size and placement.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=r10mPTqEjfI:HZ8ITXwNnaQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=r10mPTqEjfI:HZ8ITXwNnaQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ryanmcdonnell?a=r10mPTqEjfI:HZ8ITXwNnaQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ryanmcdonnell?i=r10mPTqEjfI:HZ8ITXwNnaQ:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ryanmcdonnell/~4/r10mPTqEjfI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ryanmcdonnell.com/quick-browser-window-size-adjustments/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
