Welcome Guest, Not a member yet? Register   Sign In
Multiple Applications in CodeIgniter and Expression Engine running together
#1

[eluser]Brian Loomis[/eluser]
We are looking at building an application that utilizes both CI and EE. Essentially, we are trying to open multiple private chat channels on a page, specific to the access levels of each user. Similar to a customer service portal where one representative will have access to multiple chat sessions. Additionally there will be comments added to the chat session for reference. We have concerns about running the comet under the same site as EE as described in the perplexedlabs blog: http://blog.perplexedlabs.com/2009/05/0 … g-polling/

We found these threads, that talk about developing EE/CI applications:

http://expressionengine.com/archived_fo … ad/160256/

http://expressionengine.com/archived_fo … ad/140002/

http://codeigniter.com/wiki/Multiple_Applications/

We want to leverage EE's CMS capabilities to manage content and member groups (and member group access). The CI application will take advantage of long polling (comet) servers using jQuery activation. It will allow pages to be updated automatically based on subscription to service channels running under the comet. The CI app will need to recognize the member group access that is setup in EE and be able to parlay that into the channel access provided by comet - sending and receiving channels (not EE weblogs).

We are looking at a couple of approaches for this project:

1) Developing the CI app as standalone, and we go directly to the database to retrieve member group permissions. Circumventing EE and not utilizing EE tags/templates.

Or

2) Developing the CI as a module or plugin in EE so we utilize the EE tags in the templates to call up the specific service channel.

Or

3) Suggestions? Alternative approaches you have thought about or developed?
#2

[eluser]Eric Barnes[/eluser]
I know EE's module system is kind of lacking but I would try my best to go that route. It can use models, libraries, configs, etc just only one controller.
#3

[eluser]Brian Loomis[/eluser]
It sounds like only having one controller available from a plugin would not work. The work we are doing would have many controllers in the ci side.
#4

[eluser]Phil Sturgeon[/eluser]
The cleanest way (avoiding hacking EE Router) is to make a new application folder that sits next to your EE install. Then in your database.php just include('/path/to/ee/config/database.php');

Otherwise you are heading for a world of hurt. EE has extended the crap out of many of the core CodeIgniter libraries and it's really not a native CI application.
#5

[eluser]Brian Loomis[/eluser]
So in this scenario, how do you utilize EE features like authentication and stuff in the ci application?
#6

[eluser]petrie[/eluser]
[quote author="Brian Loomis" date="1285105887"]So in this scenario, how do you utilize EE features like authentication and stuff in the ci application?[/quote]

I second Brian on this. Phil, how would you move forward from that starting point?

By including your EE database config in your CI application you would be able to connect to your EE database. Beyond that would you be required to write your own queries to access information?

I am looking at a similar setup to the OP and I was hoping to find that EE would provide some sort of API so that I could pull content from DB with relative ease. I am not interested in using the template language.

Is it safe to say that this is not the case?

Thanks.
#7

[eluser]Unknown[/eluser]
[quote author="petrie" date="1290041751"]
I second Brian on this. Phil, how would you move forward from that starting point?
[/quote]

I'm actually working on something right now for a project that does most of what you're talking about... It's basically a really hacked up Codeigniter install that sits next to the expressionengine install, with the expressionengine core 'super object' being instantiated without the router, templating class, and a few other things that would otherwise screw everything up. The result is the ability to get expressionengine sessions in a codeigniter setup, which is really really useful if you want to run some scripts or something without the hassle of making it into a full blown ee module, while still being able to check features about the member. I'm starting to work on being able to use some of the EE modules (namely member) outside of the ee install.

It's a little hackish, but it does work so far and doesn't touch any of the files in the expressionengine system folder, which is my goal. PM me if your interested in taking a look, I'll probably make it available once it's done.




Theme © iAndrew 2016 - Forum software by © MyBB