Nuking The Competition - Doing The Funky Chameleon (
Page 6 of 8 )
While the default
administration interface does allow access to most of the things an
administrator would need, it's not the only option available. The variables you
set through the various control panels correspond to the variables in the
"config.php" configuration file, and to the records in PHP-Nuke's extensive
database. If you're a power user, you should spend some time studying the
configuration file and the database schema to understand how the various tables
are linked together; the information's bound to come in handy if things go
wrong.
It's also sure to come in handy when you decide that the default
PHP-Nuke configuration no longer works for you. As I've already stated, there
are a large number of PHP-Nuke themse available for download - like WinAmp
skins, these themes allow administrators (and registered users) to personalize
the PHP-Nuke system extensively, even to the extent of completely altering
colours, page layout and displayed articles. While the default themes which ship
with PHP-Nuke are fine to start out with, you're going to have to learn to make
your own - especially if you plan to deploy this system on a commercial
basis.
PHP-Nuke themes are relatively easy to build, once you have a
sound understanding of the architecture. Every theme consists of three main
files - "header.php", "theme.php" and "footer.php" - together with required
images.
Each of these files has a specific function in the PHP-Nuke
system. "header.php" sets up the header which appears at the top of every page,
together with the blocks on the left side; "theme.php" sets up the UI for the
articles and news items; and "footer.php" sets up the blocks on the right side,
and a page footer. The order in which the various pre-defined and custom blocks
appear can be controlled as well - each of the blocks is represented by a
function call, as the following snippet from "header.php" demonstrates:
mainblock();
adminblock();
leftblocks();
ephemblock();
headlines();
online();
As you might imagine, if you know HTML, slapping together
your own theme is not very hard at all. However, rather than starting from
scratch, I'd recommend that you take an existing theme file and modify it to
reflect your requirements (at least the first couple of times that you attempt
this exercise). This will help you get to grips with the function of each file,
and also provide some understanding of which parts of the system can be
customized easily, and which ones require more work.
If you'd like to
learn more about building your own themes, I'd recommend that you also take a
look at the excellent tutorial at
http://www.dinerminor.com/ for a detailed,
step-by-step description of the process.
This article copyright Melonfire 2001. All rights
reserved.