Application Folder outside of /fuel
Is there a reason why my application can't be outside of the /fuel folder? My reason for this is that I would be able to keep FuelCMS out of my git repo and just symlink it in so I can update all my sites in one pull.
Is there one location I can change the paths or do all the files assume the app folder is inside /fuel?
Comments
1. APPPATH in the index.php bootstrap
2. The application/config/constants.php
3. The fuel/modules/fuel/config/fuel_constants.php
And a few other areas I believe. Also, the application folder does have some files in it that fuel may need to update on a pull (e.g. application/libraries/Form_builder.php).
Shouldn't all the client specific code be as separated as possible from the system? Stuff like form builder, I'm almost never going to extend, and if I do, I'd just make a copy from system and place the modified version in my app.
Since Fuel is basically the app on codeigniter and my app is on top of fuel, it's a little confusing to mix fuel and my app and not mix fuel and CI, separating my app.
Don't mean to sound pushy, just trying to plan out my next project that would benefit here.
Thanks again for such amazing support!
From there, it eventually dies at line 334 $this->_set_request($this->uri->segments);
$this exists as an instance of MY_Router, but _set_request is NULL.
Any ideas why this method wouldn't exist? It's like MY_Router isn't inheriting the base class.
Ok, figured it out. The problem was in /app/third_party/MX/Modules.php. You are setting a path relative to the app directory, which, when you move the app out of fuel, breaks. I changed to This var is accessed in /fuel/core/CodeIgniter.php on line 221 and thinks it's in the controller directory. I'm going back to root and then up into the system and modules folder. My site structure looks like: I was going to write up a post on how to do this, but is it worth it to just update github with a version where the application folder is out of the system directory? I've never really understood why Ci mixes the system and app folder in the first place. Maybe there's a reason I'm missing?
You can see this on Github here https://github.com/tw12lve/FUEL-CMS/commit/2a263a7fe5ec1c3d674cf009c3101dae798eb3a3
Step by step guide:
---
1. Move /fuel/application folder to your project root, will look like 2. In /index.php change
line 21 to line 111 to: 3. In /application/config/constants.php
line 39 to: 4. In /fuel/modules/fuel/config/fuel_constants.php
line 4-8 to: You are adding a relative path from your application/controllers folder to the fuel/modules folder. So if your app is below your web root like It would look like define('FUELMODULES_FROM_APPCONTROLLERS', '../../www/fuelcms/modules/');
5. In /application/third_party/MX/Modules.php
line 4-6 to:
Anyway, admin, it'd be enough for me to rename the 'application' folder to the name of my project, it can still be inside of fuel, i don't mind. But why isn't it enough to change the $application_folder variable of the index.php to what i need? I get the same error as above....