<?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/tips/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>Jmapping : Jquery plugin for Google Maps</title>
		<link>http://www.mikevanwinkle.com/development-2/jmapping-jquery-plugin-for-google-maps/</link>
		<comments>http://www.mikevanwinkle.com/development-2/jmapping-jquery-plugin-for-google-maps/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 15:04:29 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=591</guid>
		<description><![CDATA[Need to quickly integrate Google Maps with a series of posts? Try using JMapping. The easy part of this Jquery plugin is that you really don&#8217;t have to know much Jquery. Just loop through your posts with the right html syntax and POW! it happens. There are other jquery approaches that are more flexible &#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Need to quickly integrate Google Maps with a series of posts? <a title="JMapping Plugin for Jquery" href="http://vigetlabs.github.com/jmapping/">Try using JMapping</a>. The easy part of this Jquery plugin is that you really don&#8217;t have to know much Jquery. Just loop through your posts with the right html syntax and POW! it happens. There are other jquery approaches that are more flexible &#8230; but they require considerably more knowledge.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/development-2/jmapping-jquery-plugin-for-google-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theming Custom Post Types in WordPress 3.0</title>
		<link>http://www.mikevanwinkle.com/wordpress/theming-custom-post-types-in-wordpress-3-0/</link>
		<comments>http://www.mikevanwinkle.com/wordpress/theming-custom-post-types-in-wordpress-3-0/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 20:44:42 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[content management]]></category>
		<category><![CDATA[custom post types]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=486</guid>
		<description><![CDATA[So today I developed a simple strategy for dealing with some of the theming issues that arise out of WordPress 3.0 and the new Custom Post Type functionality. The Issue: You&#8217;re working on a site designed long before Custom Post Types were an itch in Matt&#8217;s cerebellum. But now that the functionality is there and you [...]]]></description>
			<content:encoded><![CDATA[<p>So today I developed a simple strategy for dealing with some of the theming issues that arise out of <a title="Wordpress 3.0" href="http://wordpress.org/development/2010/04/wordpress-3-0-beta-1/">WordPress 3.0</a> and the new <a title="Custom Post Types" href="http://codex.wordpress.org/Function_Reference/register_post_type">Custom Post Type</a> functionality.</p>
<p><strong>The Issue: </strong>You&#8217;re working on a site designed long before <a title="Custom Post Types" href="http://codex.wordpress.org/Function_Reference/register_post_type">Custom Post Types</a> were an itch in Matt&#8217;s cerebellum. But now that the functionality is there and you want to incorporate it into your theme. Previously you used conditional code to theme your single.php file.</p>
<pre>&lt;?php if(in_category('foo')) { ?&gt;
   Do something.
&lt;?php } elseif(in_category('bar')) { ?&gt;
   Do something else.
&lt;?php } else { ?&gt;
   Do yet another thing.
&lt;?php } ?&gt;</pre>
<p>The thought of adding yet another layer of conditionals makes you sick to your stomach. <a title="Custom Post Types" href="http://codex.wordpress.org/Function_Reference/register_post_type">Custom Post Types</a> need to be treated completely different. They have different categories, taxonomies, and even different sidbars. Arg!</p>
<p><strong>Solution: </strong>One simple function. Call it whatever you want, but here&#8217;s what it looks like. When I say simple &#8230; I mean simple.</p>
<pre>
<div id="_mcePaste">function get_post_in_context() {</div>
<div id="_mcePaste">   global $post;</div>
<div id="_mcePaste">   $type = $post-&gt;post_type;</div>
<div id="_mcePaste">   include(TEMPLATEPATH .'/layouts/single-'.$type .'-content.php');</div>
<div id="_mcePaste">}</div>
</pre>
<p>Now just create a directory in your theme called &#8220;layouts&#8221;. Then copy and paste all the markup in your <strong>single.php</strong> file between the <em>get_header()</em> tag and the <em>get_sidebar()</em> tag to a file named <strong>single-post-content.php</strong> and save the file to your layouts folder.</p>
<p>Now place a the <em>get_post_in_context()</em> tag into your single.php  where you want the markup from single-post-content.php to show up.</p>
<pre><span style="font-family: Georgia, 'Bitstream Charter', serif; color: #444444;"><span style="line-height: 22px;">&lt;?php get_header(); ?&gt;
&lt;?php get_post_in_context(); ?&gt;
 &lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;</span></span></pre>
<p>The beauty of this is that you can now create a new single-POSTTYPE-content.php (example:single-events-content.php) file for any of your custom post types and it will automagically get called instead of the single-post-content.php without any more changes to the single.php file.</p>
<p>I can&#8217;t take total credit for the idea. Some theme frameworks already employ a version of this strategy. But I need to adapt an existing theme rather than start from a framework. This function above will allow you to scale your existing theme to accomodate new post types without having to redesign your whole site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/wordpress/theming-custom-post-types-in-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>How to title a blog post</title>
		<link>http://www.mikevanwinkle.com/geek-think/how-to-title-a-blog-post/</link>
		<comments>http://www.mikevanwinkle.com/geek-think/how-to-title-a-blog-post/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 14:33:09 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Geek Think]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Problogger]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=190</guid>
		<description><![CDATA[Problogger had great article last week on how to title a blog post. Sure it&#8217;s a boring, mundane part of your site, not nearly as sexy as those moving images and flashy drop-down menus. But the title of a post could be the most important factor your are ignoring. Not only do post titles effect [...]]]></description>
			<content:encoded><![CDATA[<p>Problogger had great article last week on <a href="http://www.problogger.net/archives/2008/08/20/how-to-craft-post-titles-that-draw-readers-into-your-blog/">how to title a blog post</a>. Sure it&#8217;s a boring, mundane part of your site, not nearly as sexy as those moving images and flashy drop-down menus. But the title of a post could be the most important factor your are ignoring. Not only do post titles effect whether or not someone stays long enough to read the whole article. Post titles are key elements for Search Engines.</p>
<p>Problogger gives us the following eight tips:</p>
<ol>
<li>Communicate a  Benefit</li>
<li>Create Controversy or Debate</li>
<li>Ask a Question</li>
<li>Personalize Titles</li>
<li>Use Keywords</li>
<li>Use Power Words</li>
<li>Big Claims and Promises</li>
<li>Humor Titles</li>
</ol>
<p><a href="http://www.problogger.net/archives/2008/08/20/how-to-craft-post-titles-that-draw-readers-into-your-blog/">Read his explanation for each</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/geek-think/how-to-title-a-blog-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problogger: 10 tips for a great blog post</title>
		<link>http://www.mikevanwinkle.com/geek-think/problogger-10-tips-for-a-great-blog-post/</link>
		<comments>http://www.mikevanwinkle.com/geek-think/problogger-10-tips-for-a-great-blog-post/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 18:37:02 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Geek Think]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Problogger]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=165</guid>
		<description><![CDATA[Problogger offers these ten things you should consider before writing a blog post: Choosing a Topic &#8211; take a little extra time defining your topic and the post will flow better and you’ll develop something that matters to readers. Your Post’s Title &#8211; perhaps the most crucial part of actually getting readers to start reading [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.problogger.net/archives/2008/08/12/how-to-craft-a-blog-post-10-crucial-points-to-pause/">Problogger</a> offers these ten things you should consider before writing a blog post:</p>
<ol>
<li><strong><a href="http://www.problogger.net/archives/2008/08/14/how-to-choose-a-topic-for-your-next-blog-post/">Choosing a Topic</a></strong> &#8211; take a little extra time defining your topic and the post will flow better and you’ll develop something that matters to readers.</li>
<li><strong>Your Post’s Title</strong> &#8211; perhaps the most crucial part of actually getting readers to start reading your post when they see it in an RSS reader or search engine results page.</li>
<li><strong>The Opening Line</strong> &#8211; first impressions matter. Once you’ve got someone past your post’s title your opening line draws them deeper into your post.</li>
<li><strong>Your ‘point/s’ </strong>- a post needs to have a point. If it’s just an intriguing title and opening you’ll get people to read &#8211; but if the post doesn’t ‘matter’ to them it’ll never get traction.</li>
<li><strong>Call to Action</strong> &#8211; driving readers to <strong>do</strong> something cements a post in their mind and helps them to apply it and helps you to make a deeper connection with them.</li>
<li><strong>Adding Depth</strong> &#8211; before publishing your post &#8211; ask yourself how you could add depth to it and make it even more useful and memorable to readers?</li>
<li><strong>Quality Control and Polishing</strong> &#8211; small mistakes can be barriers to engagement for some readers. Spending time fixing errors and making a post ‘look’ good can take it to the next level.</li>
<li><strong>Timing of Publishing Your Post</strong> &#8211; timing can be everything &#8211; strategic timing of posts can ensure the right people see it at the right time.</li>
<li><strong>Promotion</strong> &#8211; having hit publish &#8211; don’t just leave it to chance that your post will be read by people. Giving it a few strategic ‘nudges’ can increase the exposure it gets exponentially.</li>
<li><strong>Conversation</strong> &#8211; often the real action happens once your post is published and being interacted with by readers and other bloggers. Taking time to dialogue can be very fruitful.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/geek-think/problogger-10-tips-for-a-great-blog-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress v. Drupal</title>
		<link>http://www.mikevanwinkle.com/design/content-management/wordpress-v-drupal/</link>
		<comments>http://www.mikevanwinkle.com/design/content-management/wordpress-v-drupal/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 14:59:37 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=82</guid>
		<description><![CDATA[Ever wonder what the difference is between WordPress and Drupal, and which you should choose. Well, as is always the answer: it depends. Performancing has a good expanation of what it, exactly, it depends on.]]></description>
			<content:encoded><![CDATA[<p>Ever wonder what the difference is between WordPress and Drupal, and which you should choose. Well, as is always the answer: it depends. Performancing has a <a href="http://performancing.com/wordpress/wordpress-and-drupal-compared-pros-and-cons-each-cms">good expanation</a> of what it, exactly, it depends on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/design/content-management/wordpress-v-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Object Caching 563/616 objects using apc

Served from: www.mikevanwinkle.com @ 2012-02-04 21:03:41 -->
