<?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>archGFX &#187; hacks</title>
	<atom:link href="http://archgfx.net/tag/hacks/feed" rel="self" type="application/rss+xml" />
	<link>http://archgfx.net</link>
	<description>Austin web designer - Adam Freetly</description>
	<lastBuildDate>Wed, 28 Sep 2011 13:50:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>four times in two months</title>
		<link>http://archgfx.net/blog/2007/geek/blogging/four-times-in-two-months</link>
		<comments>http://archgfx.net/blog/2007/geek/blogging/four-times-in-two-months#comments</comments>
		<pubDate>Fri, 23 Feb 2007 16:38:56 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[2.1]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://archgfx.net/blog/2007/asides/four-times-in-two-months</guid>
		<description><![CDATA[i upgraded my blog again last night, to help joen with some bugsquashing on Fauna RC2. after not touching my wordpress install for the better part of a year, it's odd to be updating it this many times in 2 months. I still had to do a manual hack to get my WYSIWYG tabbed editor [...]]]></description>
			<content:encoded><![CDATA[<p>i <a href="http://wordpress.org/development/2007/02/new-releases/">upgraded my blog</a> again last night, to help joen with some bugsquashing on <a href="http://www.noscope.com/fauna/2007/02/fauna-rc-on-wordpress-21-fauna-rc2#respond">Fauna RC2</a>.  after not touching my wordpress install for the better part of a year, it's odd to be updating it this many times in 2 months.  I still had to do a <a href="http://http://trac.wordpress.org/ticket/3572#comment:20">manual hack to get my <acronym title='What You See Is What You Get'><span class='caps'>WYSIWYG</span></acronym> tabbed editor to work</a>.  Nazgul's suggesting that i should keep doing this, so i used my handy new <strike>computer hacking</strike>  SVN skillz to make a patch, so i don't have to work so hard next time:  <strong>UPDATE</strong>: something in 2.1.1/2.1.2 changed, and my patch stopped fixing it.  this is a new version.  you may also need to <a href="http://sunburntkamel.archgfx.net/2006/04/03/validator-me/">hack gzhandler() out of functions.php</a>.</p>
<p><a href="http://archgfx.net/aspnet_client/tiny_mce_gzip.php.2.1.2.patch" class="download">tiny_mce_gzip.php.patch</a></p>
<p>the upgrade also means that my <acronym title='What You See Is What You Get'><span class='caps'>WYSIWYG</span></acronym> editor is <a href="http://wordpress.org/support/topic/105082?replies=5">back to the standard font and padding</a>.  i dunno how i feel about that.</p>
<p><span id="more-997"></span></p>
<p><strong>UPDATE:</strong> to apply the patch, i highly recommend using <a href="http://tortoisesvn.net/">tortoise SVN</a>.  because i like GUI's and not having to remember the command line syntax.</p>
<p>download the patch, and right click on it, like so:</p>
<p><img src="http://sunburntkamel.files.wordpress.com/2007/02/applypatch.jpg" alt="right click" /></p>
<p>tortoise will ask you where to apply it, choose the directory where you've downloaded wordpress 2.1.1.  it should then tell you that it's found a similar file in <code>wp-includes/js/tinymce</code>.  it'll bring up a split panel window showing the patch and the current version of the file.  double click the file in the little window that shows up, close it, hit save, and then upload the changed file to your blog.</p>
<p><img src="http://sunburntkamel.files.wordpress.com/2007/02/tortoisemerge.jpg" alt="merge window" /></p>
]]></content:encoded>
			<wfw:commentRss>http://archgfx.net/blog/2007/geek/blogging/four-times-in-two-months/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jizzy Handled</title>
		<link>http://archgfx.net/blog/2007/geek/blogging/jizzy-handled</link>
		<comments>http://archgfx.net/blog/2007/geek/blogging/jizzy-handled#comments</comments>
		<pubDate>Fri, 26 Jan 2007 20:25:43 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[2.1]]></category>
		<category><![CDATA[archgfx]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://archgfx.net/blog/2007/asides/jizzy-handled</guid>
		<description><![CDATA[after reasonable testing, i've now upgraded my main blog. despite all the cool kids in the hackers list saying they never use the rich text editor, i use it all the time. yeah, sure, i can write code, but that doesn't mean it's appropriate to write about my weekend in code. so, here's the list [...]]]></description>
			<content:encoded><![CDATA[<p>after reasonable testing, i've now upgraded my main blog. despite all the cool kids in the hackers list saying they never use the rich text editor, i use it all the time.  yeah, sure, i can write code, but that doesn't mean it's appropriate to write about my weekend in code.  so, here's the list of changes for the upgrade:</p>
<h3>Hacks</h3>
<ul>
<li><a href="http://trac.wordpress.org/attachment/ticket/3572/tiny_mce_gzip.phps">the <code>ob_gzhandler()</code> hack</a> that <a href="http://trac.wordpress.org/ticket/3572">fixes my bug</a>, (the <a href="http://sunburntkamel.archgfx.net/2006/04/03/validator-me/">same hack as last time</a> didn't fix it).</li>
<li><a href="http://sunburntkamel.archgfx.net/2006/12/11/telling-jesus-to-go-to-hell/">the Jesus hack</a> now takes place in <code>wp-admin/index-extra.php</code>.</li>
<li><a href="http://ocaoimh.ie/2007/01/23/the-new-wp-utw-gotcha/">the UTW hack</a>.  not that i'm dealing with a torrent of moderated comments, but broken is as broken does.</li>
<li>added a bunch of <code>.linkcat ul</code> styles.  since my linkcats didn't used to have <code>ul</code>'s.</li>
</ul>
<h3> Plugins</h3>
<ul>
<li>i deleted all the plugins i'm not using.  during the whole <a href="http://wordpress.org/extend/ideas/topic.php?id=75">disable/re-enable process</a>, i tend to forget which ones i've decided are crap.  i blame this on <a href="http://mattread.com/blog/2006/02/introducing-installer-the-plugin-2">installer</a>, which makes it far too easy to install widgets for 3 days, decide they're worthless, and then move on.  it took a while, but it saves time, or something.</li>
<li>updated <a href="http://alexking.org/blog/2007/01/24/wordpress-21-plugin-compatibility">alex king's plugins</a>, which now all have their own hooks, so i had to hack them back out of my theme.</li>
<li><a href="http://markjaquith.wordpress.com/2007/01/23/subscribe-to-comments-21/">updated S2C</a>.  it was always such a pain, guessing what email people had used to subscribe. i like easy stalking.</li>
<li><a href="http://www.archgfx.net/blog/index.php/2006/geek/wpw-linkslist">deleted linkslist</a>.  hence the sudden existence of ul's.  i'm not going to take down the plugin, since <a href="http://wpthemes.info/misty-look/#comment-18222">people seem to find it useful</a>(for the same reasons i built it), and the <a href="http://markjaquith.wordpress.com/2007/01/23/no-upg%3C/i%3Erade-files-for-20x-to-21x/">2.0.x branch isn't going away</a>.  i'm also not going to update it, because <code>wp_list_bookmarks()</code> does a decent <em>enough</em> job.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://archgfx.net/blog/2007/geek/blogging/jizzy-handled/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Akismet Excerpts</title>
		<link>http://archgfx.net/blog/2007/geek/blogging/akismet-excerpts</link>
		<comments>http://archgfx.net/blog/2007/geek/blogging/akismet-excerpts#comments</comments>
		<pubDate>Wed, 10 Jan 2007 16:35:03 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://archgfx.net/blog/2007/asides/akismet-excerpts</guid>
		<description><![CDATA[Engtech and I thought this was an excellent suggestion for dealing with the torrents of spam in the akismet panel, but matt disagrees. Engtech wrote a Greasemonkey Script that implements it browser side. I, being afraid of browser bloat, and wanting this for archGFX, not for this wordpress.com blog, hacked it in /wp-admin/wp-admin.css. It's a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://engtech.wordpress.com" title="Engineering Technology">Engtech</a> and I thought this was <a href="http://wordpress.com/forums/topic.php?id=6228&amp;replies=18#post-40182" title="ideas forum thread">an excellent suggestion for dealing with the torrents of spam</a> in the akismet panel, but <a href="http://dev.wp-plugins.org/ticket/515" title="trac ticket">matt disagrees</a>.  Engtech wrote a <a href="http://engtech.wordpress.com/2007/01/10/too-much-spam-akismet-auntie-spam-for-wordpresscom-greasemonkey-script/" title="auntie spam">Greasemonkey Script</a> that implements it browser side.  I, being afraid of browser bloat, and wanting this for archGFX, not for this wordpress.com blog, hacked it in <code>/wp-admin/wp-admin.css</code>.  It's a hack so simple, i'm embarassed i didn't think of it sooner:</p>
<pre>#spam-list li {
max-height: 6.5em;
overflow: hidden;
margin-bottom: .5em;
}

#spam-list li * {
display: inline;
}</pre>
<p>added to the end of the file.  (i actually appended it to tiger.css, which works the same.)  this is what it looks like:</p>
<p><img src="http://sunburntkamel.wordpress.com/files/2007/01/auntiespam.jpg" alt="auntie spam" /></p>
<p>if that's not enough context for you, or if it's more than you need, you can adjust <code>max-height</code> to your liking.  if you're using <acronym title='Internet Explorer 6'><span class='caps'>IE6</span></acronym> or below to review your spam, you'll want to specify <code>height</code> instead of <code>max-height</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://archgfx.net/blog/2007/geek/blogging/akismet-excerpts/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>More Plugins and Edits</title>
		<link>http://archgfx.net/blog/2006/geek/blogging/more-plugins-and-edits</link>
		<comments>http://archgfx.net/blog/2006/geek/blogging/more-plugins-and-edits#comments</comments>
		<pubDate>Mon, 28 Aug 2006 21:58:23 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[archgfx]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[note-to-self]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://archgfx.net/blog/2006/asides/more-plugins-and-edits</guid>
		<description><![CDATA[while trying to make archgfx.net validate, i found i'd broken Related Posts. When there are no related posts, the plugin only calls the wrapper for the post headline, not the whole post. so if you have, like i have &#60;li&#62;title&#60;br /&#62; &#60;small&#62;content&#60;/small&#62;&#60;/li&#62;, your page won't validate. fix: else { echo $before_title.'No related posts'.$after_title.$before_post.$after_post; } in [...]]]></description>
			<content:encoded><![CDATA[<p>while trying to make archgfx.net validate, i found i'd broken <b><a href="http://www.w-a-s-a-b-i.com/archives/2006/02/02/wordpress-related-entries-20/" title="Visit plugin homepage">Related Posts</a></b>.  When there are no related posts, the plugin only calls the wrapper for the post headline, not the whole post.  so if you have, like i have <code>&lt;li&gt;title&lt;br /&gt; &lt;small&gt;content&lt;/small&gt;&lt;/li&gt;</code>, your page won't validate.  fix:</p>
<p><code>else {<br />
echo $before_title.'No related posts'.$after_title.$before_post.$after_post;<br />
}</code></p>
<p>in the middle of the file, right before it says <code>// End Related Posts</code>.  now all my single post pages validate, not just the ones with related posts.</p>
<p>the next one is purely an annoyance.  <b><a href="http://www.skarcha.com/wp-plugins/wpvideo/" title="Visit plugin homepage">WPvideo</a></b> is a great plugin.  it's damn near impossible to post youtube videos elsewise.  that's why i post them here so often.  i finally installed WPvideo because i needed to post some videos in my portfolio.</p>
<p>Now, I understand wanting a link back.  I love having linkbacks in my theme.  but that's in the footer.  it's not hard to add information to footers.  spam karma does it.  all it takes is a little <code>add_action('wp_footer', 'wpvideo_footer');</code></p>
<p>that's a damn sight different than sticking a link to your plugin in my #CONTENT, EVERY TIME i insert a video.  so i deleted all credit for it.  It's my video, not yours.  don't go plastering your name on it.  so i found:</p>
<p><code>$htmlcode .= '&lt;div class="wpv_self"&gt;&lt;a href="http://www.skarcha.com/wp-plugins/wpvideo/"&gt;WPvideo ' . WPV_VERSION . '&lt;/a&gt;&lt;/div&gt;';</code></p>
<p>and emptied the variable, so the line reads:</p>
<p><code>$htmlcode .= '';</code></p>
<p>Also i've found that <b><a href="http://unijimpe.pandela.net/?p=85" title="Visit plugin homepage">WP-SWFObject</a></b> plus the <a href="http://www.jeroenwijering.com/?item=Flash_Video_Player">Flash Video Player</a> is a fantastic combination.</p>
]]></content:encoded>
			<wfw:commentRss>http://archgfx.net/blog/2006/geek/blogging/more-plugins-and-edits/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress CMS: Sane Menus</title>
		<link>http://archgfx.net/blog/2006/geek/blogging/wordpress-cms-sane-menus</link>
		<comments>http://archgfx.net/blog/2006/geek/blogging/wordpress-cms-sane-menus#comments</comments>
		<pubDate>Sat, 19 Aug 2006 15:00:44 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[squible]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://archgfx.net/blog/2006/asides/wordpress-cms-sane-menus</guid>
		<description><![CDATA[Over the past couple days i've moved my entire portfolio from static HTML pages to wordpress pages. for the moment i'm using one template for all of them. With static HTML I was using 1 template per project, which let me show only the current project's pages in the side menu, and the list of [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past couple days i've moved my entire portfolio from static <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> pages to wordpress pages.  for the moment i'm using one template for all of them.  With static <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> I was using 1 template per project, which let me show only the current project's pages in the side menu, and the list of projects in the top menu.  (<a href="http://archgfx.net/redirection/modeling.html" title="a page in one of the projects">example</a>).  With Using 1 template, it's tempting to use <code>&lt;?php wp_list_pages() ?&gt;</code> to generate the side menu.  except that i have A LOT of pages.  38 at last count.  So I want the side menu to only show the list of projects, and the list of subpages for the current project.</p>
<p>While I could do something like hiding <code>.pagelist ul ul ul</code> in <acronym title='Cascading Style Sheets'><span class='caps'>CSS</span></acronym>, and then making <code>.pagelist ul li.current_page_item</code> visible, the nexted lists under <code>.current_page_item</code> always looked kind of stupid, since there's no way to style them individually.  So I looked to <a href="http://www.squible.com" title="my still favorite theme for hacking">squible</a>.  because I remembered <a href="http://www.karrderized.com/" title="James Carppe, Code Guru for Squibble">karrde</a> dealing with a submenu that showed other children of the current page's parent.  so now my menu looks like this:</p>
<p><span id="more-772"></span><br />
<code>&lt;div class="floatmenu"&gt;<br />
&lt;h2 id="page-title""&gt;Mapping&lt;/h2&gt;<br />
&lt;ul class="pagelist"&gt;<br />
&lt;?php wp_list_pages('exclude=164,202&amp;sort_column=menu_order&amp;depth=2&amp;title_li='); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;h2 id="page-title""&gt;Contents&lt;/h2&gt;<br />
&lt;ul class="pagelist"&gt;&lt;li&gt;&lt;ul&gt;<br />
&lt;?php /* karrde is a GOD.  this comes from squible */<br />
$kids = get_pages('child_of='. $post-&gt;ID);<br />
if (count($kids) &gt; 0) {<br />
wp_list_pages('depth=1&amp;sort_column=menu_order&amp;title_li=&amp;child_of='. $post-&gt;ID);<br />
} else {<br />
if ($post-&gt;post_parent != 0) {<br />
wp_list_pages('depth=1&amp;sort_column=menu_order&amp;title_li=&amp;child_of='. $post-&gt;post_parent);<br />
}<br />
}<br />
?&gt;<br />
&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!-- floatmenu --&gt;<br />
</code></p>
<p>Now we get two menus, one of which shows projects and graphics, and their subpages (sortdepth=2 hides the subpages of the projects).  The second menu shows only the children the current page, or the children of current page's parent.  Works great for pages inside a project (<a href="http://www.archgfx.net/blog/index.php/projects/redirection/modeling/" title="the same page from before, inside wordpress">example</a>), or project pages (<a href="http://www.archgfx.net/blog/index.php/projects/redirection/" title="The front page of each project is a 2nd level page.">example</a>).  But when you're looking at Projects or Graphics, you get the same sub pages listed twice.  Fixing that also fixed the styling issues with having a nested list in <code>.current_page_item</code>:</p>
<p><code>.pagelist .current_page_item li {<br />
display: none;<br />
}</code></p>
<p>HA! I love it.  This won't work for every <acronym title='Content Management System'><span class='caps'>CMS</span></acronym> use of wordpress.  It works for me because i have relatively few 1st and 2nd level pages, and a whooooole lot of 3rd level pages.</p>
<h3>Bookmark This:</h3>
<p><a href="http://del.icio.us/post?url=http://sunburntkamel.archgfx.net/2006/08/19/wordpress-cms-sane-menus/;title=Wordpress+<acronym title='Content Management System'><span class='caps'>CMS</span></acronym>+Sane+Menus"><img src="http://sunburntkamel.wordpress.com/files/2006/11/delicious.gif" alt="add to del.icio.us" /></a> :: <a href="http://digg.com/submit?phase=2&amp;url=http://sunburntkamel.archgfx.net/2006/08/19/wordpress-cms-sane-menus/"><img src="http://sunburntkamel.wordpress.com/files/2006/11/digg.gif" alt="Digg it" /></a> :: <a href="http://ma.gnolia.com/bookmarklet/add?url=http://sunburntkamel.archgfx.net/2006/08/19/wordpress-cms-sane-menus/;title=Wordpress+<acronym title='Content Management System'><span class='caps'>CMS</span></acronym>+Sane+Menus"><img src="http://sunburntkamel.wordpress.com/files/2006/11/magnolia.gif" alt="add to ma.gnolia" /></a> :: <a href="http://www.stumbleupon.com/submit?url=http://sunburntkamel.archgfx.net/2006/08/19/wordpress-cms-sane-menus/;title=Wordpress+<acronym title='Content Management System'><span class='caps'>CMS</span></acronym>+Sane+Menus"><img src="http://sunburntkamel.wordpress.com/files/2006/11/stumbleit.gif" alt="Stumble It!" /></a> :: <a href="http://www.newsvine.com/_tools/seed&amp;save?url=http://sunburntkamel.archgfx.net/2006/08/19/wordpress-cms-sane-menus/;title=Wordpress+<acronym title='Content Management System'><span class='caps'>CMS</span></acronym>+Sane+Menus"><img src="http://sunburntkamel.wordpress.com/files/2006/11/newsvine.gif" alt="seed the vine" /></a> :: <a href="http://tailrank.com/share/?text=&amp;link_href=http://sunburntkamel.archgfx.net/2006/08/19/wordpress-cms-sane-menus/&amp;title=Wordpress+<acronym title='Content Management System'><span class='caps'>CMS</span></acronym>+Sane+Menus" title="TailRank"><img src="http://sunburntkamel.wordpress.com/files/2006/11/tailrank.gif" alt="TailRank"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://archgfx.net/blog/2006/geek/blogging/wordpress-cms-sane-menus/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

