Book Image

Building Websites with PHP-Nuke

Book Image

Building Websites with PHP-Nuke

Overview of this book

PHP-Nuke is a free tool for managing the content of a dynamic website. As one of the most popular applications on the Internet, PHP-Nuke has grown into a complex, powerful tool with an extraordinary range of features, and a loyal community of supporters. Through a web-based interface, users can edit and manage their site without the need for knowledge of web programming. PHP-Nuke is ideal for running a community-driven website, where visitors create accounts, comment and interact with the site, and contribute material in an easily managed fashion. PHP-Nuke has many of the features you would want from a website such as news stories, ratings, comments, discussion forums, and its look can be easily controlled with the use of themes. If you want to create a powerful, fully-featured website in no time, this book is for you. This book will help you explore PHP-Nuke, putting you in the picture of what it offers, and how to go about realizing this. Throughout the book we develop an example site, as you are taken on a detailed tour of the features of PHP-Nuke. You will be introduced to the main components of PHP-Nuke, and learn how to manage them. You will develop the skills and confidence to manage all types of content on the site, and also understand how users work and interact with the site. To make sure that you create a site that looks the way you want it to, the book covers customizing themes to help define your look for your pages. Although PHP-Nuke allows you to accomplish much without doing any web programming, to extend your site you will need to get your hands dirty with some coding. The book leads you through adding custom code to PHP-Nuke, and shows you how PHP-Nuke puts pages together, and the functions it uses for the fundamental operations of the site.
Table of Contents (15 chapters)
Building Websites with PHP-Nuke
Credits
About the Author
Preface
Installing XAMPP

PHP-Nuke as an Open-Source Content Management System


We used the expression 'open-source content management system' earlier in the chapter to describe PHP-Nuke. Let's take a closer a look at this term.

Open Source

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

  • Servingcontent

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.