<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.0.2" -->
<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/"
	>

<channel>
	<title>stewart ugelow - 2006</title>
	<link>http://www.ugelow.com/2006/feed</link>
	<description>www.ugelow.com</description>
	<pubDate>Wed, 19 Apr 2006 23:38:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>
	<language>en</language>
			<item>
		<title>Simpler WordPress Search URLs</title>
		<link>http://www.ugelow.com/2006/04/19/simpler-wordpress-search-urls/</link>
		<pubDate>Wed, 19 Apr 2006 23:38:25 +0000</pubDate>
		
	<dc:subject>Dev</dc:subject>
	<dc:subject>WordPress</dc:subject><dc:subject>Cruft</dc:subject><dc:subject>Cruft Free</dc:subject><dc:subject>Permalinks</dc:subject><dc:subject>Wordpress</dc:subject>
		<guid isPermaLink="false">http://www.ugelow.com/2006/04/19/simpler-wordpress-search-urls/</guid>
		<description><![CDATA[WordPress-powered URLs ending in <span class="code">/search/foo</span> (where "foo" is your search term) now work the same way as the old-school format of <span class="code">index.php?s=foo</span>. They're cleaner, more intuitive, and darned easier on the eyes.

The only problem? The search form included in most templates produces old-school URLs instead of the newer ones. Thankfully, there's a simple, elegant workaround using the WordPress WP_Query class.]]></description>
			<content:encoded><![CDATA[<p>Thanks to some under-the-hood black magic, newer versions of WordPress support a streamlined permalink structure for search URLs. (In some corners, these are known as <a href="http://en.wikipedia.org/wiki/Cruft" target="_blank">&#8220;cruft-free&#8221; URLs.</a>) </p>
<p>WordPress-powered URLs ending in <span class="code">/search/foo</span> (where &#8220;<a href="http://en.wikipedia.org/wiki/Metasyntactic_variable#Foo.2C_Bar.2C_and_Baz" target="_blank">foo</a>&#8221; is your search term) now work the same way as the old-school format of <span class="code">index.php?s=foo</span>. They&#8217;re cleaner, more intuitive, and darned easier on the eyes.</p>
<p>The only problem? The search form included in most templates produces old-school URLs instead of the newer ones, and the various ways of recoding the search form (see last year&#8217;s <a href="http://comox.textdrive.com/pipermail/wp-hackers/2005-April/000719.html" target="_blank">discussion</a> on the wp-hackers mailing list) seem more trouble than they&#8217;re worth.</p>
<p>Thankfully, there&#8217;s a simple, elegant workaround using the WordPress <a href="http://codex.wordpress.org/Function_Reference/WP_Query" target="_blank">WP_Query</a> class. Just add the code below to the <em>very top</em> of your <code>header.php</code> template and say goodbye to ugly search URLs.</p>
<pre><code>&lt;?php
if ((is_search()) &amp;&amp; ($_GET['s'])) {
	wp_redirect(get_bloginfo('url')."/search/".get_query_var('s'));
} //if
?&gt;</code></pre>
<p>As usual, standard disclaimers apply.
</p>
]]></content:encoded>
			</item>
		<item>
		<title>Introducing Theme Widgets</title>
		<link>http://www.ugelow.com/2006/04/17/introducing-theme-widgets/</link>
		<pubDate>Mon, 17 Apr 2006 23:11:51 +0000</pubDate>
		
	<dc:subject>Dev</dc:subject>
	<dc:subject>WordPress</dc:subject><dc:subject>Wordpress</dc:subject><dc:subject>Wordpress Plugins</dc:subject><dc:subject>Wordpress Widgets</dc:subject>
		<guid isPermaLink="false">http://www.ugelow.com/2006/04/17/introducing-theme-widgets/</guid>
		<description><![CDATA[<p>So you've just completed your upgrade to WordPress 2.x. You've installed the latest and greatest versions of your favorite plugins. You've lovingly tweaked your favorite theme to within an inch of its life. All is well with the world.</p>
<p>Then along come WordPress Widgets.</p>]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve just completed your upgrade to WordPress 2.x. You&#8217;ve installed the latest and greatest versions of your favorite plugins. You&#8217;ve lovingly tweaked your favorite theme to within an inch of its life. All is well with the world.</p>
<p>Then the WordPress development team comes along and introduces the brand new <a href="http://wordpress.org/development/2006/03/widgets-plugin/" target="_blank">WordPress Widgets</a>: slick chunks o&#8217; code that make it easy to modify your WordPress-powered site&#8217;s sidebar from a simple drag-and-drop menu. Overnight there&#8217;s a new <a href="http://widgets.wordpress.com/" target="_blank">widget blog</a>, a flurry of rejiggered themes, and the utterly grotesque new jargon &#8220;to widgetize.&#8221;</p>
<p>The good news? Customizing a third-party WordPress theme is much, much easier for end-users.</p>
<p>The bad news? While coding up a widget isn&#8217;t rocket science, it&#8217;s beyond the PHP skill level of most theme designers. (Those who <a href="http://lorelle.wordpress.com/2006/04/07/wordpress-themes-do-you-want-someone-messing-around-with-your-theme/" target="_blank">want end-users customizing their themes</a>, that is.)</p>
<p>As a result, there&#8217;s an awful lot of perfectly good code suddenly consigned to the dustbin. On the flip side, there&#8217;s been a ton of energy devoted to creating widgets that are essentially wrappers for existing plugins.</p>
<p>Wouldn&#8217;t it be better if making widgets were as simple as making theme template files? Well, now it can be that simple thanks to modifications I made to a <a href="http://guff.szub.net/2006/04/06/my-widget-example-wordpress-widget/" target="_blank">sample widget</a> by plugin writer Kaf Oseo.</p>
<p>Here&#8217;s how it works:</p>
<ol>
<li>
<p><a href="http://automattic.com/code/widgets/use/" target="_blank">Download and install</a> the WordPress Widgets plugin.</p>
</li>
<li>
<p><a href="http://www.ugelow.com/code/" target="_blank">Download and install</a> my Theme Widgets plugin.</p>
</li>
<li>
<p>If you are not using the WordPress default theme (Kubrick) or a theme that has already been updated to be widget-friendly, follow the <a href="http://automattic.com/code/widgets/themes/" target="_blank">instructions</a> for enabling the dynamic sidebar.</p>
</li>
<li>
<p>For each widget you want to offer, create a file with the appropriate code in your theme folder using a name that begins with <code>widget-</code> or <code>widget_</code>.</p>
<p>For example, try creating a file named <code>widget-example.php</code> in your theme file with the following contents:</p>
<pre>
<code>&lt;?php
/*
Widget Name: Theme Widgets Example
*/

print("&lt;p&gt;This is an example of the Theme Widgets plugin.&lt;/p&gt;");	
?&gt;
</code>
</pre>
</li>
<li>
<p>Go to the &#8220;Sidebar Widgets&#8221; item in the presentation menu. At the bottom of the page you should have a new dialog box that lets you set the number of theme widgets:</p>
<p><img src="/assets/images/themewidgets/screenshot3.gif" alt="How many theme widgets would you like?" width="499" height="136" border="1"></p>
</li>
<li>
<p>Then find &quot;Theme Widget 1&quot; in the &#8220;Available Widgets&#8221; box above and click on the widget options icon (where the blue arrow is pointing below).</p>
<p><img src="/assets/images/themewidgets/screenshot1.gif" alt="Click on the theme widget control" width="240" height="30" border="1"></p>
</li>
<li>
<p>You should see a dialog box like this one:</p>
<p><img src="/assets/images/themewidgets/screenshot2.gif" alt="Select a widget from the WordPress Default Theme folder" width="600" height="381" border="1"></p>
</li>
<li>
<p>Just click on the radio button for the theme widget you want &mdash; in this case you&#8217;ll obviously just have the one <code>widget-example.php</code> to choose from &mdash; and fill in the optional title and text fields if you&#8217;d like.</p>
</li>
<li>The close the widget and be sure to click on the &#8220;Save changes&#8221; button, <em>which may not be visible on your screen unless you scroll down.</em>
<p><img src="/assets/images/themewidgets/screenshot4.gif" alt="Save changes" width="126" height="33" border="1"></p>
</li>
<li>
<p>If all goes well, the next time you visit your site you should see &#8220;This is an example of the Theme Widgets plugin.&#8221; in your new sidebar. You&#8217;re now in business!</p>
</li>
</ol>
<p>So there it is: ten simple steps to theme widget happiness. It&#8217;s so easy, it&#8217;s Automaggic!</p>
]]></content:encoded>
			</item>
		<item>
		<title>Stewart&#8217;s Theme Widgets</title>
		<link>http://www.ugelow.com/2006/04/17/stewart-theme-widgets/</link>
		<pubDate>Mon, 17 Apr 2006 23:04:51 +0000</pubDate>
		
	<dc:subject>WordPress Plugins</dc:subject><dc:subject>Wordpress</dc:subject><dc:subject>Wordpress Plugins</dc:subject><dc:subject>Wordpress Widgets</dc:subject>
		<guid isPermaLink="false">http://www.ugelow.com/2006/04/17/stewart-theme-widgets/</guid>
		<description><![CDATA[<p>Creates widgets from files whose names begin with <code>widget-</code> or <code>widget_</code> in your theme folder. Based on <a href="http://guff.szub.net/" target="_blank">Kaf Oseo's</a> My Widget.</p>]]></description>
			<content:encoded><![CDATA[<p>Creates widgets from files whose names begin with <code>widget-</code> or <code>widget_</code> in your theme folder. Based on <a href="http://guff.szub.net/" target="_blank">Kaf Oseo&#8217;s</a> My Widget.</p>
<p><a href="/downloads/code/stewart_themewidgets.zip" target="_blank">download</a> | <a href="/downloads/code/stewart_themewidgets.phps"  target="_blank">view source</a></p>
]]></content:encoded>
			</item>
		<item>
		<title>Beltway Ball</title>
		<link>http://www.ugelow.com/2006/04/01/beltway-ball/</link>
		<pubDate>Sat, 01 Apr 2006 16:00:33 +0000</pubDate>
		
	<dc:subject>Politics</dc:subject>
	<dc:subject>Sports</dc:subject>
	<dc:subject>Ugelow.com</dc:subject>
		<guid isPermaLink="false">http://www.ugelow.com/2006/04/01/beltway-ball/</guid>
		<description><![CDATA[<p>At the intersection of Antitrust Exemption Way and Your Tax Dollars Not at Work Boulevard lies the finest baseball diamond in all the land.</p>

<p>Nestled along the Anacostia waterfront, the House that Bud Built has proven once and for all that while you can take baseball out of the Beltway, you can’t take the Beltway out of baseball. </p>]]></description>
			<content:encoded><![CDATA[<p><em>Spring 2008</em> &mdash; At the intersection of Antitrust Exemption Way and Your Tax Dollars Not at Work Boulevard lies the finest baseball diamond in all the land.</p>
<p>Nestled along the Anacostia waterfront, the House that Bud Built has proven once and for all that while you can take baseball out of the Beltway, you can&#8217;t take the Beltway out of baseball. </p>
<p>In hindsight, no one should have been surprised that the glory days of the stadium negotiations – when a &quot;baseball cap&quot; was legislative strategy and not game day attire – were only the beginning of the mesmerizing interplay between the national pastime and the nation&#8217;s politicians. </p>
<p>On the heels of the D.C. Council&#8217;s fabulous flip-flop vote, Chairman Linda W. Cropp (D) secretly convinced her colleagues that the District government should buy the naming rights (&quot;Taxation Without Representation Field&quot;) for the new stadium. Peggy Cooper Cafritz and the school board insisted on leading the search for the Superintendent of Grounds while philanthropist Betty Casey announced that she would fund living quarters at the stadium that could serve as the mayor&#8217;s official residence. (Local political analysts thought it was a bit much when Mayor Anthony A. Williams (D) finally unveiled architectural drawings of the stadium that prominently featured a black door sporting a gold &quot;Number 10&quot; leading to the residence.)</p>
<p>Everyone had been worried about how Williams and Marion Barry (D-Ward 8) would get along after Barry led the council rebellion against the stadium. But in true &quot;Things Shift&quot; sprit, the mayor past and the mayor present reached an accommodation by merging the baseball stadium budget and Barry&#8217;s beloved youth summer jobs program. It&#8217;s really quite something to see the teenaged stadium workers wearing their game day uniforms of bow ties and denim shorts cut too short.</p>
<p>Then, the feds got into the game. Senator Robert C. Byrd (D-W.Va.) slipped a provision into the omnibus transportation bill extending the Senate subway along South Capitol Street to the stadium. The Maryland and Virginia congressional delegations introduced bills restricting parking in the underground garage to cars with out-of-state license plates. (Linda Cropp protested loudly, insisting she needed two parking spaces: one for her Cadillac and one for her Buick.) And Sen. Rick Santorum (R-Penn.) led an inspired but ultimately futile filibuster in an attempt to prohibit the assisted suicide squeeze play.</p>
<p>President George W. Bush signed a secret executive order permitting the National Security Agency to monitor the amount of &quot;chatter&quot; in the infield in between innings. The Agriculture Department unveiled a campaign to promote the Nationals&#8217; farm system while the Food and Drug Administration announced plans to regulate pine tar levels in baseball. Behind the scenes, Defense Secretary Donald H. Rumsfeld and Homeland Security Secretary Michael Chertoff worked doggedly to persuade Metro not to rename the Navy Yard and Stadium-Armory stations in order &quot;to confuse the terrorists&quot; about the new stadium&#8217;s location. Vice President Dick Cheney later explained to Brit Hume, &quot;If a member of al Qaeda shows up at the Armory and doesn&#8217;t have a ticket to the circus, we&#8217;ll get &#8216;em.&quot; </p>
<p>With the uncertainty over the team&#8217;s status finally resolved, the newly anointed owners threw themselves into fashioning the <em>ne plus ultra </em>of stadium experiences, cost overruns be damned. Overnight, the impasse over retro red brick versus gleaming limestone and steel became moot as the architects received a new design brief: create a modern day monument that celebrated the perfect match of inside baseball and insider politics. Oh, my, how they delivered.</p>
<p>The stadium&#8217;s sightlines are spectacular, although those with nosebleed seats have been known to bring signs reading &quot;I Could See Better Sitting in Loudon County!&quot; But if you don&#8217;t like your seats or the gentlemen sitting across the aisle, don&#8217;t worry. The team has promised to reapportion the seats every ten years based on the results of the U.S. Census. (Statistical sampling not permitted, of course.)</p>
<p>With a nod to Fenway Park&#8217;s famed Green Monster, there is the Out-of-Left-Field Wall of Terror, an oversized video wall featuring an ever-changing cornucopia of color that flickers from yellow to orange and back at random. In center, there&#8217;s the K Street Project, where fans can track the number of strikeouts (&quot;K&#8217;s&quot;) thrown by Nationals pitchers. In between the right field bleachers stands the out-of-town scoreboard, which is fully adjustable in case any major league teams spontaneously &quot;contract.&quot; And instead of permanent fireworks launchers along the stadium rim, the Army Corps of Engineers buried World War I munitions in the outfield just as it did decades ago in Northwest D.C.&#8217;s Spring Valley.</p>
<p>Inside the stadium concourse, overhead green traffic signs helpfully pointing the way to Interstate 495 are interspersed among directions to the nearest restroom. As you make your way along the stadium perimeter, you&#8217;ll pass the vaunted Hall of Delegates where the proud flags of Puerto Rico, Guam, the Virgin Islands and American Samoa join the District&#8217;s flapping in the wind. And no visit is complete without a pilgrimage to the AFLAC Gallery of Lame Ducks, honoring former legislators like Harold Brazil (D-At Large), Kevin P. Chavous (D-Ward 7) and Sandy Allen (D-Ward 8) for their courage in voting against their constituents after their constituents voted them out of office.</p>
<p>Gourmands flock to Bugel&#8217;s BBQ Pit on South South Eutaw Street, where finely smoked meats are piled high on trademarked DirtBaguettes. (The entry in the Zagat guide notes: &quot;Prepare to queue up in ‘offensive&#8217; lines for the savory Home Rule Plate: Blue Ribbon Panel on Baseball Economics pale ale with a Pulled Pork Barrel sandwich and Kenesaw Mountain Landis coleslaw.&quot;) Other prized selections include the Red Tape tapioca pudding and D.C. Water and Sewer Authority bottled water – available in both regular and leaded flavors. And when you buy a hot dog from a vendor, a portion of your change is automatically redistributed to Alaska and Montana. (The Stevens-Murkowski-Young skybridge from the parking garages to Juneau was particularly expensive.) Another slice of the purchase price funds the on-site USDA inspectors, who helpfully make sure that none of the hot dogs have been independently tested for mad cow disease. </p>
<p>As part of the team&#8217;s community outreach, ballrooms and meeting space were added to the stadium complex. The American Society of Association Executives kicked off the event season with a mammoth convention and job fair – Treasury Secretary John W. Snow seemed particularly interested about possible openings as he wandered the booths – followed shortly by the famed white tie and tails Gridiron Club dinner. The Singing Senators reunited for a special Beltway-and-baseball themed Simon &#038; Garfunkel medley (&quot;<em>Where have you gone, Joe DiGenova? / A nation turns its lonely eyes to you</em>&quot;) which former Attorney General John Ashcroft later quipped was an &quot;extraordinary rendition.&quot;  Supreme Court Justice Samuel A. Alito Jr. was persuaded to give a dramatic reading of the classic baseball poem &quot;<em>Planned Parenthood v. Casey</em> at the Bat.&quot; But the night belonged to White House batterymates Bush and Cheney, who wowed the crowd with their Abbott and Costello inspired routine &quot;Who&#8217;s on (Sen.) Frist?&quot; </p>
<p>When the stadium opened to the public, game days were no less entertaining. In a nod to the Expos&#8217; three decades in Quebec, the team lured Celine Dion away from Las Vegas to perform the Canadian national anthem and the love theme from &quot;Titanic&quot; 200 nights a year. Convincing the Newseum to relocate to the stadium site was a real coup (&quot;We were years away from reopening on Pennsylvania Avenue, so why not?&quot; admitted Newseum founder Al Neuharth) and the state-of-the-art broadcast center keeps fans occupied whenever air quality warnings force play to be suspended. Celebrities like Al Franken even do live radio broadcasts from the stadium every day, although no one has had the heart to tell him that Air America has been off the air for years.</p>
<p>Nationals games quickly developed touches unique to D.C. and its traditions. Fans arrive at the ballpark early to watch batting practice and to speculate about which fake signatures would be submitted in the manager&#8217;s lineup cards. (Designated hitter Tony Blair and left fielder Kofi Annan slipped past the umpires on a recent afternoon.) Washington is certainly the only city in the major leagues where the seventh-inning stretch begins with the declaration &quot;All rise. Oyez, oyez, oyez!&quot; booming over the loudspeakers and ends with actual stretching led by the President&#8217;s Council on Physical Fitness and Sports. And visiting players always look confused on Non-Profit Night when the last stanza of the national anthem is played and the crowd belts out, &quot;<em>N-G-O say, does that star-spangled banner yet wave.</em>&quot; </p>
<p>Perhaps it was inevitable that the off-the-field mania that gripped the city would eventually spill over into the games themselves. The umpires tried to eject Antonin Scalia from a game for orally arguing balls and strikes from the stands, and a bench-clearing brawl ensued. (The Federalist Society promptly filed briefs calling for a strict constructionist interpretation of the strike zone.) Whenever a pitcher looks shaky or defensive adjustments need to be made, House and Senate conferees join the infielders and coaches on the mound to discuss the appropriate course of action. And D.C. Police Chief Charles H. Ramsey has taken to personally manning stadium radar guns to crack down on opposing players who steal bases too quickly. </p>
<p>Amid all the hoopla, Baltimore Orioles owner Peter Angelos continued to press his quest for compensation from his fellow owners. More terrifying than Ty Cobb sliding into base spikes-first or a chin-high Roger Clemens fastball or standing within spitting distance of Roberto Alomar, the litigious Angelos turned Major League Baseball into his personal piñata. Commissioner Bud Selig&#8217;s version of Solomon&#8217;s Compromise – in this case a 90 percent stake in the <em>creatio ex nihilo</em> Mid-Atlantic Sports Network and a $365 million guaranteed franchise resale value – proved to be only the initial ante.</p>
<p>At a summit meeting at Wye River Plantation mediated by former president Bill Clinton, Angelos wrung concession after concession from his panicked compatriots, notably a presidential pardon for signing outfielder Albert Belle to a ridiculous five-year $65 million contract in 1999, the exclusive rights to operate slot machines in D.C., and National Park Service permission to cut down 130 trees on Daniel Synder&#8217;s Potomac estate. </p>
<p>Both sides say publicly that they hope to have a final &quot;final agreement&quot; in place by season&#8217;s end. But don&#8217;t count on it. </p>
<p>As with everything else in the strange saga of the Washington Nationals and their stadium, it&#8217;s just another ballpark estimate.</p>
]]></content:encoded>
			</item>
	</channel>
</rss>
