Content Management
Using PHP-Nuke
by Peter Lavin
August 30, 2004
Overview
PHP-Nuke is a free web application self-described as a web
portal system but it might more accurately be characterised as a
content management system. This article discusses what a content
management system is and why you might want one, giving examples
of current sites that use PHP-Nuke. After reading this article
you should be able to decide whether PHP-Nuke suits your
needs.
What is PHP-Nuke?
If the average web surfer or even web master for that matter,
was to stumble upon the PHP-Nuke website (s)he would probably
give it no more than a few seconds attention and then move on to
another site. On the home page there is no explanation of what
PHP-Nuke is and no “About” link under the menu
options. Prominently displayed at the top of the page is a link
to the newest version of the software (7.4 at the time of
writing). Follow this link and you are asked to pay ten dollars
for something you know nothing about. At this point the vast
majority of casual surfers would move on to another site. Those
who are a little more persistent might find the following,
all-encompassing and hence somewhat vague description:
“PHP-Nuke is a Web Portal System, storytelling software,
News system, online community or whatever you want to call
it.”
Not an auspicious beginning, especially for software meant to
assist in the development of websites, so let’s clarify
some of the misconceptions that a quick visit to the PHP-Nuke
site might create. Firstly, only the latest version of PHP-Nuke
costs money. Earlier versions are available for free and the only
sacrifice is a modicum of functionality. Even if you do decide
you must have the very latest version you’ll want to test
drive the free one first. More importantly though – just
what is PHP-Nuke? While it certainly can perform all the
functions described in the above quotation it might more properly
be defined as a content management system.
Among other things, a content management system helps keep a
website current by automating the process of updating or changing
a site. Content may be added via an easy-to-use, web-based
interface rather than by creating a new HTML page off line and
then uploading it using FTP. Any casual web surfer may be allowed
to add to the site or additions may be restricted to an
administrator.
This may sound like an ideal solution for any and every
website but you need to consider carefully whether a content
management system suits your needs. This can perhaps best be
determined by looking at some existing sites that use
PHP-Nuke.
Example Sites
The site http://www.flymartonline.com/index.php,
is a specialised site aimed at fly fishermen in the American
mid-west and is an adjunct to an ecommerce site. This is a fairly
typical site in that the menu navigation information is on the
right, current articles are in the centre and log in information
is on the left. You’ll find the PHP-Nuke copyright notice
at the bottom of the page. At this site users can add their own
fishing stories and read those submitted by others.
Self-Healing at http://www.self-healing.org/
shows a highly customised version of the PHP-Nuke application as
used by a non-profit organisation. Registering as a user allows
you to post comments and among other things, customise how the
site appears. Various related products may be purchased
online.
The site, http://www.scriptheaven.net/,
is devoted to scripts related to Internet Relay Chat (IRC). This
site is aimed at a very narrow clientele and retains the basic
look and feel of the original PHP-Nuke site. Scripts related to
IRC many be downloaded and comments added.
Though these sites share a basic tabular layout showing three
columns they have fairly distinctive looks and you might not
suspect that they are customised versions of the same software.
What all these sites have in common is they allow for a high
degree of interaction and serve distinct and specialised online
communities.
Some other PHP-Nuke sites that you might want to investigate
are:
http://www.nukecops.com/
http://www.businessnetworkcafe.com
Having looked at these sites you will be aware of some of the
many features that PHP-Nuke offers. It allows you to add forum
topics, stories, users, messages. You can also add advertising
clients, download files and review submissions. All this is
achieved by using the scripting language, PHP, in combination
with a database.
At this point you probably also want to know a few technical
details. PHP-Nuke was designed for a system running Linux, Apache
web server with PHP and a MySQL database but it will also work on
a Windows platform with a PHP enabled web server, and with a
Postgres or an ODBC database. You will need to have version 4.1.0
or higher of PHP installed on your server. The languages
supported, with the exclusion of Thai and Turkish, are
exclusively European.
Installation
If you’ve read this far you next question might well be
about installing PHP-Nuke. It is a fairly straightforward matter
though, again, a quick look at the website is not encouraging. A
very thorough “How To” is available there but
the level of detail is intimidating. For example, there is an
detailed discussion of how to change file permissions under
Unix/Linux that even includes information about binary
numbers.
Likewise there is an extended discussion of the required
database tables and how to add them using phpMyAdmin. It is not
until you are well into the How To that you realize that
there is a script to automate the creation of the necessary
database.
If fiddling with the database from the MySQL command line does
not make you feel comfortable, you can use one of the web Installers for PHP-Nuke at
http://www.nukeresources.com/downloads-cat92.html
available for your version, in the form of the nukesql.php
script. This file will install all required database tables for a
fresh installation of PHP-Nuke. It works as follows:
Simply enter your database login information in config.php
(see
Section 3.7), upload all PHP-Nuke files (
Section 3.2.2), then upload this file to PHP-Nuke's root
directory and point your browser to it (e.g.
http://yoursite.com/nukesql.php).
While the thoroughness of documentation is admirable, a quick
installation guide helps to get a feel for the application and
see if it is suitable. Users will happily wade through the
details when they’ve decided in favour of PHP-Nuke. For a
quick installation, use the web installer and edit the config.php
file as per Section 3.7 of the How To.
Follow the instructions given in the quotation above and you
can be up and running in no time at all. If you are running a web
server and MySQL on your own computer, install a version locally
and check out the many features especially those available to the
administrator. After becoming familiar with PHP-Nuke the next
step you may want to take is to customise the look of your
website.
Customisation
The basic look of a PHP-Nuke site can be altered by changing
its theme. There are a few different themes available for
download at the PHP-Nuke site but many more on external sites.
Search the PHP-Nuke site and you will find numerous links to
these other sites. Themes can themselves be further customised by
following the instructions in chapter 14 of the How
To.
However, more advanced customisation is not for the faint of
heart. Familiarity, at an intermediate level, with PHP, HTML and
CSS is required and you will need to spend plenty of time
familiarising yourself with the code. It should also be noted
that there are over 90 tables in the database so any changes
contemplated here will have to be well thought out by someone
familiar with relational databases.
Difficulty of customisation is at least in part due to the
fact that PHP is a procedural language. With the recent arrival
of PHP 5 as a full blown object oriented language we can hope
that future versions of PHP-Nuke might be developed using the
object oriented capabilities of the language and in so doing make
it easier to customise.
Consider Carefully
If you have an interactive site that serves a specialised
online community then using a content management system might
well make sense. However this is not a decision you should make
lightly.
Consider whether your needs can be met by using a forum rather
than PHP-Nuke. While PHP-Nuke can be used as a forum the better
choice would be to use software dedicated to this task. There are
a number of open-source discussion boards available. You can see
Build a phpBB Forum for information about the phpBB forum.
If original design is of paramount importance then PHP-Nuke is
not for you. Also, if your technical requirements are fairly
specialised then perhaps you would be better off developing your
own unique solution rather than trying to fit a square peg into a
round hole
If you will need to customise PHP-Nuke extensively make sure
that you have the expertise required. Your webmaster should be
comfortable with all the relevant technologies and should be
prepared to spend a fair bit of time familiarising himself with
the existing code.
When you do set up your PHP-Nuke site make sure that content
changes regularly. Seeing dated material can be a real turn off
and achieve the opposite of your desired effect.
Finally, if you are convinced you want a content management
system but are looking for something a bit different from
PHP-Nuke then check out http://www.hotscripts.com for
links to similar applications.
While PHP-Nuke website could be more user friendly and, as
with other open-source projects there are deficiencies in
documentation, PHP-Nuke is good quality software and you
certainly can’t quibble with the price.
Resources
http://phpnuke.org/ - The
PHP-Nuke site
http://www.nukeresources.com
- Installation scripts for PHP-Nuke
http://www.hotscripts.com
Scripts of all sorts
About the Author
Peter Lavin runs a Web Design/Development firm in Toronto,
Canada. He has been published in a number of magazines and online sites, including UnixReview.com, php|architect and International PHP Magazine. He is a contributor to the recently published O'Reilly book, PHP Hacks and is also the author of Object Oriented PHP, published by No Starch Press.
Please do not reproduce this article in whole or part, in any form, without obtaining written permission.