I have a confession to make: I am an undisciplined programmer at heart. Unless someone or something provides external motivation to do otherwise, I tend to jump in and start coding a project without any formal plans. This approach usually produces code that is difficult to extend or maintain because one discovers requirements of a project only by bumping into the limitations created by what one has already coded. The end result is a continual state of rewrites.
That makes me somewhat of a hypocrite, because I get annoyed with those who do likewise. That has been the case with PHP-Nuke. I've been modifying PHP-Nuke 4.4.1a (www.phpnuke.org) for use as the publishing system for the VarLinux.org site (www.varlinux.org) and for Petreley.org, which is a project I'm doing in my off hours. PHP-Nuke is a Weblog publishing system written in PHP (www.php4.org) with MySQL (www.mysql.com) as the database back end.
To be fair, the programmers of PHP-Nuke might not have been deliberately disorganised with their approach; they simply may have fallen into some common PHP traps. Although it is entirely possible to use PHP to build a modular Web site, the language tends to discourage modularity because PHP code integrates into HTML.
This is what makes PHP simultaneously irresistible and prone to disorganisation. It is irresistible because you can use PHP to crank out MySQL data and turn it into a page of information more easily than just about any other Web programming system. PHP is prone to disorganisation because the HTML opening formatting tags you create inside a PHP function are often completed by other PHP functions. This means that every time you change the opening formatting tags, you have to find every occurrence where the closing tags must match. The most common format tags that get you into trouble are the table, row, and data tags. If you don't handle these tags properly, many of your page elements will be scattered into places you don't want them.
One way to get around this is to create a function for every combination of opening and closing tags. You can see in the current version of PHP-Nuke that the coders tried to implement this in some cases, but it was probably too late to revamp the whole project without starting over, which is what they did. PHP-Nuke 5.0 is on its way, and it is built almost from scratch.
Anyway, these problems were exactly what I encountered when I began modifying PHP-Nuke themes and PHP-Nuke itself for use with VarLinux.org. There are many sample themes for use with PHP-Nuke, and the ones I chose to modify for use with VarLinux.org were fairly sloppy.
Unfortunately, I checked my work using only the KDE Konqueror browser and Mozilla 0.8, and occasionally Opera for Linux. All of these browsers rendered my site beautifully in spite of the fact that the theme code was riddled with errors. It was only when Netscape users reported messy rendering that I began to look for these errors. I found dozens scattered throughout the themes and the PHP-Nuke code itself. (Granted, I probably introduced many of these errors myself while modifying PHP-Nuke for my needs.) Fortunately, the folks who did PHP-Nuke are releasing a new version soon which probably addresses many of the modularity issues I encountered.
In summary, I recommend taking a good long look at PHP-Nuke, both the old and new versions. Feel free to download my modified version from the VarLinux.org Web site, if only to have a good laugh at the work I've done. I'm also planning on looking at a very promising product called LXP (www.linuxports.com) as an alternative.
I recommend having a look, yourself. Another publishing system worth examining is ez-Publish (developer.ez.no). I had trouble with this software and gave up on it, perhaps too quickly. But it appears to be extremely feature-rich and powerful. I've also found it impossible to get started with CMF-1.0 (cmf.zope.org), the content management system for Zope (www.zope.org). But it looks nice. I can't help but wonder what it would be like to use it. Yet another couple to look at are thatware (www.thatware.org) and squishdot for Zope (www.squishdot.org).
Finally, I highly recommend studying many of the PHP-Nuke themes that are available on the PHP-Nuke Web site. I'm not an HTML guru by any means. I can barely grasp the concept of nested tables after messing with the themes for my site. But I learned an awful lot about how to use tables to create certain visual effects simply by trying to reproduce the effects of the existing themes and then correcting all the mistakes I had made in the process.
Indeed, I'd say that working with PHP-Nuke along with the themes that are available make one of the best tutorials on PHP and HTML formatting I've ever seen.