My site is hosted on GoDaddy.
I have the called (wrapper) module located in an application folder in the joomla directory.
I find this code interesting:
Code: Select all
dirname('/home/content/XX/XXXXXXX/html/joomla/joomla/')
Below is the code that I include in my module at the beginning:
Code: Select all
<?php
define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
define('JPATH_BASE', dirname('/home/content/XX/XXXXXXX/html/joomla/joomla/'));
echo JPATH_BASE .DS.'includes'.DS . '<br />';
require_once ( JPATH_BASE .DS . 'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS . 'includes'.DS.'framework.php' );
$mainframe = JFactory::getApplication('sitename.com/joomla');
$mainframe->initialise();
$session =& JFactory::getSession();
echo('page_id is:' . $session->get('page_id') . '<br />');
?>