Business Card: bowen@dwelle.org
Smoothbeats.com
KALX Berkeley    WSUM radio

WFMU radio

“For Some, the Blogging Never Stops”:http://www.nytimes.com/2004/05/27/technology/circuits/27blog.html. Perhaps “the addictive part is not so much extreme narcissism” if anyone _reads_ your blog.

Inspiried by “this example”:http://www.blurty.com/talkread.bml?journal=marcn&itemid=55194, I cooked up a bookmarklet for delicious that copies the selected text into the extended field on the delicious post form. Unlike the original, the extended description in optional. It works in “Firefox”:http://www.mozilla.org/products/firefox/.

Just drag this to your bookmark toolbar del.icio.us post

(thanks to “Jesse Ruderman”:http://www.squarefree.com/ for the CSS for the button — very nice.)

Update: Seb made a nice tweak that uses the main delicious page to post, which has the benefit of displaying previous post and tags…

“Woxy.com”:http://www.woxy.com/ was great, sorry to see them go: “Our Internet and over-the-air broadcasts ended at Midnight EDT, May 13th, 2004. While there is a chance that we may be able to revive our Internet broadcast at some point in the future, it’s unlikely.”

== < ?php /* Plugin Name: Recent Posts Plugin URI: http://mtdewvirus.com/wp-hacks/ Description: Returns a list of the most recent posts. Version: 1.02 Author: Nick Momrik Author URI: http://mtdewvirus.com/ */ function get_recent_posts($no_posts = 5, $before = '<li>', $after = '', $show_pass_post = false, $skip_posts = 0, $show_excerpts = false, $cat = 0) { global $wpdb, $tableposts, $tablepost2cat; $now = gmdate("Y-m-d H:i:s",time()); $request = "SELECT $tableposts.ID, $tableposts.post_title, $tableposts.post_excerpt"; if($cat <> 0) $request .= ", $tablepost2cat.category_id"; $request .= " FROM $tableposts"; if($cat <> 0) $request .= ", $tablepost2cat "; $request .= " WHERE $tableposts.post_status = 'publish' "; if(!$show_pass_post) $request .= " AND $tableposts.post_password='' "; if($cat <> 0) $request .= " AND $tableposts.ID = $tablepost2cat.post_id AND $tablepost2cat.category_id = $cat "; $request .= " AND $tableposts.post_date < '$now' "; $request .= " ORDER BY $tableposts.post_date DESC LIMIT $skip_posts, $no_posts"; $posts = $wpdb->get_results($request); if(!$posts) return; $output = ''; foreach ($posts as $post) { $post_title = stripslashes($post->post_title); $permalink = get_permalink($post->ID); $output .= $before . '<a href="' . $permalink . '" rel="bookmark" title="Permanent Link: ' . $post_title . '">' . $post_title . '</a>'; if($show_excerpts) { $post_excerpt = stripslashes($post->post_excerpt); $output.= '<br />' . $post_excerpt; } $output .= $after; } echo $output; } /* v1.02 by Bowen Dwelle http://www.dwelle.org/ Added last param (cat) - set to Cat ID to limit query, or 0 to get all cats */ Based on v1.01 by Nick Momrik http://mtdewvirus.com/ */ ?> </></></></></>
==

After a bit more WP hacking, I’m starting to agree that the code is “pretty darn ugly”:http://neo.dzygn.com/archive/2004/05/switching-to-wordpress. Partly that’s PHP’s fault; it tends to encourage a very *BASIC* style of coding, but the code certainly could be cleaner and more understandable.

For example, I just now wanted to figure out how to display field labeled as “tagline” on the General Options screen. I had to grep the source for the _bloginfo_ function, which is in template-functions-general.php. _bloginfo_ calls _get_settings_, passing along a named parameter that is *DIFFERENT* than that which it was called with — bloginfo(’description’) calls _get_settings(’_blogdescription_’). But of course I didn’t know this was the field I wanted yet, because “description” isn’t “tagline,” is it? Looking at _get_settings_, it calls _get_alloptions_, which reads from _$tableoptions_. Of course, if I wanted to find out the real table name, I’d have to find where that variable is defined, but by now I know to go straight to mysql. Opening up PhpMyAdmin, I browse the _options_ table, and find my tagline text in the _blogdescription_ field. So now I know to call bloginfo(’description’) when I want the tagline, I mean blogdescription. *Ugh, Ugh, Ugly.*

Support for categories is pretty weak, and I’ve already had to do a fair bit hacking to make them really work. Lots of functions return chunks of HTML with embedded formatting, etc — not good behavior in my book. I don’t know much about CSS, but the stylesheet seems more complicated than it needs to be. Who needs seven layers of inheritance? At some point I’ll go back and rip out all the extra styles.

There isn’t a builtin function for displaying a list of recent posts, so I grabbed “this one”:http://mtdewvirus.com/wp-hacks. It didn’t provide for limiting the list of recent posts by category, so I made a v1.02 — you can “download it here”:http://www.dwelle.org/index.php?p=139.

I decided to try out WordPress, not because of all the licensing hype around MT, but because WP is dynamic (doesn’t require rebuilding), and it’s all PHP. So far, all the functionality seems to be there, and the UI is nice and clean. The code seems OK, if not fantastically done. Conversion from MT was pretty straightforward. We’ll see how it goes…

Let’s see… Had another good bici ride last week, before jumping on the plane Saturday for a whirlwind tour of the east coast. Stopped in DC on Sunday for — as promised — a gin & tonic and a dip in the pool with Saida in Potomac, M.D. – just outside the beltway. It was 90° and sunny, and the cicadas were out in full force! We caught up and played with the dogs until it was time for me to drive down to iMedia at the Hyatt Chesapeake… Made it down just in time for — you guessed it — drinks and dinner. It was a great crowd; I caught up with a lot of old colleagues and friends, and the location was beautiful. I did get a little lost on the way down, but that’s what I get for trusting Yahoo Maps to the ends of the earth.

Monday morning I was first up on the agenda, basically the AM warm-up/sideshow before Esther Dyson’s keynote. It came off well, and there were a few people in the crowd, despite the early start. Dyson’s talk was interesting, and we had a quick chat afterwards… I can understand the connection with Louis Rossetto – they’re similar types. The rest of the day was a cruise around the bay and then back for some more networking in the pool (yes, in the pool). These media types never rest. I stayed though dinner Monday evening and then left about 8pm for the drive up to Philly. Made it in about midnight after only a couple of minor detours and a bit of head-nodding on I-95. Have to remember next time that the Red Bull takes a while to kick in!

I spent Tuesday with a client, and then headed into downtown Philly for the evening. Stayed at the Thomas Bond House, a lovely B&B in the old historic center of town. Some of the others staying there recommended a couple of places nearby, and so that’s where I went: Eulogy Belgian Tavern, Cuba Libre, and Khyber. I tried to make a stop at the City Tavern, but it was closed by the time I went by. Before dinner, I had a quick walk around the historic Society Hill area at dusk — beautiful, and some great peeks into old places from the narrow streets. Check the moblog for phonecam photos.

I finally made it home yesterday, took a rest, and today I went down to the lake for my first scheduled sailing lesson — only to find that no students had signed up! Maybe tomorrow…