Username:
Password:
    Forgot your password?
Member Login

Building a Shout Box in Sitellite

Notes

Chat Loading chat status
  • Please subscribe to chat.
  • Older messages can be viewed in the chat archive.

Subscribe  |  The Lounge  |  Share Lesson

Chapter 2: First Steps

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

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

Chapter 3: Creating Our Shout Box Form »