How to create a stand-alone application using the Joomla! Platform

From Joomla! Documentation

Revision as of 18:39, 6 July 2008 by Ivanicus (Talk | contribs)

[This is based on my experiments, I expect more knowledgeable people to jump in!]

In order to use the Joomla! Framework alone, you would have to follow the following guidelines:

  • Keep this folder/files from a normal Joomla! install:
  • includes/
  • libraries/
  • configuration.php
  • Edit configuration.php to match your server database/username/password/paths/etc.
  • Create the required tables in the database
Note: Normally only the table #__session is needed, but if you want to stay safe, just use the whole structure of a Joomla! install (without the samples!)
  • Create an index.php file in the root with the following starting code:
/* Initialize Joomla framework */
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );
/* Required Files */
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
/* Create the Application */
$mainframe =& JFactory::getApplication('site');
// Your code starts here...