<?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>Missives from the Technocave &#187; Wordpress</title>
	<atom:link href="http://www.widgettwalls.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.widgettwalls.com</link>
	<description>Fresh from my brain pan to the breakfast tables of the world.</description>
	<lastBuildDate>Tue, 09 Nov 2010 09:15:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Hacking Quicktags: All Links Are Not Created Equal</title>
		<link>http://www.widgettwalls.com/2007/09/30/hacking-quicktags-to-add-target-blank/</link>
		<comments>http://www.widgettwalls.com/2007/09/30/hacking-quicktags-to-add-target-blank/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 06:53:26 +0000</pubDate>
		<dc:creator>Widge</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[linking]]></category>
		<category><![CDATA[quicktags]]></category>
		<category><![CDATA[targeting]]></category>

		<guid isPermaLink="false">http://www.widgettwalls.com/2007/09/30/hacking-quicktags-to-add-target-blank/</guid>
		<description><![CDATA[How do you alter the insert link bits in quicktags under Wordpress?  I might be able to help you.]]></description>
			<content:encoded><![CDATA[<p>Okay, next up: the link quicktag.  On Needcoffee, we have internal links and external links.  Internal links are just plain old links.  External links open in a new window.  I know that irritates a few people, but I have no idea why.  You close the window and you&#039;re where you came from.  Seems like a no brainer to me.</p>
<p>Anyway.  Same deal as before:</p>
<p>1.  Go to /wp-includes/js/</p>
<p>2.  Edit quicktags.js</p>
<p>3.  Look for this code:</p>
<pre>
<code>edButtons[edButtons.length] =
new edButton('ed_link'
,'link'
,''
,''
,'a'
); // special case</code>
</pre>
<p><span id="more-430"></span><br />
4.  Now this is what creates the buttons across the top of your edit area.  In my case, I&#039;m altering one and creating another.  So I&#039;m going to do this:</p>
<pre>
<code>edButtons[edButtons.length] =
new edButton('ed_link'
,'int link'
,''
,''
,'a'
); // special case

edButtons[edButtons.length] =
new edButton('ed_extlink'
,'ext link'
,''
,''
,'x'
); // special case</code>
</pre>
<p>Now, in the first block of code, all I&#039;ve done is change that third line, which is what the button is labeled.  Because I want to differentiate between the two types of links, I&#039;ve changed &#034;link&#034; to &#034;int link.&#034;  And then I&#039;ve basically copied the same code again, but this time the button&#039;s called &#034;ext link.&#034;  Also, you see the sixth lines&#8211;that&#039;s supposed to be an access key.  I never use this, but I went ahead and put an X for the second one, just in case.</p>
<p>Oh, and I almost forgot: you see where the first button does an &#034;ed_link&#034; thing.  Well, since I&#039;m not a real coder, I don&#039;t know precisely what the hell that does&#8211;it does a call out to a function we&#039;ll get to in a minute.  So I must made &#034;ed_extlink&#034; the second one.</p>
<p>5.  Now look for this section of code, that starts with &#034;function edShowButton&#034;.  It&#039;s that aforementioned function business.  As before, I&#039;ve put in line breaks where there normally aren&#039;t any, just to preserve the width of my theme here.</p>
<pre>
<code>	if (button.id == 'ed_img') {
		document.write('&lt;input type="button" id="' + button.id + '" accesskey="'
+ button.access + '" class="ed_button" onclick="edInsertImage(edCanvas);"
value="' + button.display + '" /&gt;');
	}
	else if (button.id == 'ed_link') {
		document.write('&lt;input type="button" id="' + button.id + '"
accesskey="' + button.access + '" class="ed_button"
onclick="edInsertLink(edCanvas, ' + i + ');" value="' + button.display + '" /&gt;');
	}
	else {
		document.write('&lt;input type="button" id="' + button.id + '"
accesskey="' + button.access + '" class="ed_button"
onclick="edInsertTag(edCanvas, ' + i + ');" value="' + button.display + '"  /&gt;');
	}
}</code>
</pre>
<p>The first bit, the &#034;ed_link&#034; section, we really don&#039;t need to screw with.  But we need to add a function bit for &#034;ext_edlink.&#034;  It&#039;s basically the same thing as the one above it, so the two together now look like this:</p>
<pre>
<code>	else if (button.id == 'ed_link') {
		document.write('&lt;input type="button" id="' + button.id + '"
accesskey="' + button.access + '" class="ed_button"
onclick="edInsertLink(edCanvas, ' + i + ');" value="' + button.display + '" /&gt;');
	}
	else if (button.id == 'ed_extlink') {
		document.write('&lt;input type="button" id="' + button.id + '"
accesskey="' + button.access + '" class="ed_button"
onclick="edInsertExtLink(edCanvas, ' + i + ');" value="' + button.display + '" /&gt;');
	}</code>
</pre>
<p>No sweat.</p>
<p>6.  Now there&#039;s a section marked &#034;function edInsertLink&#034; which we don&#039;t need to screw with, because really all we&#039;ve done for internal links is change the button label.  But we need to add a new section.  Here&#039;s what I&#039;ve put in directly after the edInsertLink bit:</p>
<pre>
<code>function edInsertExtLink(myField, i, defaultValue) {
	if (!defaultValue) {
		defaultValue = 'http://';
	}
	if (!edCheckOpenTags(i)) {
		var URL = prompt(quicktagsL10n.enterURL, defaultValue);
		if (URL) {
			edButtons[i].tagStart = '&lt;a href="' + URL + '" target="_blank"&gt;';
			edInsertTag(myField, i);
		}
	}
	else {
		edInsertTag(myField, i);
	}
}
&lt;/a&gt;</code>
</pre>
<p>Basically all I&#039;ve done is copy the code, change &#034;edInsertLink&#034; to &#034;edInsertExtLink&#034; and stick the target=&#034;_blank&#034;> in.  That line used to look like this:</p>
<pre>
<code>			edButtons[i].tagStart = '&lt;a href="' + URL + '"&gt;';
&lt;/a&gt;</code>
</pre>
<p>But I made it this:</p>
<pre>
<code>			edButtons[i].tagStart = '&lt;a href="' + URL + '" target="_blank"&gt;';
&lt;/a&gt;</code>
</pre>
<p>7.  And that&#039;s it.  You should be good.</p>
<p>Bear in mind I&#039;m a writer, not a coder.  So if this screws up your site, it&#039;s your own lookout.  Backup files before you screw with them.  YMMV.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.widgettwalls.com/2007/09/30/hacking-quicktags-to-add-target-blank/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Quicktags: One Image Directory, Under Eris</title>
		<link>http://www.widgettwalls.com/2007/09/29/hacking-quicktags-one-image-directory-under-eris/</link>
		<comments>http://www.widgettwalls.com/2007/09/29/hacking-quicktags-one-image-directory-under-eris/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 03:55:27 +0000</pubDate>
		<dc:creator>Widge</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[quicktags]]></category>

		<guid isPermaLink="false">http://www.widgettwalls.com/2007/09/29/hacking-quicktags-one-image-directory-under-eris/</guid>
		<description><![CDATA[Wordpress Quicktags: How to screw with them to change how images show up.  ]]></description>
			<content:encoded><![CDATA[<p>Okay, so here&#039;s some fun.  At Needcoffee, we pretty much draw from a single directory for images.  But if you do the IMG quicktag by itself, all you get is it asking you for the full URL.  That&#039;s no fun.  How can you hardcode the img directory in there?</p>
<p>Simple.</p>
<p>1.  Go to wp-includes/js/</p>
<p>2.  Edit your quicktags.js</p>
<p>3.  Look for this code (I&#039;ve killed some tabs just to keep it from being too wide for the theme):</p>
<pre>
<code>function edInsertImage(myField) {
	var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
	if (myValue) {
		myValue = '&lt;img src="'
		+ myValue
		+ '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
		+ '" /&gt;';
		edInsertContent(myField, myValue);
	}
}</code>
</pre>
<p><span id="more-429"></span><br />
4.  Here&#039;s the change I made for Needcoffee:</p>
<pre>
<code>function edInsertImage(myField) {
var myValue = prompt(quicktagsL10n.enterImageURL, 'http://images.needcoffee.com/');
	if (myValue) {
		myValue = '&lt;div class="img-right"&gt;&lt;img src="'
		+ myValue
		+ '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
		+ '" /&gt;&lt;/div&gt;';
		edInsertContent(myField, myValue);
	}
}</code></pre>
<p>You&#039;ll notice that &#034;http://images.needcoffee.com/&#034; is set to pop up instead of just &#034;http://&#034;.  Obviously, you make that whatever you want it to be.</p>
<p>Now you&#039;ll also notice that I&#039;ve got a div class in there instead of just the standard img src code.  Well, at Needcoffee, our images are always on the right side of the post (well, normally), so that&#039;s hardcoded as well to save me from having to put it in.</p>
<p>Enjoy.</p>
<p>P.S.  You might need to shut down your browser and flush your machine&#039;s cache before the changes show up.  So don&#039;t panic if it doesn&#039;t take effect immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.widgettwalls.com/2007/09/29/hacking-quicktags-one-image-directory-under-eris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress and the Illuminati</title>
		<link>http://www.widgettwalls.com/2007/09/27/wordpress-and-the-illuminati/</link>
		<comments>http://www.widgettwalls.com/2007/09/27/wordpress-and-the-illuminati/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 06:03:57 +0000</pubDate>
		<dc:creator>Widge</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[illuminati]]></category>
		<category><![CDATA[law-of-fives]]></category>
		<category><![CDATA[paranoia]]></category>
		<category><![CDATA[utw]]></category>

		<guid isPermaLink="false">http://www.widgettwalls.com/2007/09/27/wordpress-and-the-illuminati/</guid>
		<description><![CDATA[Seriously, think about it: WordPress 2.3. 2+3 = 5. Law of Fives. I just saw realized this when I ran the Ultimate Tag Warrior converter: Import Complete! OK, so we lied about this being a 5-step program! You’re done! Now wasn’t that easy? Remember how AUM had cocaine added to it simply to allow for [...]]]></description>
			<content:encoded><![CDATA[<p>Seriously, think about it: WordPress 2.3.  2+3 = 5.  Law of Fives.</p>
<p>I just saw realized this when I ran the Ultimate Tag Warrior converter:</p>
<p><i>Import Complete!</p>
<p>OK, so we lied about this being a 5-step program! You’re done!</p>
<p>Now wasn’t that easy?</i></p>
<p>Remember how AUM had cocaine added to it simply to allow for the Law of Fives?</p>
<p>Yeah.  Law of Fives.</p>
<p>Hail Discordia.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.widgettwalls.com/2007/09/27/wordpress-and-the-illuminati/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing Tags in WordPress 2.3</title>
		<link>http://www.widgettwalls.com/2007/09/25/customizing-tags-in-wordpress-23/</link>
		<comments>http://www.widgettwalls.com/2007/09/25/customizing-tags-in-wordpress-23/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 04:10:46 +0000</pubDate>
		<dc:creator>Widge</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[utw]]></category>

		<guid isPermaLink="false">http://www.widgettwalls.com/2007/09/25/customizing-tags-in-wordpress-23/</guid>
		<description><![CDATA[Okay, folks. Seems to have worked&#8230;so far. And because this is the first thing I wanted to be able to do: let&#039;s talk tags. The UTW importer seems to work very well&#8211;although, come on, guys: UTW was a good plugin. Do you really have to refer to it as a &#034;nasty habit&#034;? Kinda tacky. Anyway, [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, folks.  Seems to have worked&#8230;so far.</p>
<p>And because this is the first thing I wanted to be able to do: let&#039;s talk tags.</p>
<p>The UTW importer seems to work very well&#8211;although, come on, guys: UTW was a good plugin.  Do you really have to refer to it as a &#034;nasty habit&#034;?  Kinda tacky.</p>
<p>Anyway, it zapped my 500-some odd tags fairly quickly.  There were four very odd errors where it appears tags didn&#039;t make the leap&#8211;some sort of database error&#8211;but I didn&#039;t take down the error.  If I see it again, I will.</p>
<p>But here&#039;s the part that&#039;s a little wonky&#8211;and a little unnerving.  There&#039;s nothing in the WordPress admin area to let you tinker with tags.  They&#039;re just sort of there.  I understand there&#039;s some plugins to help the tag admin thing, but as long as it works, I don&#039;t care.</p>
<p>I had to strip the UTW code out of my theme because it was causing errors (and of course, reactivating the UTW plugin caused a fatal error which WordPress mercifully put the kibosh on before it could do any damage).  So how to get the tags back in?</p>
<p>Well, <a href="http://richgilchrest.com/how-to-add-wordpress-23-tags-to-your-current-theme/" target="_blank">this post is a good start</a>, and <a href="http://richgilchrest.com/how-to-add-wordpress-23-tags-to-your-current-theme/" target="_blank">the followup&#039;s not bad</a>, but what if you just want to say something witty and then list your tags in a comma-separated list?  It&#039;s not obvious.</p>
<p><code>&lt; ?php the_tags('Taggification: ', ', ' , ''); ?&gt;</code></p>
<p>That&#039;s how I do the tags on this theme.  And as for context of where it goes?</p>
<p><code>   &lt;div class="storycontent"&gt;<br />
    &lt; ?php the_content(__('(more...)')); ?&gt;<br />
   &lt;/div&gt;<br />
&lt;br /&gt;&lt; ?php the_tags('Taggification: ', ', ' , ''); ?&gt;<br />
     &lt;p&gt;Filed under: &lt; ?php the_category(' and') ?&gt;<br />
      &lt;br /&gt;Comments: &lt; ?php comments_popup_link(__('None'), __('1 Comment'), __('% Comments')); ?&gt;&lt;/p&gt;</code></p>
<p>Tinker with it till you get it to look like what you want.</p>
<p>I&#039;m going to be changing themes anyway.  This one just looks like a giant nasty kluge.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.widgettwalls.com/2007/09/25/customizing-tags-in-wordpress-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to WordPress 2.3</title>
		<link>http://www.widgettwalls.com/2007/09/25/upgrading-to-wordpress-23/</link>
		<comments>http://www.widgettwalls.com/2007/09/25/upgrading-to-wordpress-23/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 02:08:47 +0000</pubDate>
		<dc:creator>Widge</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.widgettwalls.com/2007/09/25/upgrading-to-wordpress-23/</guid>
		<description><![CDATA[If you see anything weird, that&#039;s probably why. Yes, this blog is the guinea pig. I&#039;ll let you know how it goes.]]></description>
			<content:encoded><![CDATA[<p>If you see anything weird, that&#039;s probably why.  Yes, this blog is the guinea pig.  I&#039;ll let you know how it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.widgettwalls.com/2007/09/25/upgrading-to-wordpress-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Changes Double Dashes to Single Dashes: Make It Stop</title>
		<link>http://www.widgettwalls.com/2007/06/01/wordpress-changes-double-dashes-to-single-dashes-make-it-stop/</link>
		<comments>http://www.widgettwalls.com/2007/06/01/wordpress-changes-double-dashes-to-single-dashes-make-it-stop/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 04:49:59 +0000</pubDate>
		<dc:creator>Widge</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[dashes]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://www.widgettwalls.com/2007/06/01/wordpress-changes-double-dashes-to-single-dashes-make-it-stop/</guid>
		<description><![CDATA[Wordpress does about 90% of things well and in sane, sane fashion.  The other 10% will make you want to gnaw a limb off a cute little kitten.]]></description>
			<content:encoded><![CDATA[<p>WordPress does about 90% of things well and in sane, sane fashion.  The other 10% will make you want to gnaw a limb off a cute little kitten.</p>
<p>After putting up with the whole &#034;&#8211;&#034; becoming &#034;-&#034; for as long as I could, I finally snapped and tried to look around for a solution.  I had fixed this at one point, in a previous version of WordPress, but for some reason they moved stuff around and the first time I tried to find it I couldn&#039;t.  </p>
<p>I tried to find something that would take care of it for me, or at least the good word on how to make it go away, but the hits I found on Google weren&#039;t very helpful.  There&#039;s nothing worse than &#034;helpful assholes&#034; who try to tell you that you should just get used to something and why would you ever want to do it That Way to begin with?  It seems like every time somebody wants to change something formatting-wise in WordPress, some of these HAs show up and want to waste your time with trying to convince you instead of just telling you what the hell you need.</p>
<p>So here&#039;s what I needed, in case anybody else needs it:</p>
<p><span id="more-391"></span><br />
1.  Go to wp-includes.</p>
<p>2.  Find the formatting.php file</p>
<p>This is, of course, for WordPress 2+, I believe.  If you try to find this and something doesn&#039;t fit or something isn&#039;t where I say it is, you&#039;re probably in a different version.  I&#039;m on 2.1.3 right now.</p>
<p>3.  Find these two lines:</p>
<p>	$static_characters = array_merge(array(&#039;&#8212;&#039;, &#039; &#8212; &#039;, &#039;&#8211;&#039;, &#039;xn--&#039;, &#039;&#8230;&#039;, &#039;&#034;&#039;, &#039;\&#039;s', &#039;\&#039;\&#034;, &#039; &#8482;&#039;), $cockney);<br />
	$static_replacements = array_merge(array(&#039;&#8212;&#039;, &#039; &#8212; &#039;, &#039;&#8211;&#039;, &#039;xn--&#039;, &#039;&#8230;&#039;, &#039;&#034;&#039;, &#039;&#039;s&#039;, &#039;&#034;&#039;, &#039; &#8482;&#039;), $cockneyreplace);</p>
<p>4.  Comment them out by placing a // in front of them.</p>
<p>5.  Done.</p>
<p>Now, granted, that probably knocks out a lot of other formatting as well, but I&#039;m a lazy bastard and it didn&#039;t seem to adversely affect anything I was doing.  And if I tried to take out just bits of it, it did funky things.  So.  There you have it.  YMMV.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.widgettwalls.com/2007/06/01/wordpress-changes-double-dashes-to-single-dashes-make-it-stop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

