MovableBlog: Archives: December 2002

A weblog about the Movable Type Publishing Platform and other geekery

December 31st, 2002

What Makes a Good Blog »

Weblog Analysis

I share Min Jung's elitism and automatic lowering of esteem for certain things when looking for new weblogs to read (which I'm in the process of doing). I tend to pre-judge a weblog on its design, then domain ( domains get no respect), then font-size/readability, then the copy itself (good copy does overrule good design if the weblog was recommended to me by someone who knows my tastes). Yeah, I'm bit of a snob in that respect. A weblogs link list only really gets consideration as a launching pad to finding new weblogs. Once I have my "set" of blogs that I'll read, I tend to ignore people's link lists.

Good on Min Jung for reading my mind writing about something I've been thinking about lately. I'll put a more extensive description of how I evaluate a weblog up later, with a better ranking of characteristics.

Posted by Richard at 12:05 AM | Category: Geekery | Comments (0)

December 29th, 2002

Yahoo Remix »

Amateur Yahoo Redesign

Here's a redesign of the venerable Yahoo! portal that I could live with, if the colours were a bit more muted.

After reading "99.9% of Websites are Obsolete" by Jeffrey Zeldman, I came up with a grand scheme to create a version of Yahoo! that validated to, say, HTML 4.01 and used CSS instead of formatting within the HTML. I figured I'd be able to save Y! at least a cool hundred thou in bandwidth charges, and Y! would be so grateful that they'd give me a two-weeks-long vacation to NYC, all-expenses paid.

Well, I can dream, can't I?

Posted by Richard at 12:35 AM | Category: Geekery | Comments (0)

December 28th, 2002

Why is Zeldman Joyful? »

Somebody want to explain why Zeldman finds this so joyful? What should I be looking for?

Posted by Richard at 09:05 PM | Category: Geekery | Comments (0)

PHP Plugins »

Very much a work in progress, an online friend of mine, Bill Zeller, has created a plugin which creates PHP plugins. I'm interested in this plugin, since I can't code a line of Perl myself, but can at least pretend to code PHP.

Heed the warning that it "is developer code, it remains untested at this point [...] Use at your own risk."

Posted by Richard at 08:40 PM | Category: MT | TrackBacks (0) | Comments (0)

Re: Design? »

Just looking at how many people have chosen the name "RE: Design" for their company name (for those that don't know, RE are my initials--and I'm thinking of going pro as a web designer in the new year, again for those that don't know), and there are a few. Among others, there's (re)design, ReD (redesign), re:design and re:design inc. with random front pages. This one and this one (not all that safe for viewing at work) would make me want to hire the firm.

But then again, I'm a guy.

Posted by Richard at 12:33 AM | Category: Geekery | Comments (0)

December 27th, 2002

Hiding Content »

Hiding content: "If you want to hide things the web is not the place for you."

Very true.

Posted by Richard at 07:52 PM | Category: Geekery | Comments (0)

December 21st, 2002

MeFi vs. Gawker », It's only a web site

An image in reply to the MetaFilter vs. Gawker controversy. Gawker is a blog about media gossip in NYC, and is geared towards snooty, sarcastic NYC'ers, which I am definitely not.

Posted by Richard at 05:14 PM | Category: Geekery | Comments (0)

Ordinal Numbers: Update »

staggernation has posted a Regex solution to the ordinal numbers problem (8th post) which makes use of the Regex plugin for MT. So no more PHP loading on each page reload when it comes to calculating ordinal numbers.

Posted by Richard at 02:15 PM | Category: MT | TrackBacks (0) | Comments (0)

December 11th, 2002

TrackBack Form in PHP »

The form which pings the sidebar (which actually a post with, in my example, the TrackBack ID of 1) was created with —you guessed it—PHP.

Here's the form. Nothing new here if you're experienced with HTML.

<form action="post.php" method="GET">

<div align="center">
<input type="hidden" name="tb_id" value="1">
<input type="hidden" name="form" value="1">
<td align="right">
<p>Blog Name</p>
<input type="text" name="blog_name" size="35"
<td align="right">
<p>Post Title</p>
<input type="text" name="title" size="35" value="">
<td align="right">
<input type="text" name="excerpt" size="60"
maxlength="150" value="">
<td align="right">
<input type="text" name="url" size="60" value="">
<input type="submit" value="submit" name="submit">

Here's the PHP file, post.php, which the form calls:


$fp=fsockopen("", 80);
fputs($fp, "POST /mt/mt-tb.cgi HTTP/1.1\r\n");
fputs($fp, "Host:\r\n");
fputs($fp, "Content-Type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-Length: " . strlen($data) . "\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, "$data");
$http_response.=fgets($fp, 128);
list($http_headers, $http_content)=explode("\r\n\r\n", $http_response);


Replace and www.yourblogURL as necessary, and make sure the line after the first appearance of points to the right location of mt-tb.cgi.

Don't ask me to translate it. I grabbed it from a PHP newsgroup. It works for me, except I still can't figure out how to get just the pings from TrackBack ID 1 on the sidebar, rather than all pings, which is currently the case. What I really should have done in the first place is have it ping a TrackBack category.

Posted by Richard at 11:46 PM | Category: MT | TrackBacks (2) | Comments (0)

December 7th, 2002

Ordinal Numbers with MT and PHP »

A subtle change to the date headers here at MovableBLOG. There are now "st" after any date with the day of the month being 1 or 21, "nd" after the days of the month 2 and 22, "rd" after days of the month 3 and 23, as well as "th" for any other day of the month. I didn't find a solution in the MT manual, but it apppears there is a plugin which can convert dates in to ordinal numbers.

It probably would have done me some good to look in the MT forums, since a solution was already posted by billzeller. But since I took the time to code it myself, I might as well publish it:


$dateToday = <$MTEntryDate format="%e"$>;
switch ($dateToday)
case 1:
case 21:
case 31:
$dayEnding = "st";
case 2:
case 22:
$dayEnding = "nd";

case 3:
case 23:
$dayEnding = "rd";

$dayEnding = "th";

print "<$MTEntryDate format="%B %e"$>".$dayEnding.", <$MTEntryDate format="%Y"$>";


Play around with that last print statement to get the desired date format.

Posted by Richard at 01:08 AM | Category: MT | TrackBacks (0) | Comments (0)

December 4th, 2002

Links Divided Over 2 Columns »

On the Vancouver Webloggers links page, the links are alphabetized and divided into a two columns. But how?!

With PHP of course.

Place in your index template somewhere this code. I have a whole blog in MT dedicated to links, and in the case of Vancouver Webloggers, use the category "Other" for bloggers other than the authors of the site.


$links = array();

<MTEntries category="Other" sort_order="ascend" sort_by="title">
$links[] = "<$MTEntryBody encode_php="qq"$>";

$numlinks= count($links);


Then, where you want the links to appear in two columns, insert this code:


$half = $numlinks/2;
$half = (int) $half;

for ($i = 0;$i < $half; $i++)
print $links[$i]."<br />\n";

for ($y = $half; $y < $numlinks;$y++)
print $links[$y]."<br />\n";


Note that for the title of each link's entry, I take the blog name and capitalize the first letter. Also, I follow the practice of not using "A" or "The" as the first word in the title. So "The Blog That Never Was" is inserted in the the title as "Blog That Never Was, The" and "a blog through time" becomes "Blog through time, A".

Posted by Richard at 12:07 AM | Category: MT | TrackBacks (0) | Comments (1)