Impending Site Overhaul

I’ve been unhappy with PHP-Nuke (our content management system) for quite some time. Mainly because the guy who built it is kind of a jerk, but it also seems to have some stability and security issues. G.fc is running on PHP-Nuke 5.6. Version 7 is in beta right now, though I haven’t ever upgraded since our initial launch because I have things just how I like them. But a while back I started researching some of the numerous other free CMS engines out there, trying to determine how hard it would be to make a conversion. It seemed to be more trouble than it was worth, so I’ve been stalling.

Then I read Designing With Web Standards, an excellent book by web guru Jeffrey Zeldman, and became inspired to revamp the site’s front-end code to be cleaner and more standards-compliant. Since that was going to be a bit of an undertaking on its own, it seemed to finally be a good time to overhaul the backend as well. So some time in the next few weeks I hope to relaunch G.fc with a new CMS engine and a new look.

PHP-Nuke’s main competition (steadily gaining ground in the nuke-portal community) is PostNuke, which started as a part of the PHP-Nuke project back when it was on SourceForge and eventually branched into its own system when Francisco Burzi went megalomaniacal. From what I’ve seen, PostNuke looks more solid, more flexible, more secure and less bloated than PHP-Nuke, and since they share a common foundation it’s easier to convert over without losing data. PostNuke even comes prepackaged with conversion scripts that will modify an existing PHP-Nuke database, but only older versions.

But, once again I held off, now because of issues with the forums. The G.fc forums are powered by a PHP-Nuke port of phpBB, a forum I really like and it’s fairly well-integrated into Nuke. Until recently, PostNuke lacked an integrated port of this third-party forum engine. But now there’s PNphpBB, so there’s nothing slowing me down except one thing… there’s not yet a handy dandy conversion script to switch from PHP-Nuke+phpBB to a PNphpBB forum. Transferring the database by hand will be somewhat tedious, as I have to rename and copy the tables from one database to another without breaking the site, but at least I’ll only have to do it once.

The PHP-Nuke forum tables follow a different naming convention from the PNphpBB tables: eg; the old ones are named “nuke_table” and the new ones are “nuke_phpbb_table.” It is these tables (about 30 of em) which contain all the user data as well as the forum categories and the text of all the postings. If the page code tries to look up something in a database table that has the wrong name, it won’t be able to find it and the page will break.

I’ve got two databases, we’ll call them dbOld an dbNew. The task is to move the data stored in dbOld into the correct tables in dbNew with the correct new names. It’s pretty straightforward, just repetative and a mistake could be disastrous (that’s what backups are for). The basic steps are:

  1. Get a list of all the forum tables in dbNew, which is easy since they’re all named with the “phpbb” prefix.
  2. Locate the corresponding tables in dbOld, without the phpbb prefix.
  3. One-by-one, rename the tables in dbOld.
  4. Drop the tables from dbNew
  5. Copy the renamed tables (both structure and data) from dbOld to dbNew
  6. Reload the site and cross fingers.

As I write this, I haven’t actually done the table transfer part of it yet so my fingers are not yet uncrossed. I’m comparing the two databases table-by-table to make sure they correspond completely. If “nuke_users” has a field or two that “nuke_phpbb_users” lacks, the page will break. I’ll update this article if I hit a snag and have to change the procedure. If I was a better PHP and SQL programmer I’d be tempted to write my own script to do this and release it to the world, but I can’t. Maybe someone else will in the future (or already has and I just haven’t found it in all my googling).

As for the redesign, that I’m much more confident about. The front-end (the graphics and layout, the stuff you actually see in your browser) is all stored in a template made up of just a few HTML files and a style sheet. When each page is requested from the server, the PHP code executes, connects to the database to pull out the content, and wraps the template around it to display it all neat and pretty. But this current template is old and sloppy, and is actually an extensive modification of one of the theme templates that came with PHP-Nuke in the first place. It uses old-school deprecated tags like <font> and <center> and oodles of nested tables. This makes the actual code a browser has to download much more dense than it really needs to be.

The goal of standards-based design is to separate the visual appearance of a page from the structural meat of the content. The HTML should be lean and simple, built from the top-down in a basic outline format (heading > paragraph > heading). CSS is then used to tell the browser how to format these elements with colors, fonts, background images, etc. All of this styling information is stored in a single file, downloaded once, then held in your browser’s cache. All you have to download from page to page is the content, which is much smaller without all of that extraneous code. The end effect is a faster-loading website which uses less bandwidth.

So, spare time permitting, and if all technical obstacles are overcome, will get a massive upgrade+makeover in the very near future. Hopefully G.fc 2.0 will be more stable, more secure, more accessable, faster-loading, and use up less of our monthly bandwidth quota. Stay tuned…


  1. i believe i conversion script is available for phpnuke 6.9 – postnuke current. I think it’s called jumpship? search the postnuke forums.

    Maybe it would be worthwhile changing that script to work for you? i’m currently trying to get out of this phpnuke mess of a cms to something worthwhile. Please update me with your progress.

  2. Yeah, I had come across the Jumpship script in my hunting. At the time this was originally posted I was running PHPNuke 5.6 and Jumpship wouldn’t have worked. I would have had to upgrade Nuke to 6.9, then convert to Postnuke. That process would have saved all the posts, but the forums wouldn’t get transported, hence my dilemma.

    However, this post is now quite outdated and since then I dumped PHPNuke entirely (including the dead forums) and converted my site to a WordPress-powered blog instead. I only saved a few of the articles from the old site. I posted about this in an update on 4/28/2004.

Comments are closed.