Archive for the 'WordPress' Category

RedAlt Move and Limit Categories

Tuesday, January 24th, 2006

I moved the bulk of Red Alt to the Asymptomatic server last night because I got tired of that unmanaged server going down. The Asymptomatic server is managed, and so should get better attention when things go awry.

This also allows me to house a more permanent subversion repository (if that means anything to you) for all of the PHP development I do around here.

On top of that, it paves the way for a few minor changes at Red Alt, mostly revolving around the navigation and a wiki upgrade. Many of the navigation links there don’t work because I’m usually off doing something else rather than hooking them up. I’m going to go through all of those and make them all work.

Anyway, in case you were thinking about ignoring this news, I have updated one of my plugins for WordPress 2.0: Limit Categories

Limit Categories allows you to set limits on the categories to which users in certain Roles can post. If you create a new Role called “Guest Posters”, you can add new users to that Role, and the users with that Role will only be able to post to the “Guest Posts” category.

This makes it easy to section out your site to different writers by category, bringing your WordPress installation more toward a CMS.

Limit Categories does not limit the categories that logged-in users can view - that’s a different plugin. It might also not work as well with WordPress admin consoles that have been “redesigned”, but you can try it.

You can read more about and download Limit Categories at Red Alt, where you will also find the Role Manager plugin, which will be very useful for creating new Roles.

No More Feeds for WordPress?

Tuesday, January 17th, 2006

Let’s do away with the doom and gloom: In spite of recent context-deprived accounts, WordPress isn’t anywhere near ditching any of its feed formats. But what is all this talk about removing feeds from our favorite blogging tool? Let’s have a rational look…

WordPress currently supports four standard feed formats for syndication: RSS 0.92, RSS 1.0 (aka RDF), RSS 2.0 (aka RSS2), and Atom 0.3. All of these feeds are at least vague implementations of XML, and allow applications (feed aggregators) to gather data about your posts without actually visiting your site. This can be done because these formats are machine-readable - that is, a computer/server can be configured to automatically visit your feed and parse out the data that it provides into usable chunks.

There are certain problems with the feeds that WordPress provides, and whether these really are problems depends on your perspective. But let me tell you what I see from a coder’s point of view, and why you should consider listening to my argument.

Each of the feeds that WordPress provides is supplied by a distinctly separate script. Essentially, the inner workings of WordPress churn on each request and regurgitate a raw spew of data representing the last few posts that you’ve written. Then the script that you’ve requested - be it RSS, RDF, or Atom - figures out how to format that raw data into something that looks like a feed.

At it’s core, the problem is that these files are not easily maintained because they are separate. Why is this?

Every time you want to add functionality, like using a true GUID (Globally Unique ID - An identifier that is unique for each post in a feed), you need to change not just one file, but four.

When WordPress 2.0 was released, the approved/standard method of looping through each post was augmented. As such, all four feeds should have been updated with this new method to ensure that they are up to date. Were they all updated? No.

In fact, it has been a month since the last update to any of the feeds, in which a small glitch with a GUID was updated. (It was updated in other feeds, but not the one that was missed.) Before that, none of the feed scripts had been updated for four months. Surely software that has seen a major revision in that time should have had some review in this area. Maybe it was perfect. I’m not sure, but that seems strange to me.

People have said that RDF and RSS 0.92 are “simply too old”, and maybe that’s not fair. Some formats are being actively developed, but since our little blog software development world doesn’t seem to keep up with those innovations, we don’t see any benefit. Some folks would like to see Atom support upgraded from 0.3 to 1.0, and I am among them. It seems a disservice to WordPress to allow these feed formats to languish in disrepair, whether they are superceded by newer formats or not.

A seemingly separate issue: A suggestion that I agreed with on the wp-hackers mailing list earlier this month was additional support for comment metadata, including transferring comment handling into a centralized API. Currently, if you want to access comment information from inside plugin code, there isn’t an efficient method to get it apart from requesting it directly from the database. As a result, no filters can be applied to that information, and none of the information comes out of any cache, so it’s very difficult to write good, efficient plugins that affect comments.

Likewise, dealing with categories directly is a programmatic problem. Sure, you can do it, but it involves an arcane process that is best not attempted by any but veteran plugin developers. Function accessors to this data would prove an immense improvement for plugin development, if not for general overall efficiency and readability.

Making these changes is a good idea, but would affect large sections of code. It’s not something that would happen overnight. It could not be planned for the upcoming 2.0.1 service release, and I only suggested it as a future enhancement. Nonetheless, feeds may be significantly affected by these changes.

Changes in significant areas of the software such as these would require exponentially significant testing. And as might have been noticed during our pains from the 2.0 release, WordPress could stand to have a bit more thorough testing generally. It doesn’t need the strain of testing on formats that we don’t even have an developer advocate strong enough to volunteer for coding and testing. Not only would someone have to adopt each of the four feed files, but we would need testers to focus on the changes in those areas. I don’t see enough people who care - Maybe you’re out there?

In that vein, the suggestion was proffered that to reduce some of the development load we should retire some of the feed formats that aren’t as well used. That way, we can concentrate on perfecting the feeds that we do offer, improving the architecture in general, and opening up development to others who could supply their own feed formats. Sure, we who agreed this was a good idea were looking at the feeds as a method for a site owner to syndicate his site - not as a way for services to scrape data from your blogs.

One of the main complaints that I’ve heard is that removing RDF would cripple services that rely on the data it provides; that RDF is somehow more data-packed than the other formats available in a base install. I’m not sure how this is possible considering that they all are served the same data, but that’s irrelevant.

WordPress is at its core blogging software. It’s target user is a blogger. Do most bloggers know that they’re publishing their data in feeds that are being scraped by services who would be mad if those feeds were suddenly cut off? I’m not sure what service requires one of the feed formats we’re suggesting for retirement; one that can’t use one of the other formats. And as a blogger, are you really concerned about those services that you didn’t even know existed? I, for one, am unnerved that my data would be used that way, and look forward to turning RDF off on principle.

Besides that, nobody is suggesting that WordPress be restricted from producing RDF or any other of the feed types. It is good design to consolidate the method of producing feeds to reduce the overall code size, but that implies better, more flexible architecture. A new architecture would allow the production of additional even more robust feeds that the current architecture doesn’t support; something that we could do via plugin that we would have a hard time doing now. And certainly, just as with the geographic coordinate funtionality that was removed from WordPress 1.2 for 1.5, a plugin would be available upon release to reinstitute those feeds for those who wanted to keep them.

I’ve heard people say essentially, “It ain’t broke, don’t fix it.” Maybe not, but if we don’t fix it when we update other parts of WordPress, then it surely will break. Let’s fix it right and plan ahead to make it better instead of patching it all up piecemeal.

And as far as bogus theats of the Semantic Web people skipping out on WordPress for omitting a feed format are concerned, I can’t believe that anyone could find as flexible a product for producing the needed feeds as WordPress, even if WordPress had never produced RDF. (Hey, isn’t Semantic Web a pipe dream anyway?)

So where does that leave us? Lesser-used feeds should be retired from WordPress to benefit development of the feeds we keep and the coverage of code that needs testing. Having core code that all works is more important than making sure any pet formats are included.

In the end, we’ve only heard the word of one of the Automattic guys on the issue, and he’s not too enthusiastic about it. I’ve learned that in order to get anything major done in WordPress you need two things: Running code and commit dev support. We “anti-RDF” people have neither so far, but we’re still talking about a solution that works best for everyone. So let’s not all panic.

It sure would be helpful if people who care about these formats would step out and take care of them, though.

New Importers

Friday, January 13th, 2006

We have two new importers in the svn tree: Live Journal and dotclear. These will be in 2.0.1.

2.0.1 in the Works

Friday, January 13th, 2006

We’re fixing bugs in preparation for a 2.0.1 maintenance release. Watch the roadmap for bugfix activity. If you want to make sure your “favorite” 2.0 bug is fixed, join the testers list and download a nightly build.

I didn’t do it.

Tuesday, January 10th, 2006

In the infamous words of Bart Simpson, “I didn’t do it.”

I’m not sure what craziness is going on over at Planet WordPress, but I have done nothing to my WordPress feed since December 31st, except perhaps update the site from Subversion. That shouldn’t really have an effect, though, should it?

Perhaps when Planet WordPress starts using WordPress itself we can count on my spamming of it being reduced. Ahem. (Hey, does FeedWordPress work with 2.0?) If Matt is taking volunteers for fixing up Planet, sign me up. Maybe I’ll hit him up at tomorrow’s IRC meetup. At least then I can stop getting the emails/comments complaining about it and Technorati hits on my name with blog posts featuring nothing but a screenshot of someone’s admin spam! Ack!

In case you wanted real WordPress news, you might note that there are new versions of two of my plugins. I did not announce them yet because I was hoping to get a bit more testing by hapless passers-by before everyone else started using them.

EzStatic - Version 3.0 of EzStatic is a pretty good revamping for WordPress 2.0. It will let you run code from inside WordPress posts, just like the Run-PHP and PHP-Exec plugins. It also lets you embed static files from outside WordPress into your WordPress layout. EzStatic is one of the main reasons I wrote the Role Manager at all.

For example, I wrote a simple Chinese Restaurant Name Generator, which runs in my WP root. But you can use EzStatic to make it appear inside my WordPress template. You just change the URL and it’s there.

It’s the same exact file. Yes, when you post forms it works (with a few understandable exceptions, like when you use the same form field names that WordPress looks for to limit posts, for example). Better than having to write a whole blasted application over as a Page Template, don’t you think? Especially since you’d have to do it for every new theme you published…

Geo - Geo required some tweaking to work with WordPress 2.0, and I’m still not convinced they’re complete, so I didn’t bump the version number all the way up. The new version does support some extra features, like outputting the place name if the selected location is one of the stored locations. There are also functions to retrieve that information. And the Google Maps output URL is improved. Again.

If you have useful additions to the Geo plugin, you should email me.

I have some other updates in store, too, but I’m going to hold off announcing them until they’re better tested. Until then, sorry I flooded your Dashboard. Enjoy the Chinese Restaurant names. Yes, I did write that stupid thing just to show you EzStatic.

SxSW Meetup

Tuesday, January 10th, 2006

A tentative WordPress meetup for SxSW is starting to come together, the date and time may change, so sign up if you’re interested. This is also the first time I’ve used Upcoming and I must say it’s pretty slick.

Irish Blog Awards - Who’s your favourite?

Friday, January 6th, 2006

Ryan alerted me to the fact that Damien Mulley has opened the flood gates for nominations for the Irish Blog Awards!
This blog hasn’t been updated as much as it used to since wordpress.com took off, but take a look at the categories and email Damien if you think I should be nominated!
Guess I have my hands stuck in several of the categories with this blog and my photoblog, In Photos, so please don’t let me stop you nominating me in whatever category you like! :)

painful self-promotion ends!

Newsforge on WP

Thursday, January 5th, 2006

Newsforge thinks WordPress 2.0 is better than ever. Aw shucks. :) There is still a lot of work to do still, nice reviews are great but we’re still working our butts off on the next version.

Role Manager Plugin

Friday, December 30th, 2005

I’ve noticed a strange upshoot in new and updated plugins released around the WordPress 2.0 milestone. That’s probably a good thing.

Something that was conspicuously left out of the WordPress core (yes, it was on purpose) was a way to manage Roles as an administrator. Well, add this Role Manager plugin to the list of new WordPress 2.0 plugins.

Note that this plugin does not really do anything but manage roles. If your blog has no need to maintain Roles (for example, if you’re the only author) then you don’t need this plugin. But if you have plugins that depend on capability levels, or you want to manage groups of user permissions, then this will allow you to do that.

More details about how the plugin works and what you can do with it are available on the documentation site. This includes not just the admin user interface, but also instructions for how your plugin can cleanly add new capabilities to WordPress that the Role Manager will display in its interface.

Many thanks to David House who helped with a substantial bit of coding on this one.

Not installing WordPress 2.0? Why?

Friday, December 30th, 2005

I’ve noticed that a few people aren’t installing WordPress 2.0. Rather, some folks have tried to install it and decided that it wasn’t ready for them yet. Still other people have decided that 2.0 doesn’t offer them anything beyond what they were getting in the 1.5 code beyond an upgrade headache.

I’ve found a few posts online [1, 2, 3, 4] that talk about the problems they’ve had with 2.0 that have caused them to hold off. But rather than dredge up those posts, I figured I would ask directly.

Why aren’t you upgrading?

I would specifically like to hear from folks who have tried to upgrade and then decided against it for some reason or other.

Please… Reasonable objections. I don’t want to get into a fight, I just want to understand why. Perhaps the community can help work out those issues.