About Sitellite       Screenshots       Downloads       Forge      Documentation       Community       Support

You are here: Home / Building a Shout Box in Sitellite

Building a Shout Box in Sitellite

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.

Step 1: 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

Step 2: Creating Our Database Schema

The database schema for our Shout Box is going to be only one table large. Create a new file in the "install" folder named "install-mysql.sql" and in it add the following SQL:

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)
);

Then, 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.

Page 1: What is a Shout Box?
Page 2: Step 3: Creating Our Shout Box Form
Page 3: Step 4: Displaying the Shout Box
Page 4: Step 5: Adding Your New Shout Box to Your Web Site

Members

Note: You can use your SitelliteForge.com account here and vice versa.

Username

Password

Forgot your password?

Not a member? Click here to register

Sitellite 5 Beta


Copyright © 2008, SIMIAN systems Inc.
All rights reserved. Privacy policy
Some of the icons on this site were created by the Gnome Project.