Blog
Blogger FTP support going away
One very minor thing that's come up recently: Support for FTP publishing in Blogger is
going away. Apparently, less than 1% of Blogger users publish via FTP. That's the method I've been using from the start, and I've just never changed. So now I'm going to have to. They're supposed to be releasing a conversion tool that will make it easy to switch to a Google Custom Domain, so I can keep the blog at andrewhuey.org, but I might have to do some finagling to redirect andrewhuey.org to blog.andrewhuey.org or something like that.
On a practical basis, it shouldn't be a big deal. On a philosophical basis, though, I'm wondering if I want to do this. Right now, all my content is stored at Google, of course, but published as HTML files under my 1&1 account. I can back them up easily, and if I ever decide to stop using Blogger, they don't go away -- I can keep my archives right where they are. If I switch to "custom domain" publishing, then my fqdn (say, blog.andrewhuey.org) will just point to Google's servers, and I need to rely on them to serve up the content. They *do* have export tools that can supposedly give me a snapshot of my entire blog, so I could then import it elsewhere, so maybe there's no practical problem with this. It just bothers me a bit that all my content will be in a database at Google and not fully under my control.
I may switch to
WordPress. My host, 1&1, has the necessary support for WordPress (basically, PHP and MySQL), so I can install that, and have my blog completely under my control. All the data will be in a MySQL database that I can back up whenever I want, the logic will all be running on my own site, and I can pick it up and move it to another host whenever I want. And I guess another nice philosophical point is that WordPress is open source, so it won't matter if WordPress as a company goes away; I'll still have the code, running on my own site.
Of course, with everything that's going on right now, I'll probably just take the path of least resistance and go with the Google "custom domain" thing.
Labels: Blogger
some blogger stuff
I'm messing around with my Blogger template a bit right now, so the blog may look weird until all the pages update. I haven't touched the template for this thing in about two years, I think. The basic layout will remain the same; I'm still plenty happy with the two-column layout I borrowed from
BlueRobot some time ago.
Labels: Blogger
Post 1000
Well, this should be the thousandth post on my blog. I don't have anything particularly interesting to say about this. Here are a few totally uninteresting things going on in my life right now:
- I'm just getting over a cold that I caught over the Labor Day weekend.
- I'm down to just 51 messages in my Notes inbox. I like to think I'm doing a pretty good job of organizing my stuff into projects, actions, and reference material. And I'm deleting a lot more than I used to.
- Football season starts today!
- I'm currently reading Neil Gaiman's InterWorld and the third volume of Dark Horse's Conan reprints.
I've been using Blogger for this thing since 2001, and it's always worked well for me, aside from an occasional hiccup. I'm kind of surprised that I've kept it up for so long, but I've never completely lost interest in it. I don't know if anyone else has ever gotten anything out of this blog, but it's helped me out on several occasions. It's useful for me to be able to go back and see what I've been thinking and doing in the past; what I've been reading and listening to; what I've been working on. It helps out a lot when I'm trying to do what David Allen would call a 30,000+ ft review.
Labels: Blogger
blog changes
Not that anyone's going to be that interested in this, but I made a couple of changes to the sidebar on this blog today. First, I removed the
Technorati and
Spurl widgets. I guess I never really figured out what the point of Technorati was, and the little widget I had on the side didn't seem to serve much of a purpose.
Spurl, on the other hand, is a great web-based bookmark manager. Unfortunately, it appears to be a zombie site at this point; it's still up and running, but at reduced functionality, and, looking at their user forums, it doesn't appear that anyone's minding the shop -- there's nothing but link spam in the forums right now. I'm still using Spurl, but I'm thinking about dropping it, since it's probably going to disappear at some point. (I have a mental image of Spurl running on a server in a closet somewhere that everyone's just forgotten about. At some point, the hard drive will die, or someone will find it and unplug it, and that'll be the end of that.)
I've replaced the Spurl widget with a
del.icio.us linkroll. I think that's a little more representative of what I'm bookmarking lately.
And I reformatted the tag list. It used to be a bulleted list. Now it's just the keywords separated by slashes. I just wanted to make it more compact, so you could see it all together easily.
Labels: Blogger
Blogger label cloud
I just found a PHP script by
this guy that does pretty much the same thing that my script does, except in the form of a cloud instead of a list. Nice. He also uses a cache file so he doesn't have to read the directory on every call. Both of those were things that I had thought about adding to my PHP program. Now I can probably just borrow this guy's code.
Labels: Blogger, PHP
more fun with Blogger tags and PHP
I wanted to enhance my tag list PHP program to do a couple more things. Basically, I wanted it to be aware of when we are on a label page, so that we could make the list item for the current page plain text (instead of a link), and so that I could put a link back to the main page on any label page.
Normally, I have a link back to the main page in the header of any page other than the main one. I do this through the Blogger template, using the "ItemPage" and "ArchivePage" Blogger template tags to figure out when we're not on the main page. Unfortunately, there's no "LabelPage" template tag, as far as I can tell.
Making one of the list items text rather than a link broke the sorting, since I was just sorting on the text of the list item, including the "a href..." stuff. To get around this, I switched to using an associative array, where the key value is the tag.
Here's the code:
<?php
$dirname = "."; # current directory
$uri = $_SERVER["REQUEST_URI"]; # the page we're on
$bOnLabelPage = false; # are we on a label page?
$dir = opendir($dirname);
$file_list = array();
$i = 0;
while (false != ($file = readdir($dir)))
{
if (ereg(".html$", $file))
{
$tag = substr($file, 0, strlen($file)-5);
$key = strtoupper($tag);
if (ereg("$file$", $uri))
{
$file_list[$key] = "<li>$tag";
$bOnLabelPage = true;
}
else
$file_list[$key] = "<li><a href='/labels/$file'>$tag</a>";
$i++;
}
}
closedir($dir);
#natcasesort($file_list);
ksort($file_list);
?>
<h1>My Tags</h1>
<?php
if ($bOnLabelPage) echo ("<a href='/'>[Back to main page]</a>");
?>
<ul>
<?php foreach ($file_list as $file) echo($file); ?>
</ul>
A little more complex than what I started with, but still not too bad.
As a side note, I am using
TextWrangler to edit PHP files on my Mac, and it's working pretty well. It's got syntax-highlighting for PHP and HTML. I'm also now using
Fugu to copy files up to my server. It integrates well with TextWrangler, so that I can just keep a file open in TextWrangler and have it copied back to the server every time I save. Nice.
On Windows, I'm mostly using
Multi-Edit and
WinSCP. That combo works pretty well too, though I'm using an older version of Multi-Edit that doesn't have PHP syntax highlighting.
Labels: Blogger, PHP
sorted list of tags
OK, this time I've revised my PHP code to show a sorted list of labels:
<?php
$dirname = "."; # current directory
$dir = opendir($dirname);
$file_list = array();
$i = 0;
while (false != ($file = readdir($dir)))
{
if (ereg(".html$", $file))
{
$tag = substr($file, 0, strlen($file)-5);
$file_list[$i] = "<li><a href='/labels/$file'>$tag</a>";
$i++;
}
}
closedir($dir);
natcasesort($file_list);
?>
<h1>My Tags</h1>
<ul>
<?php foreach ($file_list as $file) echo($file); ?>
</ul>
Not a big deal, but it does show a (probably) typical use of arrays in PHP. As a side note, the "foreach" construct in PHP is a bit different from the usual foreach in other languages. It's usually something like "foreach (item in list)", while in PHP it's reversed: "foreach (list as item)". I should also mention that I first tried the regular sort() function, but switched to natcasesort(), since a case-insensitive sort makes more sense here.
Labels: Blogger, PHP
Blogger Tags
Well, I wrote a quick PHP script to create a list of tag links that I could display on this page. It should be over to the left. The code is pretty simple:
<?php
$dirname = "."; # current directory
$dir = opendir($dirname);
while (false != ($file = readdir($dir)))
{
if (ereg(".html$", $file))
{
$tag = substr($file, 0, strlen($file)-5);
$file_list .= "<li><a href='/labels/$file'>$tag</a>";
}
}
closedir($dir);
?>
<h1>My Tags</h1>
<ul>
<?php echo($file_list); ?>
</ul>
I don't have the tags showing in any particular order yet, but they're all there. I just saved this code to a file in the labels directory on my server, then included it in my template with a server-side include.
Also, I should mention that I used
this page to format the source code above so it would look OK in a blog post. (Hopefully, it *does* look ok...)
Labels: Blogger
more Blogger weirdness
I think I just discovered that the post archive settings went slightly wrong at some point, either because of the change over to the new beta, or at some point in the past. Either way, I just fixed it by putting an explicit archive URL in the settings. I think. If the archive links don't go where they're supposed to, then maybe not.
Labels: Blogger
Blogger Beta
I just switched this blog over to the new Blogger beta. I like having labels (aka tags) built into Blogger -- that was overdue. I don't like the fact that the BlogThis! bookmarklet
doesn't work anymore. And it looks like I can't put a list of labels on this page for as long as I'm still using the
classic template style. I'd have to switch to the new layout scheme.
Labels: Blogger
Alternative Style Sheets
My dad has trouble reading this page since I switched to the fancy CSS layout. Apparently, all the fancy positioning and sizing screws things up when you've got your computer set up to use large fonts, a high-contrast color scheme, and so on. I've been meaning to implement an alternate style sheet for him, and I've finally gotten around to it, with the help of
this article. If you look over at the link bar, you'll now see buttons to switch between the "normal" style sheet, and a "basic" style sheet, which simply turns off most of the fancy stuff and basically switches back to a one-column design, with the left bar at the bottom of the page instead. The JavaScript code behind the buttons should set a cookie, so the style sheet choice will be persistent. Let me know how it works!
Labels: Blogger
Google Blog Search
A new
blog search page from Google.
Labels: Blogger
Aside from adding the blog, I also updated my links page today, and played around with the page formatting a bit.
I recommend you check out Scott McCloud's
I Can't Stop Thinking #6. It's a pretty cool take on the whole Napster thing.
Labels: Blogger
This is the first post in my blog.
Labels: Blogger
© 2008 Andrew Huey