Wordpress

Been trying to migrate this site to Wordpress. Thought it would have been a breeze but a whole can of worms has been opened.

Some of the main reasons to move to Wordpress are that Wordpress is opensource, coded in php (which is something I can actually play around with, rather than perl) and supports subcategories. Plus it is also enabled with a centralised built-in search program.

However, in actual implementation, I found out, through the hard way (more on that later) that its concept of subcategories is different from the way I would have had it; its code is messy and not modular enough and lacks the template flexibilities that Movable Type has.

Problem 1: Subcategories

First let me describe my interpretation of subcategories. In my opinion, subcategories should behave in a drill-down navigational way. For example, say I have a photo gallery in my site that is subdivided into different sections: friends;work; school. I would consider the photo gallery as a main category while its sub sections subcategories. You can see that system built into my current website using movable type. However since movable type’s architecture doesn’t allow that, I had to fake the look with multiple blogs.

Initially, I thought that this problem would finally be overcome if I moved to Wordpress. To my disappointment, I found out that while finally pages could now be filed into their subsections, the only method of sorting and indexing the files in a subsection’s parents was still by date. That is, in a main section, I would find all subsection articles lumped together in a sorted-by-date list. That for me is really messy in terms of navigation. Nevertheless, I felt that the lack of subsection capabilities, in the way I wanted it, could be overcome if I created a plugin that would support that function. This however, led to tricker issues.

Problem 2: Programming Nightmare

The version of Wordpress which I am using is biggest problem is the lack of official documentation - understandable since it’s relatively new, being version 1.2. What really is annoying however, is the lack of proper naming conventions of the functions. I can’t tell if, say, a function is supposed to by default, print a result or return a result, just from looking at its name; or if a function is supposed to be used as a backend or frontend method. It would have really helped if comments were written into the code, but as we all know how programmers work: code first; documentation only later if time permits.

Problem 3: Lack of data information in post

Well, eventually, I did manage to create a subcategories plugin that worked. But do to that, I had to bypass “the loop” in Wordpress and create my own version. I did consider using the post data returned from the template page for the plugin. What the plugin would do would be to try extract data from post, re-sort it before passing it through “the loop”. However it turned out that the post data did not contain the necessary category fields that were necessary for the job. Thus I had to create my own database query to retrieve the necessary data in the sorted order that I wanted.

More problems:

With the categories plugin created, I thought I had finally what I needed to get going. However, I found out that I had forgotten to take into consideration a very important detail about Wordpress: every damn article link redirects into one page - index.php. Unlike say Postnuke, or my Squaresoft Mythology website where modules (i.e. individual script files) are loaded into index.php, Wordpress parses postdata into the same page utilising the same loop code. When I was testing my subcategories script, I created separate template files containing my own loop code. I also created alternate versions of index.php that would load tables of content for articles of pre-specified categories. In order for the links to work, I used apache’s mod_rewrite to redirect the links to the correct script files. It was only after I had implemented this that I realised that the search script found in Wordpress had been rendered buggy in template pages controlled by mod_rewrite.

One other issue that I have yet to sort out with Wordpress is the lack of ‘breadcrumbing’. I always like to know where I am at within a website and I feel that a major problem with many blogs is that after one has clicked on a category or permalink, one no longer has idea where one is.

There are several other problems with Wordpress that I discovered. They are, however, just too difficult to try to describe (not to mention I’m just too tired to).

Conclusion:

In the end, the conclusion is that I don’t think that I’ll be moving to Wordpress just yet. I’d probably wait till the project has been stabilised a little more before implementing the change. If however, I can find a better CMS that will give the functionalities without being too bloated, I’d consider moving to that instead. Movable Type will just have to do for now.

Subjects: Websites ウェブサイト

Mood: Raves and Rants

Tags: Movable Type, programming, Wordpress

Comments

In the newest nightly of

In the newest nightly of wordpress, they added the functionality to create permalinks based on the category of the post. This way with mod_rewrite, you can have different categories link to it’s own seperate index.php. you can see it at work on a site that i recently worked on. http://www.bioapplications.gr

It’s in greek but I’m sure you can see the seperation of the News and Articles.

This might make your links work the way you want them now.