<?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; WebDev</title>
	<atom:link href="http://coffeebear.net/tag/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffeebear.net</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jan 2012 23:43:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<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>Library Renovations</title>
		<link>http://coffeebear.net/2007/09/25/library-renovations/</link>
		<comments>http://coffeebear.net/2007/09/25/library-renovations/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 03:29:26 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Quickie]]></category>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WebDesign]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeebear.net/archives/2007/09/25/library-renovations/</guid>
		<description><![CDATA[In the event you notice any irregularities with this site, particularly the library section do not be alarmed. I am currently renovating that portion of the site. Library Renovations © Mark McKibben, Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.]]></description>
			<content:encoded><![CDATA[<p>In the event you notice any irregularities with this site, particularly the library section do not be alarmed.  I am currently renovating that portion of the site.</p>
<p><small><a href="http://coffeebear.net/2007/09/25/library-renovations/">Library Renovations</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/2007/09/25/library-renovations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dashboard Akismet Hack 0.0.3</title>
		<link>http://coffeebear.net/2007/04/21/dashboard-akismet-hack-003/</link>
		<comments>http://coffeebear.net/2007/04/21/dashboard-akismet-hack-003/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 16:13:11 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://coffeebear.net/archives/2007/04/21/dashboard-akismet-hack-003/</guid>
		<description><![CDATA[Akismet is a popular comment, trackback, pingback spam blocker. Originally it was developed for the WordPress blogging platform; it has since been extended to work on a variety of blogging and forums systems. However the only part of it I really care about is the WordPress plugin as it is one of the ways I [...]]]></description>
			<content:encoded><![CDATA[<p class="alpha-shadow"><a href="http://akismet.com/"><img src="http://coffeebear.net/wp-content/uploads/2007/04/wpdashboardhack.jpg" alt="Dashboard Hack 0.0.3" /></a></p>
<p>Akismet is a popular comment, trackback, pingback spam blocker.  Originally it was developed for the WordPress blogging platform; it has since been extended to work on a variety of blogging and forums systems.  However the only part of it I really care about is the WordPress plugin as it is one of the ways I protect this site from spammers.  Akismet works great<sup>1</sup> but there is one thing the developers of Akismet have never seen fit to do which drives me bonkers.  Which is to say the only place the Akismet plugin shows you how many comments it has in the spam moderation queue is on the spam moderation queue page.  And yet they put some stats for Akismet right there on the WordPress dashboard.  In ages long past, I cobbled together a small <a href="http://coffeebear.net/archives/2005/11/24/wordpressakismet-hack-002/" title="WordPress/Akismet Hack 0.0.2 | CoffeeBear.net">hack</a> to display those moderation numbers, when I upgraded my site to a more current version of WordPress my hack broke.</p>
<p>This morning I finally fixed it.  People more clever than myself could make this into a full fledged plugin, but this little hack is good enough for me.  To do this:</p>
<ol>
<li><a href="http://akismet.com/download/">Download</a> a copy of the Akismet plugin for WordPress</li>
<li>Decompress the zip file</li>
<li>Open the akismet.php file in your favorite text editor<sup>2</sup></li>
<li>In akismet.php, search for “function akismet_stats()”.  It should be around line 510.</li>
<li>In the akismet_stats function, under the line reading <code>echo '&lt;h3&gt;'.__('Spam').'&lt;/h3&gt;';</code> add the following code:<br />
<code>$spam_count = akismet_spam_count();<br />
$link = 'edit-comments.php';<br />
if ($spam_count) :<br />
print "&lt;strong&gt;&lt;a href="$link?page=akismet-admin" title="Click here to see the moderation queue"&gt;Spam in moderation ($spam_count)&lt;/a&gt;&lt;/strong&gt;\n";<br />
endif;</code></li>
<li>Save your changes.</li>
<li>Uploaded your edited copy of akismet.php to <a href="http://yourblog.com/wp-content/plugins/akismet/" class="linkification-ext" title="Linkification: http://yourblog.com/wp-content/plugins/akismet/">http://yourblog.com/wp-content/plugins/akismet/</a> and then follow the normal instructions for installing/activating the Akismet plugin.</li>
</ol>
<p>With this small hack in place, when Akismet traps some comment spam in its moderation queue the WordPress dashboard will display a link under the Spam in the Latest Activity box.  The link will say “Spam in moderation (x)” where x is the number of items in the spam moderation queue.  Since WordPress likes to occasionally mangle the display of code in posts, I’ve created a text file with my changes to the akismet_stats function.  You download that file <a href="http://coffeebear.net/wp-content/wpakismethack.txt" title="Dashboard Akismet Hack 0.0.3">here</a>.</p>
<p><strong>Update 2007-04-22:</strong> As to be expected, it didn’t take the spammers long to generate some sample data for me to create a screenshot of my hack.Â  Enjoy!</p>
<p><sup>1</sup> Particularly with the <a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> anti-spam plugin added to it.<br />
<sup>2</sup> E.g. <a href="http://kate-editor.org/">Kate</a></p>
<p><small><a href="http://coffeebear.net/2007/04/21/dashboard-akismet-hack-003/">Dashboard Akismet Hack 0.0.3</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/2007/04/21/dashboard-akismet-hack-003/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Convert from AMM to Now Reading</title>
		<link>http://coffeebear.net/2007/02/18/convert-from-amm-to-now-reading/</link>
		<comments>http://coffeebear.net/2007/02/18/convert-from-amm-to-now-reading/#comments</comments>
		<pubDate>Sun, 18 Feb 2007 19:00:22 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://coffeebear.net/archives/2007/02/18/convert-from-amm-to-now-reading/</guid>
		<description><![CDATA[As part of my upgrading to the latest/greatest version of WordPress, I switched over to using the Now Reading plugin from AMM. I switched because development on AMM seems to have come to a complete halt and it was acting somewhat flaky prior to the upgrade. One of the big problems with switching over was [...]]]></description>
			<content:encoded><![CDATA[<p>As part of my upgrading to the latest/greatest version of WordPress, I switched over to using the <a href="http://robm.me.uk/projects/plugins/wordpress/now-reading/">Now Reading</a> plugin from <a href="http://www.sozu.co.uk/software/amm/" title="Amazon Media Manager">AMM</a>.  I switched because development on AMM seems to have come to a complete halt and it was acting somewhat flaky prior to the upgrade.  One of the big problems with switching over was I didn’t want to have to manually enter in all books I’d already read and rated.  As Now Reading supports storing so much more data, I had to write a bit of custom SQL to import my existing info.  It’s not a great solution, mostly because AMM didn’t store all of the same info (e.g. date entered, started and finished).<br />
<code>INSERT INTO wp_now_reading(b_added, b_started, b_finished, b_title, b_nice_title, b_author, b_nice_author, b_image, b_asin, b_status, b_rating, b_review)<br />
SELECT amm_dateadded, amm_dateadded, amm_dateadded, amm_title,<br />
REPLACE(REPLACE(REPLACE(<br />
REPLACE(REPLACE(REPLACE(<br />
REPLACE(REPLACE(REPLACE(<br />
REPLACE(REPLACE(LCASE(amm_title), ',', '' ), ')', '' ), '(', '' )<br />
, ' ', '-' ), '...', '-' ), ':', '-' )<br />
, '!', '-' ), '?', '-' ), '&amp;', '-' )<br />
, '\'', '' ), '--', '-' ), amm_author, REPLACE(REPLACE(REPLACE( LCASE( amm_author ) , '.', '' ) , '&amp;', 'and' ) , ' ', '-' ), amm_smallImageURL, amm_asin, 'read', amm_rating *2, amm_userComments<br />
FROM wp_amm amm<br />
WHERE amm_ProductGroup = 'Book' AND amm_asin NOT IN (SELECT b_asin FROM wp_now_reading);</code></p>
<p>This short script copied over all my books for me and got everything setup as well as could be expected given the differences in the data. Below is a list of the assumptions I made in writing this script to convert to Now Reading:</p>
<ul>
<li>AMM only stores one date, so I used that for all dates on the books I copied over.</li>
<li>The above script limit itself to books and skips any already in your wp_now_reading table.</li>
<li>Now Reading has additional fields the title &amp; author.  I’m not sure what the “b_nice_author” field is used for, but the “b_nice_title” is used when you go to edit a specific book.  The format of the “b_nice_” fields seems to be to replace anything other than a letter or a number with a hyphen and to have all the letters be lower case.  I tried to make sure I did the same with my script, however you may need to double-check your data before running this to make sure I didn’t miss a symbol you used.</li>
<li>I marked all the books I was copying over as “read”.</li>
<li>AMM only allowed ratings of 1 — 5; while Now Reading allows 1 — 10.  So when I copied the ratings over, I doubled them.</li>
</ul>
<p><strong>NOTE: </strong>If you have questions about this script, post them in the comments here.  Keep in mind that I’m not providing full fledged support for the script and if you don’t know how to run this without asking, then you probably shouldn’t be messing with it. Also, if you’re really going to try running this script, then for god’s sake backup your database <em>FIRST</em>!</p>
<p><small><a href="http://coffeebear.net/2007/02/18/convert-from-amm-to-now-reading/">Convert from AMM to Now Reading</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/2007/02/18/convert-from-amm-to-now-reading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress/Akismet Hack 0.0.2</title>
		<link>http://coffeebear.net/2005/11/24/wordpressakismet-hack-002/</link>
		<comments>http://coffeebear.net/2005/11/24/wordpressakismet-hack-002/#comments</comments>
		<pubDate>Thu, 24 Nov 2005 16:54:01 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://coffeebear.net/?p=407</guid>
		<description><![CDATA[Do you run WP? Do you also have Akismet installed? Would you like a quick reference on the Dashboard showing you some info from Akismet? I do and did want this. Since I have zero idea on how to set this up as a plugin; I simply added the code into /wp-admin/index.php. I scanned through [...]]]></description>
			<content:encoded><![CDATA[<p>Do you run <a href="http://wordpress.org/" title="WordPress">WP</a>?  Do you also have <a href="http://akismet.com/" title="Stop Comment Spam and Trackback Spam Â« Akismet">Akismet</a> installed?  Would you like a quick reference on the Dashboard showing you some info from Akismet?  I do and did want this.  Since I have zero idea on how to set this up as a plugin; I simply added the code into /wp-admin/index.php.   I scanned through the file until I found the section of code which creates the “Latest Activity” box.  Then between the sections for “Blog Stats” and “Incoming Links“<sup>1</sup>, I added the following code:</p>
<p><code>&lt;h3&gt;&lt;a href="http://akismet.com/" title="Stop Comment Spam and Trackback Spam Â« Akismet"&gt;Akismet&lt;/a&gt; Stats&lt;/h3&gt;<br />
&lt;? php<br />
$deadspam = get_option('akismet_spam_count');<br />
$livespam = $wpdb-&gt;get_var("SELECT COUNT(comment_ID) FROM $wpdb-&gt;comments WHERE comment_approved = 'spam'");<br />
$sitelink = $wpdb-&gt;get_var("SELECT option_value FROM $wpdb-&gt;options WHERE option_id = '1'");<br />
print "Killed Spam Count: $deadspam\n";<br />
if ($livespam == 0) {<br />
print "Your spam queue is empty!";<br />
} else {<br />
print "&lt;strong&gt;Possible Spam Count: &lt;a href="http://coffeebear.net/wp-admin/$sitelink/wp-admin/edit.php?page=akismet.php" title="Click here to see the moderation queue"&gt;$livespam&lt;/a&gt;&lt;/strong&gt;\n";<br />
}<br />
?&gt;</code></p>
<p>There’s undoubtably a more elegant way of retrieving and displaying this information.  And for somebody who actually writes PHP code regularly, this might even be a quick and easy plugin to create.  Unfortunately, I’ve only read part of a book about PHP; so this is about as far as I can currently take the hack.  Unlike what some people think, WordPress does not require you to be a PHP guru.  It only requires a webserver with PHP, MySQL &amp; a little patience<sup>2</sup>.</p>
<p><strong>NOTE: THIS IS A CORE WORDPRESS FILE!  EDIT AT YOUR OWN RISK!  I AM NOT RESPONSIBLE IF YOU HOSE YOUR BLOG, SERVER, LIFE, THE UNIVERSE, AND EVERYTHING!  BACKUP EVERYTHING BEFORE YOU EVEN CONSIDER ATTEMPTING THIS!  ONLY ATTEMPT THIS HACK IF YOU FEEL COMFORTABLE EDITING CORE WORDPRESS FILES.</strong></p>
<p><strong>Update:</strong> <a href="http://netocury.com/">Neto Cury</a> was kind enough to point out an error in the above code.  Though to be fair it’s not entirely my fault.  I pasted into this post the exact code I used in my file, but something in <a href="http://wordpress.org/" title="WordPress">WP</a> or one of the plugins I use appears to have changed the first part of the PHP coding from &lt;? php to &lt; ?php.  I’m not sure what caused that, but to help people avoid getting errors; I’ve uploaded a text file containing the code for the hack.  You can download that file <a href="http://coffeebear.net/wp-content/wpakismethack.txt" title="WordPress/Akismet Hack 0.0.2">here</a>.</p>
<p><strong>Update #2:</strong> Fixed a typo in the previous update.  Sorry about that Neto!</p>
<p><strong>Update #3 2007-04-21:</strong> I’ve updated this hack to modify the akismet plugin file (Akismet v2.0 for WordPress 2.1.3) instead of one of the WordPress core files.  Read about it <a title="Dashboard Akismet Hack 0.0.3 | CoffeeBear.net">here</a>.</p>
<p><sup>1</sup> Blog Stats ends at line 85 in my file and at the time of this writing I am running WordPress 1.5.2.<br />
<sup>2</sup> This is true of every <abbr title="Content Management System">CMS</abbr> that I’ve looked at.</p>
<p><small><a href="http://coffeebear.net/2005/11/24/wordpressakismet-hack-002/">WordPress/Akismet Hack 0.0.2</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/2005/11/24/wordpressakismet-hack-002/feed/</wfw:commentRss>
		<slash:comments>9</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/29 queries in 0.058 seconds using disk: basic
Object Caching 873/931 objects using disk: basic

Served from: coffeebear.net @ 2012-02-04 23:14:41 -->
