Welcome Guest, Not a member yet? Register   Sign In
Pulling View and Contoller out of App folder
#1

[eluser]JCianflone[/eluser]
Hi Everyone,
I am working on a small CI project for a buddy of mine. The problem is that he is slightly stupid and will mess stuff up because he doesn't know wtf he is doing. I was thinking of modifying CI and pulling the controller and view folders OUT of the application folder. Has anyone ever attempted this? I am just wondering if I shouldn't even bother or if it can be done. Also, if you have done this before, are there any pitfalls I should be careful of?

Thanks in advance.
Joe C
#2

[eluser]Dam1an[/eluser]
But would he not just be able to mess it up wherever its stored?
I know you can change the location of the view folder by changing the constuctor in the Loader file (in system/libraries)
The model loading is also done via that class, so it's bound to be in there somewhere

As for changing the controllers location, that would be somewhere in router.php I'd imagine

If you do decide to take this route, be sure to extend the classes with your own so they don't get lost if/when you upgrade
#3

[eluser]JCianflone[/eluser]
@Dam1an thanks for the info, I'll give it a try. As for my friend, yes, he could, but he wouldn't. He could go into the other folders, but he won't. It's kind-of an out-of-sight-out-of-mind thing for him. So if I can encapsulate everything that he doesn't need to be near, I have a 99% chance he won't decide to go into some serious file and blow it out of the water.
#4

[eluser]Dam1an[/eluser]
If you just want to move everything out of the web root in the hope he won't go looking for it, all you need is to modify the 2 paths in index.php, so all you'd have left in the web root is index.php, license.txt, and stuff like images, js and css

if you think he'd get suspicious there's no other PHP in there, you could have a copy of the app in the web root as well, whih he can hack to his heart content, but it will never execute as you'll calling the one a level up Wink




Theme © iAndrew 2016 - Forum software by © MyBB