I am writing a function that will import product data from an existing database into the Expression Engine database (and structure). This means creating entries in both the channel titles as data tables.
To do this I would like to use the EE Database and localize classes. The problem is that this script cannot reside inside an expression engine template or module. Is there a way to include these classes outside of the EE structure?
I have tried adapting the code inside the index.php file. At a certain point my browser redirected to the default website page although my htaccess rewrite rules prevent this for existing files and folders.
Is there a bootstrap file to include only what is necessary to use the EE classes?
Thanks in advance, Ivan.
I have tried it but it doesn’t seem to be working. It is including files that no longer exist in EE2:
require(BASEPATH.'core/Compat'.EXT);
...
require(BASEPATH.'core/Base5'.EXT);I retrieved these files from EE 1.6.x
At the end there is
class A extends Controller {
}
$EE = new A;The script stops working after the line where an instance is made of class A.
I also searched for the function _initialize_core. It only exists in the file Core.php inside
system/expressionengine/librariesAnd I have the feeling that this class is not loaded by the bootstrap file.
It seems to me that the bootstrap file is only loading codeigniter classes. Am I wrong or is the ‘core’ parameter in the load_class calls referring to the core folder inside the codeigniter folder?
$CFG =& load_class('Config', 'core');Any ideas?
This is the original post:
Bootstrapping ExpressionEngine to integrate with other scripts
It does mention EE2. I posted a request for some help.
But if anybody else can figure out what is possibly wrong or how to use it, please do!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.