Elefant PHP Content Management System

Meet Sitellite's successor: Elefant CMS

A modern PHP framework and content management system based on the improved features of PHP 5.3+. Elefant is an extremely fast and easy to use CMS that inherits all the best of Sitellite, without the fat. Learn more »


First Steps

A Shout Box, aka Tag Board, aka Chatter Block, is a way to allow your web site users to leave a short message without having to register. I've heard them called a "new age guestbook", which I suppose describes them well enough. They are a simple application to write, making them a good candidate for an article such as this, which is intended mainly to introduce developers to Sitellite as an application development platform.

Please note that I don't go into full detail in some parts of this article, since other articles already cover topics such as writing boxes, the application layout, forms, and the Sitellite API documentation also already covers the functions used throughout this article.

What is a Shout Box?

A Shout Box consists of a list of comments left by visitors, followed by an input form visitors can use to leave new messages, including their name, a URL, and a message. Shout Boxes are compact, usually the perfect size for them to live in the sidebar of a web site.

Creating Our Shout Box Application

The first step to creating a Sitellite-based application is to create its directory structure. Inside the "inc/app" folder of your Sitellite installation, create a new sub-folder named "shoutbox" and inside that, create the following folders:


boxes
Contains most of our PHP scripts
forms
Contains any forms used by our app
html
Contains our user interface templates
install
Contains the installation files for our app, including our database schema
lib
Contains any PHP classes or functions used by our app

Creating Our Database Schema

CREATE TABLE shoutbox (
  id int not null auto_increment primary key,
  name char(48) not null,
  url char(128) not null,
  ip_address char(15) not null,
  posted_on datetime not null,
  message char(255) not null,
  index (posted_on)
);
Now go to the DB Manager in the Sitellite Control Panel (under the Tools pane in the top right of the screen) and enter the above SQL into the SQL Shell of the DB Manager. This will create the database table for us.