<?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>CoffeeBear.net &#187; WordPress</title>
	<atom:link href="http://coffeebear.net/category/computers/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffeebear.net</link>
	<description></description>
	<lastBuildDate>Sun, 05 Feb 2012 22:54:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Brain Dump 01</title>
		<link>http://coffeebear.net/2012/01/19/brain-dump-01/</link>
		<comments>http://coffeebear.net/2012/01/19/brain-dump-01/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 02:29:55 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[driving]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=2966</guid>
		<description><![CDATA[One of my goals for this year is to write more here; so while I don’t have a single idea that feels worthy of a full post, here’s a dump of various things floating around/through my skull today. Is today stupid driving day or something? I’ll grant I left for work a few minutes later [...]]]></description>
			<content:encoded><![CDATA[<p>One of my goals for this year <a class="simple-footnote" title="I don&#039;t really do new year resolutions, but I do occasionally set personal goals for the new year around January 1st." id="return-note-2966-1" href="#note-2966-1"><sup>1</sup></a> is to write more here; so while I don’t have a single idea that feels worthy of a full post, here’s a dump of various things floating around/through my skull today.</p>
<ul>
<li>Is today stupid driving day or something? I’ll grant I left for work a few minutes later than usual, but it seems odd that so many people would continually be pulling out into moving traffic (from driveways and side streets) and then going so slowly <a class="simple-footnote" title="Example in a 40mph zone, a car pulled out of a driveway less than half a block ahead of me, pulled across the lane I was driving in into the other lane and then just as I caught up to them they pulled right back in front of me." id="return-note-2966-2" href="#note-2966-2"><sup>2</sup></a>. Fortunately the roads were relatively clean this morning, so I was able to stop before plowing into any of those idiots, but still.…</li>
<li>Back in the day when Javascript was new to the web, many sites used it to frequently touch my browser in the bad way. So I quickly grew to hate it and pretty much ignored/disabled it for years. In more recent times, Javascript usage has grown up/cleaned up its act. To the point where I’m actually interested in learning to use it. So I’ve been searching around for some decent tutorials but haven’t had a lot of luck. Most tutorials either assume you already know quite a bit about Javascript or are so extremely dated that they’re useless. I did run across 2 sites with tutorials that don’t seem to be too awful: <a title="Learn to Code | Codecademy" href="http://codeacademy.com">Codecademy</a> <a class="simple-footnote" title="Codecademy gives a decent general knowledge of Javascrip. Though the site is far from perfect, with bugs in the lessons that prevent you from completing them or with questions that unclear in what they are looking for and hints that can be utterly useless" id="return-note-2966-3" href="#note-2966-3"><sup>3</sup></a> and <a title="In the Woods &amp;#8211; &amp;#8220;jQuery for Absolute Beginners&amp;#8221; Video Series | ThemeForest.net" href="http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-video-series/">jQuery for Absolute Beginners</a> <a class="simple-footnote" title="While technically these tutorials cover jQuery (a Javascript library) rather than &quot;pure&quot; Javascript and while covering an older version of jQuery (1.2.6), it still has been very interesting to go over so far." id="return-note-2966-4" href="#note-2966-4"><sup>4</sup></a></li>
<li>I’ve been thinking about about redesigning this site, but I’m trouble deciding what to do. I’ve got some ideas floating around in my skull, but I might hold off until I can look into working up a logo.</li>
</ul>
<p><small><a href="http://coffeebear.net/2012/01/19/brain-dump-01/">Brain Dump 01</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p><div class="simple-footnotes"><p class="notes">Notes:</p><ol><li id="note-2966-1">I don’t really do new year resolutions, but I do occasionally set personal goals for the new year around January 1st. <a href="#return-note-2966-1">↩</a></li><li id="note-2966-2">Example in a 40mph zone, a car pulled out of a driveway less than half a block ahead of me, pulled across the lane I was driving in into the other lane and then just as I caught up to them they pulled right back in front of me. <a href="#return-note-2966-2">↩</a></li><li id="note-2966-3">Codecademy gives a decent general knowledge of Javascrip. Though the site is far from perfect, with bugs in the lessons that prevent you from completing them or with questions that unclear in what they are looking for and hints that can be utterly useless <a href="#return-note-2966-3">↩</a></li><li id="note-2966-4">While technically these tutorials cover jQuery (a Javascript library) rather than “pure” Javascript and while covering an older version of jQuery (1.2.6), it still has been very interesting to go over so far. <a href="#return-note-2966-4">↩</a></li></ol></div>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2012/01/19/brain-dump-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the Word</title>
		<link>http://coffeebear.net/2011/08/19/state-of-the-word/</link>
		<comments>http://coffeebear.net/2011/08/19/state-of-the-word/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 04:50:37 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=1997</guid>
		<description><![CDATA[At WordCamp San Francisco 2011, Matt Mullenweg gave the a presentation entitled State of the Word. During the presentation, he talked about the 2011 WordPress User/Developer survey they did. Then today they released an anonymized copy of the data as a compressed CSV file. I took a quick look at the CSV and whipped up [...]]]></description>
			<content:encoded><![CDATA[<p>At WordCamp San Francisco 2011, Matt Mullenweg gave the a presentation entitled <a title="Matt Mullenweg: State of the Word 2011 « WordPress.tv" href="http://wordpress.tv/2011/08/14/matt-mullenweg-state-of-the-word-2011/">State of the Word</a>. During the presentation, he talked about the 2011 WordPress User/Developer survey they did.</p>
<p>Then today they <a title="WordPress « State of the Word" href="http://wordpress.org/news/2011/08/state-of-the-word/">released</a> an anonymized copy of the data as a compressed CSV file. I took a quick look at the CSV and whipped up the following MySQL script to load the data.</p>
<pre class="brush: sql; title: ; notranslate">
CREATE TABLE `survey` (
 `id` int(11)  NOT NULL AUTO_INCREMENT,
 `year_submitted` year,
 `how_use` varchar(255) DEFAULT NULL,
 `job_type` varchar(255) DEFAULT NULL,
 `c_do` text,
 `c_cms_blog` varchar(255) DEFAULT NULL,
 `c_customize` varchar(255) DEFAULT NULL,
 `c_number` varchar(255) DEFAULT NULL,
 `c_percent` varchar(255) DEFAULT NULL,
 `c_done_with_wp` varchar(255) DEFAULT NULL,
 `c_living` varchar(255) DEFAULT NULL,
 `d_do` text,
 `d_cms_blog` varchar(255) DEFAULT NULL,
 `d_customize` varchar(255) DEFAULT NULL,
 `d_number` varchar(255) DEFAULT NULL,
 `d_percent` varchar(255) DEFAULT NULL,
 `d_done_with_wp` varchar(255) DEFAULT NULL,
 `d_cost` varchar(255) DEFAULT NULL,
 `d_living` varchar(255) DEFAULT NULL,
 `u_do` text,
 `u_installed` varchar(255) DEFAULT NULL,
 `u_installed_other` varchar(255) DEFAULT NULL,
 `u_customize` varchar(255) DEFAULT NULL,
 `u_living` varchar(255) DEFAULT NULL,
 `x_living` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE = MyISAM COMMENT = 'WordPress 2011 Survey Results';

LOAD DATA INFILE '/var/lib/mysql/anon-data.csv'
 INTO TABLE `survey`
 FIELDS ENCLOSED BY '&quot;' TERMINATED BY ','
 LINES TERMINATED BY '\r'
 IGNORE 1 LINES
 (`how_use`, `job_type`, `c_do`, `c_cms_blog`, `c_customize`,
`c_number`, `c_percent`, `c_done_with_wp`, `c_living`, `d_do`, `d_cms_blog`,
`d_customize`, `d_number`, `d_percent`, `d_done_with_wp`, `d_cost`, `d_living`,
`u_do`, `u_installed`, `u_installed_other`, `u_customize`, `u_living`,
`x_living`);

UPDATE `survey` SET `year_submitted` = YEAR(NOW());
</pre>
<p>This has only been tested on MySQL 5.1.54-1ubuntu4. It should work on any recent copy of MySQL, but <abbr title="Your Mileage May Vary">YMMV</abbr>. Also, I added 2 additional fields to the table. One is a simple ID field to make it easier to reference individual responses while the other is ‘year_submitted‘. I added the latter field; so if they reuse this survey next year, I can simply add that year’s responses to the same table and track the differences. If I find the time, I may try digging into the data to see if I can find anything interesting in it (but don’t hold your breath on me finding the time to do so).</p>
<p><small><a href="http://coffeebear.net/2011/08/19/state-of-the-word/">State of the Word</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2011/08/19/state-of-the-word/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.1 is Out</title>
		<link>http://coffeebear.net/2011/02/24/wordpress-3-1-is-out/</link>
		<comments>http://coffeebear.net/2011/02/24/wordpress-3-1-is-out/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 02:28:57 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=1477</guid>
		<description><![CDATA[The latest, greatest version of WordPress was released yesterday. It comes with a whole lot fixes and new features. One of those new features is an admin bar similar to the one used on WordPress.com; however the admin bar only includes specific links rather than being automatically populated with all the various links that my [...]]]></description>
			<content:encoded><![CDATA[<p>The latest, greatest version of WordPress was released yesterday. It comes with a <a title="Version 3.1 | WordPress Codex" href="https://codex.wordpress.org/Version_3.1">whole lot fixes and new features</a>. One of those new features is an admin bar similar to the one used on WordPress.com; however the admin bar only includes specific links rather than being automatically populated with all the various links that my install of WordPress has (from various plugins). I found the lack of those links for one particular plugin particularly annoying. A quick bit of research and a little bit later, I developed the <a title="Now-Reading Admin Bar Menu | Code | CoffeeBear.net" href="http://coffeebear.net/code/#mlm-nrAdminBar">Now-Reading Admin Bar Menu</a> plugin.</p>
<p>I also noticed after the update that one of my client sites wasn’t working correctly. It turns out there’s a bug in WordPress 3.1 which <a title="#16622 ([17246] Breaks category exclusion) – WordPress Trac" href="https://core.trac.wordpress.org/ticket/16622">breaks category exclusion</a>. On my client’s site, I was using this code:</p>
<pre class="brush: php; title: ; notranslate">function exclude_category($query) {
$cat_id = '-'.get_cat_id('meetings');
if ( $query-&gt;is_home ) {
$query-&gt;set('cat', $cat_id);
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');</pre>
<p>Fortunately that bug I linked to also includes a workaround. By changing the above bit of code to read as follows, I was able to fix my client’s site. ^_^</p>
<pre class="brush: php; title: ; notranslate">function exclude_category($query) {
$cat_id = '-'.get_cat_id('meetings');
if ( $query-&gt;is_home ) {
$query-&gt;set('category__not_in', array($cat_id));
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');</pre>
<p><small><a href="http://coffeebear.net/2011/02/24/wordpress-3-1-is-out/">WordPress 3.1 is Out</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2011/02/24/wordpress-3-1-is-out/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Author Pages with hCard &amp; jQuery</title>
		<link>http://coffeebear.net/2010/01/18/author-pages-with-hcard-jquery/</link>
		<comments>http://coffeebear.net/2010/01/18/author-pages-with-hcard-jquery/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 05:00:48 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[hCard]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=972</guid>
		<description><![CDATA[While I’m definitely not the designer that any of the people who created these beautiful hCards, I was greatly impressed by them. In particular, I liked the personal hCard created by Tim Van Damme and decided to make my own version of it. Only since I’m using WordPress rather; than a static site, I wanted [...]]]></description>
			<content:encoded><![CDATA[<p>While I’m definitely not the designer that any of the people who created these <a title="hCard Examples in the wild" href="http://microformats.org/wiki/hcard-examples-in-wild">beautiful hCards</a>, I was greatly impressed by them. In particular, I liked the personal hCard created by <a href="http://timvandamme.com/">Tim Van Damme</a> and decided to make my own version of it. Only since I’m using WordPress rather; than a static site, I wanted the page to be generated automatically from info stored with my user profile within WordPress. Unfortunately WordPress does not by default store all the information I wanted to display as part of the user profile.</p>
<p>Initially when I setup the author page, I used the <a title="WordPress &amp;#8250; Cimy User Extra Fields &amp;laquo; WordPress Plugins" href="http://wordpress.org/extend/plugins/cimy-user-extra-fields/">Cimy User Extra Fields</a> plugin to get those extra fields; however in the words of Lord Downey, “It, uh … lacked elegance.” Don’t get me wrong, Marco Cimmino has created a very powerful and useful plugin. My problem is that it’s too complicated for what I want to do. Then almost as though the WordPress developers read my mind, the release of WordPress 2.9 included a new filter making it simple to add/remove new fields to the user profile page.  So easy in fact that the following bit of PHP code added to my theme’s function.php file was all that was required to add the fields I needed.</p>
<pre class="brush: php; title: ; notranslate">function vl2_contactmethods( $contactmethods ) {
 // Add Twitter
 $contactmethods['twitter'] = 'Twitter';
 //add Facebook
 $contactmethods['facebook'] = 'Facebook';
 //add flickr
 $contactmethods['flickr'] = 'Flickr';
 //add linkedin
 $contactmethods['linkedin'] = 'LinkedIn';
 //add delicious
 $contactmethods['delicious'] = 'Delicious';
 //add phone
 $contactmethods['phone'] = 'Phone';
 //add phone-type
 $contactmethods['phonetype'] = 'Phone Type';
 //add locality
 $contactmethods['locality'] = 'Locality';
 //add region
 $contactmethods['region'] = 'Region';
 //add postalcode
 $contactmethods['postalcode'] = 'Postal Code';
 //add country
 $contactmethods['country'] = 'Country';

 return $contactmethods;
 }
 add_filter('user_contactmethods','vl2_contactmethods',10,1);</pre>
<p>Of course just storing the info with the user’s profile isn’t enough; we also need to be able to pull it back out. This can be done using either the_author_meta or get_the_author_meta. I ended up using get_the_author_meta for two reasons:</p>
<p>1. I’m pulling the author’s meta info outside of the Loop.<br />
2. I wanted to return, not echo the values, so I can manipulate them before displaying them.</p>
<p>But that still wasn’t complicated enough, after all I started this project wanting to generate an hCard, using some jQuery UI to give it a fancy accordion effect. First we load the javascript for that accordion effect, by adding the following to our author.php file.</p>
<pre class="brush: jscript; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;
 $(function() {
 $(&quot;#accordion&quot;).accordion();
 });
 &lt;/script&gt;</pre>
<p>Next we get all the user fields by:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php if(isset($_GET['author_name'])) :
 // NOTE: 2.0 bug requires: get_userdatabylogin(get_the_author_login());
 $curauth = get_userdatabylogin($author_name);
 $id = $curauth-&gt;ID;
 else :
 $curauth = get_userdata(intval($author));
 $id = $curauth-&gt;ID;
 endif;

 $twitter = get_the_author_meta('twitter', $id);
 $flickr = get_the_author_meta('flickr', $id);
 $linkedin = get_the_author_meta('linkedin', $id);
 $delicious = get_the_author_meta('delicious', $id);
 $lastfm = get_the_author_meta('lastfm', $id);
 $phone = get_the_author_meta('phone', $id);
 $ptype = get_the_author_meta('phone-type', $id);
 $addr = get_the_author_meta('addr', $id);
 $locality = get_the_author_meta('locality', $id);
 $region = get_the_author_meta('region', $id);
 $postalcode = get_the_author_meta('postalcode', $id);
 $country = get_the_author_meta('country', $id);
 ?&gt;</pre>
<p>Now that we’ve got the data and the JavaScript; we need to combine it</p>
<pre class="brush: php; title: ; notranslate">&lt;div id=&quot;authorbox&quot;&gt;
 &lt;?php if (function_exists('get_avatar')) { echo get_avatar((get_the_author_meta('user_email', $id)), '120'); }?&gt;
 &lt;div id=&quot;accordion&quot;&gt;
 &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt; &lt;span&gt;&lt;span&gt;&lt;?php echo $curauth-&gt;first_name; ?&gt;&lt;/span&gt; &lt;span&gt;&lt;?php echo $curauth-&gt;last_name; ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
 &lt;div id=&quot;about&quot;&gt;
 &lt;p&gt;&lt;?php echo $curauth-&gt;description; ?&gt;&lt;/p&gt;
 &lt;/div&gt; &lt;!-- #about --&gt;
 &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/h3&gt;
 &lt;div id=&quot;contact&quot;&gt;
 &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $ptype; ?&gt;&lt;/span&gt;&lt;a href=&quot;callto:&lt;?php echo $phone; ?&gt;&quot;&gt;&lt;?php echo $phone; ?&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
 &lt;p&quot;&gt;&lt;a href=&quot;&lt;?php echo get_the_author_meta('user_url', $id); ?&gt;&quot; rel=&quot;me&quot;&gt;&lt;?php echo get_the_author_meta('user_url', $id); ?&gt;&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;&lt;span&gt;&lt;?php echo $addr; ?&gt;&lt;/span&gt;&lt;br/&gt;
 &lt;span&gt;&lt;?php echo $locality; ?&gt;&lt;/span&gt;, &lt;span&gt;&lt;?php echo $region; ?&gt;&lt;/span&gt; &lt;span&gt;&lt;?php echo $postalcode; ?&gt;&lt;/span&gt;&lt;br/&gt;&lt;span&gt;&lt;?php echo $country; ?&gt;&lt;/span&gt;&lt;/p&gt;
 &lt;/div&gt; &lt;!-- #contact --&gt;
 &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Networks&lt;/a&gt;&lt;/h3&gt;
 &lt;div id=&quot;social-networks&quot;&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a title=&quot;View &lt;?php echo $curauth-&gt;first_name; ?&gt; &lt;?php echo $curauth-&gt;last_name; ?&gt;'s Profile&quot; href=&quot;http://www.linkedin.com/in/&lt;?php echo $linkedin ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/images/linkedin.png&quot; alt=&quot;LinkedIn&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a title=&quot;Follow &lt;?php echo $twitter ?&gt; on Twitter&quot; href=&quot;http://twitter.com/&lt;?php echo $twitter ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; alt=&quot;Twitter&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a title=&quot;See &lt;?php echo $flickr ?&gt;'s photostream&quot; href=&quot;http://www.flickr.com/photos/&lt;?php echo $flickr ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/images/flickr.png&quot; alt=&quot;Flickr&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a title=&quot;&lt;?php echo $delicious ?&gt;'s Bookmarks&quot; href=&quot;http://delicious.com/&lt;?php echo $delicious ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/images/delicious.png&quot; alt=&quot;Delicious&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/div&gt; &lt;!-- #social-networks --&gt;
 &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;&lt;?php echo $curauth-&gt;first_name; ?&gt;'s Last 5 Posts&lt;/a&gt;&lt;/h3&gt;
 &lt;?php $my_query = new WP_Query('showposts=5&amp;author='.$id); ?&gt;
 &lt;div id=&quot;5posts&quot;&gt;
 &lt;ul&gt;
 &lt;?php if ($my_query-&gt;have_posts()) : while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); ?&gt;
 &lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt; &lt;?php the_time('j F Y'); ?&gt;&lt;/li&gt;
 &lt;?php endwhile; ?&gt;
 &lt;/ul&gt;
 &lt;/div&gt; &lt;!-- #5posts --&gt;
 &lt;/div&gt;&lt;!-- #accordion --&gt;
 &lt;/div&gt;&lt;!-- #authorbox --&gt;
 &lt;?php else : ?&gt;
 &lt;h2&gt;Not Found&lt;/h2&gt;
 &lt;p&gt;Sorry, but you are looking for something that isn't here.&lt;/p&gt;
 &lt;?php endif; ?&gt;</pre>
<p>Oops, I almost forgot to mention; we need to make sure we’re loading jQuery &amp; jQuery UI on the author page. Since I separate out the header stuff into it’s own file (header.php); I added this bit of code before the closing &lt;/head&gt; tag in that file:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php //if (is_author()) wp_enqueue_script('jquery-ui-core');
if (is_author()) {
 wp_deregister_script('jquery');
 wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&quot;), false, '');
 wp_deregister_script('jquery-ui-core');
 wp_register_script('jquery-ui-core', (&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js&quot;), array('jquery'), '');
 wp_enqueue_script('jquery');
 wp_enqueue_script('jquery-ui-core');
} ?&gt;</pre>
<p>And that’s that. Now my author page will by default display my gravatar next to the Biographical Info entered in my profile. There will also be three other section available…</p>
<p>* Contact: Gives selected contact information for me.<br />
* Networks: Displays icons for some social networks I use with links to my profiles on those networks.<br />
* Last 5 Posts: Shows my latest posts.</p>
<p>Later when I have more time, I’ll update the zipped copy of the VectorLover2 theme on this site for people who want to download a complete copy of the code I used for the author pages.</p>
<p>Update: I forgot to thank Joost de Valk for his excellent article, <a title="User Contact Fields in WordPress 2.9 - Yoast" href="http://yoast.com/user-contact-fields-wp29/">User Contact Fields in WordPress 2.9</a>.<br />
Update 2: I changed the code to register jquery-ui-core, so that it recognizes jquery as a dependency. This tutorial had been working fine; but for whatever reason, it suddenly was trying to load jQuery after jQuery-UI (which doesn’t work so good).<br />
Update 3: Hmm, now that I look back at this old post I realize a couple of things: 1) several of the links I’d intended to be here are missing (since corrected) and 2) this post was written worse than I thought it was.</p>
<p><small><a href="http://coffeebear.net/2010/01/18/author-pages-with-hcard-jquery/">Author Pages with hCard &amp; jQuery</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2010/01/18/author-pages-with-hcard-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing Now-Reading’s Admin Menu</title>
		<link>http://coffeebear.net/2009/08/08/fixing-now-readings-admin-menu/</link>
		<comments>http://coffeebear.net/2009/08/08/fixing-now-readings-admin-menu/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 14:49:29 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Now-Reading]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=939</guid>
		<description><![CDATA[I like using Now-Reading to track what books I’m currently reading, have read and want to read on my website. Unfortunately the plugin’s author has been too busy of late to update the plugin and one of the recent updates to WordPress caused Now-Reading’s admin menu to break (when using the single menu option). PHP [...]]]></description>
			<content:encoded><![CDATA[<p>I like using <a href="http://robm.me.uk/projects/plugins/wordpress/now-reading/" title="Now-Reading plugin for WordPress">Now-Reading</a> to track what books I’m currently reading, have read and want to read on my website. Unfortunately the plugin’s author has been too busy of late to update the plugin and one of the recent updates to WordPress caused Now-Reading’s admin menu to break (when using the single menu option). PHP is not a programming language that I’m really familiar with but I did some poking around in Now-Reading’s code and found if I changed this snip of code:</p>
<pre name="code" class="php">
	if ( $options['menuLayout'] == NR_MENU_SINGLE ) {

		add_menu_page('Now Reading', 'Now Reading', 9, 'admin.php?page=add_book', 'now_reading_add');

		add_submenu_page('admin.php?page=add_book', 'Add a Book', 'Add a Book',$nr_level , 'add_book', 'now_reading_add');

		add_submenu_page('admin.php?page=add_book', 'Manage Books', 'Manage Books', $nr_level, 'manage_books', 'nr_manage');

		add_submenu_page('admin.php?page=add_book', 'Options', 'Options', 9, 'nr_options', 'nr_options');
</pre>
<p>To read like this:</p>
<pre name="code" class="php">
	if ( $options['menuLayout'] == NR_MENU_SINGLE ) {

		add_menu_page('Now Reading', 'Now Reading', 9, 'add_book', 'now_reading_add');

		add_submenu_page('add_book', 'Add a Book', 'Add a Book',$nr_level , 'add_book', 'now_reading_add');
		add_submenu_page('add_book', 'Manage Books', 'Manage Books', $nr_level, 'manage_books', 'nr_manage');
		add_submenu_page('add_book', 'Options', 'Options', 9, 'nr_options', 'nr_options');
</pre>
<p>Then Now-Reading’s single admin menu worked properly again.</p>
<p><small><a href="http://coffeebear.net/2009/08/08/fixing-now-readings-admin-menu/">Fixing Now-Reading’s Admin Menu</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2009/08/08/fixing-now-readings-admin-menu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VectorLover 2 — Initial Release</title>
		<link>http://coffeebear.net/2009/01/29/vectorlover-2-initial-release/</link>
		<comments>http://coffeebear.net/2009/01/29/vectorlover-2-initial-release/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 04:10:15 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WebDesign]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=791</guid>
		<description><![CDATA[As previously mentioned, I’ve been working on updating and customizing the VectorLover WordPress theme to include some of WordPress 2.7’s new features and to integrate with certain WordPress plugins which I like. This evening I’m happy to announce the initial release of VectorLover 2. Features Threaded comments with quick reply links. Integrated plugin support for: [...]]]></description>
			<content:encoded><![CDATA[<p>As previously <a title="Updating VectorLover Theme &amp;laquo; CoffeeBear.net" href="http://coffeebear.net/archives/2009/01/08/updating-vectorlover-theme/">mentioned</a>, I’ve been working on updating and customizing the VectorLover WordPress theme to include some of WordPress 2.7’s new features and to integrate with certain WordPress plugins which I like. This evening I’m happy to announce the initial release of <a title="VectorLover 2 | Code | CoffeeBear.net" href="http://coffeebear.net/code/vectorlover-2/">VectorLover 2</a>.</p>
<h3 id="vl2-features">Features</h3>
<ul>
<li>Threaded comments with quick reply links.</li>
<li>Integrated plugin support for: <a href="http://robm.me.uk/projects/plugins/wordpress/now-reading/">Now-Reading</a>, <a href="http://www.randombyte.net/blog/projects/falbum/">FAlbum</a>, <a title="TweetBacks for WordPress" href="http://yoast.com/wordpress/tweetbacks/">Tweetbacks</a>, <a title="WpLicense | CC Wiki" href="http://wiki.creativecommons.org/WpLicense">wpLicense</a></li>
<li>Custom login page</li>
<li>Added a new default <a title="Globally Recognized Avatars" href="http://www.gravatar.com/">Gravatar</a> image to list of options under <em>Settings</em> -&gt; <em>Discussion</em> in WordPress’s admin backend.</li>
<li> <a href="http://microformats.org/wiki/hcard">hCard</a> microformatting to both post &amp; comment authors.</li>
<li>A stylesheet to remove unnecessary elements from printed pages.</li>
<li>Changed page titles to display as “PostTitle « BlogName” vs the previous “BlogName » PostTitle” for better <abbr title="Search Engine Optimization">SEO</abbr></li>
<li>Wrapped posts in a DIV with <a title="Post Classes | Migrating Plugins and Themes to 2.7 | WordPressCodex" href="http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7#Post_Classes">post_class()</a> to add support for fancier styling on posts.</li>
</ul>
<h3>Special Thanks</h3>
<p>This release would not have been possible without <a title="StyleShout.com" href="http://www.styleshout.com/">Erwin Aligam</a> — who designed the initial theme, <a href="http://www.themelab.com/">ThemeLab</a> — who ported the design to WordPress, <a href="http://www.famfamfam.com/">famfamfam</a> — designed some wicked-nice icons or any of these sites: <a href="http://wpengineer.com/">WPEngineer.com</a>, <a href="http://www.theenglishguy.co.uk/">TheEnglishGuy.co.uk</a>, <a href="http://ottodestruct.com/">OttoDestruct.com</a> and <a href="http://sivel.net/">Sivel.net </a> — all of whom provided valuable information while I was working on this release.</p>
<h3>Download</h3>
<p>You can download this release from my <a title="VectorLover 2 | Code | CoffeeBear.net" href="http://coffeebear.net/code/vectorlover-2/">VectorLover 2</a> page.</p>
<p><small><a href="http://coffeebear.net/2009/01/29/vectorlover-2-initial-release/">VectorLover 2 — Initial Release</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2009/01/29/vectorlover-2-initial-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Testing… 1…</title>
		<link>http://coffeebear.net/2009/01/11/testing-1/</link>
		<comments>http://coffeebear.net/2009/01/11/testing-1/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 17:55:26 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=713</guid>
		<description><![CDATA[I recently added a couple of plugins to this site (and a friend’s that I maintain) to try making administrating them easier.  Both sites also happen to use a plugin to crosspost to LiveJournal and now things are acting flaky. I’ve disabled the most likely culprit and now am writing this post to see if [...]]]></description>
			<content:encoded><![CDATA[<p>I recently added a couple of plugins to this site (and a friend’s that I maintain) to try making administrating them easier.  Both sites also happen to use a plugin to crosspost to LiveJournal and now things are acting flaky.</p>
<p>I’ve disabled the most likely culprit and now am writing this post to see if I’m right about which plugin is causing the problem.  Wish me luck.</p>
<p>Side note: Our snowblower stopped working during the last snow-storm.  The engine runs, but the auger stopped turning.  This weekend we got a bunch more snow, so I opened up the snowblower, figured out what the problem was and fixed it.  I fought the snowblower and I won!  :)  Unfortunately while troubleshooting it, I also fought my vice-grips and the vice-grips won (I’ve got the blood blister and cuts to prove it).</p>
<p><strong>UPDATE:</strong> My first guess was wrong but I’ve figured out which plugin is causing the problem and deactivated it.  For the record, <a href="http://www.phoenixheart.net/2008/11/referrer-detector">Referrer Detector</a> &amp; <a href="http://code.google.com/p/ljxp/">LiveJournal Crossposter</a> do not play nice together.</p>
<p><small><a href="http://coffeebear.net/2009/01/11/testing-1/">Testing… 1…</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2009/01/11/testing-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating VectorLover Theme</title>
		<link>http://coffeebear.net/2009/01/08/updating-vectorlover-theme/</link>
		<comments>http://coffeebear.net/2009/01/08/updating-vectorlover-theme/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 16:55:00 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=705</guid>
		<description><![CDATA[I’ve been posting notes about this under New Look, but figured all the changes deserved their own post. Since I’m going to keep updating this post with new information until I decide not to, I’m marking this as a sticky post and hiding the real changes below the fold. Additional note: I’m doing the vast [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been posting notes about this under <a title="New Look | CoffeeBear.net" href="http://coffeebear.net/archives/2008/12/12/new-look/">New Look</a>, but figured all the changes deserved their own post.  Since I’m going to keep updating this post with new information until I decide not to, I’m marking this as a sticky post and hiding the real changes below the fold. Additional note: I’m doing the vast majority of this work over at my <a title="Update VectorLover Theme for WordPress 2.7 | CoffeeBear DevBlog" href="http://faldorrah.homelinux.net/wordpress/2009/01/08/update-vectorlover-theme-for-wordpress-27/">devblog</a>, so it may be some time until the changes show up here.</p>
<p><strong>UPDATE: </strong>I’ve removed the sticky setting from this post, as I’ve completed all the work I intend to do for now on this theme. Lastly, I’ve setup a page where any new information on <a title="VectorLover2 | Code | CoffeeBear.net" href="http://coffeebear.net/code/vectorlover-2/">VectorLover2</a> will be released and I will be posting a zip file of VL2 there for people interested in my version of the theme.</p>
<p><span id="more-705"></span></p>
<h3>CHANGELOG</h3>
<ul>
<li>Integrated the <a href="http://robm.me.uk/projects/plugins/wordpress/now-reading/">Now-Reading</a> plugin.</li>
<li>Integrated the <a href="http://www.randombyte.net/blog/projects/falbum/">FAlbum</a> plugin.</li>
<li>Added Edit links to all posts/pages, available to the admin only.
<ul>
<li>Formated the Edit links (including comment edit links) to be in red text and display the pencil icon from <a title="famfamfam.com : Silk Icons" href="http://www.famfamfam.com/lab/icons/silk/">famfamfam’s Silk Icons</a>.</li>
</ul>
</li>
<li>Changed RSS &amp; Admin login links in header to use icons (again from famfamfam’s Silk Icons).</li>
<li>Added <a href="http://microformats.org/wiki/hcard">hCard</a> microformatting to both post &amp; comment authors.</li>
<li>Added a stylesheet for printing which removes the sidebar and the comment form.</li>
<li>Wrapped posts in additional DIV using <a title="Post Classes | Migrating Plugins and Themes to 2.7 | WordPressCodex" href="http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7#Post_Classes">post_class()</a> to add support for fancy styling on sticky posts.
<ul>
<li>Technically, I can do a lot more then just styling the sticky posts, but that was the motivation to do it.</li>
<li>Redid my implementation of this to allow for <a title="The English Guy   ::  post_class() and backwards compatibility" href="http://www.theenglishguy.co.uk/2008/12/31/post_class-and-backwards-compatibility/">backwards compatibilty</a>.  Ran across that tip while search for more info on styling sticky posts.</li>
</ul>
</li>
<li>Altered the body tag on the index.php page of vectorlover2<sup>1</sup> to <a title="Use Body ID/Class to Control WordPress Page Elements | Darren Hoyt Dot Com" href="http://www.darrenhoyt.com/2007/12/23/use-body-idclass-to-control-wordpress-page-elements/">conditionally</a> have an id added to allow for specific styling on just the home page.</li>
<li>Changed footer credit to link to the home page of the site.</li>
<li>Changed page titles to display as “PostTitle « BlogName” vs the previous “BlogName » PostTitle” which I prefer the look of.
<ul>
<li>Especially when I see my posts show up in Google’s search results.</li>
</ul>
</li>
<li>Integrated <a title="TweetBacks for WordPress" href="http://yoast.com/wordpress/tweetbacks/">Tweetbacks</a> plugin.
<ul>
<li>Only integrated with pre-WordPress 2.7 comments</li>
</ul>
</li>
<li>Implemented WordPress 2.7’s <a title="Migrating Plugins and Themes to 2.7/Enhanced Comment Display" href="http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display">Enhanced Comment</a> <a title="WordPress 2.7 Comments Enhancements | Nothing to see here" href="http://ottodestruct.com/blog/2008/09/29/wordpress-27-comments-enhancements/">Display features</a>.</li>
<li>Fixed <a title="wp_logout_url() | Template Tags | WordPress Codex" href="http://codex.wordpress.org/Template_Tags/wp_logout_url">Logout</a> link in comments.php to work with WordPress 2.7</li>
<li>Added <a title="Add Avatar To WordPress Default | WPEngineer.com" href="http://wpengineer.com/add-avatar-to-wordpress-default/">custom “default” gravatar</a> image.</li>
<li>Changed “Read More” links to only show on front page when I use split an entry and hide some of it behind a link.</li>
<li>Integrate <a title="TweetBacks for WordPress" href="http://yoast.com/wordpress/tweetbacks/">Tweetbacks</a> plugin with WordPress 2.7 enhanced comment display features.
<ul>
<li><a title="Separating Pings from Comments in WordPress 2.7 | Sivel.net" href="http://sivel.net/2008/10/wp-27-comment-separation/">Separating Pings from Comments in WordPress 2.7</a> has been very helpful with this.</li>
</ul>
</li>
<li>Build-in <a title="Create Your Own WordPress Login Design | WPEngineer.com" href="http://wpengineer.com/create-your-own-wordpress-login-design/">custom login page</a></li>
<li>Developed special styling for sticky posts now that they should be appearing at the top of my home page.
<ul>
<li>It’s not exactly how I want it, but it’s good enough for now.  I’d rather the sticky posts get written to the home page with a different structure (vs hiding bits with CSS) but while I did find <a title="How I made use of WordPress &amp;#8220;sticky posts&amp;#8221; feature | phoenix.heart - portfolio &amp;amp; more" href="http://www.phoenixheart.net/2008/12/how-i-made-use-of-wordpress-sticky-posts-feature/">this article</a> with some info on doing just that, my PHP-fu isn’t strong enough to get it to work right now.</li>
</ul>
</li>
<li>Added a second “sidebar” in down at the bottom of the page to display more widgety goodness
<ul>
<li>The styling of the Footer sidebar isn’t perfect, but it’s good enough.</li>
</ul>
</li>
<li>Altered RSS links &amp; comment form as suggested by <a title="How to Track WordPress Comments &amp;#038; RSS in Google Analytics &amp;raquo; Branding Rant" href="http://www.brandingrant.com/how-to-track-wordpress-comments-rss-in-analytics.html">Branding Rant</a> to setup &amp; track goals.
<ul>
<li><span style="text-decoration: line-through;">Decided to scrap this idea for now, especially as after rereading Branding Rant’s article and noticing it wants Google’s javascript at the top of the page rather than the bottom  (which can negatively affect page loading times).</span> Changed my mind on this after reading <a href="http://coffeebear.net/archives/2009/01/08/updating-vectorlover-theme/#comment-24896">Rob’s comment</a>.</li>
</ul>
</li>
</ul>
<h3>TODO</h3>
<ul>
<li>Figure out where the original author got the icons for VectorLover from (they look like an icon pack I’ve seen but can’t remember where).
<ul>
<li>Appears to be the <a title="Free Vector Icon Set 1 - 25 Icons | Monofactor - Design Graphics and Web Development Studio and Blog of Onur Oztaskiran" href="http://www.monofactor.com/free-vector-icon-set-1-25-icons/">Vector icon set</a> from monofactor, unfortunately:
<ul>
<li>I no longer remember exactly why I wanted to know this.</li>
<li>The icon set was released as a single Adobe Illustrator file, which neither Gimp or Inkscape can open correctly (some of the gradients are screwed up).</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><sup>1</sup> The utterly original name I’ve given to my revision of VectorLover.</p>
<p><small><a href="http://coffeebear.net/2009/01/08/updating-vectorlover-theme/">Updating VectorLover Theme</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2009/01/08/updating-vectorlover-theme/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>New Look</title>
		<link>http://coffeebear.net/2008/12/12/new-look/</link>
		<comments>http://coffeebear.net/2008/12/12/new-look/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 06:20:18 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://coffeebear.net/archives/2008/12/12/new-look/</guid>
		<description><![CDATA[Upgraded CoffeeBear.net to WordPress 2.7 and switched to a different theme.  I liked certain things about the old theme but most of those were developer features that I’ve never gotten around to using.  And since it was kind of ugly the way it was…  I decided to switch it up a bit.  Unfortunately I’ll have [...]]]></description>
			<content:encoded><![CDATA[<p>Upgraded CoffeeBear.net to WordPress 2.7 and switched to a different theme.  I liked certain things about the old theme but most of those were developer features that I’ve never gotten around to using.  And since it was kind of ugly the way it was…  I decided to switch it up a bit.  Unfortunately I’ll have to once again customize the <a title="Now-Reading Plugin" href="http://robm.me.uk/projects/plugins/wordpress/now-reading/">Now-Reading</a> output as it’s all busted &amp; fugly right now.</p>
<p><small><a href="http://coffeebear.net/2008/12/12/new-look/">New Look</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2008/12/12/new-look/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Now-Reading Tweaks v2</title>
		<link>http://coffeebear.net/2008/09/12/now-reading-tweaks-v2/</link>
		<comments>http://coffeebear.net/2008/09/12/now-reading-tweaks-v2/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 22:48:58 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Now-Reading]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=636</guid>
		<description><![CDATA[Some time back, I tried to make Rob Miller’s Now-Reading plugin display who’s reading each book on the individual pages. But the PHP code I posted at that time didn’t work like I thought it did, my interests changed and I moved onto other things. Today I had a visitor stop by asking about my [...]]]></description>
			<content:encoded><![CDATA[<p>Some <a href="http://coffeebear.net/archives/2008/04/25/now-reading-tweaks/" title="Now-Reading Tweaks | CoffeeBear.net">time back</a>, I tried to make Rob Miller’s <a title="Now-Reading plugin for WordPress" href="http://robm.me.uk/projects/plugins/wordpress/now-reading/">Now-Reading plugin</a> display who’s reading each book on the individual pages.  But the PHP code I posted at that time didn’t work like I thought it did, my interests changed and I moved onto other things.  Today I had a <a href="http://coffeebear.net/archives/2008/04/25/now-reading-tweaks/#comment-24422" title="Comment by elle | Now-Reading Tweaks| CoffeeBear.net">visitor</a> stop by asking about my broken tweak.  So I took another look at the code and I believe I’ve got something that works this time.</p>
<pre name="code" class="php">// Now-Reading Plugin: Get the display name of the book's reader
function mlm_book_reader( $echo=true ) {
	global $book;

	$user_info = get_userdata($book->reader);

	if ( $echo )
		echo $user_info->display_name;
	return $user_info->display_name;

}</pre>
<p>This grabs “Display name publicly as” from the user’s profile and displays it on the page.  I put the function in the functions.php file of the theme I’m using (so any automatic upgrades of the plugin won’t erase it).  Then I put &lt; ?php mlm_book_reader() ?&gt; into my custom single.php template and viola!</p>
<p>Note: this has only been tested on WordPress 2.6.2 with Now-Reading 4.4.3.</p>
<p><small><a href="http://coffeebear.net/2008/09/12/now-reading-tweaks-v2/">Now-Reading Tweaks v2</a> © <a href="http://coffeebear.net" rel="cc:attributionURL">Mark McKibben</a>, <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States</a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://coffeebear.net/2008/09/12/now-reading-tweaks-v2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/44 queries in 0.079 seconds using disk: basic
Object Caching 1271/1364 objects using disk: basic

Served from: coffeebear.net @ 2012-02-08 17:30:39 -->
