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

Chapter 1. An 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 chapter, 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 book.

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.

With the possibility of adding so much to the site, you might think it will be difficult to keep track of everything, and make sure that everything is linked. This is also done for you by PHP-Nuke, and it creates navigation menus for the visitor, and displays lists of articles and other information, automatically setting up the links for visitors to move from one place to another.

Of course, PHP-Nuke cannot do everything you imagine, and it has its limitations. For example, PHP-Nuke is very good for adding text content to the site. However, it is not so good (in the default setup) for adding images and other resources to the site; it supports them once they are available, but the management interface does not really help with adding them. To add images and other resources such as Flash movies or banners, you will need to access the web server directly using an FTP client.

However, the power and flexibility PHP-Nuke offers you to manage a complex website would be difficult to achieve without many, many hours of careful programming.