Category Archives: Software

Mnemonic Web Design

I’ve been in tweak mode for the past few days, getting this blog ready to duplicate for a coming Lockergnome project (based on MultiUser WordPress). In futzing with my CSS, I’ve had to enter values for positioning left and right (literally). You can define the spacing for margin-top, margin-right, margin-bottom, and margin-left separately – or you can define the spacing for all four (or less) in a single margin property. Employing “margin: 10px 3px 3px 10px” is easy. The trouble is, I could never remember which one was for which position! But I didn’t stay in TRBL for long. Top, Right, Bottom, Left – no trouble at all, so long as I can remember to keep myself in TRBL. Mnemonic devices are so nices.

OpenSearch RSS AutoDiscovery for WordPress Searches

I started to compile a “wish list” of WordPress plugins. Turns out, many of my wishes have already come true – it just took a little digging on Google. Too bad there’s not an amazingly comprehensive WordPress plugin directory / wiki (and if there is, nobody really knows about it yet). One of my wishes was for an OpenSearch feed. Turns out Williamsburger already created a plugin, with a WP 2.0 compatible version linked from his comments thread. This got me up and running with my own OpenSearch feed easily enough, but I wanted to have it actually be autodiscoverable within a search query. Without bothering anybody in my personal circle, I found the variables I needed to insert between at the top of my header.php template:

[php]< ?php if (is_search()) { ?>
< link rel="alternate" type="application/rss+xml" title=": < ?=wp_specialchars($s); ?>” href=”http://chris.pirillo.com/os-query?s=< ?=wp_specialchars($s); ?>” />
< ?php } ?>[/php]There you go. An autodiscoverable feed for your WordPress searches! Try a search on my blog for a living example. Couldn’t have gotten it done unless Shayne figured out what I was doing wrong within the .htaccess file. Ugh. I’ve gotta start learning more about Regular Expressions. FUN!

Ultimate Tag Warror META Keywords

It’s amazing what happens when you email the developer of a WordPress plugin – they respond. At least, most of ’em do (I’m still waiting to hear back from a couple of ’em right now, including Red Alt on being able to search posts from his admin search plugin). After blasting a note to Chris Davis about his community-based tagger, I sent a note off to Christine Davis (no relation) about some shortcomings in the current Ultimate Tag Warrior. I wanted UTW to copy tags into the META keywords tag. She responded with code which needed to be tweaked a bit by Shayne:

[php]< ?php if (is_tag()) { ?>
< meta name="keywords" content="‘%tagdisplay%’, ‘default’=> ‘, %tagdisplay%’)); ?>” />
< ?php } else if (is_single()) { ?>
< meta name="keywords" content="‘%tagdisplay%’, ‘default’=> ‘, %tagdisplay%’)); ?>” />
< ?php } ?>[/php]That’s for all you SEO types out there who are also using the wildly-popular Ultimate Tag Warrior plugin (and I’m not just saying that because it supports Gada.be). This is fun!

New Flickr Photo Header

Apologies for everybody who saw this post before it was fully baked. I was testing the style for the iG-Syntax Hiliter plugin. Seems to be working okay, and even though I can tweak the options under the appropriate tab in my admin panel, I think there’s some other page I can use to tweak specific settings (as the plugin comes with a set of images that I don’t see surfaced anywhere). No matter, the plugin came in handy here – and will definitely be used again in future code displays.

I hate big-ass blog headers. The first thing I do when I see a gigantic image sitting front an center on a Web page is flick my scroll wheel to move down to the meat of the page. Yes, they can be aesthetically pleasing – but they can also be a gigantic waste of space. As such, I haven’t really ever had an interesting blog header. My most recent design (admittedly limited due to the overly-complicated template design of BlogWare’s system) had all the important and relevant information sitting there. You know who I am, right? This time, I wanted to do something a bit more dynamic – a bit more interesting. To get what I wanted, I needed to slap two few tools together: a simple photo thumbnail repository engine and a syndication format interpreter.

I’ve been looking around for a great RSS plugin for WordPress, and still can’t find anything close to satisfactory (read: configurable, powerful). I’ve been a registered CaRP user for years, and (what do you know) it also happens to be a PHP script. I’ve gotta convince Antone to turn CaRP into a full-blown WordPress plugin, though it has abolutely no UI to begin with. I know how to use CaRP, I’m learning how to work within WordPress, and I know just about enough PHP to tweak what I need to tweak in a script.

You’ve seen a few images show up inline in recent days, having been posted through email via the Postie plugin. It’s not generating thumbnails (or RSS, let alone an album), so I’m turning to my friend Flickr. Unfortunately, it only outputs 8 square thumbnail images per feed pull (and I really wanted 10). No matter, Flickr and CaRP have helped me get the job done. For CaRP, I’m employing these options:

[php]CarpConf(‘cborder’,”);
CarpConf(‘iorder’,’image’);
CarpConf(‘maxitems’,12);
CarpConf(‘bitems’,’

‘);
CarpConf(‘aitems’,’Chris Pirillo

‘);
CarpCacheShow(‘http://www.flickr.com/services/feeds/[email protected]&format=rss_200’);[/php]

Of course, now I needed to define the CSS. Putting the images there (alone) is nifty enough, but I’m the kind of guy who loves combining fun with functionality. My name needs to be there, but I’m still not sold on slapping up a tagline in that position. As a visitor, I’d expect to click the name to return to the root of this site – so it had to be hyperlinked. Cake. Almost. I ran into some issues with positioning of my small nav icons, but (amazingly enough) the code works in both browsers. I think I’m the only blogger who optimizes his pages for IE, though? Anyway, here’s the CSS:

[css].headertext { font: 75px Georgia; left: 0px; position: absolute; text-decoration: none; }
.headertext a, .headertext a:hover { color: #FFFFFF; text-decoration: none; }
.headerwrapper { left: 50px; position: absolute; top: 15px; }
.headerwrapper img { border: 0px; float: left; margin: 0px; padding: 0px; }[/css]

The result is what you see at the top of my blog. As I upload a new image, the older ones will get pushed off to the right (and eventually pushed out altogether). Been looking for a way to rip 10+ images out of my feed without futzing with the API. Anyway, it’s there now – and you’re more than welcome to take this code and do it on your site, too (although you’ll have to adapt the PHP script if you don’t use CaRP). That should be easy enough to do, even if you have to work backwards from the source of any given page here.

Desperate Housewives Game from Buena Vista

Wandering around the E3 show floor one new game stuck out like a sore thumb – Desperate Housewives. It’s not like we’re fans of the ladies of Wisteria Lane and we certainly wouldn’t admit it here, but the idea of a game based on the most popular nighttime soap since Dallas seems a little on likely. On closer inspection, the game feels a bit like a SIMS title, with you playing a new arrival on…

Direct and Related Links for ‘Desperate Housewives Game from Buena Vista’