<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>CogDogBlog &#187; using wp</title>
	<atom:link href="http://cogdogblog.com/tag/using-wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://cogdogblog.com</link>
	<description>Alan Levine&#039;s space for barking about and playing with technology</description>
	<lastBuildDate>Mon, 13 Feb 2012 03:36:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
		<item>
		<title>Goin&#8217; to Camp</title>
		<link>http://cogdogblog.com/2008/07/27/goin-to-camp/</link>
		<comments>http://cogdogblog.com/2008/07/27/goin-to-camp/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 05:48:22 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[Blog Pile]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[using wp]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/?p=2511</guid>
		<description><![CDATA[I&#8217;m loading up my duffle bag with mosquito repellent, mess kit, multi-tool, flashlight, sleeping bag, laptop, blog&#8230;. woah woah&#8230; well I am not taking all that stuff but I am going to camp&#8230; WordCamp! WordPressCamp! Thanks to a direct message nudge from @lloydbudd as a reminder, I hemmed and hawed and then just spelled out WTF. I&#8217;ve got a bunch of miles on United to get there &#8230; ouch&#8230; speaking of WTF&#8230; WTF is a &#8220;close-in processing fee&#8221;? United charged me, a sort of frequent flier, $75 because I just used my miles for a trip less than 21 days out. How is that costing them money? Next thing it will be the seat-belt usage fee and the ramp extension charge. Oh and the landing gear deployment fee. Geez. Oh well, its still an inexpensive trip, and a chance to spend a day in total geek out WordPress mode. I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://2008.sf.wordcamp.org/"><img src="http://cogdogblog.com/wp-content/uploads/2008/07/wordcamp.jpg" alt="" title="wordcamp" width="227" height="215" class="alignright size-full wp-image-2512" /></a> I&#8217;m loading up my duffle bag with mosquito repellent, mess kit, multi-tool, flashlight, sleeping bag, laptop, blog&#8230;. woah woah&#8230; well I am not taking all that stuff but I am going to camp&#8230; <a href="http://2008.sf.wordcamp.org/">WordCamp! WordPressCamp!</a></p>
<p>Thanks to a direct message nudge from <a href="http://twitter.com/lloydbudd">@lloydbudd </a> as a reminder, I hemmed and hawed and then just spelled out WTF.  I&#8217;ve got a bunch of miles on United to get there &#8230; ouch&#8230; speaking of WTF&#8230; WTF is a &#8220;close-in processing fee&#8221;? United charged me, a sort of frequent flier, $75 because I just used my miles for a trip less than 21 days out. How is that costing them money? Next thing it will be the seat-belt usage fee and the ramp extension charge. Oh and the landing gear deployment fee. Geez.</p>
<p>Oh well, its still an inexpensive trip, and a chance to spend a day in total geek out WordPress mode.</p>
<p>I&#8217;m going to camp! I&#8217;m going to camp!  I&#8217;m going to camp!  I&#8217;m going to camp! </p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/07/27/goin-to-camp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Upping WP</title>
		<link>http://cogdogblog.com/2008/03/31/upping-wp/</link>
		<comments>http://cogdogblog.com/2008/03/31/upping-wp/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 07:11:20 +0000</pubDate>
		<dc:creator>Alan Levine</dc:creator>
				<category><![CDATA[Blog Pile]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[using wp]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/?p=2274</guid>
		<description><![CDATA[WordPress 2.5 has been out a few days, what am I waiting for? Actually for my Dreamhost hosted sites, the upgrade is a brainless click with its One Click install/upgrades. I am done. Well not completely, the whole admin interface is different! It has that new car WordPress.com smell, the old blue is gone, we have pastels, and woah, all the stuff is in a different place. Its just an adjustment phase, like wiping the crud from your eyeglasses. Back up th This post is not about the virtues of WP2.5 as they ought to unveil themselves through use (time to get serious about tagging though). I am thinking more about the fleet of 4 or 5 WP sites I have at NMC (#6 is in the oven) and the upgrade path for them. WP2.5 has in place upgrades for plugins and at NorthernVoice, Matt hinted that it might someday [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/">WordPress 2.5</a> has been out a few days, what am I waiting for? Actually for my Dreamhost hosted sites, the upgrade is a brainless click with its One Click install/upgrades. I am done.</p>
<p>Well not completely, the whole admin interface is different! It has that new car WordPress.com smell, the old blue is gone,  we have pastels, and woah, all the stuff is in a different place. Its just an adjustment phase, like wiping the crud from your eyeglasses. Back up th</p>
<p>This post is not about the virtues of WP2.5 as they ought to unveil themselves through use (time to get serious about tagging though). I am thinking more about the fleet of 4 or 5 WP sites I have at NMC (#6 is in the oven) and the upgrade path for them. WP2.5 has in place upgrades for plugins and at NorthernVoice, Matt hinted that it might someday be a feature for the whole blog.</p>
<p>So for grins, and documentation, my typical steps are listed below.One problem is that an update requires deleting all core files and adding new ones, so users accessing your site while this is in progress, might see all kinds of strange things.</p>
<ul>
<li>Back up the database (on NMC sites, I run a cron script that does this daily, thats different). I use the <a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup plugin</a> and store a copy on my server.</li>
<li>I already keep a master set of all my wp-content stuff (plugins, themes, etc) on my work machine, so no backup needed.</li>
<li>De-activate all plugins except one &#8211; <a href="http://sw-guide.de/wordpress/plugins/maintenance-mode/">Maintenance Mode</a>. This is super handy, as it presents a notice if someone visits your site while you are &#8220;in maintenance mode&#8221; &#8211; they see a static page. Users with admin access can log in and see everything. You can test the new version before opening it up. Just dont forget! (yes, drupal as this built in, and I like it)</li>
<li>I delete ALL files from install directory except for wp-config and the wp-content directory. On some sites, I have a lot of other files not related to WordPress, so in those cases I am deleting al of the wp-xxxxx files (except config)</li>
<li>Upload new files, go to the upgrade URL, and you are almost home free (dont forget to turn back the setting for <a href="http://sw-guide.de/wordpress/plugins/maintenance-mode/">Maintenance Mode</a></li>
</ul>
<p>But I ran into a situation recently that required another strategy&#8211; we were doing upgrades and repairs on our MySQL database, and even in maintenance mode, the site would hang and generate a database connection error of MySQL is offline. I came up with my own strategy for times when perhaps I know MySQL is not available (this may never happen to most readers).</p>
<p>I created a directory in my base directories named <strong>offline</strong> and put a single <strong>index.php</strong> file in there that provides a basic message&#8211; you can see one at <a href="http://sl.nmc.org/offline/">http://sl.nmc.org/offline/</a>.</p>
<p>Next, you need a manual switch. This is done in the main <strong>index.php</strong> file which is lovingly short:</p>
<pre class="brush: php">
&lt;?php
/* Short and sweet */
define(&#039;WP_USE_THEMES&#039;, true);
require(&#039;./wp-blog-header.php&#039;);
?&gt;
</pre>
<p>The first statement just sets a flag, and the second one includes the WordPress engine, and starts it with a database call. So all we need is a way to skip that part, and load our static page. So my modified  <code>index.php</code> file has statements that I turn off/turn on by toggling the <code>//</code> prefixes on certain lines. A <code>//</code> before a line treats it as a comment, or a note, and is not execute.</p>
<p>In normal WP mode, where all the databases are working and chugging along, my <code>index.php</code> looks like this- we just run everything through <code>wp-blog-header.php</code>:</p>
<p><pre><pre>
&lt;?php
/* Short and sweet */

define(&#039;WP_USE_THEMES&#039;, true);

/* comment out line for on/off mode */

// ONLINE MODE
&lt;strong&gt;require(&#039;./wp-blog-header.php&#039;);&lt;/strong&gt;

// OFFLINE MODE
&lt;strong&gt;// header(&#039;Location:offline/index.php&#039;);&lt;/strong&gt;
?&gt;</pre></pre></p>
<p>And should my database be kaput, sick, or just not available, I can route any blog access (since all  URLs to a blog are handled via  this basic <code>index.php</code> file) bu adding the comment code to one line, and removing it from the other:</p>
<p><pre><pre>
&lt;?php
/* Short and sweet */

define(&#039;WP_USE_THEMES&#039;, true);

/* comment out line for on/off mode */

// ONLINE MODE
//&lt;strong&gt;require(&#039;./wp-blog-header.php&#039;);&lt;/strong&gt;

// OFFLINE MODE
&lt;strong&gt;header(&#039;Location:offline/index.php&#039;);&lt;/strong&gt;
?&gt;</pre></pre></p>
<p>So all accesses to this blog will go to the holding pattern page.</p>
<p>Yeah, its manual and not elegant, but It Works.</p>
<p>And one more note for the drupal-istas- even with drupal&#8217;s maintenance mode, if the database is off kilter or off, you will not see your crafted message but a database error message that tells an admin somethings about checking the configuration settings, not what you want users to see.</p>
<p>I skirted this by hacking the <code>/includes/database/mysql.inc</code> file and commented out the typical database connection message around line 102, and write my own:</p>
<p><pre><pre>
&nbsp;&nbsp;&nbsp;&nbsp;// Show error screen otherwise
&nbsp;&nbsp;&nbsp;&nbsp;drupal_maintenance_theme();
&nbsp;&nbsp;&nbsp;&nbsp;drupal_set_header(&#039;HTTP/1.1 503 Service Unavailable&#039;);
&nbsp;&nbsp;&nbsp;&nbsp;drupal_set_title(&#039;Unable to connect to database server&#039;);
&nbsp;&nbsp;&nbsp;&nbsp;print theme(&#039;maintenance_page&#039;, &#039;The NMC Web site is 
&nbsp;&nbsp; undergoing maintenance or database repairs at this time 
&nbsp;&nbsp; and should return soon. If this&nbsp;&nbsp;situation persists please
&nbsp;&nbsp; contact us at website@nmc.org and thanks for your patience.&lt;/p&gt;&#039;);
</pre></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/03/31/upping-wp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Hello Askimet, Goodbye SK2! Thanks for all the Fish</title>
		<link>http://cogdogblog.com/2008/03/22/sk2-2/</link>
		<comments>http://cogdogblog.com/2008/03/22/sk2-2/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 05:16:05 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[using wp]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2008/03/22/sk2-2/</guid>
		<description><![CDATA[I&#8217;ve just swapped the spam &#8220;defense&#8221; here from SpamKarma2 to Askimet. The word is that Dr Dave is going to top updating it. Sk2 has sure needed regular attention lately, a lot of moderation, and then I found out that friends of mine were being tossed its captcha, and I hate bad captchas. Bad news. And then I recall at Northern Voice 2008 when keynoter Matt Mullenweg said he created Askiment for his Mom top be able to blog w/o worry of spam&#8230; well he had me. So now I am running Askimet. No spam fence is w/o problems, so I am holding off any celebration.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just swapped the spam &#8220;defense&#8221; here from <a href="http://unknowngenius.com/blog/wordpress/spam-karma/ ">SpamKarma2</a> to <a href="http://akismet.com/">Askimet</a>. The word is that Dr Dave is going to top updating it. Sk2 has sure needed regular attention lately, a lot of moderation, and then I found out that friends of mine were being tossed its captcha, and <a href="http://flickr.com/photos/cogdog/tags/badcaptcha/">I hate bad captchas</a>.</p>
<p>Bad news.</p>
<p>And then I recall at Northern Voice 2008 when keynoter <a href="http://ma.tt/">Matt Mullenweg</a> said he created Askiment for his Mom top be able to blog w/o worry of spam&#8230; well he had me.</p>
<p>So now I am running Askimet. No spam fence is w/o problems, so I am holding off any celebration.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/03/22/sk2-2/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>PhotoDropper Gateway Plugin Drug for Flickr Photos</title>
		<link>http://cogdogblog.com/2008/03/01/photodropper/</link>
		<comments>http://cogdogblog.com/2008/03/01/photodropper/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 17:50:35 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[using wp]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2008/03/01/photodropper/</guid>
		<description><![CDATA[photo credit: lovestruck. This is my first play with PhotoDropper a WordPress plugin that provides a search interface and one click insert so you can find creative commons licensed flickr photos in your blog. It is lovely, a lovely, lovely plugin, and is just one more iota of my expression of my flickr love. Or obsession. All of which is infinitely more fun, fulfilling, interesting than drudgery than things like meta data or BlackBored. I am fairly sure this is a linktribution to Tim Lauer via twitter]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/61989447@N00/2281346536/" title="" target="_blank"><img src="http://farm3.static.flickr.com/2228/2281346536_9984e82815_d.jpg" alt="" border="0" /></a><br /><small><a href="http://www.photodropper.com/creative-commons/" title="creative commons" target="_blank"><img src="http://cogdogblog.com/wp-content/plugins/photo_dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/61989447@N00/2281346536/" title="lovestruck." target="_blank">lovestruck.</a></small></p>
<p>This is my first play with <a href="http://www.photodropper.com/wordpress-plugin/">PhotoDropper</a> a WordPress plugin that provides a search interface and one click insert so you can find <a href="http://flickr.com/creativecommons">creative commons licensed flickr photos</a> in your blog.</p>
<p>It is lovely, a lovely, lovely plugin, and is just one more iota of my expression of my flickr love. Or obsession.</p>
<p>All of which is infinitely more fun, fulfilling, interesting than drudgery than things like meta data or BlackBored.</p>
<p>I am fairly sure this is a linktribution to <a href="http://twitter.com/timlauer">Tim Lauer via twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/03/01/photodropper/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>WordPressing Dissected: NMC Pachyderm Services</title>
		<link>http://cogdogblog.com/2008/02/14/wordpressing-dissected/</link>
		<comments>http://cogdogblog.com/2008/02/14/wordpressing-dissected/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 20:23:12 +0000</pubDate>
		<dc:creator>Alan Levine</dc:creator>
				<category><![CDATA[Blog Pile]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[using wp]]></category>
		<category><![CDATA[wordpress dissected]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2008/02/14/wordpressing-dissected/</guid>
		<description><![CDATA[Let me join the Jim Groom Kum-Ba-Ya I Love WordPress Chorus. In this least year, I&#8217;ve rolled out 3 NMC web sites that are published via WordPress, with each one going deeper into the bowels of the templates and just more jazzed how I can bend them to my will, casting CSS, PHP, plugins, MySQL to do my bidding. This is unlike drupal, where after a year I am still trying to figure out just how the heck it works and manages information. Its still a grey murky, opaque blue gumdrop box. I am trying to summon the drupal love, and it aint happening. But WordPress, you make me sing. In this blog post that portends to be a monster one of length, I am going to dissect a new site I worked in gory technical detail. On each of these sites, I have started with a standard template and [...]]]></description>
			<content:encoded><![CDATA[<p>Let me join the <a href="http://bavatuesdays.com/">Jim Groom Kum-Ba-Ya I Love WordPress Chorus</a>. In this least year, I&#8217;ve rolled out 3 NMC web sites that are published via WordPress, with each one going deeper into the bowels of the templates and just more jazzed how I can bend them to my will, casting CSS, PHP, plugins, MySQL to do my bidding. This is unlike drupal, where after a year I am still trying to figure out just how the heck it works and manages information. Its still a grey murky, opaque blue gumdrop box. I am trying to summon the drupal love, and it aint happening.</p>
<p>But WordPress, you make me sing. In this blog post that portends to be a monster one of length, I am going to dissect a new site I worked in gory technical detail.</p>
<p>On each of these sites, I have started with a standard template and slowly ripped the guts apart. So far, in the stable, is the <a href="http://sl.nmc.org/">NMC Campus Observer</a> which began as the <a href="http://www.kingcosmonaut.de/blix/">Blix template</a>. Then there is <a href="http://virtualworlds.nmc.org/">NMC Virtual Worlds</a> a child of the <a href="http://ericulous.com/2006/12/22/wp-theme-orange-web-20/">Orange 2.0 Theme</a>, and one where I learned to create multiple page templates, use custom fields to spawn content specific sidebars, and rolling my own database queries to get posts I really wanted. Our podcast site, <a href="http://web.nmc.org/conversations/">NMC Conversations</a> is probably the least modded, a few tweaks of the <a href="http://www.deanjrobinson.com/projects/redoable/">redoable theme</a>.</p>
<p>Now the thing I also love about WordPress is there are many levels of creativity you can operate at. You can simply blog, never tinker with the templates, and easily switch out themes like a new pair of socks. That&#8217;s great; it means you are focused on the content. Or you can get way down into the guts of the engine. Now I don&#8217;t do much with widgets- I think the concept is great for many bloggers as it offers a nice amount of flexibility on what you slap on your sidebar&#8230; but in my case, I find them horribly limited and boxed in.. cause I know I can easily script my way to something better.  Or you can somewhere in between- add your own graphics header, toss some specific text or web javascript code in the sidebar.</p>
<p>So as I get closer to the details, I remind you the stuff I am talking about is what you can do with your own code on a hosted server; while the WordPress.com service is fabulous (<a href="http://cogdogroo.wordpress.com/">I used it myself this year</a>), its simplicity comes at a price of severe lack of template tinkering. You really cannot do much there.</p>
<p><strong>BEFORE:</strong><br />
<a href="http://www.pachyderm.org/about"><img src='http://cogdogblog.com/wp-content/uploads/2008/02/pachyderm-old.jpg' alt='pachyderm-old.jpg' /></a></p>
<p>The site I am going to talk about is the <a href="http://pachyderm.nmc.org/">NMC Pachyderm Services web site</a>, which replaces a static HTML tabled encrusted, hand code the navigation links&#8221; Pachyderm.org web site, which was not all that bad, but once you go to database driven template sites, it just hurts to hand code an HTML site.</p>
<p><strong>AFTER:</strong><a href="http://pachyderm.nmc.org/"><img src='http://cogdogblog.com/wp-content/uploads/2008/02/pachyderm-services-new.jpg' alt='pachyderm-services-new.jpg' /></a></p>
<p>So I am going to talk alot about the mangling I did in the templates along with some plugins I deploy (and tweak too). I should say I go about waist deep into the CSS and full body dive into the PHP code of the templates. And for some of these sites, I make a bend away from the standard format of blog as reverse chronological series of &#8220;posts&#8221;. I make web sites, not blogs.</p>
<p>Some of this stuff may get nitty gritty in detail, but I am intrigued to see if I can document all the little pieces that came together for this site. To be honest, these really develop organically, and sometimes change/evolve with more content dumped in.</p>
<p><span id="more-2202"></span></p>
<p>These projects start usually with a lot of scribbles in real paper, and boxes and lines, as I try to flesh out some sense of the information types. Then I start <a href="http://themes.wordpress.net/">browsing WordPress themes</a>. I am not always looking for one that &#8220;looks good&#8221; out of the box, but more, one that seems to have a general layout and design elements I have in mind. Everything, from colors to graphics to sidebar structure, is malleable.</p>
<p>In this case, I had access to a great set of themes shared with my by <a href="http://incsub.org/blog/">James Farmer</a>. The <a href="http://www.briangardner.com/themes/vertigo-blue-wordpress-theme.htm">Vertigo theme by Brian Gardner</a> jumped out- it has appropriate color elements, but also a clean text style, and 2 sidebars to play with. I also eyeball how complex the theme files are; this one is elegant with a basic set of files. </p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2008/02/vertigo.jpg' alt='Vertigo theme' /></p>
<p>The header text is all graphics, so it could be almost any type style and the footer is a Hemingway style. At this point I think I may get lucky and not have to do much to the template. But that&#8217;s no fun&#8230;</p>
<p>In looking at the content needs, the Pachyderm site would need basic intro static content, <a href="http://pachyderm.nmc.org/category/news/">time stamped news items</a>, and <a href="http://pachyderm.nmc.org/category/showcase/">a collection of examples for the &#8220;gallery&#8221;</a>. It might not need more, but that was enough to get rolling.</p>
<p>So in the next chunk, I am going to talk about all the mods I did on the front page, using the numbered spots as a key:</p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2008/02/pachy-services-web.jpg' alt='pachy-services-web.jpg' /></p>
<p><strong>(1) Header Graphics</strong><br />
These changes are easy, you just need to find the originals, check their dimensions, and then create new versions, and replace them in the theme&#8217;s images folder. For the Vertigo theme, the main banner is all graphic, so I could use any font to make the <a href="http://pachyderm.nmc.org/wp-content/themes/vertigo-blue-3column/images/header.gif">pachyderm services background header</a>. In the Pachyderm site, the font for the main title is &#8220;Orater Std&#8221; and the tagline font is Monotype Corsiva. The <a href="http://pachyderm.nmc.org/wp-content/themes/vertigo-blue-3column/images/logo.gif">left pachyderm logo</a> was a bit of editing to get a good mask for the icon. A sign of a quality template to me is that the author has provide PhotoShop versions of this graphics (e.g. <a href="http://pachyderm.nmc.org/wp-content/themes/vertigo-blue-3column/images/logo_blank.gif">the logo blank</a>), so the sizes and background colors are all preserved.</p>
<p><strong>(2) The static front content</strong><br />
The focus of this site is not a regular stream of &#8220;blog posts&#8221;, so I used <strong>Options</strong> -&gt; <strong>Reading</strong> the feature that allows make the front of the site display this static content from a WordPress page. This is the second or third time I have used this approach for a site that has a consistent front face so the primary information is not the new &#8220;posts&#8221; but information that does not change over time. The &#8220;posts&#8221; are there, but are now relegated to the sidebars as the content that are newly added are either  <a href="http://pachyderm.nmc.org/category/news/">news items</a>, and <a href="http://pachyderm.nmc.org/category/showcase/">showcase items</a>.</p>
<p><strong>(3) Fixing the Top Navigation Links</strong><br />
On this and many templates, automatic navigation within the blog is enabled by WP code that loops through all of the pages created, and attempts often to put  a lot of content in a small box. I had plans to put those links elsewhere. So rubbing together the template tools, we go to <strong>Presentation</strong> -&gt;  <strong>Theme Editor</strong>, and then open up the header.php file to change these lines:</p>
<p><pre><pre>
&nbsp;&nbsp;&lt;div id=&quot;headerright&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_settings(&#039;home&#039;); ?&gt;&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php wp_list_pages(&#039;title_li=&amp;depth=1&#039;); ?&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;&lt;?php bloginfo(&#039;rss2_url&#039;); ?&gt;&quot;&gt;RSS&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
&nbsp;&nbsp;&lt;/div&gt;
</pre></pre></p>
<p>This will create navigation from all WP pages, and then tack on in the beginning a home link and RSS on the end,  but I opted for hard coding a smaller set since I only wanted a handful on the top navigation (yes, I could have used the options on <code>wo_list_pages</code> to exclude pages by ids, but straight HTML here is less work. Plus I&#8217;d have to keep adding excludes as pages were added).<br />
<pre><pre>
&lt;div id=&quot;headerright&quot;&gt;
&nbsp;&nbsp;&lt;ul&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_settings(&#039;home&#039;); ?&gt;&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;/about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;/contact&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;&lt;?php bloginfo(&#039;rss2_url&#039;); ?&gt;&quot;&gt;RSS&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&lt;/ul&gt;
&lt;/div&gt;
</pre></pre></p>
<p>(4) <strong>Navigation Links</strong><br />
A normal blog has a sidebar block listing categories and another one listing static wordpress pages; for this sites purposes, I have blended them together under an &#8220;Explore&#8221; heading. I somewhat did it the lazy way, just shoving together in one &lt;ul&gt; list the pages and then the categories. I hope the order does not mattter, in that case I&#8217;d have to do some more gymnastics in PHP (but I know I can take that on).</p>
<p><pre><pre>
&lt;li id=&quot;Pages&quot;&gt;
&lt;h2&gt;Explore&lt;/h2&gt;
&lt;ul&gt;
&lt;?php wp_list_pages(&#039;title_li=&amp;depth=1&#039;); ?&gt;
&lt;?php wp_list_cats(&#039;sort_column=name&#039;); ?&gt;
&lt;/ul&gt;
&lt;/li&gt;
</pre></pre></p>
<p>(5) <strong>Static Content Links</strong><br />
Nothing special here, just to show you can add pretty much what you need in HTML to the template; in this case, a top block of specific links (well I could have used a blogroll, but for 4 link, straight HTML is easy). and the &#8220;About&#8221; block.</p>
<p>You may have to have some savvy of the CSS- in this case, all of the &lt;a&gt;&#8230;&lt;/a&gt; links are set as block, meaning they sit alone on a line (this is to handle the rollover effects).</p>
<p>(6) <strong>Random Post from Category</strong><br />
Now we really roll of our sleeves and do custom code. We have a category of posts for our <a href="http://pachyderm.nmc.org/category/showcase/">pachyderm showcase</a> and want to randomly put one on the front page. There might be a plugin that does this (I looked but did not find one that can pull from a category), so I rolled my own code.</p>
<p>Put your safety glasses on, this gets pretty messy.</p>
<p>I&#8217;ve learned this from the WP Codex on <a href="http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query">Displaying Posts Using a Custom Select Query</a>. More or less you figure out how to query the database to get what you want (usually a bunch of trial error tests in phpMyAdmin). Some of the query stuff is tricky, as the wp_posts table contains not only blog posts, but page content, and even rows for the media uploaded, so you have to make sure you get the right things back. And fishing from categories is not as easy as it used to be, so it requires a join to another table where the categories are related to the posts.</p>
<p>I should add that I am using another advanced technique for the posts that are Pachyderm Showcase items- I use custom fields for two extra pieces of data for each post in this category (for reference, <a href="http://pachyderm.nmc.org/showcase/fox-harris-amset/">see the corresponding post</a>):</p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2008/02/custom-fields.jpg' alt='custom-fields.jpg' /></p>
<p>The value of &#8220;icon&#8221; is a URL for a square icon used in the entry. These showcase items had already been done <a href="http://www.nmc.org/spotlights/pachyderm">on the NMC drupal site</a>, so I just link to those existing ones.</p>
<p>The value for &#8220;miini&#8221; is a file name of a 220 pixel wide icon that is used for the front page preview- I have these stored in a specific directory inside <code>/wp-content/showcase</code>, e.g. the one for the <a href="http://pachyderm.nmc.org/wp-content/showcase/fox-harris.jpg">Fox Harris entry</a>.  In hindsight, I could have gotten away with one custom field value and made twp WordPress special directories for the image. </p>
<p>Anyhow, where I need these in my code, I use the <a href="http://www.coffee2code.com/wp-plugins/">Get Custom Field Values plugin</a> to get the values. For example, to embed the icons in a post page, I use:</p>
<p><pre><pre>
&lt;?php 
$showcase_icon = c2c_get_custom(&#039;icon&#039;);&nbsp;&nbsp; 
if ($showcase_icon) echo &#039;&lt;img src=&quot;&#039; . 
&nbsp;&nbsp;$showcase_icon . &#039;&quot; alt=&quot;&quot; 
&nbsp;&nbsp;class=&quot;right&quot; /&gt;&#039;;
?&gt;
</pre></pre></p>
<p>This code will embed an icon only if there is a value for the appropriate custom field.</p>
<p>I cannot underscore enough how much flexibility custom fields provide. I use it extensively on the NMC Virtual Worlds site (see the <a href="http://cogdogblog.com/2007/01/16/making/">write-up I did for that site</a>)</p>
<p>But back to this front page random post inserter, here is the whole chunk that does this section, with some explanatory comments&#8230;</p>
<p><pre><pre>
&lt;?php 
/* Only display on pages that are front (id 3) or the About page */ 
if ( is_page(&#039;3&#039;) or&nbsp;&nbsp;is_page(&#039;about&#039;)) : ?&gt;

&lt;li id=&quot;Showcase&quot;&gt;
&lt;h2&gt;Featured Pachyderm&lt;/h2&gt;
&lt;ul&gt;
&lt;?php
// Here is the hairy MySQL query to get one post
// selected randomly from id# 4 (category id)
 $pageposts = $wpdb-&gt;get_results(
&nbsp;&nbsp; &quot;SELECT wposts.* FROM $wpdb-&gt;posts wposts 
&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN&nbsp;&nbsp;wp_term_relationships rel 
&nbsp;&nbsp;&nbsp;&nbsp; ON wposts.ID=rel.object_id 
&nbsp;&nbsp;&nbsp;&nbsp; WHERE rel.term_taxonomy_id = 4 
&nbsp;&nbsp;&nbsp;&nbsp; AND wposts.post_type = &#039;post&#039; 
&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY RAND() Limit 1&quot;, 
&nbsp;&nbsp;&nbsp;&nbsp; OBJECT);
 ?&gt;

&lt;?php if ($pageposts): ?&gt; // loop over results
&lt;?php foreach ($pageposts as $post): ?&gt; // each result
&nbsp;&nbsp;&lt;?php setup_postdata($post); ?&gt; // get variables

&nbsp;&nbsp;// use plugin to get value of custom field
&nbsp;&nbsp;&lt;?php $showcase_preview = c2c_get_custom(&#039;mini&#039;);?&gt;

&nbsp;&nbsp;// only execute if something was found
&nbsp;&nbsp;// embed the graphic and link
&nbsp;&nbsp;&lt;?php if ($showcase_preview): ?&gt;
&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; 
&nbsp;&nbsp;title=&quot;link to &lt;?php the_title(); ?&gt;&quot;&gt;
&nbsp;&nbsp;&lt;img src=&quot;/wp-content/showcase/&lt;?php echo $showcase_preview ?&gt;&quot; 
&nbsp;&nbsp;border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;

&nbsp;&nbsp;&lt;?php endif; ?&gt;
&nbsp;&nbsp;
&nbsp;&nbsp;&lt;!-- print a title and link --&gt;
&nbsp;&nbsp;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title=&quot;link to &lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/strong&gt;&lt;/li&gt;
&nbsp;&nbsp;
&nbsp;&nbsp;// use the RSS version to print a mini blurb, first 35 characters
&nbsp;&nbsp;&lt;li&gt;&lt;em&gt;&lt;?php the_content_rss(&#039;&#039;, false, &#039;&#039;, 35); ?&gt;...&lt;/em&gt;&lt;/li&gt;

 &lt;?php endforeach; ?&gt; 
 &lt;?php endif; ?&gt;
 
 &lt;!-- more showcases link --&gt;
&nbsp;&nbsp;&lt;li class=&quot;more&quot;&gt;&lt;a href=&quot;/category/showcase/&quot;&gt;more pachyderms...&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp; &lt;/ul&gt;

&lt;/li&gt;
&lt;?php endif?&gt;
</pre></pre></p>
<p>Its pretty hairy, yes, but exactly what we needed.</p>
<p>(7) <strong>Move Search Field</strong><br />
The Vertigo template has the search field in the footer; I justed moved it higher on the page. I believe search boxes ought to be &#8220;above the fold&#8221;.</p>
<p>(8) <strong>Custom Code for Recent News</strong><br />
As another variation of the approach in item 6, I wanted to display headlines for posts that re only in the &#8220;Pachyderm News&#8221; category. But the twist here was using some code to rework the date display like it was on the old Pachyderm.org site (it was not critical, more of, &#8220;I wonder if this can be done&#8221;).</p>
<p>This custom query is not as complex as the previous example, so I used the <code><a href="http://codex.wordpress.org/Function_Reference/WP_Query">WP_QUERY</a></code> function that allows me to use the standard WP method and just add some parameters, in this case to select from a specific category, and return 5 items.</p>
<p>We then loop over each one, use the  <code><a href="http://codex.wordpress.org/Formatting_Date_and_Time">the_time()</a></code> function to reformat the timestamp, and make a list of links.</p>
<p><pre><pre>
&lt;li id=&quot;Recent&quot;&gt;
&lt;h2&gt;Recent News&lt;/h2&gt;
&lt;ul&gt;
&lt;!-- use WP_QUERY to select by category and count --&gt;
&nbsp;&nbsp;
&lt;?php $my_query = new WP_Query(&#039;category_name=news&amp;showposts=5&#039;);?&gt;
&nbsp;&nbsp;
&nbsp;&nbsp;&lt;?php while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();?&gt;
&nbsp;&nbsp;&lt;!-- display link, date reformatted, and title --&gt;
&nbsp;&nbsp;&lt;li&gt;&lt;a title=&quot;&lt;?php echo the_title() ?&gt;&quot; 
&nbsp;&nbsp;href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;strong&gt;
&nbsp;&nbsp;&lt;?php the_time(&#039;m.d.Y&#039;) ?&gt;&lt;/strong&gt; 
&nbsp;&nbsp;&lt;?php echo the_title() ?&gt;&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&lt;?php endwhile; ?&gt;
&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&lt;li class=&quot;more&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href=&quot;http://pachyderm.nmc.org/category/news/&quot;&gt;more...&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp; &lt;/ul&gt;
&lt;/li&gt;
</pre></pre></p>
<p>(9) <strong>Flickr Badge</strong><br />
I love adding random photos to a page for freshness. Here I use <a href="http://flickr.com/badge.gne">flickr&#8217;s badge code</a> to pull from photos in <a href="http://www.flickr.com/photos/newmediaconsortium/">an NMC general photo account</a> only <a href="http://www.flickr.com/photos/newmediaconsortium/tags/pachypix/">photos tagged as pachypix</a>.</p>
<p>You are not stuck with the cut and paste code. I yank out some chrome and stuff I dont want, and you can edit the javascript line:</p>
<p><code>http://www.flickr.com/badge_code_v2.gne?count=4&#038;display=random&#038;siz....</code)</p>
<p>to sat tel it a different number of photos to pull. I use this method on other sites; for example, if you use the badge creation tool to work on a public tag, flickr does not offer random as a display option. But if you edit the value here... it works.</p>
<p>I did not want the photos on every page, so the code is wrapped in a PHP command to specify which pages it appears on:</p>
<p><pre><pre>
&lt;?php /* If this is the frontpage */ if ( is_page(&#039;3&#039;)) : ?&gt;
&lt;li id=&quot;flickr&quot;&gt;
&lt;h2&gt;Pachy Pix&lt;/h2&gt;
&lt;!-- Start of Flickr Badge --&gt;
&lt;style type=&quot;text/css&quot;&gt;
#flickr_badge_uber_wrapper a:hover,
#flickr_badge_uber_wrapper a:link,
#flickr_badge_uber_wrapper a:active,
#flickr_badge_uber_wrapper a:visited {text-decoration:none !important; 
&nbsp;&nbsp; background:inherit !important;color:#3993ff;}
#flickr_badge_wrapper {}
#flickr_badge_source {padding:0 !important; font: 11px Arial, Helvetica, 
Sans serif !important; color:#666666 !important;}
&lt;/style&gt;
&lt;table id=&quot;flickr_badge_uber_wrapper&quot; 
cellpadding=&quot;0&quot; cellspacing=&quot;10&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; id=&quot;flickr_badge_wrapper&quot;&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.flickr.com/badge_code_v2.gne?count=4
&amp;display=random&amp;size=t&amp;layout=v&amp;source=user_tag
&amp;user=17942035%40N00&amp;tag=pachypix&quot;&gt;
&lt;/script&gt;
&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;!-- End of Flickr Badge --&gt;
&lt;/li&gt;
&lt;?php endif; ?&gt;
</pre></pre></p>
<p><strong>(10) Embedded RSS Feed</strong><br />
We wanted to include headlines/updates from the <a href="http://www.pachyforge.org/">Pachyderm Developer Community (PachyForge)</a>. There are tons of WP plugins for doing this, but since I know <a href="http://feed2js.org/">Feed2JS</a> inside out, I just use the <a href="http://feed2js.org/index.php?s=php">PHP version of it to embed feeds</a> as needed.</p>
<p>I have a central stored location for Feed2JS code that is on our web server, and can access it from any one of our 8 or 9 virtual domains by knowing the path (obscured below for obvious reasons). </p>
<p><pre><pre>
&lt;li id=Pachyforge&quot;&gt;
&lt;h2&gt;PachyForge News&lt;/h2&gt;
&lt;?php 
// declare Feed2Js variables
$src = &#039;http://www.pachyforge.org/index2.php?
&nbsp;&nbsp;&nbsp;&nbsp; option=ds-syndicate&amp;version=1&amp;feed_id=2&#039;;

$chan = &#039;n&#039;;
$num = 5;
$desc = 0;
$html = &#039;n&#039;;
$tz = -8;
$utf = &#039;y&#039;;
$date = &#039;n&#039;;
$targ = &#039;y&#039;;
$pc = &#039;y&#039;;

// use&nbsp;&nbsp;feed2php include file
require(&#039;/var/www/........./feed2js/feed2php.inc&#039;);
?&gt;&nbsp;&nbsp; 

&lt;span class=&quot;more&quot;&gt;
&lt;a href=&quot;http://www.pachyforge.org/&quot;&gt;more...&lt;/a&gt;
&lt;/span&gt;
&lt;/li&gt;
</pre></pre></p>
<p>Since my install of Feed2JS caches feeds (well all versions fo) but are cleaned on a daily basis, this is really stable.</p>
<p><strong>(11) Gutted Footer</strong><br />
The footer on the Vertigo template is pretty much for blog content, with more lists of recent posts, categories, etc, in 4 columns that is typical for templates following <a href="http://warpspire.com/hemingway">Hemingway</a>. It s anice design style, but the content as is was not what we needed.</p>
<p>So I put a right aligned NMC logo in column 1, put NMC contact info in column 2, the basic links generated by the WP blogrool in 3, and a combo of RSS links and credits in column 4. Its pretty flexible what you can do. And you are not stuck at all with the stock footer.</p>
<h3>But Wait There is More!</h3>
<p>Beyond this template mucking, I made use of two plugins I really found useful that generate special pages for our site.</p>
<p><a href="http://green-beast.com/blog/?page_id=136">Secure and Accessible PHP Contact Form</a> provides an excellent web form for collecting feedback from visitors, and does away with putting email address links on your site:</p>
<blockquote><p>This powerful yet easy-to-install PHP contact form features exceptional accessibility and usability while still providing extensive anti-spam and anti-exploit security features. A marriage of communication and peace-of-mind</p></blockquote>
<p>It is dead easy to configure, with a lot of options for features and design. So it creates our <a href="http://pachyderm.nmc.org/contact/">Pachyderm Services Contact page</a>. I am using this now on all new WP sites I do because it is so useful,</p>
<p>The next one I found is new; we wanted to have a Frequently Asked Questions section on the site. I could have coded it as a static page or series of pages with perhaps sub categories. But this seemed to call for a lot of manual page creation, and I wanted to turn over the content creation / management to NMC staff.</p>
<p>So enter the <a href="http://knowledgeconstructs.com/wordpress-plugins/faq-tastic/">FAQ-Tastic plugin</a> which provides a Wp admin interface for creating, managing, editing the FAQ. So here is the final <a href="http://pachyderm.nmc.org/faq/">Pachyderm Services FAQ </a>as I created it-- well, not final, it is a work in progress.</p>
<p>This took a little bit of extra leg work and tweaking. So first, in FAQ-Tastic, I create a collection of question groups, and associate them with the main FAQ web page- this means each Q&#038;A will be generated as a separate sub page:</p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2008/02/faq-q-groups.jpg' alt='faq-q-groups.jpg' /></p>
<p>and the links on the right allow access to edit, add new questions to that group:</p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2008/02/faq-questions.jpg' alt='faq-questions.jpg' /></p>
<p>You control the order by dragging and dropping the green bars. Editing is easy, well you need to roll your own HTML if you want something more than text. but it works.</p>
<p>The trickier part was on formatting the FAQ page... it is essentially a list of tags specific for this plug-in, that I put below headers to put in the right group order:</p>
<p><pre><pre>
&lt;h4&gt;How do I?&lt;/h4&gt;
[faq summary How Do I?]

&lt;h4&gt;Authoring&lt;/h4&gt;
[faq summary Authoring]

&lt;h4&gt;Working with Media&lt;/h4&gt;
[faq summary Media]
</pre></pre></p>
<p>where the "summary" command means print the question linked to the answer page, and the third part of the tag is the name of the question group.</p>
<p>I also had issues with the output since it puts them into an HTML unordered list, but then uses &lt;h3&gt; tags, which looked butt ugly on this site. So I just went down into the plugin files and found the php files that generate output, and cleaned it up to make them just bold, and remove extraneous line breaks that mangled the output.</p>
<p>The last little trick was the problem that landing on an Answer page provided no link back to the index. So again, I rolled up my  sleeves and edited the page.php template:</p>
<p><pre><pre>
 &lt;?php&nbsp;&nbsp;
if ($post-&gt;post_parent==&quot;43&quot;) 
echo &#039;&lt;p style=&quot;font-size:95%; text-align:right&quot;&gt;
&lt;a href=&quot;/faq&quot;&gt;&amp;laquo; return to pachyderm faq&lt;/a&gt;&lt;/p&gt;&#039;;
?&gt;
</pre></pre></p>
<p>43 is the WP id for the <a href="http://pachyderm.nmc.org/faq/">main FAQ page</a> so if I am on a child page of that, which is what the plugin creates, I insert a return link.</p>
<p>That is about all my tired mind can think of for the details of how this site works. All in all, crafting these WP sites is a work of sheer joy, and each one I learn new techniques I roll into the next one. With your own WP site, there is no limit to what you can do, and you can arm twist WordPress into running any kind fo site, one that is easy to update, is dynamic, and sometimes even darn pretty to look at.</p>
<p>I love WordPress like no other ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/02/14/wordpressing-dissected/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Comment(MultiUser)Press</title>
		<link>http://cogdogblog.com/2008/01/23/commentpress-mu/</link>
		<comments>http://cogdogblog.com/2008/01/23/commentpress-mu/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 07:00:48 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[using wp]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2008/01/23/commentpress-mu/</guid>
		<description><![CDATA[A while back I was excited to tinker with CommentPress, a WordPress template geared towards a format for online papers &#8212; see CommentPressing NMC Paper on Evolution of Communication. Developed by the Institute for the Future of the Book, what CP offers is the feature for site visitors to attach comments at the paragraph level&#8211; this is all riding on a blog platform, but produces something rather not blog-like&#8230; well, sort of blog like. We did a trial for this at NMC for a white paper we had released in November; the first iteration of the online paper was via drupal on our main web site, where each chapter was done inside a drupal book content, so that each chapter was commentable. It works, but&#8230; as a CommentPress version, the comments can be more granular in context of the paper, and we picked up a lot of good comment activity [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I was excited to tinker with <a href="http://www.futureofthebook.org/commentpress/">CommentPress</a>, a WordPress template geared towards a format for online papers &#8212; see <a href="http://cogdogblog.com/2007/11/30/commentpress/">CommentPressing NMC Paper on Evolution of Communication</a>.</p>
<p>Developed by the <a href="http://www.futureofthebook.org/">Institute for the Future of the Book</a>,  what CP offers is the feature for site visitors to attach comments at the paragraph level&#8211; this is all riding on a blog platform, but produces something rather not blog-like&#8230; well, sort of blog like. </p>
<p>We did a trial for this at NMC for a white paper we had released in November; the <a href="http://www.nmc.org/evolution-communication">first iteration of the online paper</a> was via drupal on our main web site, where each chapter was done inside a drupal book content, so that each chapter was commentable. It works, but&#8230; as <a href="http://web.nmc.org/communication">a CommentPress version</a>, the comments can be more granular in context of the paper, and we picked up a lot of good comment activity in this second version.</p>
<p>But then the folks at the office said, &#8220;Let&#8217;s do more in this format!&#8221; which is great, but&#8230;. I sure as heck don&#8217;t want to create a new WP site for each paper.</p>
<p>Then I said, Eureka! This is the perfect job for <a href="http://mu.wordpress.org/">WordPress MU</a> (Multi-user), not to be a blog farm, and more technically, to be a multiblog site from one WP codebase.</p>
<p>But argggh, the current version of WPMu was equivalent to WP 2.3 and the current version of CommentPress was only compatible with WP 2.1. James Farmer was kind enough to share the CommentPress template his crew had tweaked to make work at edublogs, but it would not render article correctly on my site. </p>
<p>But yay! Tonight I just checked, and the CommentPress template was updated to 2.3 equivalence and it all works.</p>
<p>That&#8217;s a lot of quasi techi mumbo jumbo to get to this part; I know have the <em>Evolution of Communication</em> running in WPMu at <a href="http://wp.nmc.org/communication">http://wp.nmc.org/communication</a> and a second CP site on the same site, <em>Co-Evolution of Technology, Media and Collective Action</em> at <a href="http://wp.nmc.org/coevolution">http://wp.nmc.org/coevolution</a>. </p>
<p>This is not a paper per se, it is the keynote presentation by Howard Rheingold delivered in Second Life at the December 3-5 <a href="http://www.nmc.org/2007-fall-virtual-symposium">2007 NMC Symposium on the Evolution of Communication</a>, so what you have is the video of the entire presentation, and then the text of it (transcribed for us from the video) is available for commenting:</p>
<p><a href="http://wp.nmc.org/coevolution"><img src='http://cogdogblog.com/wp-content/uploads/2008/01/co-evolution.jpg' alt='co-evolution.jpg' /></a></p>
<p>These sites dont take long to assemble once you have the text of a paper; the major decision making is how to chunk it into sections (each blog post becomes a &#8220;Chapter&#8221;).</p>
<p>I am just tickled to now have a WPMu site <a href="http://umwblogs.org">like my cool technobuds at University of Mary Washington,</a> though my scale is much smaller and simpler. For now&#8230;</p>
<p>I still need to tinker with the main entry site, there&#8217;s nothing really to see now.</p>
<p>And what would be really cool is if I can figure out how to serve the other 4 or 5 NMC WordPress sites I have running on different domains.</p>
<p>But this is good enough for now.</p>
<p>It must be as <a href="http://grandtextauto.org/">Grand Text Auto has their whole site now in CommentPress</a> format (the blog skin version).. and jealous! They have tinkered with the CSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/01/23/commentpress-mu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Customize the Anarchy Media Player Screen</title>
		<link>http://cogdogblog.com/2008/01/12/custom-player/</link>
		<comments>http://cogdogblog.com/2008/01/12/custom-player/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 20:42:46 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[using wp]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2008/01/12/custom-player/</guid>
		<description><![CDATA[On my tale of switching media player plugins, D&#8217;Arcy&#8217;s comment about troubles with the Anarchy Media Player preview got my thinking, why be stuck with the lame graphic the plugin provides? Just make your own, and replace the vid-play.gif file inside /wp-content/plugins/anarachy-media/images &#8212; here is a test to see how mone looks- this is the default player if you do not provide a media image: Paddy the Wombat movie Isn&#8217;t that nice than:]]></description>
			<content:encoded><![CDATA[<p>On my tale of switching media player plugins, <a href="/2008/01/12/bye-podpress/#comment-45934">D&#8217;Arcy&#8217;s comment</a> about troubles with the Anarchy Media Player preview got my thinking, why be stuck with the lame graphic the plugin provides? </p>
<p>Just make your own, and replace the <strong>vid-play.gif</strong> file inside <strong>/wp-content/plugins/anarachy-media/images</strong> &#8212; here is a test to see how mone looks- this is the default player if you do not provide a media image:</p>
<p><a href="http://cogdogblog.com/wp-content/movies/wombat.mov">Paddy the Wombat movie</a></p>
<p>Isn&#8217;t that nice than:</p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2008/01/vid_play-_orig.gif' alt='vid_play-_orig.gif' /></p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/01/12/custom-player/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://cogdogblog.com/wp-content/movies/wombat.mov" length="820603" type="video/quicktime" />
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>WordPress Plugin Divorce: PodPress I&#8217;m Left You For Anarchy</title>
		<link>http://cogdogblog.com/2008/01/12/bye-podpress/</link>
		<comments>http://cogdogblog.com/2008/01/12/bye-podpress/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 16:40:17 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[using wp]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2008/01/12/bye-podpress/</guid>
		<description><![CDATA[Note to readers- mostly tedious details on WordPress nuts and bolts to follow- click next for the usual shallow barking and whining) WordPress Plugins are awefully powerful to let you easily add/subtract functionality form your own hosted WP site. But sometimes, they become a marriage that may be difficult to extricate yourself. For the NMC Campus Observer, our WP powered site for our Second Life antics, since its inception on March 2006, I had used PodPress, a rather full featured plugin to handle the embedding of audio, sometimes video. It has a huge list of features, and if you have ever looked, adds a lot os &#8220;stuff&#8221; to your pages. It has a lot of updates, and each replacement is a not so moderate upload of scads of files. Adding the audio/video content is not done via editing your content, but via a separate editing pane. But more problematic, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note to readers- mostly tedious details on WordPress nuts and bolts to follow- click next for the usual shallow barking and whining)</em></p>
<p>WordPress Plugins are awefully powerful to let you easily add/subtract functionality form your own hosted WP site. But sometimes, they become a marriage that may be difficult to extricate yourself. For the <a href="http://sl.nmc.org/">NMC Campus Observer</a>, our WP powered site for our Second Life antics, since its inception on March 2006, I had used <a href="http://www.mightyseek.com/podpress/">PodPress</a>, a rather full featured plugin to handle the embedding of audio, sometimes video.</p>
<p>It has a huge list of features, and if you have ever looked, adds a lot os &#8220;stuff&#8221; to your pages. It has a lot of updates, and each replacement is a not so moderate upload of scads of files. Adding the audio/video content is not done via editing your content, but via a separate editing pane. But more problematic, I&#8217;ve had numerous incidences where the site&#8217;s display was mangled on certain browsers&#8211; sometimes Safari lost a sidebar, more recently the site was totally wrecked in Internet Explorer, the sidebar pushed down to the bottom, bottom of the post/comments field cut off. If I disabled PodPress, the display issues went away. But then also, did all of my links to the media. And one of the recent WordPress updates seemed to have a conflict with PP as well.</p>
<p>So its been on my list for a while to get myself out of this relationship. I have been using <a href="http://an-archos.com/anarchy-media-player">Anarchy Media Plugin</a> on other sites which is one with less overhead, no mucking of display (well I did discover the Gregarious plugin has a conflict that disables Anarchy), but better it works simply by replacing a simple hypertext link to your mp3, .mov, etc with a player icon. This way, should you ever move to another plugin, your content is in tact. </p>
<p>If you are looking for a simple plugin to just convert mp3 links to a nice small player, I like <a href="http://blog.taragana.com/index.php/archive/taraganas-delicious-mp3-player-wordpress-plugin/">Taragana’s Del.icio.us mp3 Player WordPress Plugin</a>.</p>
<p>So the task was I&#8217;d have to find every post that had a PodPress managed media, and rewrite the post to have a normal href link that Anarchy could pick up. </p>
<p><span id="more-2153"></span></p>
<p>The PodPress data, as mentioned is in its own pane:</p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2008/01/podpress-removal.jpg' alt='podpress-removal.jpg' /></p>
<p>So I&#8217;d have to cut and paste the URL from here on each post and then create a link in the body of the post. But I had to find a way to identify all the posts that had embedded PodPress content. This meant diving into MySQL via PHPmyAdmin, and running the query:</p>
<p><pre><pre>SELECT post_id FROM `wp_postmeta` 
WHERE meta_key=&#039;podPressMedia&#039; 
ORDER BY post_id asc</pre></pre></p>
<p>PodPress and other plugins store extra info it needs into the wp_<strong>postmeta</strong> table.</p>
<p>This returned to me a list of the post ids for all of the entries that had PodPress stuff&#8211; 69 of them! Yikes!</p>
<p>So now I had a list of post ids, like:</p>
<p><pre><pre>
15
23
43
628
</pre></pre></p>
<p>How do I get to those entries to edit? Aha, Remember that when you use WordPress&#8217;s features for Permalinks, you convert the actual URLs that look like <strong>http://sl.nmc.org/index.php?p=967</strong> into something pretty like <strong>http://sl.nmc.org/2008/01/10/edugrid/</strong> which is really just an alias to the URL with a post number in it.</p>
<p>So I took my list of 69 exported post ids, one per line, into BBEdit and did a search and replace- replacing every line return <strong>\r</strong> with <strong>\rhttp://sl.nmc.org/index.php?p=</strong>  so my list above became:</p>
<p><pre><pre>
http://sl.nmc.org/index.php?p=15
http://sl.nmc.org/index.php?p=23
http://sl.nmc.org/index.php?p=43
http://sl.nmc.org/index.php?p=628
</pre></pre></p>
<p>Now I had full URLs I could copy to the browser, then click my edit link in the entry, modify the post, remove the PodPress data, and save. It took about 2 hours.</p>
<p>But I was not done.</p>
<p>The other problem was the way I had done my Quicktime links- usually in my post I had a still image embedded in the page with a link to the Quicktime media on that image, plus an additional text link to the Quicktime video itself. The problem here was that Anarchy uses each occurrence of a link to a *.mov file as an embedded player, so I would lose the image and then have 2 stacked players.</p>
<p>The solution was to remove the IMG tag, remove the second links, and then put the JPG in the same directory as the video, so for a video named <strong>my-cool-movie.mov</strong>, you stash next to it a image file named <strong>my-cool-movie.mov.jpg</strong>.  This tells the Anarchy player to use that image as a preview, I had the JPG already in the post, so I just had to download the image, name it right, and upload it to the video directory.</p>
<p>Its also an issue because any link to a *.mov or a *.wmv, sometimes we provide as a download link, Anarachy turns into an embedded player. I got around those by converting the URLs to a <a href="http://tinyurl.com">TinyURL</a> which thus Anarchy does not see as a video link.</p>
<p>So to find these occurrences, I had to search the blog for entries that contained &#8220;Quicktime Video&#8221; and thus had another 10 entries to clean.</p>
<p>Last step was to disable PodPress plugin, goodbye!</p>
<p>I don&#8217;t mean to criticize PodPress, it has all kinds of features like iTunes integration, and it likely works great for others; but for this site, over the years, it continually created havoc on the web layout. The divorce from the plugin is now finalized, no hard feelings, I&#8217;ve just moved on to someone else. </p>
<p>Sometimes it is as easy as unplugging a plugin, but other times you are in much deeper.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2008/01/12/bye-podpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>One Nice Feature Among Many in WP 2.3&#8230;</title>
		<link>http://cogdogblog.com/2007/09/26/wp23/</link>
		<comments>http://cogdogblog.com/2007/09/26/wp23/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 04:56:36 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[using wp]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2007/09/26/wp23/</guid>
		<description><![CDATA[I&#8217;ve barely had time to breathe much less update all of my WordPress powered sites, but noticed today one small feature I&#8217;ve been waiting for&#8230; I was actually, for no logical reason, setting up one more new WP powered web site for NMC, not quite ready for prime time. But what is cool is the plugins page now informs you when a plugin has a newer version available: Until now you would have to check each plug-in home page to check. Nice. Other goodies lurk under the hood- tags for posts built in &#8212; and it looks like it will import tags from old plugins (like Bunny&#8217;s technorati tags I have used a bit) and some other enhancements for dealing with blog post URLs. For CogDogBlog, the changeover is easy, as the Dreamhost one click upgrades make it a no brainer; my corral of NMC blogs will take the old [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve barely had time to breathe much less update all of my WordPress powered sites, but noticed today one small feature I&#8217;ve been waiting for&#8230; I was actually, for no logical reason, setting up one more new WP powered web site for NMC, not quite ready for prime time. But what is cool is the plugins page now informs you when a plugin has a newer version available:</p>
<p><img src='http://cogdogblog.com/wp-content/uploads/2007/09/wp232.jpg' alt='wp232.jpg' /></p>
<p>Until now you would have to check each plug-in home page to check. Nice.</p>
<p>Other goodies lurk under the hood- tags for posts built in &#8212; and it looks like it will import tags from old plugins (like Bunny&#8217;s technorati tags I have used a bit) and some other enhancements for dealing with blog post URLs. </p>
<p>For CogDogBlog, the changeover is easy, as the Dreamhost one click upgrades make it a no brainer; my corral of NMC blogs will take the old manual approach, unless I can channel D&#8217;Arcy&#8217;s suggestion of using Subversion.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2007/09/26/wp23/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>No More Bad Behavior with Bad Behavior on the Prowl</title>
		<link>http://cogdogblog.com/2007/07/16/bad-behavior/</link>
		<comments>http://cogdogblog.com/2007/07/16/bad-behavior/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 05:36:38 +0000</pubDate>
		<dc:creator>Alan Levine aka CogDog</dc:creator>
				<category><![CDATA[using wp]]></category>

		<guid isPermaLink="false">http://cogdogblog.com/2007/07/16/bad-behavior/</guid>
		<description><![CDATA[Over the years, angry blog posts about spam is my most frequent blog post activity (well, until Twitter came out). I&#8217;ve been long resigned to scripted onslaughts of attempts to insert unwanted content into the comment space as a SFOL (Sad Fact of Life). For the most part, I&#8217;ve had excellent luck with Spam karma 2 catching most spam and keeping it from my pages. 27,000 spams eaten in maybe 3 years, oi! But each one results in an email that at first excites me (wow, a real person had something really to say!) which today turned to sour grape juice 10 times with a series of comments like &#8220;pjtxgw qbvxdmac fkzv zdmltnav ouiszlfmj qfidsozar oapzfsdb&#8221; or &#8220;&#8221;. What&#8217;s weird is that the URLs inserted are gibberish too. My only guess is they attempt to foist an approved comment past a sleepy blog writer, and once the gate is open, [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years, angry blog posts about spam is my most frequent blog post activity (well, until Twitter came out). I&#8217;ve been long resigned to scripted onslaughts of attempts to insert unwanted content into the comment space as a SFOL (Sad Fact of Life).  </p>
<p>For the most part, I&#8217;ve had excellent luck with <a href="http://unknowngenius.com/blog/wordpress/spam-karma/">Spam karma 2</a> catching most spam and keeping it from my pages. 27,000 spams eaten in maybe 3 years, oi!</p>
<p>But each one results in an email that at first excites me (wow, a real person had something really to say!) which today turned to sour grape juice 10 times with a series of comments like &#8220;pjtxgw qbvxdmac fkzv zdmltnav ouiszlfmj qfidsozar oapzfsdb&#8221; or &#8220;&#8221;. What&#8217;s weird is that the URLs inserted are gibberish too. My only guess is they attempt to foist an approved comment past a sleepy blog writer, and once the gate is open, they can post anything.</p>
<p>But these came in thick clumps today, maybe 20 in total, and even more that were caught in SK2. I know some people sweat by Askimet for WordPress, and a little bit of searching brought me to something which is billed as a first line of defense in conjunction with these two existing spam traps.</p>
<p><a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a>. </p>
<blockquote><p>Bad Behavior is a PHP-based solution for blocking link spam and the robots which deliver it.</p>
<p>Bad Behavior complements other link spam solutions by acting as a gatekeeper, preventing spammers from ever delivering their junk, and in many cases, from ever reading your site in the first place. This keeps your site’s load down, makes your site logs cleaner, and can help prevent denial of service conditions caused by spammers.</p></blockquote>
<p>It is listed as working with a whole raft of PHP driven systems, not only WordPress, but drupal, mediawiki, and about 10 more. There is some wry humor there too- following the <a href="http://www.bad-behavior.ioerror.us/documentation/how-it-works/">link for how it works</a>:</p>
<blockquote><p><strong>How Bad Behavior Works</strong><br />
It’s black magic.</p>
<p>(This is a placeholder. I’ll explain the whole thing later.)</p></blockquote>
<p>I <a href="http://www.homelandstupidity.us/software/bad-behavior/bad-behavior-download/">downloaded</a> it (you have to smile at a site called &#8220;homeland stupidity&#8221;), installed the plugin, enabled it. In less than 3 minutes, it had already reported stopping 10 attempts.</p>
<p>I&#8217;m curious to see what effect it has. And I am eager to try it on our MediaWiki sites as I am tired of the bots that create random 6 character accounts, and wipe out and deface our content. More on that later, one report from the front lines of the War on Spam at a time.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogdogblog.com/2007/07/16/bad-behavior/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>

