Custom blog themes for 10.4’s blog server?

I’ve continued working with 10.4 Server’s blog server since my earlier entry. Since then, Apple’s updated the blog server with some neat features, including the ability to embed podcasts along with individual entries, as shown below in the screenshot. Apple has also updated the admin console with a newer (and much more visually appealing) Blojsom admin console.

One thing that’s I still haven’t seen is additional themes for the blog server. Thanks to Keith Bradnam’s and Brendan Berg’s work on the blojsom backend, it looks like it should be easy enough to add in new themes once they’re built, but I haven’t been able to find anyone who has started building and posting new themes for use by Apple’s blog server. If there’s someone out there who’s all-fired to start building themes, but has no idea how to access the themes themselves or set them up so that the new themes show up in Apple’s themes listing, here’s how you access them and add them.

Themes location:
/Library/Tomcat/blojsom_root/webapps/ROOT/blojsom_resources/stylesheets

If you copy (and then rename) one of the existing stylesheets in this directory, then the new filename will automatically pop up in in the list of available themes. Any changes that you make to the renamed stylesheet will then affect the appearance of your blog pages.

The dowside to this is that the filename will show up in the listing, so you’ll see your listing change to include “filename.css”. You can change it to be a more normal-sounding name by editing the following file:

/Library/Tomcat/blojsom_root/webapps/ROOT/strings/en.properties

At the bottom of this configuration file is a section called ‘Template full names’, which contains the links between theme names and the corresponding stylesheet name that they are specified by. The default entries show up in the en.properties config file as follows:

# Template full names
template.apple_layout=Grey
template.v2_layout=White
template.v4_layout=Graphite
template.v5_layout=Blue

The other thing you’ll need to keep in mind when building themes is that there are two files that need to be included for each new style you wish to add. The first is the normal CSS file, for example filename.css. The second is a matching javascript file named filename.js. The javascript file need only include the following lines:

—–BEGIN CODE—–
function customStartup()
{

}
—–END CODE—–

Remember, you need to have sudo privileges to work with these files, so the usual warnings apply about being careful anytime you’re working with that kind of power.

Anybody had any luck with building their own themes, or knows someone who has and is willing to share? Drop a line in the comments to let me know.

loading

Comments have been disabled for this post