Welcome Guest, Not a member yet? Register   Sign In
Build a CI application alongside EE 2 installation
#1

[eluser]Monarobase[/eluser]
Hello,

We have just started converting our customer area to CI and will soon start adapting a new design for our site to EE (v2).

EE v2 being based on codeignitor, what would be the best practice ?

Should I install a seperate installation of CodeIgnitor or could I plug into Expression Engine's CI ?

I haven't found any instructions about the best way to plug into the expression engine's codeignitor. Should I just create a new folder inside the /system/expressionengine/ folder ?

Or maybe would it be best to do a seperate CI installation ?

Thanks Smile !
#2

[eluser]Ben Edmunds[/eluser]
It's all up to you. For the most part if you are building a section of your site that will use CI but isn't in EE I would just create a new application folder named after your app or site and then use EE's CI install.
#3

[eluser]Monarobase[/eluser]
Thankyou, that's what I hoped I could do !
#4

[eluser]Scott Boyde[/eluser]
Have you any instructions on how to do this.
#5

[eluser]Monarobase[/eluser]
This should help Smile

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

[eluser]Scott Boyde[/eluser]
I get most of that but where do you drop it into the EE installation.
#7

[eluser]Monarobase[/eluser]
I haven't tried this yet but this is what I have understood :

1) Get a clean copy of an application folder from the same CI version as uses Expression Engine (I haven't looked yet to make sure if it's the latest version of CI the EE uses or not).

2) Name this folder after your app and place it along side the expressionengine folder.

3) Copy the index.php file from CI to where I want the application to be (I would probably create a directory a put it in it or something similar, and I edit it so it uses the right application folder.

This is all theoretical as I have not tried it yet but if someone else who has done this before could confirm or correct these instructions it would be great !
#8

[eluser]Scott Boyde[/eluser]
What I have done so far is setup EE as my main site

my structure is as follows

www.nifootball.co.uk/
application - CI application
system - CI system
ee_system
index.php - ee2 index
stats.php - CI index

When I access the site I can work with EE2 as normal but to access my football stats parts I need to add stats.php/ to the url. I think I can remove this or use routes but just can't remember what I need to do.
#9

[eluser]Monarobase[/eluser]
Good question !

At the moment www.nifootball.co.uk/ redirects to http://www.nifootball.co.uk/pages/home.html

Which before .htaccess re-link was :

http://www.nifootball.co.uk/index.php/pages/home.html

What you need now is to be able to access :

http://www.nifootball.co.uk/stats.php

Without the .htaccess re-link this would not have been a problem, but my guess (without being sure this is the best way around it, maybe CI provides a cleaner way I'm not aware of) would be to add a condition to your .htaccass file, something like this :

if URL doesn't contain stats.php then do this

You could do this using a RewriteCond before your Expression Engine rewrite rules.
#10

[eluser]Scott Boyde[/eluser]
Do you think you would be ablw to specify when it adds the stats.php so that it only adds it when I use CI controllers.




Theme © iAndrew 2016 - Forum software by © MyBB