We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Using expressionengine libraries in seperate app on same server?

Development and Programming

Mike Bray's avatar
Mike Bray
11 posts
about 15 years ago
Mike Bray's avatar Mike Bray

Hi,

I want to write a small app on a server which I’m using expressionengine which can take advantage of expressionengines libraries. How do I set myself up to do this? I tried…

<?php

ob_start();
    require 'index.php';
ob_end_clean();

$EE =& get_instance();

$EE->load->database('db_name');
$query = $EE->db->get('db_table');
    foreach ($query->result() as $row)
    {
        print $row->surname;
    }

?>

Mostly doing this as a way to learn how to program with EE but I’m completely stuck. Any good reference material on this? I don’t want to create modules etc.

       
JohanD's avatar
JohanD
59 posts
about 15 years ago
JohanD's avatar JohanD

If you need access to the EE instance, or want the application to be part of EE (displayed in the backend or frontend), then you’ll need to create a ExpressionEngine module/extension/plugin, which will go in the system/expressionengine/thridparty/ folder. More info here: http://ellislab.com/expressionengine/user-guide/development/modules.html

Or you can create a separate application using the CodeIgniter library directly. CodeIgniter is the framework ExpressionEngine is built upon, and you can use those files for your application. You can access the same database and files if you want to, but you’ll have your own config files, and won’t have access to the EE instance.

I haven’t done this with EE, but I’ve worked with CodeIgniter before, so I’m guessing that the application folder (from the CodeIgniter zip file) can be added to your site, without the system folder, then change the paths in the index.php file of your application to point to the codeigniter library that expressionengine uses. Can anyone confirm this? More info here http://ellislab.com/codeigniter/user-guide/installation/index.html

       
Mike Bray's avatar
Mike Bray
11 posts
about 15 years ago
Mike Bray's avatar Mike Bray

Thanks for your reply. If anyone has done this I’d love some more feedback. I am going to interacting a lot with the tables generated by EE but really don’t want to go to the hassle of creating a module to do this.

       
JohanD's avatar
JohanD
59 posts
about 15 years ago
JohanD's avatar JohanD

You can use your own framework as well… or if it’s very simple, just use a database abstraction layer… You don’t really have to use the ExpressionEngine or CodeIgniter if you don’t have a lot of experience with it.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.