Your message has been sent.
This article has been saved to your account.
Go to my account
This article has been emailed to your Kindle.
Send this article
This article series by Douglas Paterson, author of Building Websites with PHP-Nuke, begins with an overview of PHP-Nuke; what it is, and what it can do to help you build your own community-driven website. We shall learn all the features and functionality provided by PHP-Nuke by developing an example site, the Dinosaur Portal, as we progress through this series.
In this article series, we will cover:
- An Introduction to PHP-Nuke (see below)
- Installing PHP-Nuke
- Your First Page
- Managing the Site
- Managing Users
- Story Management with PHP-Nuke
- Content Management Modules
- Managing the Discussion Forums
- Customizing Layout with Themes
- Programming PHP-Nuke
This is the first article of the series in which we will cover the introduction to PHP-Nuke.
PHP-Nuke is a free tool to manage the content of dynamic websites. To be more specific, PHP-Nuke is an open-source content management system. In fact, you could say it is 'the' open-source content management system. Since it is vastly popular, a number of other similar systems have sprung from it, and even similar systems based around very different technologies that owe nothing to it in terms of code have added 'Nuke' to their name as homage.
Although the first paragraph conveys something of the history and grandeur of PHP-Nuke, it doesn't answer the basic question of what it can actually do for you.
PHP-Nuke allows you to create a dynamic, community-driven website with minimum effort and programming knowledge. To get the most out of PHP-Nuke, a knowledge of web development will prove to be useful, but even then, PHP-Nuke is written in the PHP scripting language (as can be deduced from the name), which is probably the most popular and straightforward language for creating websites and web applications.
The first PHP-Nuke release in June 2000 was created by a developer named Francisco Burzi to power his site, Linux Preview. Since then, PHP-Nuke has evolved under his guidance to the system it is today.
PHP-Nuke is truly one of the Internet's legendary applications. In this article, we will take our first look at PHP-Nuke, understand what it can do, find out where to go for further resources, and briefly discuss the site we will create in this article series.
What PHP-Nuke Can Do for You
PHP-Nuke is ideal for creating community-driven websites.
The 'community' part of 'community-driven' means that the site is geared towards a particular group of people with similar interests. Maybe this community is concerned with wine making, flowers, programming, zombie films, or even dinosaurs. Maybe the community is actually a group of customers of a particular product. Of course, we are talking about an online community here.
Whatever the community is into, the site can be structured to hold information relevant to the members; maybe it will be news stories about a forthcoming zombie film, links to other zombie sites, reviews, or synopses of other zombie films.
The 'driven' part of 'community-driven' suggests that the information available on this site can be extended or enhanced by the members of the community. Members of the community may be able to shape what is on the site by posting comments, contributing or rating stories, and participating in discussions. After all, communities are made up of people, and people have views and opinions, and often like to express them!
This is exactly what PHP-Nuke enables. More than being just a website, a PHP-Nuke site provides a rich and interactive environment for its visitors.
The best bit is, you don't have to be an expert programmer to achieve all this. With only rudimentary knowledge of HTML, you can engineer a unique-looking PHP-Nuke website.
The Visitor Experience
The standard installation of PHP-Nuke provides many features for its visitors. Some of them are:
- Searchable news articles, organized into topics
- Ability of visitors to create an account on the site, and log in to their own personal area
- Ability of visitors to rate articles, and create discussions about them
- Straw polls and surveys
- Ability of visitors to submit their own stories to be published on the site
- An encyclopedia, in other words, a collection of entries organized alphabetically
- A catalog of web links or downloadable files
- Discussion forums
- Ability of visitors to select their own look for the site from a list of different 'themes'
- RSS syndication of your articles to share your content with other sites
This is not a complete list either. And these are only some of the features that come with the standard installation. PHP-Nuke is a modular system; it can be customized and extended, and there is a huge range of third-party customizations and extensions to be found on the Internet. Any of these can add to the range of features your site provides.
The Management Experience
As a potential 'manager' of a PHP-Nuke site, as you read through the list of features above you may think they sound rather attractive, but you might also wonder how you will handle all of that.
PHP-Nuke provides a web-based management interface. You, as the manager of the site, visit the site and log in with a special super user, or site administrator, account. After this, from the comfort of your web browser, you run the show:
- You can add new information, and edit, delete, or move existing pieces of information.
- You can approve articles submitted by the user to be shown on the site.
- You can decide the features of the site.
- You can control what is displayed on the pages.
- You can control who is able to see what.
What Exactly is PHP-Nuke?
PHP-Nuke is a collection of PHP scripts that run on a web server, connect to a database, and display the retrieved data in a systematic way. In other words, PHP-Nuke is a data-driven PHP web application.
PHP-Nuke can be downloaded for free, and then installed to your local machine for testing and development. The files and the database can be uploaded to a web hosting service, so that your site will be available to anyone on the Internet. There are even web hosting services that offer PHP-Nuke installation at the click of a button.
PHP-Nuke is built around a 'core' set of functions, which perform mundane tasks such as selecting what part of the application the user should be shown, checking who the user is, and what they can do on the site. The thing that makes PHP-Nuke exciting to the world is the set of modules that comes with it. These modules provide the real functionality of the site, and include ones for news and article management, downloads, and forums, among others. The modules can be switched on and off with ease, and other modules can be added to the system.
There is no shortage of third-party modules on the Internet, and you can find a PHP-Nuke module for almost any imaginable purpose.
The look of a PHP-Nuke site is controlled by a theme. This is a collection of images, colors, and other resources, and instructions that determine the layout of the page. A new theme can be selected, and your site will be transformed immediately. Visitors with a user account on the site are able to select their own personal theme.
PHP-Nuke comes with many language files. These contain translations of standard elements on the site interface. The availability of these translations reflects the international nature of the PHP-Nuke community.
PHP-Nuke as an Open-Source Content Management System
We used the expression 'open-source content management system' earlier in the article to describe PHP-Nuke. Let's take a closer a look at this term.
eBook Price: $20.99
Book Price: $29.99
PHP-Nuke is free, and it is also open source. After downloading PHP-Nuke, all the source code of the application is there in front of you. This means, if you are so inclined, you can dig around to see how it works, or check why something is not working as it should. PHP-Nuke is not a perfect application (what is?), and there will always be parts that do not work as they should. Since there are many people using PHP-Nuke on the Internet, the problem is usually spotted and the solution is posted on one of the PHP-Nuke forums.
Another advantage of having the source of the application (the code) available to you is that you can modify (hack!) it, or extend it in whichever way you choose.
PHP-Nuke is released under a license, the GNU General Public License (GPL). The GPL bestows much freedom in the way that you can work with PHP-Nuke, and it also brings along some restrictions. The ins and outs of the GPL are pretty complex, and we aren't even going to attempt an in-depth discussion of the consequences of this. For more information about the GPL visit http://en.wikipedia.org/wiki/GPL.
The GPL should always be respected. The GPL is one of the cornerstones of the Free Software movement, which was set up to promote rights to use, modify, and redistribute computer programs. The GPL offers you almost complete freedom in your use of the software, and means, basically, that PHP-Nuke will not be going away. Even if some future version of it were to become completely commercial, the existing code could be taken and modified to create a new version, also released with a GPL license. This process, known as forking, accounts for a number of the PHP-based content management systems that can be found on the Web today. A number of other established systems, such as XOOPS and PostNuke, began life as 'forks' of PHP-Nuke, and have evolved in their own particular direction.
There are a couple of restrictions with PHP-Nuke, involving copyright messages. For example, the copyright message displayed at the foot of each page should not be removed from your page:
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
If you wish to remove this message (and others like it), you should visit http://php-nuke.org to find out about the commercial license. You should not find these requirements restricting your use of PHP-Nuke.
Content Management System
We have spoken a lot about adding and editing 'information' on a website. A broader term for information here would be 'content'. To summarize our earlier discussions of PHP-Nuke, it allows you to manage the content of your site. In other words, it's a content management system.
According to Wikipedia, a Content Management System (CMS) is a 'system used to organize and facilitate collaborative creation of documents and other content' (http://en.wikipedia.org/ wiki/Content_management_system).
Well, it is difficult to define content management system and avoid the words 'a system for managing content'!
You can think of a content management system as playing three roles:
- Capturing content
- Maintaining and Organizing content
- Serving content
Capturing the content is usually done by users entering data in forms in a web browser. This content is then stored in a database for later retrieval. Serving the content allows the right data to be selected, sorted, and ordered, and then displayed to the visitor in a coherent and consistent way.
PHP-Nuke achieves all of these. Visitors or the site administrator can input content from a range of places on the site. This content can be maintained and organized from the web-based administration interface by the site administrator. When a visitor requests a page from the site, PHP-Nuke will determine which content should be displayed and how it should be ordered. It then handles the output of the content, along with the rest of the page.
Getting Help in the PHP-Nuke Community
PHP-Nuke has a substantial user base. There is a large group of people who run PHP-Nuke sites, develop extensions to PHP-Nuke, and create visual customizations, among other activities. All this leads to a vibrant community that pushes the product forward, helps to address the problems faced by people working with PHP-Nuke, and offers support and encouragement to users.
There are a number of sites dedicated to PHP-Nuke that contain a range of PHP-Nuke resources, such as add-ons, bug fixes and patches, tutorials, and so on. You will also find the option of paid support for PHP-Nuke, and since PHP-Nuke is such a popular and widespread application, it will not be difficult to find a PHP developer who has experience of working with PHP-Nuke.
Each of these sites is well worth a visit to see what they offer:
- http://phpnuke.org: This is the home of PHP-Nuke, run by Francisco Burzi, the creator and maintainer of PHP-Nuke. From here, you can download the latest version of PHP-Nuke. This is also a good place to find news of the latest offerings from the PHP-Nuke community, including new sites running on PHP-Nuke.
- http://www.nukecops.com: There is a particularly large forum here, with many posts on problems encountered by PHP-Nuke users. If you find yourself with a problem, then the Nukecops.com forums are a good bet to find a solution.
- http://www.nukeresources.com: This is the home of the PHP-Nuke patches that we will use when installing PHP-Nuke. There is also an extensive list of downloads here, as well as a number of tutorials.
- http://www.karakas-online.de/EN-Book/: This is the PHP-Nuke HOWTO. This is a massive collection of tips and tricks for working with PHP-Nuke, solving common problems, and useful hacks. This document is also found on a number of other PHP-Nuke websites as the PHP-Nuke HOWTO.
- http://thethemes.cc/: This is a site with dozens of PHP-Nuke themes aimed at gaming sites.
- http://ravenphpscripts.com/: NukeSentinel, a security add-on for PHP-Nuke, can be found here.
Many of the PHP-Nuke sites will have links to other recommended PHP-Nuke sites. In addition to providing valuable resources and information, all these sites will give you a good idea of what it is possible to accomplish on a PHP-Nuke site.
The Dinosaur Portal
We're going to create an example site, the Dinosaur Portal, as we move through the article series. The Dinosaur Portal does not have an extensive list of requirements; we simply want to create a site with features such as a structure for adding dinosaur-related stories and a place for entering information about various dinosaurs. We also want to make sure that the site looks very distinctive, and is fun.
The Dinosaur Portal is based around the premise that 'just because you haven't seen a dinosaur, it doesn't mean they've all died out'. It will be a place where people can explore a range of rather fantastical theories about dinosaurs and their interactions with other life forms.
A web portal is a site that is a gateway to other resources on the Internet (or possibly an intranet). The features of PHP-Nuke are ideal for creating web portals, and the Dinosaur Portal will be a gateway to a whole host of eclectic, dinosaur-based resources.
This article has introduced PHP-Nuke. PHP-Nuke is an open-source content management system; you can also think of it as a free tool for managing the content of websites.
We looked at what PHP-Nuke offers in terms of a visitor experience, and also what this will mean for the person who is in charge of maintaining the site. PHP-Nuke has functionality to make site maintenance easy, and the site can be run from a web-based interface. We found out about the PHP-Nuke community, and where to go for help or further PHP-Nuke resources.
The article concluded with a quick description of the Dinosaur Portal—the site we are going to create in this article series. We are ready to begin on this journey, so the next step is to actually get PHP-Nuke up and running, that is, installation of PHP-Nuke.
If you have read this article you may be interested to view :
eBook Price: $20.99
Book Price: $29.99
About the Author :
Douglas Paterson is a full-time acquisition editor and part-time author for Packt Publishing. He is a doctor of Mathematics and has over five years experience of working on programming books across a number of different subjects. He lives in Birmingham, England, with his wife, and his unusually hairy dog, Zak.