Category Archives: WordPress

The open source publishing platform I co-founded — development, releases, community, and the ecosystem.

Texturize Finished

I just stuck a fork in Texturize and I’m ready to integrate it fully with WordPress. I’m very satisfied with the speed and functionality of this latest version. Not much in way of feature changes, except for one I think is pretty significant.

The Q tag would be great if it weren’t for Internet Explorer’s lacking in the realm of CSS generate content. (See Hixie’s scathing remarks for a critical look at IE.) Anyway this is the first automagic quote curlifier to do this (cue 15 corrections) though I’m sure Textile and SmartyPants won’t be far behind. The great thing about this technique is it lets you markup semantically meaningful quotes in your writing without losing a majority of your audience. Even better it would be trivial to put some simple browser detection and send the markup to browsers that get it. What a concept, using browser detection for good and not evil. This post is the first one where I’m using this technique. Hope the sky doesn’t fall. Update: It didn’t.

LINK Navigation

Now I know I just gushed about Opera, but I just found another reason why Mozilla kicks butt. Back in the day a number of link types that could be used by user-agents in an additional navigation bar or pre-cache some elements “to reduce the perceived load time.” Cool, eh? There are a number of possible applications in the blog format that lend themselves well to this, and I’ve tried to put as many as possible here. Viewing the source or visiting in Mozilla is the best way to get a feel for what’s happening and how neat the application is, but some descriptions are in order nonetheless. I don’t know the default setting for the “Site Navigation Bar” is for Mozilla, but to make sure it’s on go “View > Show/Hide > Site Navigation Bar > Show Only As Needed” to make sure you’ll see what all the fuss is about.

First, it was very tricky hard to get this all working with my current setup; whenever I try something new here my immediate thought to how it can be integrated into WordPress, but the steps I had to take were so convoluted that I doubt that any of this will make it into the next release. Anyway the first useful link that came to mind would be “bookmark,” something I specify the rel attribute on my permalink tags but no current browser picks up. So for example the bookmark link for this entry would be like so:

<link rel="bookmark" href="/p620" title="LINK Navigation" />

For any index, individual, archive, or category page you look at on the journal part of this site there will be a set of bookmark links to each of the entries on the page. I have created similar links for commenting and trackbacking entries, that personally I’ve found to be an extremely efficient way to get around. Check under your “More” menu in Mozilla to see it all. Mozilla also links nicely to the alternative representations of the content, such as RSS, and though it links to the same resources on each page it really should link to the specific representation of only the content on the current page, so for example the comments page could link to its unique RSS 2 feed.

Then some basic navigation elements were in order. The logic of these should be apparent from the code, but there is a link pointing to the top page of this site, a link to the search page, the FAQ, information about myself, and finally copyright information. When you are browsing a single entry you are offered links to the previous and next entry, as well as to the very first entry. This could be expanded once date-based archives are available to allow you to browse from month to month or day to day. Once you start using it, you’ll wonder how you ever navigated any other way.

Finally I set the categories to be “sections,” though I’m not sure if I’m entirely comfortable with this. If you envision all of the text of this blog as a document, then the “index” could be the front page, but after that it’s open for interpretation. Should categories be sections or chapters? Could chapters be say, month-based archives? What if I wanted some arbitrary division of chapters, say by whatever relationship I was in at the time? Sub-sections seem ill-defined as you can’t seem to define several sub-sections as a child of a section, though I may simply need to explore this further. Also I am feeling slightly constrained by the software I use to manage everything, but it would be fascinating to see how someone without those constraints such as Tantek could do with his structure. Ideally some common set of relationships specific to the organization of a weblog—much like the goal of the Weblog Metadata Initiative (where’d they go?)—could be agreed upon and implemented by default by the authors of the most common software and templates. Several people already implement a bit of this already, for example Mark, but there is a lot of unrealized potential here.

Opera is able to use all of the standard defined links, but doesn’t catch any of the extra ones. IE of course is oblivious to it all. Mozilla gets everything. If you have any information on other browsers let me know. I should be defining the extra rel attributes in a profile document, but there are only a few hours left before I’m supposed to “wake up” for my classes tomorrow, so some sleep may be in order.

miniBB

I’ve spent all night hacking miniBB to have some semblance of standards compliance. I like it a lot because it’s simple and easy to get around, but the coding style (or lack thereof) in the source is really painful. In addition to no formatting of the PHP, the HTML suggests a lack of a basic understanding of markup languages, with enough nested tables to curl your toes. But guess what, it validates. On that note I would like to announce that the WordPress Support Forums are now up and humming along nicely.

Em and En Dashes in Movable Typo

Several users of the MTCurly plugin have written in or commented about the module catching em dashes written in as two hyphens. In the PHP function I have parsing the text on this site, I actually have this rule running. Well, it’s a pretty trivial task to do this, but when I was thinking about it the issue of en dashes bothered me and I decided to reread one of my favorite ALA articles, A List Apart: The Trouble With EM ‘n EN.

While the majority of people will just want to use the em dash, I think the possibility of having en dashes generated automatically as well would be very convenient and encourage more widespread adoption of them. But how do you notate an en dash using only the characters on the keyboard? I thought about this and came to the conclusion that there should be two optional addons to the code, one for changing two hyphens into an em dash, and one that changes two hyphens into an en dash and three into an em dash. Get the updated code. I’m curious to hear some thoughts on this.

For those who aren’t familiar with the proper usage of em and en dashes, here’s a quote from the ALA article, which I think is the best summary of the matter on the net, by Peter K. Sheerin.

The em dash (&#8212;) is used to indicate a sudden break in thought (“I was thinking about writing a—what time did you say the movie started?”), a parenthetical statement that deserves more attention than parentheses indicate, or instead of a colon or semicolon to link clauses. It is also used to indicate an open range, such as from a given date with no end yet (as in “Peter Sheerin [1969—] authored this document.”), or vague dates (as a stand-in for the last two digits of a four-digit year).

Two adjacent em dashes (a 2-em dash) are used to indicate missing letters in a word (“I just don’t f——ing care about 3.0 browsers”).

Three adjacent em dashes (a 3-em dash) are used to substitute for the author’s name when a repeated series of works are presented in a bibliography, as well as to indicate an entire missing word in the text.

The en dash (&#8211;) is used to indicate a range of just about anything with numbers, including dates, numbers, game scores, and pages in any sort of document.

It is also used instead of the word “to” or a hyphen to indicate a connection between things, including geographic references (like the Mason–Dixon Line) and routes (such as the New York–Boston commuter train).

It is used to hyphenate compounds of compounds, where at least one pair is already hyphenated (as in “Netscape 6.1 is an Open-Source–based browser.”). The Chicago Manual of style also states that it should be used “Where one of the components of a compound adjective contains more than one word,” instead of a hyphen (as in “Netscape 6.1 is an Open Source–based browser”). Both of these rules are for clarity in indicating exactly what is being modified by the compound.

Other sources also specify the use of an en dash when referring to joint authors, as in the “Bose–Einstein” paper. Some also prefer it to a hyphen when text is set in all capital letters.

While quoting the above article, I noticed what may be an error in the source where it looks like in the paragraph about en dashes em dashes are actually used. I’ve corrected it in the quote above. Typos happen, I’ll drop Zeldman an email. (Time to break out the spel chequer.)

I’m also considering adding a few other things to the next version of the plugin, so if you have anything you’d like to see in there let me know.

Curly Quotes in Movable Type

I am happy to announce that the “curlyquotes” module for Movable Type has passed out of beta into the release stage. Many thanks to Todd of Dominey Design for testing and providing valuable feedback. Here are the updated instructions. For full details, please see this script’s info page, which lets you receive updates by email, leave comments, report bugs, ask for features, and ask questions, et cetera. Here are the updated installation directions:

  1. Install the MTRegex plugin. (Directions from readme.txt file)
    1. Get file.
    2. Place the ‘regex.pl’ file in your Movable Type “plugins” directory
    3. Place ‘regex.pm’ and ‘postproc.pm’ in a ‘bradchoate’ subdirectory underneath your Movable Type “extlib” directory.
    4. You should end up with something like this:
      • (mt home)/plugins/regex.pl
      • (mt home)/extlib/bradchoate/regex.pm
      • (mt home)/extlib/bradchoate/postproc.pm
  2. Create a new template module called curlyquotes with the code from here.
  3. Add <$MTInclude module="curlyquotes"$> to the top of all your templates.
  4. Replace all occurences of <$MTEntryBody$> with <$MTEntryBody
    regex="1"$>
    .

Usage is free, in every sense of the word, but if you could throw a link back this way I would appreciate it. Also if you improve on the code in some way, submit your changes so everyone can benefit.

What this module does: It takes straight quotes/prime mark, and makes them proper typographer’s quotes, sometimes called “curly” or “smart” quotes. So basically it takes "this" and makes it “this” using the proper HTML entities. It also works with single quotes, apostrophes, and multi-paragraph double quotes. It slices and dices!

Why? Because there is no button for a curly quote or apostrophe on the keyboard. No really, see the old post for more.

Greyscale

A return to normalcy? Not quite, but it’s a beginning. Grief is a natural reaction to extraordinary events, it’s a protection mechanism to help us cope. However when it’s prolonged it can have the negative effect of holding us from moving forward. It’s impossible not to grieve with the images being shown on every station and website, however, things must move forward. I think that a lot of people took a step back and thought about things yesterday, and I couldn’t think of a better way to honor the memory of September 11th.

9/11 is a flashbulb memory for most everyone; every trivial detail about where we were, who we were with is burned into our memories. For my generation, this is really the first event of that kind, thankfully. I tried to think of today as a day of quiet introspection–remembrances, resolutions, emotions, and most of all, examination of today’s events. Where has the US gone since 9/11? I think reaction-ism on the part of some lawmakers has hurt the very things we’re trying to protect: our liberty, freedom, and ultimately, safety for ourselves and our progeny.

Anyway, mostly because I don’t want these things to fade in my own mind, I have set it up so on the 11th of every month the memorial (greyscale) theme will load for that day.

Curly Quotes for Movable Type

I’ve finally gotten around to writing the instructions for Movable Type users to implement the curlme function using Brad Choate’s MTRegex plugin. The regex is the same, just the manner that it’s being implemented is a bit different. I’ve tested this out pretty extensively across this site, and there have been no problems. In fact, it’s in action right now. Once again I would like to thank Mark Pilgrim, who inspired this all.

The best instructions I can give, since I’m not a MT user myself, are to follow the very excellent instructions I’ve summarized below, replacing the MTAddRegex tags with the new ones.

  1. Install the MTRegex plugin.
  2. Create a new template module called curlyquotes with the following code:
    Code depreciated, see latest version
  3. $MTInclude module=”curlyquotes”$> to the top of all your templates.
  4. Replace all occurrences of <$MTEntryBody$> with <$MTEntryBody

    regex="1"$>
    .

And you’re done! Post any questions you might have and I’ll respond ASAP.

Macro

Through Kymberlie I found a very cool photo contest at photojunkie that I’ve decided to enter. The theme of the contest is “Macro,” which is one of my favorite features on my camera. I have a ton of macro shots, so thinking of what to do was a challenge. The first thought that came to my mind was a face, and I had a particular model in mind but she isn’t available this Sunday, so I dove into the photolog to find one that suits. Kudos to Bridget. Without further ado, here it is:

KemahTake a second look at the horizon :), we’re actually on the big swinging rides at Kemah.

8-31-2002

8-31-2002—even though summer is over now, in spirit if not in weather, I wanted to try and capture some of the things that symbolize summer to me: ants, grass, dirt, bushes, sun. Update: added about a dozen more photos from tonight. Interesting perspectives at the River Oaks shopping center, and some car logos, a new theme.

Comments Back

Well it looks like the issues with MySQL 4.03 aren’t going to resolved anytime soon, and it was messing up other applications anytime a variant of SELECT DISTINCT was used so I went ahead and rolled the installation back to 4.02. So things should be working fine now; if you see any bugs drop me an email or something. I’m getting ready to put some new summer-themed pictures up, so keep your dials locked.

Houston

Back in Houston, finally, and it’s nice adjusting back to old habits and comforts. Besides family and pets, I think the thing I missed most were my speakers, and it’s bliss to hear high fidelity sound again. Uploaded the last day from the trip, so enjoy! I’m also working on some layout/design changes for this site. The plan is to have a different theme for every month.