Skip to content
chriscasper edited this page Sep 24, 2011 · 2 revisions

Welcome to the Simple-Engine wiki!

Simple Engine is pretty basic as the title states. Here are some quick installation instructions.

Installation

  1. Download a copy of the app from here.
  2. FTP or move the files to the “home” directory on your server.
  3. That’s pretty much it. Just make sure the htaccess file is in place since it does all of the routing for you.

Setup

Getting a site setup is pretty easy. Just follow through the next steps.

1. First you should be looking at a basic file structure like this.
File Structure

2. Next in the index.php and config.php files are some lines to configure.

index.php

define( 'ENVIRONMENT', 'LOCAL' );

Set the ENVIRONMENT variable to one of the following: LOCAL,DEV, or PRODUCTION

config.php


switch( ENVIRONMENT ){
  case "LOCAL":
  case "DEV":
    error_reporting( E_ALL );
    ini_set( 'display_errors', TRUE );
    ini_set( 'display_startup_errors', TRUE );
    // Always include the trailing slash in URL vars
    define( 'SITE_URL', 'http://localhost/' );
    define( 'SITE_NAME', 'Site Name' );
    define( 'SITE_DESC_DEFAULT', 'A basic install of Simple Engine.' );
    define( 'SITE_KEYWORDS_DEFAULT', 'Simple Engine,stupid simple,open source,robots rock' );
    break;
  case "PRODUCTION":
    error_reporting( E_ERROR );
    ini_set( 'display_errors', FALSE );
    ini_set( 'display_startup_errors', FALSE );
    // Always include the trailing slash in URL vars
    define( 'SITE_URL', 'http://localhost/' );
    define( 'SITE_NAME', 'Site Name' );
    define( 'SITE_DESC_DEFAULT', 'A basic install of Simple Engine.' );
    define( 'SITE_KEYWORDS_DEFAULT', 'Simple Engine,stupid simple,open source,robots rock' );
    break;
}

Set up the different cases for your different environments.

3. After you have the above completed you can begin by creating pages in the content folder. If you create a file called about_us.php, you will be able to go to mysite.com/about_us and it will display the content you want.

Nested URL
Say you want a URL like: mysite.com/about/history/ Just setup the folder structure like this:
Content structure

4. Setting up the general layout
You will also need to modify the following template file for the main layout of your site.
go to layouts > basic > index.php

In here you will find the basic markup for a page layout. You will find css and js include functions int he head of this file.

Past this there really isn’t much to explain. This probably is not for people just getting into web layouts. It’s geared more towards people who are fluent in php and can find their way around.

If you need more help past this, you can always reach me via message on github, or email me directly at: me[at]christophercasper[dot]com

Clone this wiki locally