Load Joomla and Fabrik in a specific php file

davboh

New Member
Hi All, I'd like to know how can I load Joomla and Fabrik insite à php file.
I have initiate this but that thrown an Fabrik Error

PHP:
error_reporting( E_ALL );
ini_set('display_errors', '1');

define('_JEXEC', 1);
define('_API', 1);

define('JPATH_BASE', dirname(dirname(dirname(__FILE__))));
define('COM_FABRIK_FRONTEND', JPATH_BASE . '/components/com_fabrik');

// Include the Joomla framework
require_once ( JPATH_BASE . '/includes/defines.php' );
require_once ( JPATH_BASE . '/includes/framework.php' );

$application = JFactory::getApplication('site');
$application->initialise();

// Include the Fabrik framework
require_once JPATH_LIBRARIES . '/fabrik/include.php';

//load list 32
$listModel = JModelLegacy::getInstance('list', 'FabrikFEModel');
$listModel->setId(32);

Here is the error:
PHP:
0 Call to a member function setId() on bool

What am I doing wrong?

Thanks
 
Last edited:
Hi, I have added this lines

PHP:
require_once JPATH_LIBRARIES . '/fabrik/include.php';
require_once COM_FABRIK_FRONTEND . '/models/fabrik.php';
JLoader::import('list', JPATH_ROOT.'/components/com_fabrik/models');
JLoader::import('form', JPATH_ROOT.'/components/com_fabrik/models');

and now have this error
PHP:
Class 'FabrikWorker' not found
/Applications/MAMP/htdocs/mycerfav398/components/com_fabrik/models/list.php:4072
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top