MovableBlog: Archives: December 2002
December 31st, 2002
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 (blogspot.com 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.
December 29th, 2002
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?
December 28th, 2002
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."
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.
December 27th, 2002
Hiding content: "If you want to hide things the web is not the place for you."
December 21st, 2002
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.
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.
December 11th, 2002
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">
<input type="hidden" name="tb_id" value="1">
<input type="hidden" name="form" value="1">
<input type="text" name="blog_name" size="35"
<input type="text" name="title" size="35" value="">
<input type="text" name="excerpt" size="60"
<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:
fputs($fp, "POST /mt/mt-tb.cgi HTTP/1.1\r\n");
fputs($fp, "Host: www.yourhost.com\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");
list($http_headers, $http_content)=explode("\r\n\r\n", $http_response);
Replace www.yourhost.com and www.yourblogURL as necessary, and make sure the line after the first appearance of www.yourhost.com 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.
December 7th, 2002
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"$>;
$dayEnding = "st";
$dayEnding = "nd";
$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.
December 4th, 2002
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"$>";
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".