Extensão das funções do Joomla para páginas externas

Inclua o código abaixo no topo da página PHP.

//define constant
define
( '_JEXEC', 1 );
define
( 'DS', DIRECTORY_SEPARATOR );


// adjust joomla path according to your joomla installation
define
( 'JPATH_BASE', $_SERVER[ 'DOCUMENT_ROOT' ] . DS . 'joomla' );

//include joomla core files
require_once
( JPATH_BASE . DS . 'includes' . DS . 'defines.php' );
require_once
( JPATH_BASE . DS . 'includes' . DS . 'framework.php' );
require_once
( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'factory.php' );

//create application
$mainframe
=& JFactory::getApplication('site');

//joomla functionality has been included!

//Now we initialize database object
$db
= JFactory::getDBO();

//Importing the Plugin Helper
JLoader::import('joomla.plugin.helper');

// test whether some plugins is enabled
$pluginenabled
= &JPluginHelper::isEnabled('authentication', 'joomla');