<?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>workblog &#187; Wordpress</title>
	<atom:link href="http://iandunn.name/workblog/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://iandunn.name/workblog</link>
	<description></description>
	<lastBuildDate>Wed, 25 Aug 2010 22:23:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Accessing cforms Data Directly</title>
		<link>http://iandunn.name/workblog/accessing-cforms-data-directly/</link>
		<comments>http://iandunn.name/workblog/accessing-cforms-data-directly/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 19:04:36 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=114</guid>
		<description><![CDATA[I&#8217;m using the cforms plugin on one site at the client&#8217;s request, and I needed to access some of the form&#8217;s data. Their API didn&#8217;t have what I needed, so I thought I&#8217;d just query the database directly. But when I looked at the database I didn&#8217;t see any tables for it. I thought that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using the <a href="http://www.deliciousdays.com/cforms-plugin">cforms</a> plugin on one site at the client&#8217;s request, and I needed to access some of the form&#8217;s data. Their API didn&#8217;t have what I needed, so I thought I&#8217;d just query the database directly. But when I looked at the database I didn&#8217;t see any tables for it. I thought that was kind of odd, but figured maybe they just used a bunch of wp_options fields, but I didn&#8217;t notice anything when I skimmed through the table. Then I thought maybe they were writing out to an XML file, so I looked through the file system, but found nothing. Kind of frustrated, I started skimming through the code to try and figure out where hell it was storing it&#8217;s data. I Didn&#8217;t find anything solid, so I searched their forums and on Google, and found nothing.</p>
<p>I came back a few days later and skimmed through the code again and eventually figured out that it <em>was</em> using the wp_options table, but only one field. All of the global settings, form settings and form data are stored in a single field, in a serialized format that only an MIT grad on crack could parse by hand.</p>
<p>I added a post to their forums to help anyone else in my position, and also to mention that maybe their approach wasn&#8217;t the most intuitive, organized or standard. After a couple of days I checked back to see if anyone had left any comments on it, but it was gone. Lame&#8230; How petty and insecure do you have to be to censor criticism?</p>
<p>So anyway, in the end all you really need to do is use get_option() to get an associative array of all of the data.</p>
<pre name="code" class="php">

$cforms = get_option(&#039;cforms_settings&#039;); // get the data
echo &#039;&lt;pre&gt;&#039;. print_r($cforms, true) .&#039;&lt;/pre&gt;&#039;; // output in readable format
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/accessing-cforms-data-directly/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Home page posts missing when using Pretty Permalinks for Wordpress on IIS</title>
		<link>http://iandunn.name/workblog/12/</link>
		<comments>http://iandunn.name/workblog/12/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:12:47 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=12</guid>
		<description><![CDATA[I&#8217;ve been working on a problem recently with the Pretty Permalinks solution for Wordpress on IIS. I was migrating a working Wordpress blog from one server to another and once it was on the new server the front page would come up w/ the theme, but instead of the default posts it would say &#8220;Sorry, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a problem recently with the <a href="http://tech.einaregilsson.com/2007/07/30/pretty-wordpress-permalinks-on-iis/">Pretty Permalinks</a> solution for Wordpress on IIS. I was migrating a working Wordpress blog from one server to another and once it was on the new server the front page would come up w/ the theme, but instead of the default posts it would say &#8220;Sorry, no posts matched your criteria.&#8221; If I reverted to the default ?p=id permalinks everything worked fine, but not with /%postname%. With the %postname% permalinks, any sub pages would work, just not http://example.com/blog. http://example.com/blog/index.php would work, though. I think the problem is because <a href="http://tech.einaregilsson.com/2007/07/30/pretty-wordpress-permalinks-on-iis/#comment-21686">the site was using PHP&#8217;s ISAPI module instead of FastCGI</a>. The server I was moving to only had CGI and ISAPI, so instead of using FastCGI I just created a /blog/index.html and set IIS to redirect it to http://example.com/blog/index.php</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protecting Contact Forms From Spam</title>
		<link>http://iandunn.name/workblog/akismet-libraries/</link>
		<comments>http://iandunn.name/workblog/akismet-libraries/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 17:27:23 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Spam]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=8</guid>
		<description><![CDATA[I&#8217;ve had several clients complain about getting spam through their contact forms. Initially, I tried checking the referrers to make sure the comments were being submitted from a browser rather than just a bot, but that didn&#8217;t help enough. Luckily, many people have created libraries for Akismet, the anti-spam service that Wordpress uses. I setup [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had several clients complain about getting spam through their contact forms. Initially, I tried checking the referrers to make sure the comments were being submitted from a browser rather than just a bot, but that didn&#8217;t help enough. Luckily, many people have created libraries for <a href="http://akismet.com">Akismet</a>, the anti-spam service that Wordpress uses. I setup the contact form to use <a href="http://miphp.net/blog/view/php4_akismet_class">Bret Kuhns&#8217; PHP4 class</a>, which submits the comment to Akismet&#8217;s service and lets you know if it&#8217;s spam or not. There are <a href="http://akismet.com/development/">several other libraries available</a>, including ones for PHP5, Python, Java, Ruby on Rails and .NET2.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/akismet-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blank Page when using IIS Permalink hack</title>
		<link>http://iandunn.name/workblog/blank-page-when-using-iis-permalink-hack/</link>
		<comments>http://iandunn.name/workblog/blank-page-when-using-iis-permalink-hack/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 17:44:13 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=5</guid>
		<description><![CDATA[I use Pretty Wordpress Permalinks on IIS when I need to install WP on a windows server, but on one host I ran into a problem where I would get a blank page if the post didn&#8217;t exist instead of the theme&#8217;s 404 template. But for some reason it works fine if I just echo [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://tech.einaregilsson.com/2007/07/30/pretty-wordpress-permalinks-on-iis/">Pretty Wordpress Permalinks on IIS</a> when I need to install WP on a windows server, but on one host I ran into a problem where I would get a blank page if the post didn&#8217;t exist instead of the theme&#8217;s 404 template. But for some reason it works fine if I just echo something in wp-404-handler.php. I echoed out an HTML comment so it wouldn&#8217;t disturb the layout. Here&#8217;s my new version of the file:</p>
<pre name="code" class="php">

&lt;?php
	echo &quot;&lt;!-- If the page doesn&#039;t exist I get a blank screen unless I echo something --&gt;&quot;;
	$qs = $_SERVER[&#039;QUERY_STRING&#039;];
	$_SERVER[&#039;PATH_INFO&#039;] = $_SERVER[&#039;REQUEST_URI&#039;] = substr($qs, strpos($qs, &#039;:80&#039;)+3);
	require_once(&#039;index.php&#039;);
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/blank-page-when-using-iis-permalink-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
