Archive for the ‘Blog’ Category

Reboot

Tuesday, September 23rd, 2008 at 7:32 pm

Every now and then, I neglect my blog for a few months. It’s not for lack of interest, or lack of things to write about; I just don’t have any time for a little while, and then when I have something quick I’d like to post about, I feel like I’m doing a disservice by not making time to write meaningful posts about the stuff I wanted to post about, either for my own selfish reasons or because it may legitimately be useful to someone else who is looking for information I’ve found or has a question that I can answer.

And so, every once in a while, I have to convince myself to put all that behind me, accept the fact that it won’t get written and that’s okay, and start posting again, even if it’s short and meaningless and inane. Like this.

.htaccess and WordPress

Monday, May 19th, 2008 at 12:14 pm

Lesson learned: WordPress re-writes part of your .htacess file every now and again, namely, the part between the “BEGIN WordPress” and “END WordPress” comments. So, you know, you shouldn’t put your own rewrite rules in between them, or you’ll wonder why they keep going missing.

Movable Type vs. WordPress

Friday, May 16th, 2008 at 4:51 pm

I’ve had this site on WordPress for a few days now, after using Movable Type for over three years.

So far, I love it.

I don’t want to place blame, but for the past couple months, Movable Type was giving me hell. I kept getting 500 Internal Server Errors on almost every other page load, and I don’t know if it was because of MT, 1&1 (my web host), or because my 650+ posts were too much for the system. According to the Google, a lot of other people were having this problem - long run times seemed to be the issue - but no one seemed to have any solutions. It was incredibly frustrating to do anything, and so I just avoided it.

Under those circumstances, MT was kind of like a rusted-out Oldsmobile that only fired on three cylinders and refused to start on cold mornings. In comparison, WordPress is like a brand new Vespa - quick, sleek, and kind of fun. And most importantly, it doesn’t stall in the middle of the highway.

Now that I think about it, maybe it was because of the language. Movable Type is mostly Perl, and WordPress is PHP. I don’t know enough about Perl to know if that could have been an issue, but whatever. I’m a big fan of Movable Type, but it just wasn’t working for me. I got all my posts and comments moved over, the permalinks seem to be alright, and I’m happy. I need to get my portfolio and project pages fixed up, but on the whole, the migration was easier and quicker than I thought it would be.

Of course, as I was editing this, brockli.com disappeared entirely for half an hour, then gave me a 500 error, then refused to connect to the database for a little while. Maybe I can blame 1&1 after all.

The Chore of Blogging

Friday, May 16th, 2008 at 7:00 am

After reading Getting Things Done and trying a couple times to implement the system, I think I’ve only taken away the parts that actually add MORE stress: everything is work, and you just need to prioritize and do it.

With that mentality, blogging falls in with booking hotels and airfare, planning bachelor parties, regular household chores, and of course, actual work work. The trouble is that all of those things take precedence over blogging, so I just haven’t been doing it - and then I feel like there’s one more thing on my to-do list.

I started this blog with the best of intentions: I wanted to actually write interesting, well-written posts - unlike the short trivial crap I used to post in LiveJournal constantly. I saw (and still see) a lot of really talented writers that are blogging about all sorts of things, and I wanted - to some extent - to emulate that. But the truth is, I’m not a good writer. I have ideas for blog posts all the time, but I don’t feel like expending the time or energy to write something GOOD about it, so I just don’t bother. In general, I really like writing about stuff on here - frankly, I think it’s more for me than anyone else. It’s kind of therapeutic to write about stuff, to work through my feelings on the matter. But so often, my desire to write something is overwhelmed by my desire to write something good. It feels like an obligation, but an obligation to whom? Only a small handful of people read this site, and as much as I love you all, I don’t think any of you expect a whole lot of quality out of me. Maybe I need to adjust my own expectations and just post stuff when I feel like it, whether I can make it good or not.

Furthermore, Movable Type and 1&1 have been giving me hell lately. In the MT admin, I get 500 Internal Server Errors on almost every page load, so even a simple post is a frustrating exercise. I managed to import all my entries and comments in WordPress, so we’ll see if this works better (and incidentally, you may get all my posts again in your feed reader - sorry about that).

Long story short, blogging has left a bad taste in my mouth for a couple of reasons. I’m going to keep doing it, though. It won’t be polished and it won’t be pretty, but I think I’m OK with that.

(And yes, I hate blogging-about-blogging as much as everyone else, but you’ll get over it)

LiveJournal Comments

Monday, January 28th, 2008 at 7:47 pm

Once upon a time, JR recommended that I write a script to pull comments from my blog’s syndicated account on LiveJournal into Movable Type, so that all comments would appear in one place.

And I did, and all was well for a while, but the recent upgrade broke it.

Well, it’s fixed now. Not a big deal, really, but all comments will be copied here every now and again when I run the script and approve them. Futhermore, you LJ folks can now comment on my actual site with your LiveJournal account. If you’d rather do that, click the link at the top of the post in LJ, and use the Sign In link below comments that have already been made. LiveJournal is one of the options on the right side.

Or, just comment on LJ. Either way, I’m stealin ur thoughtz.

Three Years of Blog

Friday, January 25th, 2008 at 10:45 am

Check it out, I started this thing three years ago. Happy blogiversary to me!

Movable Type: Update Entry Date

Thursday, January 24th, 2008 at 8:05 pm

My favorite plugin in MT3 was UpdateAuthoredOn. It didn’t do much: you got a button next to the entry date input, and clicking on it would update it to the current time and date. Simple, but very handy - especially if you’re the kind of person who writes an entry over the course of a couple days and want to post it with the current time.

The new version is called UpdateEntryDate, but it’s not working for me in MT4. So, I ripped out the part I needed and changed the MT template. If you want to try it out, you’ll need to modify tmpl/cms/edit_entry.tmpl in your MT directory. Go to line 1057 (give or take), or search for entry-time to find the date and time inputs.

First, the time input needs an ID. You can replace the whole entry-time input with this:

<input id="entry-time" class="entry-time" name="authored_on_time" tabindex="11" value="<$mt:var name="authored_on_time" escape="html"$>" />

Then insert this two lines down, after the closing span tag:

<input type="button" class="primary-button"
onclick="update_authored_on();" value="Update" />
<script type="text/javascript">
function zeropad(num) {
return (num < 10) ? '0' + num : num;
}
function update_authored_on() {
var now = new Date();
var y = now.getFullYear();
var m = zeropad(now.getMonth() + 1);
var d = zeropad(now.getDate());
var h = zeropad(now.getHours());
var min = zeropad(now.getMinutes());
var s = zeropad(now.getSeconds());
document.getElementById("created-on").value = y + '-' + m + '-' + d;
document.getElementById("entry-time").value = h + ':' + min + ':' + s;
}
</script>

Movable Type: Archives Location Change With Upgrade

Wednesday, January 23rd, 2008 at 10:19 pm

As I’ve mentioned here before, I upgraded to Movable Type 4 not too long ago. One of the changes that almost went unnoticed is the way archives are handled. In MT3, I wasn’t using the dynamic pages, so every post was generated into a file in the archives directory. For example, a post about new music in July wound up at /archives/2007/07/new_music.php.

In MT4 - or at least, MT4 with dynamic pages - there is no archives directory. Really, there aren’t any directories, since it’s all handled by mod_rewrite, but that’s not really the point I’m making. Under MT4, that post I mentioned above would be at /2007/07/new_music.php, with no /archives at the front.

Now, I could change the Archive Mapping on the Entry Archive Template in the admin, but I kind of like the shorter URLs. I don’t know much about mod_rewrite, but I found an answer a lot quicker than I expected to, thanks to askApache. I just added this to the .htaccess file in my site root, and now any requests to the non-existent archives directory are re-directed back into the root.

RedirectMatch ^/archives/(.*)$ http://www.brockli.com/$1

If you want to use this for your site, you’ll need to replace brockli.com with your own URL, but that should be it.

Movable Type QuickPost

Friday, January 18th, 2008 at 10:15 pm

I still haven’t finished putting the site back together after upgrading Movable Type, but I really like the new version. The admin interface is a lot cleaner and easier to use, and everything feels…sturdier, I guess.

I’m not sure if QuickPost was a feature in 3.2, but I didn’t know about it if it was. And really, calling it a “feature” is an overstatement. It’s just a bookmarklet that you drop in the bookmarks toolbar of your browser, and it allows you to quickly start a post about the web page you’re looking at. For those of you who ARE using Movable Type (and this post won’t be of much interest to anyone else), there’s a QuickPost link in the Write Entry page, down below the Save and Cancel buttons.

It’s a handy little bookmarklet, but by default, it doesn’t work the way I would like. It pops up a new window with a new blog post that contains the URL of the page you were looking at, two <br>’s, and then any text you had selected on the page.

That’s a good start, but clunkier than I would like, so I changed mine a fair bit. Here’s what I’m using - it’s one long line that won’t fit in your browser, so copying it might be a pain.

javascript:d=document;w=window;t='';if(d.selection)t=d.selection.createRange().text;else{if(d.getSelection)t=d.getSelection();else{if(w.getSelection)t=w.getSelection()}}entryTitle=encodeURIComponent(d.title);if(t=='')entryBody='';else entryBody=encodeURIComponent('<blockquote>') + encodeURIComponent(t) + encodeURIComponent('</blockquote>\n\n');entryBody+=encodeURIComponent('<a href="') + encodeURIComponent(d.location.href) + encodeURIComponent('">Link</a>');url='http://site.com/cgi-bin/mt.cgi?__mode=view&qp=1&_type=entry&blog_id=1&title=' + entryTitle + '&text=' + entryBody;void(w.open(url))

And here’s a more verbose version, so it’s easier to see what’s going on:

d = document;
w = window;
t = '';
if(d.selection) {
t = d.selection.createRange().text;
}
else {
if(d.getSelection) {
t = d.getSelection();
}
else {
if(w.getSelection) {
t = w.getSelection();
}
}
}
entryTitle = encodeURIComponent(d.title);
if(t == '') {
entryBody = '';
}
else {
entryBody = encodeURIComponent('<blockquote>') + encodeURIComponent(t) + encodeURIComponent('</blockquote>\n\n');
}
entryBody += encodeURIComponent('<a href="') + encodeURIComponent(d.location.href) + encodeURIComponent('">Link</a>');
url = 'http://site.com/cgi-bin/mt.cgi?__mode=view&qp=1&_type=entry&blog_id=1&title=';
url += entryTitle + '&text=' + entryBody;
void(w.open(url));

I changed a few things. For one, “_blank” is no longer included in the window open. Under my Firefox configuration, this means that it comes up in a new tab instead of a new window. I also changed the entry body; now, it turns the URL of the page into a link (with the text “Link”), and any selected text goes above that in a <blockquote>. Basically, you get a new post that’s in the format Boing Boing typically uses.

If you want to try it out, do the following:

  1. Drag the QuickPost link from the Write Entry screen into your bookmarks toolbar.
  2. Open your favorite text editor - Notepad will do - and copy that first block of code above into it.
  3. Right-click on the bookmark and select Properties. Copy the Location field into your text editor too.
  4. You need to pull the URL out of your QuickPost code and put it into mine. Obviously, the domain part won’t be site.com, and the blog_id might be different if you’re running more than one blog in your MT installation.
  5. Copy the new code with the correct URL into the Location field for the bookmarklet. Make sure there aren’t any line breaks in it.
  6. That’s it. Test it out by going to any web page, select some text, and click the QuickPost bookmark. You should get a new post that contains the text you had selected.

Drop me a note if you’ve got any questions or suggestions for improvements, or just post a comment here.

Upgrading Movable Type

Sunday, January 13th, 2008 at 9:59 am

I’m in the process of upgrading Movable Type, so things may be a little wonky for the next couple days. It was time for some spring cleaning, so I did a fresh install. I think MT is all set, and all my old posts are here, but I’ve still got some more content to move over from the old site - stuff like my Projects and Portfolio pages, the About Me page, that kind of stuff.

That, and in MT4, entry URLs use dashes for spaces instead of underscores. I have links to my own posts in the format “whats_so_great_about_christianity.php”, but if you actually go to that post, the URL is “whats-so-great-about-christianity.php”. I’m assuming that’s a setting I just haven’t found yet, but until I do, links within new posts to old posts will be broken.

If you find any gaping holes, please drop me a note.

That Catholic Guilt

Sunday, August 19th, 2007 at 1:47 pm

I feel bad that I haven’t been blogging much lately, but I don’t actually feel like writing anything, even though there’s stuff I do want to write about. I think the past few months caught up with me last weekend, and I’ve been totally drained ever since. I’m going to make more time for naps.

Toothpaste

Wednesday, January 31st, 2007 at 7:43 am

I just noticed that my toothpaste top can flip up OR twist off (it even has printed instructions) (actually, that’s the only reason I noticed). Why didn’t they think of that sooner? (And why do I feel like I should have a preference?)

Also: I almost forgot about it, but as of last Thursday, I’ve been doing this thing for two years.

Blog Analysis Tools

Saturday, January 6th, 2007 at 8:08 pm

Does anyone know a decent blog traffic analysis tool? I’ve been using Google Analytics, but it’s geared toward companies and marketers, not bloggers. On the upside, it gathers data via JavaScript, so I only get stats from actual visitors and not bots or spammers. My hosting company offers a web stats tool, but the numbers there are an order of magnitude higher than the ones on Analytics because they count all page requests, not just the ones that come from an actual browser.

I can also get the log files from my host, so a desktop app that handles raw files would work. I used Weblog Expert Lite for a little while; it gives me the information I want, but since the reports are based on the logs from the server, it’s got all the same crap results that the host’s web stats utility does. As such, another JavaScript-based tool would probably be best.

JR linked me to Measure Map the other day; I don’t know anything about it, but it’s intriguing…and closed to new users right now. Anyone got any other ideas?

New Design

Monday, January 1st, 2007 at 3:36 pm

Like the new look? Of course you do.

I upgraded to MT 3.2 almost a year ago, and “re-design blog” has been on my to-do list ever since. The default template isn’t bad, but I definitely didn’t care for the grey-blue crap. So, I stripped out most of the coloring, touched up some borders, and brought back the random banner images (who doesn’t love random banner images?). I’ve got about a dozen of them from the old design and I’ll be adding more when I get around to it - collect them all!

LJ Comment Grabber: Getting Better

Monday, January 1st, 2007 at 1:14 pm

I don’t know if anyone besides Jym has tried the LJ Comment Grabber, but I fixed the comment parsing…sort of. Read the project page for more details. If you are using it, this is definitely an update you want to get.