Actions

Difference between revisions of "How to create a stand-alone application using the Joomla! Platform"

From Joomla! Documentation

m
Line 1: Line 1:
{{cookiejar}}
+
'''''[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__) );
 +
:define( 'DS', DIRECTORY_SEPARATOR );
 +
:/* 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...
 +
:/**************************************************/

Revision as of 03:34, 5 July 2008

[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__) );
define( 'DS', DIRECTORY_SEPARATOR );
/* 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...
/**************************************************/