<?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>Codepolice.net &#187; Wordpress</title>
	<atom:link href="http://codepolice.net/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://codepolice.net</link>
	<description>C#, ASP.NET, MVC, LINQ, Wordpress and stuff like that</description>
	<lastBuildDate>Mon, 26 Jul 2010 08:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Problems with mssql_connect() on IIS</title>
		<link>http://codepolice.net/2010/07/14/problems-with-mssql_connect-on-iis/</link>
		<comments>http://codepolice.net/2010/07/14/problems-with-mssql_connect-on-iis/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 09:47:45 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=311</guid>
		<description><![CDATA[Lately I&#8217;ve been reinstalling my Windows servers a couple of time due to some problems. I&#8217;m running both PHP (WordPress) and ASP.NET on my server. From my WordPress blog I sometimes connect to MS SQL to get some data and this time i could not get the MSSQL extension in PHP to work. I got [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been reinstalling my Windows servers a couple of time due to some problems. I&#8217;m running both PHP (WordPress) and ASP.NET on my server. From my WordPress blog I sometimes connect to MS SQL to get some data and this time i could not get the MSSQL extension in PHP to work. I got this error all the time.</p>
<blockquote><p><strong>call to undefined function mssql_connect()</strong></p></blockquote>
<p>When you Google this you mostly get the tip that you should put the file ntwdblib.dll in the /ext folder. I have a vague memory that this helped me the last time i had this problem but this time that didn&#8217;t help. I also noticed that MSSQL was not loaded when i run phpinfo().</p>
<p>Finally I <a href="http://forums.iis.net/t/1162267.aspx">found this post</a> on the IIS forum that recommended me to run the command.</p>
<blockquote><p><strong>php-cgi.exe -v</strong></p></blockquote>
<p>When I did this I got an error message telling me that &#8220;This program cannot start because msvcr71dll is missing from your computer&#8221;. I then <a href=" http://i.justrealized.com/2009/05/16/how-to-fix-missing-msvcr71dll-problem-in-windows/">downloaded this dll file</a>, put it in my C:\Windows\SysWOW64 (/system32 if you are on 32 bit). I also recycled my application on IIS and then everything worked. Hallelulja!</p>
<p>I have no idea if it&#8217;s related but i used &#8220;Web platform installer&#8221; to install PHP.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2010/07/14/problems-with-mssql_connect-on-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pclzip_err_bad_format (-10) : unable to find end of central dir record signature</title>
		<link>http://codepolice.net/2010/07/07/pclzip_err_bad_format-10-unable-to-find-end-of-central-dir-record-signature/</link>
		<comments>http://codepolice.net/2010/07/07/pclzip_err_bad_format-10-unable-to-find-end-of-central-dir-record-signature/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 08:58:09 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=308</guid>
		<description><![CDATA[I got this error today when i was trying to upgrade some WordPress plugins. It turned out that my disk was full at my webhost. When i googled the error message i got lots of different answers so i just thought i would try to give some google juice to this solution.]]></description>
			<content:encoded><![CDATA[<p>I got this error today when i was trying to upgrade some WordPress plugins. It turned out that my disk was full at my webhost. When i googled the error message i got lots of different answers so i just thought i would try to give some google juice to this solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2010/07/07/pclzip_err_bad_format-10-unable-to-find-end-of-central-dir-record-signature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Only show the sub menu when the parent is selected with the new wp_nav_menu in WordPress 3.0</title>
		<link>http://codepolice.net/2010/06/28/only-show-the-sub-menu-when-the-parent-is-selected-with-the-new-wp_nav_menu-in-wordpress-3-0/</link>
		<comments>http://codepolice.net/2010/06/28/only-show-the-sub-menu-when-the-parent-is-selected-with-the-new-wp_nav_menu-in-wordpress-3-0/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 14:39:07 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[wordpress 3]]></category>
		<category><![CDATA[wp_nav_menu]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=296</guid>
		<description><![CDATA[I just spent two hours trying to hide the submenu for a menu item that is not selected in the new menu system in WordPress 3.0. First i found this post in the WordPress forums where someone had built a &#8220;Custom Walker&#8221; but it was for a slightly different scenario and it was also a [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent two hours trying to hide the submenu for a menu item that is not selected in the new menu system in WordPress 3.0. First i found <a href="http://wordpress.org/support/topic/413314">this post in the WordPress forums</a> where someone had built a &#8220;Custom Walker&#8221; but it was for a slightly different scenario and it was also a really complicated solution. Then i realized that i can do this super simple with jQuery. All you need is two lines of codes.</p>
<pre class="brush:javascript">$(document).ready(function () {
 $(".sub-menu").hide();
 $(".current_page_item .sub-menu, .current_page_parent .sub-menu").show();
 $(".sub-menu li").after("&lt;li class='sub-menu-seperator'&gt;|&lt;/li&gt;");
});</pre>
<p>This will hide all sub-menus, and then if a parent happens to have the class .current_page_item we show the sub-menu. My god i love jQuery.</p>
<p><strong>Update:</strong></p>
<p>As sushicodeur suggest you could of course do this only with CSS, it&#8217;s basically the same thing.</p>
<pre class="brush:css">.sub-menu { display: none; }
.current_page_item .sub-menu, .current_page_parent .sub-menu { display: block; }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2010/06/28/only-show-the-sub-menu-when-the-parent-is-selected-with-the-new-wp_nav_menu-in-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress file upload on IIS, 403, permalinks and all sorts of crap</title>
		<link>http://codepolice.net/2010/06/22/wordpress-file-upload-on-iis-403-permalinks-and-all-sorts-of-crap/</link>
		<comments>http://codepolice.net/2010/06/22/wordpress-file-upload-on-iis-403-permalinks-and-all-sorts-of-crap/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 19:18:45 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[403]]></category>
		<category><![CDATA[image upload]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=291</guid>
		<description><![CDATA[I have just installed two servers with IIS 7 and IIS 7.5 and i have had all sorts of problems with IIS file uploads. Issues with permissions for PHP and WordPress. Apparently with PHP you must give your IIS_IUSRS (What is the diffrence between IIS_IUSRS and IUSR btw?)  user permission to both your temp direct [...]]]></description>
			<content:encoded><![CDATA[<p>I have just installed two servers with IIS 7 and IIS 7.5 and i have had all sorts of problems with IIS file uploads.</p>
<ol>
<li>Issues with permissions for PHP and WordPress. Apparently with PHP you must give your IIS_IUSRS (What is the diffrence between IIS_IUSRS and IUSR btw?)  user permission to both your temp direct (upload_tmp_dir) and your regular upload directory in WordPress (\wp-content\uploads)</li>
<li>Remember to SAVE YOUR POST AS A DRAFT (or publish it of course) before uploading. I just spent the last ½ hour trying to upload images but all i got was &#8220;403 Access Denied&#8221;. When i saved the post everything worked perfectly.</li>
</ol>
<p>Well .. this is the issues i found so far. Will update this post if i find anything else.</p>
<p>Links: <a href="http://joseph.randomnetworks.com/archives/2007/09/04/wordpress-file-uploads-with-iis/">WordPress File Uploads With IIS</a>, <a href="http://wordpress.org/support/topic/383737">Issue with image upload</a> .. and more</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2010/06/22/wordpress-file-upload-on-iis-403-permalinks-and-all-sorts-of-crap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Problems with Dean&#8217;s Permalinks Migration after WordPress 2.7</title>
		<link>http://codepolice.net/2008/12/22/problems-deans-permalinks-migration-wordpress-27/</link>
		<comments>http://codepolice.net/2008/12/22/problems-deans-permalinks-migration-wordpress-27/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 12:09:32 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[Dean's Permalinks Migration]]></category>
		<category><![CDATA[Permalinks]]></category>
		<category><![CDATA[Redirection]]></category>

		<guid isPermaLink="false">http://www.codepolice.net/?p=105</guid>
		<description><![CDATA[I updated to WordPress 2.7 when it was released and on the surface everything seemed to work just fine. Then today when i clicked a old link to one of my wordpress sites i got a 404 message. It turns out that Dean&#8217;s Permalinks Migration plugin stopped working after WordPress 2.7 (i assume at least, [...]]]></description>
			<content:encoded><![CDATA[<p>I updated to WordPress 2.7 when it was released and on the surface everything seemed to work just fine. Then today when i clicked a old link to one of my wordpress sites i got a 404 message.</p>
<p>It turns out that <a href="http://www.deanlee.cn/wordpress/permalinks-migration-plugin/">Dean&#8217;s Permalinks Migration plugin</a> stopped working after WordPress 2.7 (i assume at least, i didn&#8217;t do any research about it). You use Dean&#8217;s Permalinks Migration plugin to do a 301 (SEO friendly) redirect from your old permalink structure to a new one.</p>
<p>I used /year/month/day/post-title before but i wanted to change to just /post-title and Dean&#8217;s Permalinks Migration plugin worked great. But as i said before it stopped worked after we installed WordPress 2.7.</p>
<p>The solution i found was to install another plugin called <a href="http://urbangiraffe.com/plugins/redirection/">Redirection</a> that is used to do all sort of redirects in WordPress. After i installed the plugin i just added a regular expression redirect like this.</p>
<p><img class="aligncenter size-full wp-image-106" title="301-redirect" src="http://www.codepolice.net/wp-content/uploads/2008/12/301-redirect.png" alt="301-redirect" width="373" height="148" /></p>
<p>This means something like redirect any url that looks like /digits/digits/digits/text to /text. The $4 means to grab the text from the last * in the source URL.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2008/12/22/problems-deans-permalinks-migration-wordpress-27/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Generate expiring urls for Amazon S3 via a WordPress Plugin</title>
		<link>http://codepolice.net/2008/12/08/generate-expiring-urls-for-amazon-s3-via-a-wordpress-plugin/</link>
		<comments>http://codepolice.net/2008/12/08/generate-expiring-urls-for-amazon-s3-via-a-wordpress-plugin/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 13:04:31 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[Expiring URL]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Querystring Protected URL]]></category>

		<guid isPermaLink="false">http://www.codepolice.net/?p=84</guid>
		<description><![CDATA[I am a .net developer and haven&#8217;t done any PHP work ever. But i use WordPress and for some time now i been looking for a plugin that could generate a URL for Amazon S3 that is &#8220;signed&#8221; and will expire after a certain amount of time. I posted the question on both wordpress and [...]]]></description>
			<content:encoded><![CDATA[<p>I am a .net developer and haven&#8217;t done any PHP work ever. But i use WordPress and for some time now i been looking for a plugin that could generate a URL for Amazon S3 that is &#8220;signed&#8221; and will expire after a certain amount of time.</p>
<p>I posted the question on both <a href="http://wordpress.org/support/topic/221630">wordpress</a> and <a href="http://developer.amazonwebservices.com/connect/thread.jspa?threadID=27036&amp;tstart=0">amazon</a> forums but haven&#8217;t got any replies. Well .. maybe i did not explain my problem good or nobody else is interested in this.</p>
<p>So i figured i had to take care of this myself. And as i said. I&#8217;m a total newbie in both PHP and WordPress plugins so my plugin is probably really really stupid and i would be happy if somebody could send suggestions how to make it better. But it works.</p>
<p><strong>How does it work?</strong></p>
<p>You just add</p>
<p>[S3 bucket=yourbucket text=your link text]the_object_name.txt[/S3]</p>
<p>to your post or page and it will generate a expiring urls that no leecher can link to. If you don&#8217;t supply and link text it will not generate a link and just print the URL. I use the same bucket names as URL&#8217;s (like netplay.whoa.nu) and if you use Amazon standard urls you must change this.</p>
<p>Download: <a href="http://wordpress.org/extend/plugins/amazon-s3-url-generator/">Amazon S3 URL Generator</a></p>
<p>Thanks to <a href="http://www.fused.org.uk/2008/08/s3-query-string-authentication-generator/">this guy</a> for the PHP script i based this on.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2008/12/08/generate-expiring-urls-for-amazon-s3-via-a-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->