Simpler URLs

Occasionally I think about simplifying the URLs for jl.o because I find that the date as an 8-number preface is cumbersome, but I worry about losing readers and links that have come to depend on a number of posts. It turns out there is WordPress plug-in that can manage this process, as [Tom Ewer notes on WPExplorer][]: “To easily create the redirects on your WordPress website I recommend the [Simple 301 Redirects][] plugin.”

Ewer also offers the following bit of advice for after you have made the change: “You may still have the odd broken link 404 error, so it may be worth thinking about creating a custom 404 page with information about the permalink change. That topic is for a whole other post though.”

[Tom Ewer notes on WPExplorer]: http://www.wpexplorer.com/change-permalinks-wordpress/
[Simple 301 Redirects]: http://wordpress.org/plugins/simple-301-redirects/

New Year But … er, a New Look

Yeah, yeah, happy arbitrary new year. What was wrong with having the new year begin on the first day of spring anyway? It makes a lot more sense than having it only a week after we celebrated the winter solstice by shoving presents under an evergreen tree (that, sigh, will soon be brown because we cut it down). Curmudgeonly impulses aside, I just wanted to note that the site is going to look a little different for a few days. It was time to update the PHP scripts that make the site go and it seemed best to use the latest offering from the WordPress folks themselves and then slowly hack the CSS back to something more of what the Logbook has looked like for the past year.

It’s not going completely back. I think the right sidebar is going to stick around, and so is my new friend L’hydre. I came across him on a crest having some connection to the town of Laudun, France, and I decided I kinda like the little guy. Hydras are apparently fairly rare in heraldry, and they represent the defeat of a significant enemy. For me, I like how friendly he looks. He’s an animal that would like to be able to fly (wings), clearly can make his way through the water (webbed feet), and has thoughts that go in too many directions (heads). Yup, I’m keeping him.

**UPDATE**: Okay, a new look. It was inevitable I suppose. I was looking for something that a more responsive design, in the sense that it would work well across a number of devices. I decided to give [Codium Extend][] a try. I’m fairly happy with it, except the “responsive” part of it makes for some pretty dense, and lengthy CSS. And I can’t quite get the gap between the posts and the sidebar to open up a bit more. That space feels too tight to me.

[Codium Extend]: http://wordpress.org/extend/themes/codium-extend

WordPress Pages

Pages in WordPress offer a lot of functionality. This link takes you to the page in the Codex that treats them. I am reading there now to find out how to make the *Search/Archive* page work the way I want it to work.

I would like it if the tweets that TwitTool is grabbing from Twitter account and placing into the logbook would be formatted more like asides. Since TwitTool can apply the tag of “tweet” to a post, there appears to be a way to get [tag-based formatting of posts][tag]. Thank you WordPress community.

[tag]: http://wordpress.org/support/topic/formatting-based-on-tag-slug

Improve WordPress Search

Two places to start:

* [Make WordPress’ search function suck less](http://yoast.com/wordpress-search/)
* [10 Useful WordPress Code Snippets](http://speckyboy.com/2010/09/19/10-useful-wordpress-search-code-snippets/)

The Reliability of Blogging Platforms

[Royal Pingdom has the results](http://royal.pingdom.com/2010/12/17/the-most-reliable-and-unreliable-blogging-services-2/) of their monitoring of five popular blogging platforms: Blogger, WordPress.com, TypePad, Posterous, Tumblr (spoler alert: listed in order of reliability). Ordinarily I would let this pass, but I am considering using a publicly available blogging platform for my digital humanities seminar. Why a public service? I want students to have something that can continue beyond their years at university: using our Moodle installation can’t do this. I am currently leaning towards [Wordpress.com](http://wordpress.com) because

1. I use it and am familiar with it
2. It’s open source
3. A number of digital humanities projects, e.g. CUNY’s [Academic Commons]( http://commons.gc.cuny.edu/), are built on it — or the other open source CMS, [Drupal](http://drupal.org/). (CUNY’s effort should not be confused with the other [Academic Commons](http://www.academiccommons.org/), which is equally interesting, but I don’t know if it’s built on WordPress CMS.)

Profile of Matt Mullenweg

KTEH put together profile of Matt Mullenweg, the man (or, at least the head guy) behind the WordPress web application. In the process of chronicling WP’s development, the profile gives a nice overview of WordPress itself and of open source software in general.

Post Formats Now in WordPress

Now that I have had a chance to work with the [Tumblog Plugin][tp], my overall sense of it is that it is a kludge. (If I could get its companion software, [Express App][exp], to work on my phone, I might be more forgiving, but I haven’t, so I am not.) The plugin’s UI is extraordinarily involved, and I don’t particularly admire how the exact workings of the plugin are hard to follow.

I need not fuss with it too much longer, however: *post formats* are designated to arrive in [WordPress 3.1][wp31]. *Hooray!* From the [Codex][]:

> Formats are meta information that can be used by themes to customize presentation of a post. The basic idea is to provide a specific method for specifying the display “format” of a post. This replaces the need to use categories to accomplish the same thing, and even more importantly, is portable between themes that support those formats!

[tp]: http://wordpress.org/extend/plugins/woo-tumblog/
[exp]: http://express-app.com/
[wp31]: http://wordpress.org/news/2010/11/wordpress-3-1-beta-1/
[Codex]: http://codex.wordpress.org/Post_Formats

Anthologize

Anthologize is a tool for content creators to turn their website, and other materials they have syndicated I believe, into a book. It was produced by the Center for History and New Media’s “One Week, One Tool” project. They used a number of extant ideas and projects as their starting points:

UPDATE: Further along in the traditional publishing workflow comes editing and I just came across a website that allows for a kind of crowdsourcing of editing: it’s called BiteSizeEdits. Fascinating.

UPDATE 2: There’s a commercial site doing this: http://leanpub.com/.

JLO Now Has Its Own Code Base

Well, not entirely. The web application that actually makes this website work is [WordPress][wp]. Up until last night, I was using a standard WP installation, which means I was running WordPress with a pre-packaged theme. Now there are literally thousands of themes: I won’t even link to any particular site here, because all you have to do is search for “wordpress theme” in any search engine to get page after page of links.

I have, since returning to WordPress for the basis of this site, used a half dozen themes in search of “the one.” All of them had something I liked, but none of them had everything. In the end, I decided that there was nothing else to be done except to code the thing myself. And so, as of the end of June in the year 2009, here is the working prototype of *jello* as I have come to call the collective pieces that make up [johnlaudun.org][jlo].

### The Building Blocks ###

The essential building blocks of a WP site — disregarding for the moment all the scripts that make calls to the database to pull actual content into pages — are a collection of `php` scripts stored in the theme folder. Well, with our disregard, we should really call them the essential *presentational* blocks. In a typical WordPress site, you have a collection of page templates that call upon things like `header.php`, `sidebar.php`, and `footer.php.` Each of those scripts in turns contains calls to others in the WP engine itself to fetch content, either singly or in an iterative fashion, that gets coughed up.

In the case of something like `sidebar.php`, there is ample opportunity to call a variety of *widgets*, which are conveniently managed from within the WP Dashboard. For the sake of keeping things simple and for making the pages of JLO load faster, I opted to hard code, as programmers sometimes say, those functions into `sidebar.php` itself. Here’s an example:


I borrowed the idea from the developer of the Modern-Clix theme, and I stripped out all the widgetry and now have a `sidebar.php` file that is 37 lines long.

I performed much the same sort of surgery on the other `php` scripts, paying especial attention to what the WordPress community calls *the Loop*, which is the iterative functionality that delivers something the list of posts, either on the front page of the site or in the archive pages. I don’t pretend to fully understand it, but I had to get inside it to some degree to begin to understand where I could intervene in terms of styling what really becomes one of the most important content blocks of the site, *the post*. I am not completely satisfied with the current state of things, but I have simplified the CSS and I will continue to do so, removing as much as possible to get the sheet to load as quickly as possible.

### Flexible Presentation ###

What this means is that all those scripts I mentioned above deliver to a browser styled HTML. By convention, that means HTML broken into `div`s and other elements which are styled, by reference to a Cascading Style Sheet, either by `class` or `id`. In a style sheet, classes are indicated by a prefatory dot, “.”, and ids by a hash mark, “#”. By convention, classes apply to objects that appear multiple times on a page and ids to unique items. In terms of my own website, the `div` role call for a given page looks something like this:

#wrapper

#header

#content
.post

#sidebar
.section

#footer

In an attempt to be fashion forward and, I hope, a bit future-proof, much of the website’s measurement is made in terms of `em`s, a term borrowed from typography, where it refers to the square space constituted by the width of the letter *m* in a particular type face. There will be, under such a regime, subtle differences between faces. The hope is that those differences will be relevant to the type face itself and all the things it makes up: in books, pages; in websites, er, what we also call pages.

The other measurement commonly used in website is the `pixel`, which is great for absolute positioning, but it does limit what browsers can do to accommodate or adapt to their particular users. My hope is that using the `em` I will allow not only my youthful colleagues to read what I write but also some of the older folks with whom I work to read, and if they need to adjust type sizes, the website will flex fairly gracefully. I have not had the chance to try this out on other browsers apart from [Safari][saf] and [Firefox][ff] on the Mac, but I will as soon as I can and tweak appropriately.

### Goals and Next Steps ###

My overall goal was to get the look that I wanted, but I also wanted to simplify the code base both for my own ability to use it and revise it as well as to make it faster to deliver to folks with less than optimal connections. The Flickr stuff is going to slow loading of pages down. There’s no doubt about that, but I wasn’t quite ready to give up the thumbnails in the sidebar. The site is now so clean that without a little bit of color somewhere, I worried it would fade into a white-out. I will continue to post bits of code as I go, and I will certainly make the style sheet available once I have made sure that everything in it needs to be there and that I haven’t stripped out anything important. (I would hate to give out broken code.)

Let me know what works and what doesn’t work.

My next steps are to style the printing of pages and posts so that they look like print documents and not printed screen documents and to style the website for use on mobile devices like the iPhone.

UPDATE [2009-06-29]: Comments are now on automatically for all posts.

[wp]: http://wordpress.org/
[jlo]: http://johnlaudun.org/
[saf]: http://apple.com/safari/
[ff]: http://firefox.com/