Habari updated

I just updated Habari (this blog software).

It took a little bit of work because there was PHP4-compatible code in a couple of plug-ins: mainly of the sort...

$instance =& new $classname;

My web host has just upgraded to PHP 5.3.1 which absolutely forbids this.

Search and replaced, and it's all fixed!

Permissions in Habari

I wrote previously about trying to hack Habari so that I could restrict certain users' actions. Soon, that will be unnecessary.

I've been playing around with the yet-to-be-released Habari 0.6, and it's pretty good. I used Subversion to grab the "trunk" dev version from the code repository. Of course, that is subject to change, so some of the issues I'll be describing in this post might have been solved.

Administrators can assign users to groups and then grant those groups privileges to do different things. There are a few holes though. For example, to allow any user to change his or her details, one has to give that user access to the "Users" part of the admin. That gives access to create, edit or delete operations. I want my students to only be able to access their own details. Fortunately, there are "hooks" into the administration menu and other APIs to restrict such actions. So I haven't had to "hack" the core code at all. I've created a plugin instead.

Similarly, using the plugin API, I can allow student users to create blog entries and save them as drafts but not publish them. And I'm hoping I can find a way to "lock" them after publishing so that non-administrator authors cannot change them. I think I can do it by adding a proxy method to the Post class and using that in the HTML template to add or not add an "edit" link. Of course, I shall also have to deny access to the actual edit URL.

All in all, it's looking pretty good.

Working with Feedburner

I've been looking for a podacsting platform for work. The plan is to have my students record and edit lectures and tutorials, convert them to mp3s and publish them.

I quite like Habari. If I were writing blogging software from scratch, I'd do things differently, but when I look through the code I can see why they've done the things they've done. It's so much better than the God-awful mess that is Wordpress.

After reading this post, I've installed the plug-in and got myself a Feedburner account. I want to investigate using Feedburner to generate a podcast-aware feed.

One problem I've encountered is that if you use a media player (e.g. Flash) in the markup of a page, Feedburner detects the player but not the file it's playing. So I think I'll have to go the way of Paul Boag, and place a direct link to the MP3 file in the markup for the blog entry. Another link might open a window, or take the user to another page which is not tracked by either Habari's Atom feed or Feedburner.

Habari has different content types. By default, there are "pages" and "entries". Pages are meant to be like static HTML pages, as far as I can tell. So these would be a good candidate for presenting the media player to any users who might like to use it.

 1

About

A vanity publishing venture of David Rodger, sound production teacher and wannabe PHP developer

User