Go to content Go to navigation Go to search

Tread lightly on the things of earth

Mike’s weblog about computing, politics, and faith (a progressive view)

Moving day

Tread lightly is now a MovableType weblog at a new permanent location.

Please follow me to this new location by updating your bookmarks/blogroll/newsfeed:

Tread lightly on the things of earth (MT edition)

Content here won’t be updated further but will remain accessible as my 2002 Radio blog archive, searchable from new location.

Thanks!

<!— imported into MT from 2002 Radio entry via RE on 2003-12-10 —>

Compact blogroll popup menu

I want to display a blogroll, and I want it to be compact. (Because I'm bringing forward a long, long list of Radio subscriptions that would overwhelm my left sidebar.)

Phil Ringnalda generously provides the code to display one's blo.gs blogroll favorites in a popup menu (via PHP and JavaScript). The ultimate in compactness, eh? Thanks, Phil!

BTW, Phil's blogroll.php (actually, its output) validates as XHTML 1.0 Transitional after making the following modifications:

Encompass the emitted javascript with an HTML comment:
L81C44: add "<!--" before the "/n"
L87C11: add "-->" before "</script>"

and of course
L90C100: change "<br>" to "<br />"

[Populating popup menu in progress . . . ]

(Runner-up is blogrolling.com's service as used by Horst, for example, on the Aardvark main page. Note the effortless identification by asterisk which blogs have recently updated. Quite cool as well.)

2003-01-02 update: Similarly, why not conserve vertical sidebar space further by implementing popup (aka dropdown) menus for recent entries and archives as well as for blogroll? I first saw this done at Kung Fu Grippe, and in its page source I see Merlin credits Pete for the dropdown menu code. Thanks very much, Pete!

Roasting coffee at home, umm, umm, good

I noted back in April my interest in the Kuro5hin story, A coder’s guide to coffee, much of which was news to me. Well, Christmas Day I learned what fresh, home-roasted coffee tastes like …

read more...

Building Image::Magick in Mac OS X Jaguar with Perl 5.8.0

I’m trying to get my head around Brad’s MTEmbedImage plugin, and it requires ImageMagick and the Image::Magick perl module. (Context: Mac OS X 10.2.3, Perl 5.8.0 built this way). But Image::Magick won’t install from CPAN, and perlmagick-pm in fink is out of date. Randal provides the necessary steps to build Image::Magick (03 Nov 2002) . . . read more...

Realizations: MTInclude plus PHP instead of SSI

Realizations as a result of implementing a direct SQL include instead of SSI for, in this case, rightcontent photos:

  • I could have used an <$MTInclude file="photolog.txt" $> all along instead of including via SSI (verified). Difference: MTInclude includes only at page rebuild; SSI includes at every page load. How much does this difference matter?
  • Not using SSI means I can embed PHP if I want (can't do both) [Richy notes an .htaccess command to force PHP parsing of .html files]

Richy also made me aware of Sebastian's Validable plugin and Erik's overLIB (its documentation; provide Link Back if I use it), both of which I've installed locally and at webhost.

2003-01-29 update: PHP includes at every page load, just as SSI does. This is obvious to me now, but wasn't when I originally wrote this entry.

SSI include syntax:
<!--#include virtual="file.html"-->

PHP include syntax:
<?php include ("file.html"); ?>
(more at PHP Include Tutorial)

Solution to MT SQL plugin DBI error

In trying to use Brad Choate’s cool SQL Plugin, I got this error on rebuilding this site:

Can't get DBI::st=HASH(0x81240ec)->{NAME_hash}: unrecognised<br /> attribute at /path/to/extlib/bradchoate/sql.pm line 132.

A comment clue from Chris at the bottom of the SQL Plugin page leads to a solution: “I traced the problem to an old version of perl-DBI (prior to 1.2.0 - when NAME_hash was introduced afai can tell).”

If you have a shell account, you can implement Chris’s hint above this way:

mkdir ~/lib
wget http://cpan.org/authors/id/T/TI/TIMB/DBI-1.32.tar.gz
tar xzvf DBI-1.32.tar.gz
cd DBI-1.32
perl Makefile.PL LIB=~/lib PREFIX=~/lib
make
make install

Then specify the new DBI to MT by inserting a ‘use lib’ in front of the ‘use DBI’ in /path/to/mt/lib/MT/ObjectDriver/DBI/mysql.pm:

# MWJ 20021224: use newer DBI 1.32 in ~/lib
use lib qw(/home/mwjames/lib/i386-linux);
use DBI;

2003-02-17 update: In MT v2.6, the file in which to insert the ‘use lib’ is /path/to/mt/lib/MT/ObjectDriver/DBI.pm.