<?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>Mike Van WinkleThe Simplest WordPress User Access Log Ever | Mike Van Winkle</title>
	<atom:link href="http://www.mikevanwinkle.com/tag/cms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikevanwinkle.com</link>
	<description>Wordpress/PHP Developer</description>
	<lastBuildDate>Tue, 31 Jan 2012 00:02:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The Simplest WordPress User Access Log Ever</title>
		<link>http://www.mikevanwinkle.com/geek-think/the-simplest-wordpress-user-access-log-ever/</link>
		<comments>http://www.mikevanwinkle.com/geek-think/the-simplest-wordpress-user-access-log-ever/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 14:41:16 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Geek Think]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[podscms]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=1101</guid>
		<description><![CDATA[Those of use who develop using pods often find we use it for everything. So here&#8217;s a quick tip on using PodsCMS to create a custom user access log. Step 1: Set up the Pod I&#8217;m assuming you&#8217;ve already installed/activate both the PodsCMS and Pods UI plugins. If not, please do so before starting. Create [...]]]></description>
			<content:encoded><![CDATA[<p>Those of use who develop using pods often find we use it for everything. So here&#8217;s a quick tip on using PodsCMS to create a custom user access log.</p>
<h2>Step 1: Set up the Pod</h2>
<p>I&#8217;m assuming you&#8217;ve already installed/activate both the PodsCMS and Pods UI plugins. If not, please do so before starting. </p>
<p>Create a new Pod called &#8220;logins&#8221;.<br />
<a href="http://www.mikevanwinkle.com/wp-content/uploads/2011/06/Screen-shot-2011-06-29-at-10.15.54-AM.png"><img src="http://www.mikevanwinkle.com/wp-content/uploads/2011/06/Screen-shot-2011-06-29-at-10.15.54-AM-300x180.png" alt="" title="Screen shot 2011-06-29 at 10.15.54 AM" width="300" height="180" class="alignnone size-medium wp-image-1105" /></a></p>
<p>By default each pod is created with a name and slug field. We&#8217;re going to use the name field but you can delete the slug field. </p>
<p>Then you&#8217;ll need to create a field for &#8220;date&#8221;. Of course, Pods stores the date any entry is created in a field called &#8220;created&#8221; which you can access from within Pods Templates. But it still makes sense to have a date field in the Pod itself, if nothing else for the sake of a clear data model. </p>
<p><a href="http://www.mikevanwinkle.com/wp-content/uploads/2011/06/Screen-shot-2011-06-29-at-10.16.46-AM.png"><img src="http://www.mikevanwinkle.com/wp-content/uploads/2011/06/Screen-shot-2011-06-29-at-10.16.46-AM-247x300.png" alt="" title="Screen shot 2011-06-29 at 10.16.46 AM" width="247" height="300" class="alignnone size-medium wp-image-1106" /></a> </p>
<p>So once you have added the date field your Pod will look like this:</p>
<p><a href="http://www.mikevanwinkle.com/wp-content/uploads/2011/06/Screen-shot-2011-06-29-at-10.17.03-AM.png"><img src="http://www.mikevanwinkle.com/wp-content/uploads/2011/06/Screen-shot-2011-06-29-at-10.17.03-AM-300x172.png" alt="" title="Screen shot 2011-06-29 at 10.17.03 AM" width="300" height="172" class="alignnone size-medium wp-image-1107" /></a></p>
<h2>Step 2: Add function</h2>
<p>Now just add the following code to your functions.php file. </p>
<pre class="brush:php">
add_action('set_logged_in_cookie','mpv_add_access_log_entry');
function mpv_add_access_log_entry($user) {
	$user = explode('|',$user);
	$log = new PodAPI();
	$params = array('datatype'=>'logins');
	$params['columns'] = array('name'=>$user[0],'date'=>date('Y-m-d H:i:s'));
	$log->save_pod_item(pods_sanitize($params));
}
</pre>
<p>This function uses the Pod API to insert a row in the logins table. Alternatively you can use the $wpdb class and do something like this: </p>
<pre class="brush:php">
global $wpdb;
$wpdb->insert($wpdb->prefix.'pod_tbl_logins',array('name'=> $user[0],'date'=> date('Y-m-d H:i:s')));
</pre>
<p>The only trouble with going this route is that in order to use the pods admin interface to manage the data, you&#8217;ll also need to add a row to the wp_pod table. This will change with Pods 2.0 so there&#8217;s no need to demonstrate. But I strongly recommend using the PodsAPI class as it will make sure to implement best practices and in 2.0 it will use the $wpdb class anyway. </p>
<p>So that&#8217;s it. To create an exportable report of the logins just install the &#8220;<a href="http://wordpress.org/extend/plugins/exports-and-reports/">Exports and Reports</a>&#8221; plugin. Or you can use PodsUI to create a custom interface. </p>
<p>Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/geek-think/the-simplest-wordpress-user-access-log-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Admin Makeover Coming in 3.2</title>
		<link>http://www.mikevanwinkle.com/wordpress/wordpress-admin-makeover-coming-in-3-2/</link>
		<comments>http://www.mikevanwinkle.com/wordpress/wordpress-admin-makeover-coming-in-3-2/#comments</comments>
		<pubDate>Sat, 07 May 2011 14:03:47 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[3.2]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[WordPress 3.2]]></category>
		<category><![CDATA[WordPress Development]]></category>
		<category><![CDATA[WP 3.2]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=1019</guid>
		<description><![CDATA[I somehow had missed that WordPress 3.2 was going to feature a makeover of the WordPress admin theme. The new theme looks sharp. Here&#8217;s a preview. Let&#8217;s hope this doesn&#8217;t create issues with plugins.]]></description>
			<content:encoded><![CDATA[<p>I somehow had missed that WordPress 3.2 was going to feature a makeover of the WordPress admin theme. The new theme looks sharp. Here&#8217;s a preview. Let&#8217;s hope this doesn&#8217;t create issues with plugins.</p>

<a href='http://www.mikevanwinkle.com/wordpress/wordpress-admin-makeover-coming-in-3-2/attachment/screen-shot-2011-05-06-at-7-41-45-am/' title='WordPress Admin Preview'><img width="150" height="150" src="http://www.mikevanwinkle.com/wp-content/uploads/2011/05/Screen-shot-2011-05-06-at-7.41.45-AM-150x150.png" class="attachment-thumbnail" alt="WordPress Admin Preview" title="WordPress Admin Preview" /></a>
<a href='http://www.mikevanwinkle.com/wordpress/wordpress-admin-makeover-coming-in-3-2/attachment/screen-shot-2011-05-06-at-7-39-51-am/' title='WordPress Admin Preview'><img width="150" height="150" src="http://www.mikevanwinkle.com/wp-content/uploads/2011/05/Screen-shot-2011-05-06-at-7.39.51-AM-150x150.png" class="attachment-thumbnail" alt="WordPress Admin Preview" title="WordPress Admin Preview" /></a>
<a href='http://www.mikevanwinkle.com/wordpress/wordpress-admin-makeover-coming-in-3-2/attachment/screen-shot-2011-05-06-at-7-28-35-am/' title='Wordpress Admin Theme Preview'><img width="150" height="150" src="http://www.mikevanwinkle.com/wp-content/uploads/2011/05/Screen-shot-2011-05-06-at-7.28.35-AM-150x150.png" class="attachment-thumbnail" alt="Wordpress Admin Theme Preview" title="Wordpress Admin Theme Preview" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/wordpress/wordpress-admin-makeover-coming-in-3-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flutter to Custom Post Types</title>
		<link>http://www.mikevanwinkle.com/wordpress/flutter-to-custom-post-types/</link>
		<comments>http://www.mikevanwinkle.com/wordpress/flutter-to-custom-post-types/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 16:06:51 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[flutter]]></category>
		<category><![CDATA[wordpress as cms]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=720</guid>
		<description><![CDATA[So I&#8217;m working a project right now where I&#8217;m converting a WordPress installation from Flutter to the native WordPress custom post type functionality. The reasons for the switch are numerous. For one, it&#8217;s always good rule of thumb to use as few plugins as possible. The fewer plugins, the fewer php warning messages, the fewer [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m working a project right now where I&#8217;m converting a WordPress installation from Flutter to the native WordPress custom post type functionality. The reasons for the switch are numerous. For one, it&#8217;s always good rule of thumb to use as few plugins as possible. The fewer plugins, the fewer php warning messages, the fewer javascript conflicts, the fewer hooks and filters getting processed on every load, and the fewer hits on the Database server. Secondly, flutter is particularly hard on the database, sometimes adding an extra 5 or more queries for every custom field.</p>
<p>The really great thing about flutter is that it still stores the field values in the  <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">wp_postmeta </span>table which means you don&#8217;t have to worry about any real data migration. So you have the luxury of taking it a step at a time.</p>
<p>The first step is to convert those key categories attached to &#8220;write panels&#8221; into post types. I did this by <a title="Wordpress Codex" href="http://codex.wordpress.org/Function_Reference/register_post_type">registering the post type</a> as usual and simply running the following function on the init hook. This function performs a simple DB query to update posts with the specified cat slug into post_types.</p>
<p><code><br />
function convert_cats_to_types($cat,$type) {<br />
global $wpdb;<br />
$query = $wpdb-&gt;prepare("<br />
UPDATE wp_posts SET post_type = '$type' WHERE ID IN<br />
(<br />
SELECT DISTINCT object_id FROM wp_term_relationships rel<br />
INNER JOIN wp_term_taxonomy AS tt ON tt.term_taxonomy_id = rel.term_taxonomy_id AND tt.taxonomy = 'category'<br />
INNER JOIN wp_terms AS t ON t.term_id = tt.term_id AND t.slug = '$cat'<br />
)<br />
");<br />
$results = $wpdb-&gt;query($query);<br />
}</code></p>
<p>There&#8217;s no risk of losing data here, we are just changing where the posts in question are show up. The second thing to do is to replace the field-specific metaboxes. We&#8217;ll cover that in the next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/wordpress/flutter-to-custom-post-types/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress PodsCMS Widgets</title>
		<link>http://www.mikevanwinkle.com/wordpress/plugins/wordpress-podscms-widgets/</link>
		<comments>http://www.mikevanwinkle.com/wordpress/plugins/wordpress-podscms-widgets/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 16:33:56 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[podscms]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=647</guid>
		<description><![CDATA[I&#8217;m not sure why it took me this long to put this plugin together, but whatever. I&#8217;ve been using WordPress PodCMS plugin for a long time now. And quite often I need to add pod stuff to a sidebar. Usually, I&#8217;d go find a custom sidebar that I&#8217;d made before and adapt it. But then [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure why it took me this long to put this plugin together, but whatever. I&#8217;ve been using WordPress PodCMS plugin for a long time now. And quite often I need to add pod stuff to a sidebar. Usually, I&#8217;d go find a custom sidebar that I&#8217;d made before and adapt it. But then I realized how super easy it would be to have a widget that allows you to select which Pod you want to show and which template you want to show it with !!! so bang!</p>
<p><strong><a title="WordPress Pods Widgets" href="http://www.mikevanwinkle.com/wp-content/uploads/2010/10/pods-widgets.zip">WordPress PodsCMS Widgets &#8211; Version 0.1</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/wordpress/plugins/wordpress-podscms-widgets/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress PodsCMS SEO Titles Plugin</title>
		<link>http://www.mikevanwinkle.com/wordpress/plugins/wordpress-podscms-seo-titles-plugin/</link>
		<comments>http://www.mikevanwinkle.com/wordpress/plugins/wordpress-podscms-seo-titles-plugin/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 20:02:54 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[podscms]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress as cms]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=494</guid>
		<description><![CDATA[I haven&#8217;t submit this plugin to the WordPress SVN yet, because I&#8217;m still playing with it. The remaining issue is that while it works, I&#8217;m not sure it works in the most efficient manner possible. I&#8217;m also going to post it over at @podscms and get some feedback. At any rate, for anyone who&#8217;s running [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t submit this plugin to the WordPress SVN yet, because I&#8217;m still playing with it. The remaining issue is that while it works, I&#8217;m not sure it works in the most efficient manner possible. I&#8217;m also going to post it over at <a title="PodsCMS" href="http://www/podscms.org">@podscms</a> and get some feedback.</p>
<p>At any rate, for anyone who&#8217;s running a pods installation and having trouble getting SEO friendly titles on your pod pages, this plugin creates a template tag &lt;?php pods_seo_title(); ?&gt; that you can use to override wordpress default behavior. The plugins check to see if the page is a pod page, and if so calls the title of the respective pod. If not, it checks to see if the page is singular and returns the TITLE | SITENAME format if it is. Otherwise it returns the SITENAME | SITE DESCRIPTION form.</p>
<p><strong>Download:</strong> <a href="http://www.mikevanwinkle.com/wp-content/uploads/2010/06/pods-seo-titles.php_.zip">Pods SEO Titles</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/wordpress/plugins/wordpress-podscms-seo-titles-plugin/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Object Caching 777/834 objects using apc

Served from: www.mikevanwinkle.com @ 2012-02-04 21:00:31 -->
