Posts in the WordPress Category

Feeling Distracted

Published 20 years, 4 months past

For no apparent reason other than I can, I’ve redone the sidebar to include a linkblog titled “Distractions.”  I did this by grabbing Markku Seguerra‘s wp-recent-links plugin and then hacking the holy bejeezus out of it.  I needed to add a “via” function, for example, and wanted to make the administrative interface a bit nicer.  That involved finding out how MySQL statements work (mostly by finding all the ways they don’t).  So, hack hack hack.  It was an interesting distraction.  I’ll make the files available in due course.

To make room, I took out the “Socialization” section because it seemed largely worthless; two of the services listed I hardly even look at any more, and the other one was mostly about me puffing up my ego in public, which nobody really needs to see.  I’m also thinking about taking out the Platelets because I don’t get to update it often enough, even though I have really soft spot for it in my heart.  We’ll see what happens.

Keen-eyed observers will notice that I backfilled a few entries from the past few days.  I needed test data, you know?


Migration Patterns

Published 20 years, 6 months past

I’ve fielded a few questions about my experience migrating from Movable Type to WordPress, so I thought I’d address that subject for anyone else who might be interested.  I didn’t migrate from Movable Type.  I’ve never run Movable Type.  Okay?  That’s not saying anything for or against MT.  I’ve just never used it.

What I was using before setting up WordPress was a completely hand-built system where I authored entries in an XML format of my own devising, in which every entry for a given period (say, all of 2004) was sitting the same file.  Once I wrote a new entry, I’d pour the XML file through a set of XSLT scripts to generate the latest posts, monthly archive pages, and RSS feeds.  This was accomplished with some dirt-simple shell scripts I’d put together.  Here’s what the main script looked like:

#!/bin/bash
MONTH="$(date +%Y%m)"
echo $MONTH
xsltproc -o latest.html xslt/latest.xsl archive.xml
xsltproc -o rss20.xml xslt/rss20.xsl archive.xml
xsltproc -o rss091.xml xslt/rss091.xsl archive.xml
xsltproc -o $MONTH.html -stringparam chunk $MONTH xslt/chunker.xsl archive.xml

Anyone familiar with xsltproc will see what I’m doing at a glance.  For the rest of you, here’s a quick explanation.  The first xsltproc... line runs xsltproc using the script at xslt/latest.xsl (relative to the shell script) against the file archive.xml, writing the result to the file latest.html.  That’s it.  Nothing very fancy, but it worked well enough when I created the system.

Why did I abandon my loving crafed system for an installable package?  A combination of factors, any of which would not have been enough on its own.

  • The monthly archives were starting to get too heavy.  For example, the archive page for March 2004 is 88KB, and that doesn’t count any style sheets, images, or other external resources that would have to be loaded on top of that.  Back in the day, a month’s worth of posts would be maybe 15KB of HTML and text.  Heck, all of my posts from 1999 and 2000 total a whopping 32KB of HTML source.  My total posting from December 1999 through 2001 is about the same amount of data as the posts for March 2004.  So I needed more flexibility in terms of post archiving, which meant things like per-post archives, which I didn’t really want to have to try to support via XSLT.
  • I wanted to offer post commenting from time to time, and also have a system that managed pingbacks and trackbacks.  I had very little interest in figuring out how to implement my own commenting system, so weblogging software was my best choice.
  • An ability to search through the post archives was something I wanted to add, but for some reason I don’t want to do it through Google.  I’m still not sure why… I just don’t.

So why did I migrate to WordPress, specifically?  After looking at a number of packages, I decided that WordPress just fit me the best.  I still don’t like having to go through a Web interface to write posts, as I’ve gotten very used to authoring in BBEdit, but that was going to be a hurdle no matter what.  (And I do often write up a post in BBEdit before simply pasting it into the Web interface.)  Here are some specific reasons:

  • By default, WordPress generates valid XHTML files.  Thus, the process of adapting its code to generate the valid HTML I wanted was a lot less painful than it would have been with a package that doesn’t generate valid markup by default.
  • Similarly, WordPress is set up to handle site presentation via CSS, so it was a trivial matter for me to replace their default styles with my own.
  • I like that WordPress is not only open source, but users are encouraged to hack on it and share their hacks, which I’ve already started to do.  This was enough like a hand-built system to make me happy.  I think of it as a stock car that I can tune and tinker with to my heart’s content.
  • The new “Import via RSS” feature in WordPress 1.2 made sucking all of my back posts into the system really, really easy.  I just had to create a full-content RSS file containing every post I’d ever written—pretty easy, given that I had them all stored in XML—and then point the RSS importer at the file.  Well, two files, actually, but it still made the whole process very smooth.  It read the publication dates, categories, and everything else of note in a matter of milliseconds.  In fact, it was so easy I felt no regret about blowing away my test-site import and doing it again for the public site.
  • It certainly didn’t hurt that one of the primary forces behind WordPress is Matt Mullenweg, a fellow GMPG founder, so I knew that if I really got stuck I could ask him for help.

So that’s why I switched away from my home-brewed system and onto WordPress.  So far, aside from the occasional bouts of swearing at obscure MySQL and PHP syntax, neither of which has been anywhere near as migrane-inducing as XSLT syntax was, I’ve had no significant reason to regret the change.

Now you know… and knowing is half the battle.


New WP Plugin

Published 20 years, 6 months past

A small WordPress hacking update: I’ve added a new plugin, MW Get Post Info, to the WordPress Plugins and Hacks page.  This one could be particularly useful for those of you who are providing excerpt feeds.  As usual, share and enjoy.


Plugging Into WordPress

Published 20 years, 6 months past

Although I’m now using WordPress for the “Thoughts From Eric” portion of the site, that doesn’t mean I’m using a default install.  Oh no.  I had to go hacking on the source of the system, even though I knowknew next to nothing about PHP (not that it seems terribly difficult to learn) and bend it to my desires.  No, not those kinds of desires.  The HTML it produced wasn’t suited to my needs, so I changed it.  I didn’t like the limitations of some functions, so I extended them.  I needed a more robust monthly calendar, so I added what I needed.  I thought the administrative interface could provide better visual feedback, so I hacked on it until I could do things like highlight activated plugins in varying shades of green.

Since WordPress now supports plugins, I figured I’d share some of what I’ve created in case anyone out there is interested.  Thus, I now have a WordPress Plugins and Hacks page in the Tools area of meyerweb.  The three plugins currently given there are the three I wrote first, and which work the way I wanted.  Each plugin has a page that documents the parameters it can accept, which is a good way to decide if a given plugin will be of any use to you or not.  I have a few more plugins that are almost, but not quite, ready for public release; hopefully I’ll have them sorted out within the next couple of weeks.

So feel free to check out my WP plugins, and to use ’em if you like ’em.


Switcheroo

Published 20 years, 6 months past

I’ve converted “Thoughts From Eric” over to use WordPress, dropping my lovingly hand-crafted XML/XSLT solution for something packaged.  Since there’s no actual package, I guess I use that term somewhat loosely, but then I was also being very loose with the term “lovingly,” at least as pertains to XSLT.  I decided to go with WordPress because it’s all driven by HTML+CSS layout, and it uses PHP to generate the HTML.  I don’t know from PHP, but I can figure it out well enough to hack in the features I want, and the CSS-driven nature of the layout means I can do my own thing in a jiffy.  In this case, that meant bending the PHP files to produce markup consistent with the old meyerweb, and then applying my existing style sheets to the result.  Thus the visual consistency between yesterday and today.

Some changes that may or may not be of interest to you:

  • By default, comment posting will be disabled but trackbacks will be permitted.  I expect things to stay that way until I decide what my policy will be regarding anonymous posting, comment spammers, and the like.  I’ll open up commenting on the occasional question post—I expect to put up one later today, in fact—but I won’t be opening up every post for comments.  I’ve taken note of how that’s gone at some other sites, and have rarely liked what I’ve seen.
  • All feeds will continue to use excerpts; I will not be publishing full-content feeds, mostly because if I did y’all would saturate the outgoing pipes.  Yes, dammit, bandwidth does still matter.
  • Both RSS feeds have lost their word-count and category information.  As soon as I figure out how to recreate those in WordPress, they’ll be back.  I had them figured out for WP1.0.2, but the very same functions seem to silently fail in WP1.2 beta, which is what I’m using.  I’ll get it worked out eventually.
  • The RSS2.0 feed now includes <pubDate> elements for your sorting pleasure.  FeedDemon users of the world, rejoice.
  • About 300 back-catalog posts (roughly speaking, December 1999 through October 2002) all got dumped into the “General” category.  You might not want to try to read that category all in one shot.
  • I’ll likely fiddle with the categorization of old posts as I come across them, so don’t do anything that depends on a post being in a particular category.  No, I have no idea what that might be.
  • The old archive pages still exist, so your permalinks won’t break.  If you want to update them to the new URIs, that would be appreciated, but if not, no big deal.
  • The vast majority of posts, including posts up through last month, show as having been published precisely at midnight.  That’s because the old archive file didn’t carry time information for those posts, not because I’m an obsessive-compulsive night owl.
  • Posts now show their categories, and clicking on said category names gets you a list of every post in the category.  Right now, that means a page that shows the full post content for every post in the category.  I plan to create a condensed-summary category view at some point.
  • I’ll probably also continue fiddling with the layout, displayed information, and various other aspects of the post and archive pages.  Just don’t refer to a particular layout idea in a debate unless you grab a screenshot, that’s all.

That’s about it.  I just thought some of you out there would be interested in the details.


Browse the Archive

Later Entries