<?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>super-cooper &#187; plugin</title>
	<atom:link href="http://www.super-cooper.com/archive/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.super-cooper.com</link>
	<description>Python, GIS, and a sprinkling of mindless drivel from Chad Cooper</description>
	<lastBuildDate>Wed, 08 Dec 2010 02:12:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Converation Viewer now an official WordPress plugin</title>
		<link>http://www.super-cooper.com/archive/2008/07/19/converation-viewer-now-an-official-wordpress-plugin/</link>
		<comments>http://www.super-cooper.com/archive/2008/07/19/converation-viewer-now-an-official-wordpress-plugin/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 03:56:26 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.super-cooper.com/?p=56</guid>
		<description><![CDATA[I finally got around to getting Conversation Viewer into the WordPress plugins SVN repository. Been meaning to do that for a while. Version 1.0.0 can be had from the trunk at: http://svn.wp-plugins.org/conversation-viewer/trunk/ The writeup and instructions/examples of usage can be found here .]]></description>
			<content:encoded><![CDATA[<p>I finally got around to getting <a title="Converation Viewer page" href="http://www.super-cooper.com/archive/2005/05/26/wordpress-plugin-conversation-viewer/" title="Converation Viewer page">Conversation Viewer</a> into the WordPress plugins SVN repository. Been meaning to do that for a while. Version 1.0.0 can be had from the trunk at:</p>
<p><a title="trunk" href="http://svn.wp-plugins.org/conversation-viewer/trunk/" target="_self" title="trunk">http://svn.wp-plugins.org/conversation-viewer/trunk/</a></p>
<p>The writeup and instructions/examples of usage can be found <a title="Converation Viewer page" href="http://www.super-cooper.com/archive/2005/05/26/wordpress-plugin-conversation-viewer/" target="_self" title="Converation Viewer page">here</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.super-cooper.com/archive/2008/07/19/converation-viewer-now-an-official-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin: Conversation Viewer</title>
		<link>http://www.super-cooper.com/archive/2005/05/26/wordpress-plugin-conversation-viewer/</link>
		<comments>http://www.super-cooper.com/archive/2005/05/26/wordpress-plugin-conversation-viewer/#comments</comments>
		<pubDate>Thu, 26 May 2005 12:14:34 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[site]]></category>
		<category><![CDATA[conversation]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://super-cooper.com/?p=93</guid>
		<description><![CDATA[First off, I have to say that I can really only take credit for about 10% of the code in this plugin, if that. I really can&#8217;t even take credit for the idea. And let me also come out and say that I am in no way any sort of PHP genius. I&#8217;m sure there [...]]]></description>
			<content:encoded><![CDATA[<p>First off, I have to say that I can really only take credit for about 10% of the code in this plugin, if that. I really can&#8217;t even take credit for the idea. And let me also come out and say that I am in no way any sort of PHP genius. I&#8217;m sure there are things that could be done better in this plugin, but this works for me. So, with all that out of the way, the idea for this came from <a href="http://www.1976design.com/blog/archive/2004/07/29/redesign-tag-transform/" title="Dunstan's idea for inserting conversations using XML">Dunstan</a>, and the majority of the code came from <a href="http://elasticdog.com/" title="Elastic Dog">Aaron Schaefer&#8217;s</a> <a href="http://elasticdog.com/2004/09/code-viewer/" title="Code Viewer plugin">Code Viewer</a> plugin.<br />
<span id="more-41"></span></p>
<h2>What is it, and why?</h2>
<p>Conversation Viewer is a WordPress <del>1.2</del> 2.5 plugin that pulls a external text file into a post and formats it into a defined list, keeping you from having to manually code the conversation into a defined list, ordered list, or Heaven forbid, a ghastly table. I wanted to be able to easily and quickly include conversations into posts, while still keeping the code nice and clean. <a href="http://www.super-cooper.com/archive/2004/10/12/retro-dude-thats-tom-sizemore/">I tried this manually once with a table</a>, and while the result looked good, the code was rather sloppy and <em>very</em> cumbersome to compose.</p>
<h2>How it works</h2>
<p>Basically, you tell the plugin the path to your conversation text files, and to insert a conversation, you simply call the text file(s) containing the conversation(s), and it (they) will appear in the post. You can call as many different conversations in one post as you want, just name them uniquely. The nitty gritty of how the plugin works is commented in the plugin code.</p>
<h2>Usage</h2>
<p>You need three things to get this up and running: the plugin, a text file of a conversation (with proper syntax), and some CSS for styling. <a href="http://www.super-cooper.com/snippets/conv-viewer/conv-viewer.txt">Get the plugin here.</a> Change <code>$default_conv_path</code> to the absolute path of the directory you plan on storing your text files of conversations (mine is something like <code>http://www.super-cooper.com/conversations/</code>), then slap it into your plugins folder and activate it. Next, construct your conversation file, which should look something like this:</p>
<link rel="stylesheet" href="http://www.super-cooper.com/wp-content/plugins/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code>Me,Why did the chicken cross the road?</code></li>
<li value="2" class="tab0 even"><code>The Wife,Why?.</code></li>
<li value="3" class="tab0 odd"><code>Me,To get to the other side.</code></li>
<li value="4" class="tab0 even"><code>The Wife,You're crazy.</code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://www.super-cooper.com/snippets/conv-viewer/conversation-viewer-example-1.txt">conversation-viewer-example-1.txt</a></li>
</ol>
<p>Now let&#8217;s break this down. This is a conversation between the Wife and I where I am showing off my joke-telling prowess, and she is obviously <em>very</em> impressed. There a basically two parts to the conversation: who&#8217;s talking and what they are saying, which are separated by a comma. The plugin looks for the occurence of the first comma, assumes everything to the left of it is the person, and everything to the right of it is what that person is saying. Call the text file in your post like so:</p>
<p><code>&lt;conversation src="http://www.super-cooper.com/snippets/conversation-viewer-example-1.txt" /&gt;</code></p>
<p>I like to arrange mine in subdirectories by date, and if you have more than one to include in a post, just add the numbers on the end and call them accordingly. Note that this path is relative, you set the root of this path in <code>$default_conv_path</code> in the plugin earlier. The above text conversation, parsed through the browser,  would look like so with the plugin and my CSS:</p>
<dl class="conversation">
<dt>Me:</dt>
<dd>Why did the chicken cross the road?</dd>
<dt>The Wife:</dt>
<dd>Why?.</dd>
<dt>Me:</dt>
<dd>To get to the other side.</dd>
<dt>The Wife:</dt>
<dd>You&#8217;re crazy.</dd>
</dl>
<p>And the code that produced it would look like so:</p>
<link rel="stylesheet" href="http://www.super-cooper.com/wp-content/plugins/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code>&lt;dl class=&quot;conversation&quot;&gt;</code></li>
<li value="2" class="tab0 even"><code>&lt;dt&gt;Me:&lt;/dt&gt;</code></li>
<li value="3" class="tab0 odd"><code>&lt;dd&gt;Why did the chicken cross the road?&lt;/dd&gt;</code></li>
<li value="4" class="tab0 even"><code>&lt;dt&gt;The Wife:&lt;/dt&gt;</code></li>
<li value="5" class="tab0 odd"><code>&lt;dd&gt;Why?.&lt;/dd&gt;</code></li>
<li value="6" class="tab0 even"><code>&lt;dt&gt;Me:&lt;/dt&gt;</code></li>
<li value="7" class="tab0 odd"><code>&lt;dd&gt;To get to the other side.&lt;/dd&gt;</code></li>
<li value="8" class="tab0 even"><code>&lt;dt&gt;The Wife:&lt;/dt&gt;</code></li>
<li value="9" class="tab0 odd"><code>&lt;dd&gt;You&amp;#8217;re crazy.&lt;/dd&gt;</code></li>
<li value="10" class="tab0 even"><code>&lt;/dl&gt;</code></li>
</ol>
<p>The definition term is the person&#8217;s name, and what they said is the definition.</p>
<h2>Mixing it up</h2>
<p>Let&#8217;s say you want to emphasize what someone is saying. I like to do this with italics. Well, to style what the person is saying in italics, simply add a pound sign (&#35;) <em>before</em> the person&#8217;s name, like so:</p>
<link rel="stylesheet" href="http://www.super-cooper.com/wp-content/plugins/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code>The Son,I'm having a horndog for dinner.</code></li>
<li value="2" class="tab0 even"><code>#Me,Really?</code></li>
<li value="3" class="tab0 odd"><code>The Son,U-huh.</code></li>
<li value="4" class="tab0 even"><code>Me,Don't you mean a corndog?</code></li>
<li value="5" class="tab0 odd"><code>The Son,That's what I said, a corndog.</code></li>
</ol>
<p>Which, when called through the plugin and parsed, would look like this:</p>
<dl class="conversation">
<dt>The Son:</dt>
<dd>I&#8217;m having a horndog for dinner.</dd>
<dt>Me:</dt>
<dd class="emphasis">Really?</dd>
<dt>The Son:</dt>
<dd>U-huh.</dd>
<dt>Me:</dt>
<dd>Don&#8217;t you mean a corndog?</dd>
<dt>The Son:</dt>
<dd>That&#8217;s what I said, a corndog.</dd>
</dl>
<p>And the code that produced it would look like this:</p>
<link rel="stylesheet" href="http://www.super-cooper.com/wp-content/plugins/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code>&lt;dl class=&quot;conversation&quot;&gt;</code></li>
<li value="2" class="tab0 even"><code>&lt;dt&gt;The Son:&lt;/dt&gt;</code></li>
<li value="3" class="tab0 odd"><code>&lt;dd&gt;I&amp;#8217;m having a horndog for dinner.&lt;/dd&gt;</code></li>
<li value="4" class="tab0 even"><code>&lt;dt&gt;Me:&lt;/dt&gt;</code></li>
<li value="5" class="tab0 odd"><code>&lt;dd class=&quot;emphasis&quot;&gt;Really?&lt;/dd&gt;</code></li>
<li value="6" class="tab0 even"><code>&lt;dt&gt;The Son:&lt;/dt&gt;</code></li>
<li value="7" class="tab0 odd"><code>&lt;dd&gt;U-huh.&lt;/dd&gt;</code></li>
<li value="8" class="tab0 even"><code>&lt;dt&gt;Me:&lt;/dt&gt;</code></li>
<li value="9" class="tab0 odd"><code>&lt;dd&gt;Don&amp;#8217;t you mean a corndog?&lt;/dd&gt;</code></li>
<li value="10" class="tab0 even"><code>&lt;dt&gt;The Son:&lt;/dt&gt;</code></li>
<li value="11" class="tab0 odd"><code>&lt;dd&gt;That&amp;#8217;s what I said, a corndog.&lt;/dd&gt;</code></li>
<li value="12" class="tab0 even"><code>&lt;/dl&gt;</code></li>
</ol>
<p>Finally, here&#8217;s my CSS that I use for styling my conversations:</p>
<link rel="stylesheet" href="http://www.super-cooper.com/wp-content/plugins/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code>dl<span style="color: #6666ff;">.conversation</span> dt <span style="color: #66cc66;">&#123;</span></code></li>
<li value="2" class="tab1 even"><code>clear<span style="color: #3333ff;">:left</span><span style="color: #66cc66;">;</span></code></li>
<li value="3" class="tab1 odd"><code>float<span style="color: #3333ff;">:left</span><span style="color: #66cc66;">;</span></code></li>
<li value="4" class="tab1 even"><code>text-align<span style="color: #3333ff;">:right</span><span style="color: #66cc66;">;</span></code></li>
<li value="5" class="tab1 odd"><code>width<span style="color: #3333ff;">:<span style="color: #933;">9em</span></span><span style="color: #66cc66;">;</span></code></li>
<li value="6" class="tab1 even"><code>line-height<span style="color: #3333ff;">:<span style="color: #933;">1</span></span><span style="color: #6666ff;"><span style="color: #933;">.8em</span></span><span style="color: #66cc66;">;</span></code></li>
<li value="7" class="tab1 odd"><code>font-weight<span style="color: #3333ff;">:bold</span><span style="color: #66cc66;">;</span></code></li>
<li value="8" class="tab1 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li value="9" class="tab0 odd"><code>dl<span style="color: #6666ff;">.conversation</span> dd <span style="color: #66cc66;">&#123;</span></code></li>
<li value="10" class="tab1 even"><code>margin<span style="color: #3333ff;">:<span style="color: #933;">0</span></span> <span style="color: #933;">7px</span> <span style="color: #933;">0</span> <span style="color: #933;">10em</span><span style="color: #66cc66;">;</span></code></li>
<li value="11" class="tab1 odd"><code>padding<span style="color: #3333ff;">:<span style="color: #933;">0</span></span><span style="color: #66cc66;">;</span></code></li>
<li value="12" class="tab1 even"><code>vertical-align<span style="color: #3333ff;">:top</span><span style="color: #66cc66;">;</span></code></li>
<li value="13" class="tab1 odd"><code>line-height<span style="color: #3333ff;">:<span style="color: #933;">1</span></span><span style="color: #6666ff;"><span style="color: #933;">.8em</span></span><span style="color: #66cc66;">;</span></code></li>
<li value="14" class="tab1 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li value="15" class="tab0 odd"><code>dl dd<span style="color: #6666ff;">.emphasis</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li value="16" class="tab1 even"><code>font-style<span style="color: #3333ff;">:italic</span><span style="color: #66cc66;">;</span></code></li>
<li value="17" class="tab1 odd"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://www.super-cooper.com/snippets/conv-viewer/conversation-viewer-example-css.txt">conversation-viewer-example-css.txt</a></li>
</ol>
<p>Some other examples of this plugin in use can be found <a href="http://super-cooper.com/2005/05/02/how-ya-doin/">here</a> and <a href="http://super-cooper.com/2005/03/13/retro-jack-theres-no-speed-limit-in-montana/"> here</a>.</p>
<h2>Other stuff</h2>
<p>This plugin was designed for WP 1.2 (yeah, I know I should migrate to 1.5, but I don&#8217;t have the time or desire to do so anytime soon), so I have no idea if it will work in 1.5. If it does or doesn&#8217;t, please let me know. <strong>EDIT: This works in 2.5 as of 2008-04-22. Also works on 2.7 as of 2009-01-02</strong> Any feedback is appreciated, but remember, most of the code I just hacked up from <a href="http://elasticdog.com/2004/09/code-viewer/" title="Code Viewer plugin">Code Viewer</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.super-cooper.com/archive/2005/05/26/wordpress-plugin-conversation-viewer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

