In this chapter we will look at programming PHP-Nuke. Specifically, this means creating new blocks and modules. Before we get stuck into that, we will have a look at what actually happens inside PHP-Nuke when a page is requested by a browser.
After that, we will create a new block, a better version of the Dinosaur of the Day block we created in Chapter 4. That, if you recall, was a static HTML block, and we had hard-coded the image of the dinosaur and its title into the block. Here we will create a block that takes the image to display and title of the dinosaur from the database. This will introduce us to data access in PHP‑Nuke, a topic that you will use a lot as you begin to code more with PHP-Nuke.
After a quick look at the file and folder structure of a module, we then begin creating a new module for PHP‑Nuke. This module will allow items of content to be submitted for modules that do not support user-submitted content. In this chapter, we will code functionality...